Commit Graph

1377 Commits

Author SHA1 Message Date
Tom Boucher
feec5a37a2 ci(security): add prompt injection, base64, and secret scanning
Add CI security pipeline to catch prompt injection attacks, base64-obfuscated
payloads, leaked secrets, and .planning/ directory commits in PRs.

This is critical for get-shit-done because the entire codebase is markdown
prompts — a prompt injection in a workflow file IS the attack surface.

New files:
- scripts/prompt-injection-scan.sh: scans for instruction override, role
  manipulation, system boundary injection, DAN/jailbreak, and tool call
  injection patterns in changed files
- scripts/base64-scan.sh: extracts base64 blobs >= 40 chars, decodes them,
  and checks decoded content against injection patterns (skips data URIs
  and binary content)
- scripts/secret-scan.sh: detects AWS keys, OpenAI/Anthropic keys, GitHub
  PATs, Stripe keys, private key headers, and generic credential patterns
- .github/workflows/security-scan.yml: runs all three scans plus a
  .planning/ directory check on every PR
- .base64scanignore / .secretscanignore: per-repo false positive allowlists
- tests/security-scan.test.cjs: 51 tests covering script existence,
  pattern matching, false positive avoidance, and workflow structure

All scripts support --diff (CI), --file, and --dir modes. Cross-platform
(macOS + Linux). SHA-pinned actions. Environment variables used for
github context in run blocks (no direct interpolation).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:23:51 -04:00
Tom Boucher
cb549fef4b Merge pull request #1350 from ITlearning/feat/korean-docs-translation
docs: add complete Korean (ko-KR) documentation — 12 translated files
2026-03-24 07:47:32 -04:00
ITlearning
a300d1bd41 docs(ko-KR): replace stiff -십시오 with natural -세요 throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:47:01 +09:00
ITlearning
9e3fe8599e docs: add complete Korean (ko-KR) documentation — 12 translated files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:42:48 +09:00
Tom Boucher
60fda20885 Merge pull request #1346 from ChaptersOfFloatingLife/fix/codex-config-toplevel-keys
fix: preserve top-level config keys and use absolute agent paths for Codex ≥0.116
2026-03-23 22:26:56 -04:00
Tom Boucher
1a9fc98d41 Merge pull request #1349 from ITlearning/main
docs: add Korean (ko-KR) README translation
2026-03-23 22:26:19 -04:00
Tom Boucher
91349199a5 Merge pull request #1348 from gsd-build/fix/verify-work-checkpoint-rendering
fix: harden verify-work checkpoint rendering (supersedes #1337)
2026-03-23 22:22:11 -04:00
Tom Boucher
e03a9edd44 fix: replace invalid \Z regex anchor and remove redundant pattern
The original PR (#1337) used \Z in a JavaScript regex, which is a
Perl/Python/Ruby anchor — JavaScript interprets it as a literal match
for the character 'Z', silently truncating expected text containing
that letter. Replace with a two-pass approach: try next-key lookahead
first, fall back to greedy match to end-of-string.

Also remove the redundant `to=all:` pattern in sanitizeForDisplay()
since it is a subset of the existing `to=[^:\s]+:` pattern.

Add regression tests proving the Z-truncation bug and verifying
expected blocks at end-of-section parse correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:19:49 -04:00
Tom Boucher
7f1479d370 Merge pull request #1347 from gsd-build/fix/hook-field-validation
fix: validate hook field requirements to prevent silent settings.json rejection
2026-03-23 22:18:29 -04:00
ITlearning
1db5b42df1 docs: change README(ko-KR) translate 2026-03-24 11:16:57 +09:00
Tom Boucher
c2292598c7 fix: validate hook field requirements to prevent silent settings.json rejection
Add validateHookFields() that strips invalid hook entries before they
cause Claude Code's Zod schema to silently discard the entire
settings.json file. Agent hooks require "prompt", command hooks require
"command", and entries without a valid hooks sub-array are removed.

Uses a clean two-pass approach: first validate and build new arrays
(no mutation inside filter predicates), then collect-and-delete empty
event keys (no delete during Object.keys iteration). Result entries
are shallow copies so the original input objects are never mutated.

Includes 24 tests covering passthrough, removal, structural invalidity,
empty cleanup, mutation safety, unknown types, and iteration safety.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:11:54 -04:00
CI
9f8d11d603 fix: preserve top-level config keys and use absolute agent paths for Codex ≥0.116
Two fixes for Codex config.toml compatibility:

1. ensureCodexHooksFeature: insert [features] before the first table header
   instead of prepending it before all content. Prepending traps bare
   top-level keys (model, model_reasoning_effort) under [features], where
   Codex rejects them with "invalid type: string, expected a boolean".

2. generateCodexConfigBlock: use absolute config_file paths when targetDir
   is provided. Codex ≥0.116 requires AbsolutePathBuf and cannot resolve
   relative "agents/..." paths, failing with "AbsolutePathBuf deserialized
   without a base path".

Fixes #1202

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 10:11:31 +08:00
ITlearning
25029dbf81 docs: add Korean README link to main README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:07:43 +09:00
ITlearning
e48979f48a docs: add Korean (ko-KR) README translation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 10:56:00 +09:00
Tom Boucher
763c6cc642 Merge pull request #1345 from gsd-build/fix/windows-shell-robustness-stdin-projectroot
fix: Windows hook stdin, workflow shell robustness, and project_root detection (#1343)
2026-03-23 20:28:31 -04:00
Tom Boucher
58c2b1f502 fix: Windows shell robustness, project_root detection, and hook stdin safety (#1343)
Address 4 root causes of Windows + Claude Code reliability issues:

1. Workflow shell robustness: add || true guards to informational commands
   (ls, grep, find, cat) that return non-zero on "no results", preventing
   workflow step failures under strict execution models. Guard glob loops
   with [ -e "$var" ] || continue to handle empty glob expansion.

2. Hook stdin handling: replace readFileSync('/dev/stdin') with async
   process.stdin + timeout in agent templates (gsd-verifier.md). Existing
   JS hooks already have timeout guards.

3. project_root detection: fix isInsideGitRepo() to check .git at the
   candidate parent level (not just below it), enabling correct detection
   when .git and .planning/ are siblings at the same directory level —
   the common single-repo case from a subdirectory.

4. @file: handoff: add missing @file: handlers to autonomous.md and
   manager.md workflows that call gsd-tools init but lacked the handler
   for large output payloads.

Fixes #1343

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:20:15 -04:00
Tom Boucher
2eb3d2f6d6 Merge pull request #1340 from OtherPaulo/feat/support-documentations-for-brazilians
feat: add Portuguese documentation and update language links
2026-03-23 20:00:24 -04:00
Paulo Rodrigues
7709059f42 feat: add Portuguese documentation and update language links 2026-03-23 15:38:17 -04:00
Tom Boucher
5733700d7d Merge pull request #1338 from gsd-build/fix/worktree-edit-permissions
fix: add permissionMode to worktree agents
2026-03-23 14:26:47 -04:00
Tom Boucher
03a711bef7 fix: update map-codebase test for refactored workflow
The map-codebase workflow was refactored to remove the explicit
"Runtimes with Task tool" line in favor of inline detection instructions.
Updated test to match the new workflow structure by checking the
"NOT available" condition line instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 14:10:07 -04:00
Tom Boucher
a6939f135f fix: add permissionMode: acceptEdits to worktree agents (#1334)
Worktree agents (gsd-executor, gsd-debugger) prompt for edit permissions
on every new directory they touch, even when the user has "accept edits"
enabled. This is caused by Claude Code's directory-scoped permission
model not propagating to worktree paths.

Setting permissionMode: acceptEdits in the agent frontmatter tells Claude
Code to auto-approve file edits for these agents, bypassing the per-
directory prompts. This is safe because these agents are already granted
Write/Edit in their tools list and are spawned in isolated worktrees.

- Add permissionMode: acceptEdits to gsd-executor.md frontmatter
- Add permissionMode: acceptEdits to gsd-debugger.md frontmatter
- Add regression tests verifying worktree agents have the field
- Add test ensuring all isolation="worktree" spawns are covered

Upstream: anthropics/claude-code#29110, anthropics/claude-code#28041

Fixes #1334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 14:05:33 -04:00
3metaJun
aaaa8e96fe Harden verify-work checkpoint rendering 2026-03-23 14:05:33 -04:00
Ikko Ashimine
f43e0237f2 docs: add Japanese documents 2026-03-23 14:05:33 -04:00
monokoo
d908bfd4ad Modify codex command in review.md
Updated the codex command to include 'exec' and skip git repo check.
2026-03-23 14:05:33 -04:00
Tom Boucher
5fc0e5e2ae Merge pull request #1339 from gsd-build/feat/windsurf-support
feat: add Windsurf runtime support
2026-03-23 14:04:29 -04:00
Tom Boucher
8579a30065 feat: add Windsurf runtime support
Adds full Windsurf (by Codeium) runtime integration, following the same
pattern as the existing Cursor support. Windsurf uses .windsurf/ for
local config and ~/.windsurf/ for global config, with skills in
.windsurf/skills/ using the SKILL.md structure.

What:
- CLI flag --windsurf and interactive prompt option (8)
- Directory mapping (.windsurf local, ~/.windsurf global)
- Content converter functions (tool names, path replacements, brand refs)
- Skill copy function (copyCommandsAsWindsurfSkills)
- Agent conversion (convertClaudeAgentToWindsurfAgent)
- Install/uninstall branches
- Banner, help text, and issue template updates
- Windsurf conversion test suite (windsurf-conversion.test.cjs)
- Updated multi-runtime selection tests for 8 runtimes

Closes #1336

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:50:23 -04:00
Tom Boucher
927522afe4 Merge pull request #1329 from eltociear/add-ja-doc
docs: add Japanese documents
2026-03-23 08:35:57 -04:00
Tom Boucher
911f77b311 Merge pull request #1331 from monokoo/monokoo-patch-1
Modify codex command in review.md
2026-03-23 08:33:45 -04:00
monokoo
cd0edb75b3 Modify codex command in review.md
Updated the codex command to include 'exec' and skip git repo check.
2026-03-23 14:15:35 +08:00
Ikko Ashimine
1f1575992b docs: add Japanese documents 2026-03-23 14:09:39 +09:00
Tom Boucher
dab0c47111 Merge pull request #1326 from gsd-build/fix/1325-android-project-detection
fix: expand brownfield detection for Android, Kotlin, Gradle, and more
2026-03-22 14:21:33 -04:00
Tom Boucher
dbc5b2ab87 fix: expand brownfield project detection to cover Android, Kotlin, Gradle, and 15+ additional ecosystems
The code/package detection in cmdInitNewProject only recognized 7 file
extensions and 5 package files, missing Android (Kotlin + Gradle), Flutter
(Dart + pubspec.yaml), C/C++, C#, Ruby, PHP, Scala, and others. This caused
new-project to treat brownfield projects in those ecosystems as greenfield,
skipping the codebase mapping step.

Added 18 code extensions and 11 package/build files to the detection lists.

Fixes #1325

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:19:30 -04:00
Tom Boucher
ae69e6e9e4 Merge pull request #1324 from gsd-build/docs/v1.28-release-notes
docs: v1.28 release documentation
2026-03-22 12:13:59 -04:00
Tom Boucher
7457e33263 docs: v1.28 release documentation update
Add documentation for all new features merged since v1.27:

- Forensics command (/gsd:forensics) — post-mortem workflow investigation
- Milestone Summary (/gsd:milestone-summary) — project summary for onboarding
- Workstream Namespacing (/gsd:workstreams) — parallel milestone work
- Manager Dashboard (/gsd:manager) — interactive phase command center
- Assumptions Discussion Mode (workflow.discuss_mode) — codebase-first context
- UI Phase Auto-Detection — surface /gsd:ui-phase for UI-heavy projects
- Multi-Runtime Installer Selection — select multiple runtimes interactively

Updated files:
- README.md: new commands, config keys, assumptions mode callout
- docs/COMMANDS.md: 4 new command entries with full syntax
- docs/FEATURES.md: 7 new feature entries (#49-#55) with requirements
- docs/CONFIGURATION.md: 3 new workflow config keys
- docs/AGENTS.md: 2 new agents, count 15→18
- docs/USER-GUIDE.md: assumptions mode, forensics, workstreams, non-Claude runtimes
- docs/README.md: updated index with discuss-mode doc link

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 12:13:17 -04:00
Lex Christopherson
cdc464bdb9 docs: update READMEs for v1.28.0 — workstreams, workspaces, forensics, milestone-summary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:06:59 -06:00
Lex Christopherson
277c446215 1.28.0 v1.28.0 2026-03-22 09:44:44 -06:00
Lex Christopherson
c75248c26d docs: update changelog for v1.28.0 2026-03-22 09:44:40 -06:00
Tom Boucher
bb9c190ac8 Merge pull request #1322 from gsd-build/fix/opencode-task-tool-1316
fix: list OpenCode as runtime with Task tool support in map-codebase
2026-03-22 11:29:59 -04:00
Tom Boucher
d86c3a9e35 fix: list OpenCode as runtime with Task tool support in map-codebase
OpenCode has a `task` tool that supports spawning subagents, but
map-codebase workflow incorrectly listed it under "Runtimes WITHOUT
Task tool". This caused the agent to skip parallel mapping and fall
back to sequential mode, wasting tokens when it self-corrected.

Move OpenCode to the "with Task tool" list and clarify that either
`Task` or `task` (case-insensitive) qualifies. Add regression test.

Fixes #1316

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 11:27:59 -04:00
Tom Boucher
59a6b8ce44 Merge pull request #1323 from gsd-build/fix/text-mode-plan-phase-v2
fix: add text_mode support to plan-phase workflow
2026-03-22 11:25:58 -04:00
Tom Boucher
f5bd3dd2e1 fix: resolve Windows 8.3 short path failures in worktree tests
On Windows CI, os.tmpdir() returns 8.3 short paths (C:\Users\RUNNER~1)
while git returns long paths (C:\Users\runneradmin). fs.realpathSync()
doesn't resolve DOS 8.3 names on NTFS — fs.realpathSync.native() does.

Added normalizePath() helper using realpathSync.native with fallback,
applied to all temp dir creation and path comparisons in the linked
worktree test suite.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 11:23:54 -04:00
Tom Boucher
65aed734e9 fix: handle missing config.json in text_mode test
The test tried to fs.readFileSync on config.json which doesn't exist
in createTempProject() fixtures. Now gracefully creates the config
from scratch when the file is missing.

Co-Authored-By: GhadiSaab <GhadiSaab@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 11:21:43 -04:00
Ghadi Saab
a74e6b1e94 fix: add text_mode support to plan-phase workflow
`workflow.text_mode: true` (or `--text` flag) now applies to
plan-phase, not just discuss-phase. Fixes #1313.

Changes:
- `init plan-phase` now exposes `text_mode` from config in its JSON output
- plan-phase workflow parses `--text` flag and resolves TEXT_MODE from
  init JSON or flag, whichever is set
- All four AskUserQuestion call sites (no-context gate, research prompt,
  UI design contract gate, requirements coverage gap) now conditionally
  present as plain-text numbered lists when TEXT_MODE is active
- `--text` added to plan-phase command argument-hint and flags docs
- Tests added for init output and workflow references

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:21:43 -04:00
Tom Boucher
2e895befa7 Merge pull request #1317 from gsd-build/fix/worktree-planning-check
fix: respect .planning/ in linked worktrees
2026-03-22 11:02:11 -04:00
Tom Boucher
d27a524312 Merge pull request #1321 from gsd-build/fix/copilot-skill-count-fragile-assertion
fix: compute copilot skill/agent counts dynamically
2026-03-22 11:01:20 -04:00
Tom Boucher
918032198a fix: normalize Windows 8.3 short paths in worktree test
On Windows CI, fs.realpathSync returns the long path (runneradmin)
while git worktree list returns the 8.3 short path (RUNNER~1).
Apply fs.realpathSync to both sides of the assertion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:58:24 -04:00
Tom Boucher
5eb3c04bce fix: respect .planning/ in linked worktrees before resolving to main repo
resolveWorktreeRoot() unconditionally resolved linked worktrees to the main
repo root. When a linked worktree has its own independent .planning/ directory
(e.g., Conductor workspaces), all GSD commands read/wrote the wrong planning
state. Add an early return that checks for a local .planning/ before falling
through to main repo resolution.

The caller in gsd-tools.cjs already had this guard (added in #1283), but the
function itself should be correct regardless of call site. This is defense-in-
depth for any future callers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:58:24 -04:00
Tom Boucher
c9c7c45abd fix: compute copilot skill/agent counts dynamically from source dirs
The hardcoded EXPECTED_SKILLS and EXPECTED_AGENTS constants broke CI
on every PR that added or removed a command/agent, because the count
drifted from the source directories. Every open PR based on the old
count would fail until manually updated.

Now computed at test time by counting .md files in commands/gsd/ and
agents/ directories — the same source the installer reads from. Adding
a new command automatically updates the expected count.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:58:09 -04:00
Tom Boucher
c2f31306f3 Merge pull request #1320 from gsd-build/fix/workstream-post-merge-cleanup
fix: address post-merge review concerns from #1268
2026-03-22 10:54:33 -04:00
Tom Boucher
a164c73211 fix: update copilot skill count to 57 (new commands from recent merges)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:51:52 -04:00