From 38f312143840b825f7ae669a64938a9a429998f2 Mon Sep 17 00:00:00 2001 From: Roman Kiprin Date: Sat, 4 Apr 2026 14:37:27 -0500 Subject: [PATCH 1/7] feat:Support for task= removal --- assets/configs/remove-task.json | 181 +++++++++++++++++++++++++ assets/prompts/M-COPY-AND-TRANSLATE.md | 99 +++++++++++++- 2 files changed, 279 insertions(+), 1 deletion(-) create mode 100644 assets/configs/remove-task.json diff --git a/assets/configs/remove-task.json b/assets/configs/remove-task.json new file mode 100644 index 0000000..7be13cd --- /dev/null +++ b/assets/configs/remove-task.json @@ -0,0 +1,181 @@ +{ + "_description": "Replace task() calls with @subagent_type shorthand syntax for gsd subagent types", + "_source": "Claude Code (get-shit-done-cc)", + "_target": "OpenCode (gsd-opencode)", + "_usage": "node assets/bin/gsd-translate-in-place.js assets/configs/remove-task.json [--apply] [--show-diff]", + "include": [ + "gsd-opencode/commands/gsd/**", + "gsd-opencode/get-shit-done/references/**", + "gsd-opencode/get-shit-done/templates/**", + "gsd-opencode/get-shit-done/workflows/**" + ], + "exclude": [ + "node_modules/**", + "gsd-opencode/node_modules/**", + ".git/**", + ".translate-backups/**", + "assets/**", + "**/*.bak", + "**/*.png", + "**/*.jpg", + "**/*.gif", + "**/*.ico", + "**/*.svg", + "original/**" + ], + "maxFileSize": 10485760, + "rules": [ + { + "_comment": "1a. Multiline task() with variable prompt, model, description (standard 4-line format)", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with variable prompt to @subagent shorthand" + }, + { + "_comment": "1b. Multiline task() with quoted prompt, model, description", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 \"$1\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with quoted prompt to @subagent shorthand" + }, + { + "_comment": "2a. Single-line task() with variable prompt, model, description", + "pattern": "task\\(\\s*prompt=(\\w+)\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*model=\"[^\"]*\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace single-line task() with variable prompt to @subagent shorthand" + }, + { + "_comment": "2b. Single-line task() with quoted prompt, model, description", + "pattern": "task\\(\\s*prompt=\"([^\"]+)\"\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*model=\"[^\"]*\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", + "replacement": "@$2 \"$1\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace single-line task() with quoted prompt to @subagent shorthand" + }, + { + "_comment": "3. task() with triple-quoted prompt: task(prompt=\"\"\"...\"\"\", subagent_type=\"gsd-xxx\", ...)", + "pattern": "task\\(\\s*prompt=\"\"\"([\\s\\S]*?)\"\"\"\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*model=\"[^\"]*\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", + "replacement": "@$2 \"\"\"$1\"\"\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace task() with triple-quoted prompt to @subagent shorthand" + }, + { + "_comment": "4a. Multiline task() with variable prompt, description only (no model)", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() without model to @subagent shorthand" + }, + { + "_comment": "4b. Single-line task() with variable prompt, description only (no model)", + "pattern": "task\\(\\s*prompt=(\\w+)\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace single-line task() without model to @subagent shorthand" + }, + { + "_comment": "5a. Multiline task() with variable prompt, extra args (isolation etc), description, no model", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=([^,\\n]+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n(?:\\s*\\w+=\"?[^\"]*\"?\\s*,?\\s*\\r?\\n)*\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with extra args, no model, to @subagent shorthand" + }, + { + "_comment": "6. task() with subagent_type first and triple-quoted prompt", + "pattern": "task\\(subagent_type=\"(gsd-[^\"]+)\",\\s*prompt=\"\"\"([\\s\\S]*?)\"\"\"\\s*\\)", + "replacement": "@$1 \"\"\"$2\"\"\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace task() with subagent_type first and triple-quoted prompt" + }, + { + "_comment": "7. Multiline task() with expression prompt (containing + operator)", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=([^,]+\\+[^,]+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace task() with expression prompt to @subagent shorthand" + }, + { + "_comment": "8. Multiline task() with variable prompt and trailing comment", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*(?:#[^\\n]*)?\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with comment to @subagent shorthand" + }, + { + "_comment": "9. Multiline task() with variable prompt, trailing comment, model, description", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*(?:#[^\\n]*)?\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 $1", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with comment and model to @subagent shorthand" + }, + { + "_comment": "10. Multiline task() with quoted prompt containing newlines, subagent_type, model (no description)", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+\\n[^\"]*)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 \"$1\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with multiline quoted prompt, no description" + }, + { + "_comment": "11. Multiline task() with quoted prompt containing newlines, subagent_type, model, description", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+\\n[^\"]*)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 \"$1\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with multiline quoted prompt to @subagent shorthand" + }, + { + "_comment": "12. Multiline task() with subagent_type first, model, extra args, description, quoted prompt at end", + "pattern": "task\\(\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n(?:\\s*\\w+=\"?[^\"]*\"?\\s*,\\s*\\r?\\n)*\\s*description=\"[^\"]*\",\\s*\\r?\\n\\s*prompt=\"([^\"]+)\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$1 \"$2\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with subagent_type first, prompt last to @subagent shorthand" + }, + { + "_comment": "13. Multiline task() with subagent_type first, extra args, multiline quoted prompt at end (map-codebase pattern)", + "pattern": "task\\(\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n(?:\\s*\\w+=.+\\s*\\r?\\n)*\\s*description=\"[^\"]*\",\\s*\\r?\\n\\s*prompt=\"([^\"]+)\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$1 \"$2\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace task() subagent_type first with prompt last (map-codebase pattern)" + }, + { + "_comment": "14. Indented task() with subagent_type first, model, isolation, multiline quoted prompt (execute-phase deep indent)", + "pattern": "task\\(\\s*\\r?\\n\\s+subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s+model=\"[^\"]*\",\\s*\\r?\\n\\s+isolation=\"[^\"]*\",\\s*\\r?\\n\\s+prompt=\"([\\s\\S]*?)\"\\s*\\r?\\n\\s+\\)", + "replacement": "@$1 \"$2\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace indented task() with subagent_type first, isolation, prompt last (execute-phase deep indent)" + }, + { + "_comment": "15. Multiline task() with quoted prompt containing newlines, subagent_type, model, extra args, description", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*\\w+=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 \"$1\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with extra arg (isolation) between model and description" + }, + { + "_comment": "16. Multiline task() with expression prompt (multi-line + concatenation), subagent_type, model, description", + "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+)\"\\s*\\+[\\s\\S]+?,\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", + "replacement": "@$2 \"$1\"", + "isRegex": true, + "caseSensitive": true, + "description": "Replace multiline task() with multi-line expression prompt to @subagent shorthand" + } + ] +} diff --git a/assets/prompts/M-COPY-AND-TRANSLATE.md b/assets/prompts/M-COPY-AND-TRANSLATE.md index 4ec09a9..6ff5d37 100644 --- a/assets/prompts/M-COPY-AND-TRANSLATE.md +++ b/assets/prompts/M-COPY-AND-TRANSLATE.md @@ -11,7 +11,8 @@ This project maintains `gsd-opencode/` as an adapted fork of the upstream `origi 1. **Copy** -- pull latest files from the submodule into `gsd-opencode/` 2. **Translate** -- replace Claude Code naming, paths, tools, and commands with OpenCode equivalents 3. **Add Agents Mode** -- inject `mode: subagent` into all agent definition files -4. **Validate** -- ensure zero forbidden strings remain in the translated files +4. **Modify Agent Calls** -- replace `task()` calls with `@subagent_type` shorthand syntax +5. **Validate** -- ensure zero forbidden strings remain in the translated files ### Tools @@ -127,6 +128,96 @@ node assets/bin/gsd-translate-in-place.js assets/configs/add-agent-mode.json --- +## Step 2C: Modify Agent Calls + +Replace `task()` function calls with the OpenCode `@subagent_type` shorthand syntax. The config `assets/configs/remove-task.json` contains regex rules that match the most common `task()` call patterns found in commands, workflows, references, and templates. + +**Scope**: Only files in `gsd-opencode/commands/gsd/`, `gsd-opencode/get-shit-done/references/`, `gsd-opencode/get-shit-done/templates/`, and `gsd-opencode/get-shit-done/workflows/`. + +**What gets replaced** (examples): + +``` +# Before (multiline variable prompt) +task( + prompt=filled_prompt, + subagent_type="gsd-phase-researcher", + model="{researcher_model}", + description="Research Phase {phase}" +) + +# After +@gsd-phase-researcher filled_prompt +``` + +``` +# Before (single-line quoted prompt) +task(prompt="Stack research", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research") + +# After +@gsd-project-researcher "Stack research" +``` + +``` +# Before (triple-quoted prompt) +task( + prompt="""...""", + subagent_type="gsd-planner", + model="{planner_model}", + description="Plan Phase {phase}" +) + +# After +@gsd-planner """...""" +``` + +**What does NOT get replaced**: Prose references to `subagent_type=` inside inline code spans (e.g., `` `subagent_type="gsd-executor"` ``) are left untouched -- they are documentation, not function calls. + +### 2Ca. Preview + +```bash +node assets/bin/gsd-translate-in-place.js assets/configs/remove-task.json --show-diff +``` + +**What to check:** +- Files affected are only within the scoped directories (commands, references, templates, workflows) +- Each diff shows a `task(...)` call replaced with an `@subagent_type ...` shorthand +- No `oc-` or `-oc-` files appear in the output +- Prose references (inside backticks) are NOT modified +- Verify the extracted prompt value is correct for each replacement (no truncated prompts) + +**Common issues to watch for:** +- **Truncated multiline prompts**: Some `task()` calls have massive multi-line prompts (50+ lines). If a replacement looks like it captured only part of the prompt, note it for manual review. +- **Expression prompts**: Prompts using string concatenation (`+`) may only capture the first segment -- verify these replacements look correct. +- **Unmatched calls**: Not every `task()` variant is covered by regex. Complex patterns (deeply indented, extra args in unusual positions) may need manual conversion. + +### 2Cb. Apply + +```bash +node assets/bin/gsd-translate-in-place.js assets/configs/remove-task.json --apply +``` + +### 2Cc. Verify + +```bash +node assets/bin/gsd-translate-in-place.js assets/configs/remove-task.json +``` + +**Expected output**: 0 changes remaining (all matching `task()` calls already replaced). + +### 2Cd. Manual review of unmatched calls + +After apply, search for any remaining `task(` calls with `gsd-` subagent types that were not auto-replaced: + +```bash +grep -rn 'subagent_type="gsd-' gsd-opencode/commands/gsd/ gsd-opencode/get-shit-done/references/ gsd-opencode/get-shit-done/templates/ gsd-opencode/get-shit-done/workflows/ || echo "No remaining task() calls" +``` + +If results are found: +- Check if each is a prose reference (inside backticks or plain text) -- these are correct to leave as-is +- If any are actual `task()` calls that the regex missed, convert them manually following the pattern: `@subagent_type prompt_value` + +--- + ## Step 3: Translate -- Supplemental Rules (If Needed) ### 3a. Preview translations @@ -263,6 +354,12 @@ When the workflow completes (forbidden strings check passes), produce this repor - Files with mode added: N - Files skipped (already had mode): N +### Step 2C: Modify Agent Calls +- Config used: assets/configs/remove-task.json +- Files modified: N +- Total task() calls replaced: N +- Manual conversions needed: N (list files if any) + ### Step 4: Validate - Forbidden strings check: PASSED - Iterations required: N From 17a7ed4c82f62e4f1d0b61c986f59f58081fd529 Mon Sep 17 00:00:00 2001 From: Roman Kiprin Date: Sat, 4 Apr 2026 16:01:25 -0500 Subject: [PATCH 2/7] sync: upgrade upstream GSD from v1.30.0 to v1.32.0 - Copy 254 files from submodule (23 new + 231 diverged overwritten) - Add mode: subagent to 21 agent files - Replace task() calls with @subagent syntax (52 auto + 28 manual) - Apply 4351 supplemental rule translations across 244 files - Fix all forbidden string violations (task(), gsd:, etc.) - Update antipatterns.toml for new v1.32.0 patterns --- .bg-shell/manifest.json | 1 + assets/antipatterns.toml | 3 +- assets/configs/remove-task.json | 38 +- gsd-opencode/agents/gsd-advisor-researcher.md | 2 +- .../agents/gsd-assumptions-analyzer.md | 2 +- gsd-opencode/agents/gsd-debugger.md | 1 - gsd-opencode/agents/gsd-doc-verifier.md | 207 ++ gsd-opencode/agents/gsd-doc-writer.md | 608 ++++++ gsd-opencode/agents/gsd-executor.md | 23 +- gsd-opencode/agents/gsd-phase-researcher.md | 41 + gsd-opencode/agents/gsd-plan-checker.md | 90 +- gsd-opencode/agents/gsd-planner.md | 317 ++- gsd-opencode/agents/gsd-security-auditor.md | 129 ++ gsd-opencode/agents/gsd-ui-auditor.md | 40 + gsd-opencode/agents/gsd-user-profiler.md | 4 +- gsd-opencode/agents/gsd-verifier.md | 102 +- gsd-opencode/commands/gsd/gsd-add-backlog.md | 2 +- .../commands/gsd/gsd-analyze-dependencies.md | 34 + gsd-opencode/commands/gsd/gsd-autonomous.md | 8 +- gsd-opencode/commands/gsd/gsd-cleanup.md | 5 + gsd-opencode/commands/gsd/gsd-debug.md | 45 +- .../commands/gsd/gsd-discuss-phase.md | 9 +- gsd-opencode/commands/gsd/gsd-docs-update.md | 48 + .../commands/gsd/gsd-execute-phase.md | 4 + gsd-opencode/commands/gsd/gsd-help.md | 2 + gsd-opencode/commands/gsd/gsd-join-discord.md | 1 + gsd-opencode/commands/gsd/gsd-manager.md | 1 + gsd-opencode/commands/gsd/gsd-new-project.md | 4 + gsd-opencode/commands/gsd/gsd-plan-phase.md | 5 + gsd-opencode/commands/gsd/gsd-quick.md | 8 +- .../commands/gsd/gsd-reapply-patches.md | 210 +- .../commands/gsd/gsd-research-phase.md | 14 +- .../commands/gsd/gsd-review-backlog.md | 1 + gsd-opencode/commands/gsd/gsd-review.md | 5 +- gsd-opencode/commands/gsd/gsd-secure-phase.md | 35 + gsd-opencode/commands/gsd/gsd-thread.md | 2 +- gsd-opencode/commands/gsd/gsd-workstreams.md | 13 +- gsd-opencode/docs/ARCHITECTURE.md | 14 +- gsd-opencode/docs/COMMANDS.md | 23 +- gsd-opencode/docs/CONFIGURATION.md | 28 +- gsd-opencode/docs/FEATURES.md | 299 ++- gsd-opencode/docs/USER-GUIDE.md | 1704 ++++++++--------- gsd-opencode/docs/ja-JP/ARCHITECTURE.md | 13 +- gsd-opencode/docs/ja-JP/COMMANDS.md | 3 +- gsd-opencode/docs/ja-JP/CONFIGURATION.md | 4 +- gsd-opencode/docs/ja-JP/FEATURES.md | 22 +- gsd-opencode/docs/ja-JP/USER-GUIDE.md | 8 +- gsd-opencode/docs/ko-KR/ARCHITECTURE.md | 13 +- gsd-opencode/docs/ko-KR/COMMANDS.md | 3 +- gsd-opencode/docs/ko-KR/CONFIGURATION.md | 4 +- gsd-opencode/docs/ko-KR/FEATURES.md | 22 +- gsd-opencode/docs/ko-KR/USER-GUIDE.md | 8 +- gsd-opencode/docs/manual-update.md | 62 + gsd-opencode/docs/pt-BR/USER-GUIDE.md | 2 +- gsd-opencode/docs/zh-CN/README.md | 37 +- .../references/model-profile-resolution.md | 8 +- gsd-opencode/get-shit-done/bin/gsd-tools.cjs | 50 +- .../get-shit-done/bin/lib/commands.cjs | 82 +- gsd-opencode/get-shit-done/bin/lib/config.cjs | 10 +- gsd-opencode/get-shit-done/bin/lib/core.cjs | 372 +++- gsd-opencode/get-shit-done/bin/lib/docs.cjs | 267 +++ .../get-shit-done/bin/lib/frontmatter.cjs | 13 + gsd-opencode/get-shit-done/bin/lib/init.cjs | 90 +- .../get-shit-done/bin/lib/milestone.cjs | 21 + .../get-shit-done/bin/lib/model-profiles.cjs | 2 + gsd-opencode/get-shit-done/bin/lib/phase.cjs | 421 ++-- .../get-shit-done/bin/lib/profile-output.cjs | 98 +- .../get-shit-done/bin/lib/roadmap.cjs | 250 +-- .../get-shit-done/bin/lib/schema-detect.cjs | 238 +++ .../get-shit-done/bin/lib/security.cjs | 8 +- gsd-opencode/get-shit-done/bin/lib/state.cjs | 410 +++- gsd-opencode/get-shit-done/bin/lib/verify.cjs | 146 +- .../get-shit-done/bin/lib/workstream.cjs | 8 +- .../references/artifact-types.md | 113 ++ .../references/continuation-format.md | 30 +- .../references/model-profile-resolution.md | 6 +- .../references/model-profiles.md | 4 +- .../references/planner-gap-closure.md | 62 + .../references/planner-reviews.md | 39 + .../references/planner-revision.md | 87 + .../references/planning-config.md | 15 + .../get-shit-done/references/ui-brand.md | 4 +- .../references/workstream-flag.md | 59 +- .../get-shit-done/templates/SECURITY.md | 61 + .../get-shit-done/templates/VALIDATION.md | 6 +- .../get-shit-done/templates/claude-md.md | 31 +- .../get-shit-done/templates/config.json | 4 + .../templates/debug-subagent-prompt.md | 8 +- .../templates/planner-subagent-prompt.md | 12 +- .../get-shit-done/workflows/add-phase.md | 4 +- .../get-shit-done/workflows/add-todo.md | 2 +- .../workflows/analyze-dependencies.md | 96 + .../workflows/audit-milestone.md | 20 +- .../get-shit-done/workflows/autonomous.md | 171 +- .../get-shit-done/workflows/check-todos.md | 4 +- .../workflows/complete-milestone.md | 17 +- .../workflows/diagnose-issues.md | 14 +- .../workflows/discovery-phase.md | 2 +- .../workflows/discuss-phase-assumptions.md | 32 +- .../workflows/discuss-phase-power.md | 291 +++ .../get-shit-done/workflows/discuss-phase.md | 167 +- .../get-shit-done/workflows/docs-update.md | 1093 +++++++++++ .../get-shit-done/workflows/execute-phase.md | 433 ++++- .../get-shit-done/workflows/execute-plan.md | 2 +- gsd-opencode/get-shit-done/workflows/help.md | 15 +- .../get-shit-done/workflows/insert-phase.md | 4 +- .../get-shit-done/workflows/manager.md | 69 +- .../get-shit-done/workflows/map-codebase.md | 42 +- .../get-shit-done/workflows/new-milestone.md | 22 +- .../get-shit-done/workflows/new-project.md | 73 +- gsd-opencode/get-shit-done/workflows/next.md | 2 +- gsd-opencode/get-shit-done/workflows/note.md | 2 +- .../get-shit-done/workflows/pause-work.md | 83 +- .../workflows/plan-milestone-gaps.md | 4 +- .../get-shit-done/workflows/plan-phase.md | 213 ++- .../get-shit-done/workflows/progress.md | 40 +- gsd-opencode/get-shit-done/workflows/quick.md | 188 +- .../get-shit-done/workflows/research-phase.md | 8 +- .../get-shit-done/workflows/resume-project.md | 8 +- .../get-shit-done/workflows/review.md | 35 +- .../get-shit-done/workflows/secure-phase.md | 154 ++ .../get-shit-done/workflows/settings.md | 17 +- gsd-opencode/get-shit-done/workflows/ship.md | 17 +- .../get-shit-done/workflows/transition.md | 12 +- .../get-shit-done/workflows/ui-phase.md | 18 +- .../get-shit-done/workflows/ui-review.md | 32 +- .../get-shit-done/workflows/update.md | 181 +- .../get-shit-done/workflows/validate-phase.md | 12 +- .../get-shit-done/workflows/verify-phase.md | 133 +- .../get-shit-done/workflows/verify-work.md | 90 +- original/get-shit-done | 2 +- 131 files changed, 8944 insertions(+), 2248 deletions(-) create mode 100644 .bg-shell/manifest.json create mode 100644 gsd-opencode/agents/gsd-doc-verifier.md create mode 100644 gsd-opencode/agents/gsd-doc-writer.md create mode 100644 gsd-opencode/agents/gsd-security-auditor.md create mode 100644 gsd-opencode/commands/gsd/gsd-analyze-dependencies.md create mode 100644 gsd-opencode/commands/gsd/gsd-docs-update.md create mode 100644 gsd-opencode/commands/gsd/gsd-secure-phase.md create mode 100644 gsd-opencode/docs/manual-update.md create mode 100644 gsd-opencode/get-shit-done/bin/lib/docs.cjs create mode 100644 gsd-opencode/get-shit-done/bin/lib/schema-detect.cjs create mode 100644 gsd-opencode/get-shit-done/references/artifact-types.md create mode 100644 gsd-opencode/get-shit-done/references/planner-gap-closure.md create mode 100644 gsd-opencode/get-shit-done/references/planner-reviews.md create mode 100644 gsd-opencode/get-shit-done/references/planner-revision.md create mode 100644 gsd-opencode/get-shit-done/templates/SECURITY.md create mode 100644 gsd-opencode/get-shit-done/workflows/analyze-dependencies.md create mode 100644 gsd-opencode/get-shit-done/workflows/discuss-phase-power.md create mode 100644 gsd-opencode/get-shit-done/workflows/docs-update.md create mode 100644 gsd-opencode/get-shit-done/workflows/secure-phase.md diff --git a/.bg-shell/manifest.json b/.bg-shell/manifest.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/.bg-shell/manifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/assets/antipatterns.toml b/assets/antipatterns.toml index 7977e53..9cdbf0c 100644 --- a/assets/antipatterns.toml +++ b/assets/antipatterns.toml @@ -33,5 +33,6 @@ forbidden_strings = [ "websearch, webfetch, mcp__context7__*", "workflows/set-profile.md", "quality/balanced/budget", - "gsd:" + 'gsd:update\\|GSD update\\|gsd-install', + 'task(' ] diff --git a/assets/configs/remove-task.json b/assets/configs/remove-task.json index 7be13cd..313199b 100644 --- a/assets/configs/remove-task.json +++ b/assets/configs/remove-task.json @@ -30,7 +30,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with variable prompt to @subagent shorthand" }, { @@ -38,7 +38,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 \"$1\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with quoted prompt to @subagent shorthand" }, { @@ -46,7 +46,7 @@ "pattern": "task\\(\\s*prompt=(\\w+)\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*model=\"[^\"]*\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace single-line task() with variable prompt to @subagent shorthand" }, { @@ -54,7 +54,7 @@ "pattern": "task\\(\\s*prompt=\"([^\"]+)\"\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*model=\"[^\"]*\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", "replacement": "@$2 \"$1\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace single-line task() with quoted prompt to @subagent shorthand" }, { @@ -62,7 +62,7 @@ "pattern": "task\\(\\s*prompt=\"\"\"([\\s\\S]*?)\"\"\"\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*model=\"[^\"]*\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", "replacement": "@$2 \"\"\"$1\"\"\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace task() with triple-quoted prompt to @subagent shorthand" }, { @@ -70,7 +70,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() without model to @subagent shorthand" }, { @@ -78,7 +78,7 @@ "pattern": "task\\(\\s*prompt=(\\w+)\\s*,\\s*subagent_type=\"(gsd-[^\"]+)\"\\s*,\\s*description=\"[^\"]*\"\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace single-line task() without model to @subagent shorthand" }, { @@ -86,7 +86,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=([^,\\n]+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n(?:\\s*\\w+=\"?[^\"]*\"?\\s*,?\\s*\\r?\\n)*\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with extra args, no model, to @subagent shorthand" }, { @@ -94,7 +94,7 @@ "pattern": "task\\(subagent_type=\"(gsd-[^\"]+)\",\\s*prompt=\"\"\"([\\s\\S]*?)\"\"\"\\s*\\)", "replacement": "@$1 \"\"\"$2\"\"\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace task() with subagent_type first and triple-quoted prompt" }, { @@ -102,7 +102,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=([^,]+\\+[^,]+),\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace task() with expression prompt to @subagent shorthand" }, { @@ -110,7 +110,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*(?:#[^\\n]*)?\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with comment to @subagent shorthand" }, { @@ -118,7 +118,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=(\\w+),\\s*(?:#[^\\n]*)?\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 $1", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with comment and model to @subagent shorthand" }, { @@ -126,7 +126,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+\\n[^\"]*)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 \"$1\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with multiline quoted prompt, no description" }, { @@ -134,7 +134,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+\\n[^\"]*)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 \"$1\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with multiline quoted prompt to @subagent shorthand" }, { @@ -142,7 +142,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n(?:\\s*\\w+=\"?[^\"]*\"?\\s*,\\s*\\r?\\n)*\\s*description=\"[^\"]*\",\\s*\\r?\\n\\s*prompt=\"([^\"]+)\"\\s*\\r?\\n\\s*\\)", "replacement": "@$1 \"$2\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with subagent_type first, prompt last to @subagent shorthand" }, { @@ -150,7 +150,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n(?:\\s*\\w+=.+\\s*\\r?\\n)*\\s*description=\"[^\"]*\",\\s*\\r?\\n\\s*prompt=\"([^\"]+)\"\\s*\\r?\\n\\s*\\)", "replacement": "@$1 \"$2\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace task() subagent_type first with prompt last (map-codebase pattern)" }, { @@ -158,7 +158,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s+subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s+model=\"[^\"]*\",\\s*\\r?\\n\\s+isolation=\"[^\"]*\",\\s*\\r?\\n\\s+prompt=\"([\\s\\S]*?)\"\\s*\\r?\\n\\s+\\)", "replacement": "@$1 \"$2\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace indented task() with subagent_type first, isolation, prompt last (execute-phase deep indent)" }, { @@ -166,7 +166,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+)\",\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*\\w+=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 \"$1\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with extra arg (isolation) between model and description" }, { @@ -174,7 +174,7 @@ "pattern": "task\\(\\s*\\r?\\n\\s*prompt=\"([^\"]+)\"\\s*\\+[\\s\\S]+?,\\s*\\r?\\n\\s*subagent_type=\"(gsd-[^\"]+)\",\\s*\\r?\\n\\s*model=\"[^\"]*\",\\s*\\r?\\n\\s*description=\"[^\"]*\"\\s*\\r?\\n\\s*\\)", "replacement": "@$2 \"$1\"", "isRegex": true, - "caseSensitive": true, + "caseSensitive": false, "description": "Replace multiline task() with multi-line expression prompt to @subagent shorthand" } ] diff --git a/gsd-opencode/agents/gsd-advisor-researcher.md b/gsd-opencode/agents/gsd-advisor-researcher.md index bd42c63..9d5d55b 100644 --- a/gsd-opencode/agents/gsd-advisor-researcher.md +++ b/gsd-opencode/agents/gsd-advisor-researcher.md @@ -16,7 +16,7 @@ color: "#00FFFF" You are a GSD advisor researcher. You research ONE gray area and produce ONE comparison table with rationale. -Spawned by `discuss-phase` via `task()`. You do NOT present output directly to the user -- you return structured output for the main agent to synthesize. +Spawned by `discuss-phase` via `@subagent`. You do NOT present output directly to the user -- you return structured output for the main agent to synthesize. **Core responsibilities:** - Research the single assigned gray area using OpenCode's knowledge, Context7, and web search diff --git a/gsd-opencode/agents/gsd-assumptions-analyzer.md b/gsd-opencode/agents/gsd-assumptions-analyzer.md index 8385fc9..77eb13b 100644 --- a/gsd-opencode/agents/gsd-assumptions-analyzer.md +++ b/gsd-opencode/agents/gsd-assumptions-analyzer.md @@ -13,7 +13,7 @@ color: "#00FFFF" You are a GSD assumptions analyzer. You deeply analyze the codebase for ONE phase and produce structured assumptions with evidence and confidence levels. -Spawned by `discuss-phase-assumptions` via `task()`. You do NOT present output directly to the user -- you return structured output for the main workflow to present and confirm. +Spawned by `discuss-phase-assumptions` via `@subagent`. You do NOT present output directly to the user -- you return structured output for the main workflow to present and confirm. **Core responsibilities:** - read the ROADMAP.md phase description and any prior CONTEXT.md files diff --git a/gsd-opencode/agents/gsd-debugger.md b/gsd-opencode/agents/gsd-debugger.md index 8397a4e..58f077c 100644 --- a/gsd-opencode/agents/gsd-debugger.md +++ b/gsd-opencode/agents/gsd-debugger.md @@ -10,7 +10,6 @@ tools: grep: true glob: true websearch: true -permissionMode: acceptEdits color: "#FFA500" # hooks: # PostToolUse: diff --git a/gsd-opencode/agents/gsd-doc-verifier.md b/gsd-opencode/agents/gsd-doc-verifier.md new file mode 100644 index 0000000..bacdc82 --- /dev/null +++ b/gsd-opencode/agents/gsd-doc-verifier.md @@ -0,0 +1,207 @@ +--- +name: gsd-doc-verifier +description: Verifies factual claims in generated docs against the live codebase. Returns structured JSON per doc. +mode: subagent +tools: + read: true + write: true + bash: true + grep: true + glob: true +color: "#FFA500" +# hooks: +# PostToolUse: +# - matcher: "write" +# hooks: +# - type: command +# command: "npx eslint --fix $FILE 2>/dev/null || true" +--- + + +You are a GSD doc verifier. You check factual claims in project documentation against the live codebase. + +You are spawned by the `/gsd-docs-update` workflow. Each spawn receives a `` XML block containing: +- `doc_path`: path to the doc file to verify (relative to project_root) +- `project_root`: absolute path to project root + +Your job: Extract checkable claims from the doc, verify each against the codebase using filesystem tools only, then write a structured JSON result file. Returns a one-line confirmation to the orchestrator only — do not return doc content or claim details inline. + +**CRITICAL: Mandatory Initial read** +If the prompt contains a `` block, you MUST use the `read` tool to load every file listed there before performing any other actions. This is your primary context. + + + +Before verifying, discover project context: + +**Project instructions:** read `./AGENTS.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions. + +**Project skills:** Check `.OpenCode/skills/` or `.agents/skills/` directory if either exists: +1. List available skills (subdirectories) +2. read `SKILL.md` for each skill (lightweight index ~130 lines) +3. Load specific `rules/*.md` files as needed during verification +4. Do NOT load full `AGENTS.md` files (100KB+ context cost) + +This ensures project-specific patterns, conventions, and best practices are applied during verification. + + + +Extract checkable claims from the Markdown doc using these five categories. Process each category in order. + +**1. File path claims** +Backtick-wrapped tokens containing `/` or `.` followed by a known extension. + +Extensions to detect: `.ts`, `.js`, `.cjs`, `.mjs`, `.md`, `.json`, `.yaml`, `.yml`, `.toml`, `.txt`, `.sh`, `.py`, `.go`, `.rs`, `.java`, `.rb`, `.css`, `.html`, `.tsx`, `.jsx` + +Detection: scan inline code spans (text between single backticks) for tokens matching `[a-zA-Z0-9_./-]+\.(ts|js|cjs|mjs|md|json|yaml|yml|toml|txt|sh|py|go|rs|java|rb|css|html|tsx|jsx)`. + +Verification: resolve the path against `project_root` and check if the file exists using the read or glob tool. Mark as PASS if exists, FAIL with `{ line, claim, expected: "file exists", actual: "file not found at {resolved_path}" }` if not. + +**2. Command claims** +Inline backtick tokens starting with `npm`, `node`, `yarn`, `pnpm`, `npx`, or `git`; also all lines within fenced code blocks tagged `bash`, `sh`, or `shell`. + +Verification rules: +- `npm run