Commit graph

1979 commits

Author SHA1 Message Date
github-actions[bot]
34ce83889d release: v2.48.0 2026-03-25 22:25:06 +00:00
TÂCHES
b44da0b0d6 Merge pull request #2537 from mastertyko/fix/clear-stale-milestone-id-reservations
fix(gsd): clear stale milestone ID reservations at session start
2026-03-25 16:07:06 -06:00
TÂCHES
9cc993f21c Merge pull request #2547 from gsd-build/copilot/update-gsd-forensics-logs-and-journal
Enhance /gsd forensics with journal and activity log awareness
2026-03-25 16:05:01 -06:00
copilot-swe-agent[bot]
aee8973d81 fix: make journal scanning intelligent — limit parsed files, line-count older ones
scanJournalForForensics() previously called queryJournal() which loaded
ALL journal entries from ALL daily files into memory. For long-running
projects this could be thousands of entries and megabytes of data.

Now:
- Only the last 3 daily files are fully JSON-parsed (event counts, flows)
- Older files are line-counted only (no JSON parsing) for totals
- Recent events use a rolling window of 20 (shift, not accumulate)
- Constants MAX_JOURNAL_RECENT_FILES and MAX_JOURNAL_RECENT_EVENTS
  make limits explicit and tunable

Activity log scanning was already intelligent:
- nativeParseJsonlTail with 10MB byte cap
- Only last 5 files scanned
- extractTrace() distills raw JSONL into compact ExecutionTrace structs
- formatReportForPrompt has 30KB hard cap on total output

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gsd-build/gsd-2/sessions/7e7f71ec-0d56-409b-930e-5dff1305ff2a
2026-03-25 21:53:37 +00:00
TÂCHES
9a16119235 Merge pull request #2535 from mastertyko/fix/preflight-context-draft-completed-milestones
fix(auto): skip CONTEXT-DRAFT warning for completed/parked milestones
2026-03-25 15:47:25 -06:00
TÂCHES
bdbad70625 Merge pull request #2538 from jeremymcs/feat/discuss-queued-milestones
feat(discuss): allow /gsd discuss to target queued milestones
2026-03-25 15:47:01 -06:00
TÂCHES
bcca77781b Merge pull request #2540 from mastertyko/fix/forensics-false-positive-error-traces
fix(forensics): filter benign bash exit-code-1 and user skips from error traces
2026-03-25 15:46:24 -06:00
TÂCHES
9a32ea9c17 Merge pull request #2543 from splichy/fix/provider-scoped-stream-routing
fix(model-registry): scope custom provider stream handlers to prevent clobbering built-ins
2026-03-25 15:44:55 -06:00
TÂCHES
0a789396b2 Merge pull request #2544 from gsd-build/feat/external-tool-execution
fix: revert insertChildBefore and clean up external tool rendering
2026-03-25 15:42:49 -06:00
Vojtěch Šplíchal
d56842ab7a fix(model-registry): scope custom provider stream handlers to prevent clobbering built-in API handlers
When a custom provider (e.g. claude-code-cli) registers a streamSimple
handler with the same api type as a built-in (e.g. 'anthropic-messages'),
the global API provider registry was overwritten, routing ALL models of
that api type through the custom handler.

This caused anthropic/claude-opus-4-6 requests to be dispatched through
the Claude Code SDK subprocess instead of the Anthropic API, resulting
in 'Tool not found' errors for Glob, Read, Edit, Bash (SDK tool names
not present in pi's tool registry).

Fix: wrap the registered handler with a model.provider guard so it only
fires for models from the registering provider, delegating to the
previous handler for all other providers.

Closes #2536
2026-03-25 22:33:48 +01:00
Lex Christopherson
b8b92b8481 revert: remove insertChildBefore usage in chat-controller
The insertChildBefore approach doesn't fix tool ordering because the
message component is already live-streaming text when tool_execution
events arrive. Proper fix requires T3 Code-style session-lifetime
architecture. Revert to simple addChild for now.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:30:49 -06:00
mastertyko
c64d3ba65d fix(forensics): filter benign bash exit-code-1 and user skips from error traces
extractTrace() indiscriminately counts all isError tool results as
errors, including grep/rg/find returning exit code 1 (no matches)
and user-interrupt skips. This produces false-positive error-trace
anomalies in forensics reports — in a healthy 10-unit run, 3 units
were flagged with 8 spurious 'errors'.

Add two filters before pushing to the errors array:
- Bash commands with '(no output)' + exit code 1 (normal POSIX grep)
- 'Skipped due to queued user message' (intentional user interrupt)

Real errors (non-zero exit with actual error output, non-bash tool
failures) are still counted as before.

Closes #2539
2026-03-25 22:13:25 +01:00
Jeremy McSpadden
f21537d725 feat(discuss): allow /gsd discuss to target queued milestones
Closes #2307

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 16:05:06 -05:00
mastertyko
aee09a53ec fix(gsd): clear stale milestone ID reservations at session start
The module-level reservedMilestoneIds Set persists across /gsd
invocations within the same Node process. Each cancelled session
reserves an ID that is never claimed, permanently inflating the
next milestone number. Starting /gsd 3 times without completing
produces M011 instead of M009.

Call clearReservedMilestoneIds() at the top of showSmartEntry()
and showHeadlessMilestoneCreation() so stale reservations from
previous cancelled sessions are discarded before generating new IDs.
The function already existed but was never called outside tests.

Closes #2488
2026-03-25 21:47:18 +01:00
Lex Christopherson
263d725ecd fix: render tool calls above text response for external providers
- Add insertChildBefore() to Box component for positional insertion
- In chat controller, insert tool_execution components before the last
  assistant message component (instead of appending after) when tools
  were executed externally
- Simplify agent-loop externalToolExecution path back to basic
  tool_execution_start/end emission
- Toolcall streaming events are filtered in the Claude Code adapter
  to prevent duplicate rendering via message_update

Result: externally-executed tool calls render above the text response,
matching the expected visual flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:38:39 -06:00
mastertyko
e5330ee082 fix(auto): skip CONTEXT-DRAFT warning for completed/parked milestones
The pre-flight milestone queue check in auto-start warns about every
CONTEXT-DRAFT.md it finds, regardless of milestone status. A completed
milestone with a leftover CONTEXT-DRAFT.md triggers a spurious warning
on every session start — noise with no actionable meaning.

Add a status guard that skips completed and parked milestones before
checking for CONTEXT-DRAFT files. When the DB is unavailable, fall back
to the existing warn-on-all behavior (safe default).

Closes #2473
2026-03-25 21:24:44 +01:00
github-actions[bot]
55c8988900 release: v2.47.0 2026-03-25 19:53:13 +00:00
TÂCHES
91c1547856 Merge pull request #2532 from gsd-build/feat/external-tool-execution
feat(agent-core): external tool execution mode for Claude Code CLI
2026-03-25 13:09:21 -06:00
Lex Christopherson
bbea8460b5 fix(claude-code-cli): render tool calls above text response
- Filter toolcall_start/delta/end events from streaming to prevent
  out-of-order rendering in the TUI's accumulated message content
- Collect tool calls from intermediate SDK turns and include them
  BEFORE text content in the final AssistantMessage
- The agent loop's externalToolExecution path emits proper
  tool_execution_start/end events for each intermediate tool call
- Result: tool activity renders above the text response, not below

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:57:47 -06:00
Lex Christopherson
a0ee03d331 feat(agent-core): add externalToolExecution mode for external providers
Adds `externalToolExecution` flag to AgentLoopConfig. When true, the
agent loop emits tool_execution_start/end events for TUI rendering but
skips local tool dispatch. Used by providers that handle tool execution
internally (e.g., Claude Code CLI via Agent SDK).

The flag is dynamically evaluated per-loop via a callback on
AgentOptions, so model switches mid-session are handled correctly.
Providers with authMode "externalCli" automatically use this mode.

Also updates the Claude Code CLI stream adapter to preserve tool call
blocks in the final message instead of stripping them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:57:47 -06:00
TÂCHES
d524454059 Merge pull request #2530 from gsd-build/fix/pr-risk-map-path
fix(ci): update FILE-SYSTEM-MAP.md path in pr-risk-check
2026-03-25 12:49:08 -06:00
TÂCHES
0ded615826 Merge pull request #2528 from gsd-build/copilot/fix-inherited-repo-check
fix: isInheritedRepo() false negative when parent dir has stale .gsd
2026-03-25 12:48:57 -06:00
Lex Christopherson
15d8974611 fix(ci): update FILE-SYSTEM-MAP.md path after docs→docs-internal move
The Mintlify docs migration renamed docs/ to docs-internal/ but
pr-risk-check.mjs still referenced the old path, causing every
PR Risk Report workflow to fail with an empty body.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:44:43 -06:00
copilot-swe-agent[bot]
cc7a0cd7c4 fix: isInheritedRepo false negative when parent has stale .gsd; defense-in-depth local .git check in bootstrap
Fix 1 (auto-start.ts): Replace nativeIsRepo(base) with existsSync(join(base, ".git"))
so bootstrap always creates .git locally even when parent repo makes git rev-parse succeed.

Fix 2 (repo-identity.ts): Start walk-up loop at dirname(normalizedBase) instead of
normalizedBase — finding .gsd at basePath itself is irrelevant to inheritance detection.

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gsd-build/gsd-2/sessions/99fdcddc-7e44-4a64-a1ec-a536806216f6
2026-03-25 18:42:27 +00:00
TÂCHES
12e48f1e2a Merge pull request #2512 from trek-e/docs/update-v2.45-v2.46
docs: update README and Mintlify docs for v2.45.0 and v2.46.0
2026-03-25 12:39:47 -06:00
TÂCHES
8ac7bebded Merge pull request #2515 from ahwlsqja/fix/reconcile-stale-task-units
fix: reconcile stale task DB status from disk artifacts (#2514)
2026-03-25 12:39:37 -06:00
TÂCHES
9b548ba7f3 Merge pull request #2516 from jeremymcs/fix/packages-test-coverage
ci(test): wire packages/pi-coding-agent tests into CI
2026-03-25 12:38:57 -06:00
copilot-swe-agent[bot]
86e6054833 Initial plan 2026-03-25 18:38:42 +00:00
TÂCHES
92fbe26239 Merge pull request #2523 from gsd-build/feat/claude-code-cli-provider
feat(provider): Claude Code CLI provider via Agent SDK
2026-03-25 12:26:43 -06:00
Lex Christopherson
e8a7881307 fix(claude-code-cli): resolve SDK executable path and update model IDs
- Add pathToClaudeCodeExecutable to SDK query options, resolving the
  system `claude` binary via `which claude`. Without this, the SDK
  looks for a bundled cli.js that doesn't exist when installed as a
  library dependency.
- Remove env option that was replacing the subprocess environment and
  stripping auth credentials, causing "Not logged in" errors.
- Update model IDs to current versions: claude-opus-4-6 (1M ctx),
  claude-sonnet-4-6 (1M ctx), claude-haiku-4-5 (200K ctx).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:22:40 -06:00
TÂCHES
4170c639a4 Merge pull request #2525 from gsd-build/fix/planning-doctrine-demoable-definition
fix: make planning doctrine demoable definition audience-appropriate
2026-03-25 12:21:34 -06:00
copilot-swe-agent[bot]
ce4720bad8 refactor: address review - extract RAPID_ITERATION_THRESHOLD_MS, simplify data access
Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gsd-build/gsd-2/sessions/d648480a-42f4-4c41-81c7-85038609c717
2026-03-25 18:20:29 +00:00
copilot-swe-agent[bot]
1737b169b5 feat: enhance /gsd forensics with journal and activity log awareness
- Add journalSummary to ForensicReport: flow count, event type
  distribution, recent events timeline, date range
- Add activityLogMeta to ForensicReport: file count, total size,
  oldest/newest files
- Add journal-based anomaly detectors: stuck-detected, guard-block,
  rapid-iterations, worktree-failure events
- Update formatReportForPrompt and saveForensicReport to include
  journal timeline and activity log metadata
- Update forensics prompt template with journal format docs,
  investigation guidance for cross-referencing activity+journal
- Update web types (diagnostics-types.ts) and forensics-service.ts
  for new fields
- Add forensics-journal.test.ts with 11 contract tests

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gsd-build/gsd-2/sessions/d648480a-42f4-4c41-81c7-85038609c717
2026-03-25 18:19:08 +00:00
TÂCHES
97e27634d8 Merge pull request #2522 from gsd-build/copilot/fix-bypass-single-writer-api
fix(prompts): migrate remaining 4 prompts to DB-backed tool API
2026-03-25 12:17:19 -06:00
Lex Christopherson
524e9dd258 fix: make planning doctrine demoable definition audience-appropriate
The old "demoable" definition was biased toward GUI/SaaS products —
it explicitly penalized terminal commands and curl as demo surfaces.
For developer tools (CLIs, APIs, frameworks), the terminal IS the
product interface and curl IS a legitimate demo.

Redefines "demoable" as audience-appropriate: the intended user
exercising the capability through its real interface. Adds a carve-out
for infrastructure-as-product slices (protocols, extension APIs,
provider interfaces) to the foundation-only rule.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:17:00 -06:00
copilot-swe-agent[bot]
8a0e1dea00 fix(prompts): migrate remaining 4 prompts to use DB-backed tool API instead of direct write
- research-milestone.md: replace direct write with gsd_summary_save (artifact_type: RESEARCH)
- plan-slice.md: update contradictory footer to reference gsd_plan_slice tool
- run-uat.md: replace direct write with gsd_summary_save (artifact_type: ASSESSMENT)
- complete-slice.md: update footer to reference gsd_complete_slice tool

Closes #2513

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gsd-build/gsd-2/sessions/350eb36b-b2d7-4e1a-bd2f-debd7b9b13a3
2026-03-25 18:08:33 +00:00
Lex Christopherson
c55d409991 feat(provider): add Claude Code CLI provider extension
Implements Phase 1 of the Claude Code subscription-as-provider integration
(issue #2509). Users with a Claude Code subscription (Pro/Max/Team) can
use subsidized inference through GSD's UI via the official Agent SDK.

The extension registers a provider with authMode: "externalCli" that
delegates to the user's locally-installed claude CLI. The SDK runs the
full agentic loop (multi-turn, tool execution) in one streamSimple call.
Tool calls stream in real-time for TUI visibility but are stripped from
the final AssistantMessage so the agent loop ends cleanly without local
tool dispatch.

Zero core changes — pure extension-based implementation.

Closes #2509

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:07:08 -06:00
copilot-swe-agent[bot]
5e934a0949 Initial plan 2026-03-25 18:01:02 +00:00
Lex Christopherson
811680f5b6 fix: make workflow event hash platform-deterministic
The hash included `ts` in the input despite the docstring promising
it was "independent of ts/actor/session". On Windows, millisecond
timer resolution caused two calls within the same tick to get
different timestamps, producing different hashes for identical
cmd+params.

Remove `ts` from the hash input to match documented behavior.
Revert continue-on-error on windows-portability now that the
root cause is fixed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:20:35 -06:00
Jeremy McSpadden
d6bd17298f ci(test): add test:packages script and wire packages/pi-coding-agent tests into CI
The 13 test files in packages/pi-coding-agent/src/core/ were never executed
in CI or by `npm test`. The test:unit glob only covers src/resources/extensions/gsd/tests/
and src/tests/, leaving lifecycle-hooks, model-registry-auth-mode, auth-storage,
and 10 other suites with zero enforcement.

- Add `test:packages` script that runs compiled dist tests after build
- Wire into both the linux build job and windows-portability job in CI
- Fix two env-isolation bugs in auth-storage.test.ts: the "returns undefined"
  and "falls through to fallback resolver" tests were not clearing
  OPENROUTER_API_KEY before calling getApiKey, causing failures when the
  env var is set in the caller's environment
2026-03-25 12:14:17 -05:00
github-actions[bot]
652811212a release: v2.46.1 2026-03-25 17:13:41 +00:00
Lex Christopherson
ab5444fec8 fix(ci): prevent windows-portability from blocking pipeline
continue-on-error allows CI to conclude as success even when
windows-portability fails, unblocking the Pipeline workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:05:22 -06:00
ahwlsqja
0e7a01f49c fix: reconcile stale task DB status from disk artifacts (#2514)
When a session disconnects after the agent writes SUMMARY + VERIFY
files but before postUnitPostVerification updates the DB, tasks
remain 'pending' in the DB despite being complete on disk.

deriveStateFromDb now checks each non-done task for a SUMMARY file
on disk before selecting the active task. If found, it updates the
DB to 'complete' and logs to stderr for observability.

Fixes #2514
2026-03-26 02:01:57 +09:00
Lex Christopherson
5821e3dce9 chore: trigger CI to pick up pipeline race condition fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 10:59:49 -06:00
Lex Christopherson
382c53e592 chore: trigger pipeline with race condition fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 10:57:33 -06:00
Lex Christopherson
c6328a229f fix(ci): prevent pipeline race condition on release push
Serialize pipeline runs with a fixed concurrency group (pipeline-main)
instead of per-SHA groups that allowed parallel races. Pull --rebase
before pushing the release commit so intervening main commits don't
cause non-fast-forward failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 10:47:48 -06:00
Tom Boucher
147a141d4d docs: update README and Mintlify docs for v2.45.0 and v2.46.0
- Replace v2.44.0 "What's New" section with v2.46.0 covering single-writer
  state engine, /gsd rethink, /gsd mcp, offline mode, global KNOWLEDGE.md,
  mobile-responsive web UI, and key fixes
- Update default git.isolation from worktree to none across all docs
- Add /gsd rethink and /gsd mcp to command tables (README + commands.mdx)
- Add offline mode and /gsd mcp to getting-started.mdx
- Add troubleshooting entries for isolation default change and startup checks
- Reference Mintlify documentation site (gsd.build) in README
- Update git-strategy.mdx with reordered isolation modes and migration note
- Update auto-mode.mdx isolation mode listing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:43:08 -04:00
TÂCHES
cebdc77ffd Add $GSD Token badge to README
Added badge for $GSD token on Dexscreener to README.
2026-03-25 10:38:40 -06:00
TÂCHES
b1300160f3 Merge pull request #2511 from gsd-build/fix/ensure-db-open-empty-gsd
fix(gsd): create empty DB for fresh projects with empty .gsd/
2026-03-25 10:34:03 -06:00
Lex Christopherson
ae0029b49f fix(gsd): create empty DB for fresh projects with empty .gsd/ (#2510)
ensureDbOpen() and the auto-start DB lifecycle block both gated DB
creation on the presence of Markdown files (DECISIONS.md, REQUIREMENTS.md,
milestones/). In a brand new project, .gsd/ exists but contains no
Markdown yet, so gsd_decision_save returned db_unavailable and the
agent derailed.

Create an empty DB whenever .gsd/ exists, regardless of Markdown content.
Migration runs only when Markdown files are present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 10:29:53 -06:00