gsd-opencode 1.33.2 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/agents/gsd-advisor-researcher.md +23 -0
  2. package/agents/gsd-ai-researcher.md +142 -0
  3. package/agents/gsd-code-fixer.md +523 -0
  4. package/agents/gsd-code-reviewer.md +361 -0
  5. package/agents/gsd-debugger.md +14 -1
  6. package/agents/gsd-domain-researcher.md +162 -0
  7. package/agents/gsd-eval-auditor.md +170 -0
  8. package/agents/gsd-eval-planner.md +161 -0
  9. package/agents/gsd-executor.md +70 -7
  10. package/agents/gsd-framework-selector.md +167 -0
  11. package/agents/gsd-intel-updater.md +320 -0
  12. package/agents/gsd-phase-researcher.md +26 -0
  13. package/agents/gsd-plan-checker.md +12 -0
  14. package/agents/gsd-planner.md +16 -6
  15. package/agents/gsd-project-researcher.md +23 -0
  16. package/agents/gsd-ui-researcher.md +23 -0
  17. package/agents/gsd-verifier.md +55 -1
  18. package/commands/gsd/gsd-add-backlog.md +1 -1
  19. package/commands/gsd/gsd-add-phase.md +1 -1
  20. package/commands/gsd/gsd-add-todo.md +1 -1
  21. package/commands/gsd/gsd-ai-integration-phase.md +36 -0
  22. package/commands/gsd/gsd-audit-fix.md +33 -0
  23. package/commands/gsd/gsd-autonomous.md +1 -0
  24. package/commands/gsd/gsd-check-todos.md +1 -1
  25. package/commands/gsd/gsd-code-review-fix.md +52 -0
  26. package/commands/gsd/gsd-code-review.md +55 -0
  27. package/commands/gsd/gsd-complete-milestone.md +1 -1
  28. package/commands/gsd/gsd-debug.md +1 -1
  29. package/commands/gsd/gsd-eval-review.md +32 -0
  30. package/commands/gsd/gsd-explore.md +27 -0
  31. package/commands/gsd/gsd-from-gsd2.md +45 -0
  32. package/commands/gsd/gsd-health.md +1 -1
  33. package/commands/gsd/gsd-import.md +36 -0
  34. package/commands/gsd/gsd-insert-phase.md +1 -1
  35. package/commands/gsd/gsd-intel.md +183 -0
  36. package/commands/gsd/gsd-manager.md +1 -1
  37. package/commands/gsd/gsd-next.md +2 -0
  38. package/commands/gsd/gsd-reapply-patches.md +58 -3
  39. package/commands/gsd/gsd-remove-phase.md +1 -1
  40. package/commands/gsd/gsd-review.md +4 -2
  41. package/commands/gsd/gsd-scan.md +26 -0
  42. package/commands/gsd/gsd-set-profile.md +1 -1
  43. package/commands/gsd/gsd-thread.md +1 -1
  44. package/commands/gsd/gsd-undo.md +34 -0
  45. package/commands/gsd/gsd-workstreams.md +6 -6
  46. package/get-shit-done/bin/gsd-tools.cjs +143 -5
  47. package/get-shit-done/bin/lib/commands.cjs +10 -2
  48. package/get-shit-done/bin/lib/config.cjs +71 -37
  49. package/get-shit-done/bin/lib/core.cjs +70 -8
  50. package/get-shit-done/bin/lib/gsd2-import.cjs +511 -0
  51. package/get-shit-done/bin/lib/init.cjs +20 -6
  52. package/get-shit-done/bin/lib/intel.cjs +660 -0
  53. package/get-shit-done/bin/lib/learnings.cjs +378 -0
  54. package/get-shit-done/bin/lib/milestone.cjs +25 -15
  55. package/get-shit-done/bin/lib/model-profiles.cjs +17 -17
  56. package/get-shit-done/bin/lib/phase.cjs +148 -112
  57. package/get-shit-done/bin/lib/roadmap.cjs +12 -5
  58. package/get-shit-done/bin/lib/security.cjs +119 -0
  59. package/get-shit-done/bin/lib/state.cjs +283 -221
  60. package/get-shit-done/bin/lib/template.cjs +8 -4
  61. package/get-shit-done/bin/lib/verify.cjs +42 -5
  62. package/get-shit-done/references/ai-evals.md +156 -0
  63. package/get-shit-done/references/ai-frameworks.md +186 -0
  64. package/get-shit-done/references/common-bug-patterns.md +114 -0
  65. package/get-shit-done/references/few-shot-examples/plan-checker.md +73 -0
  66. package/get-shit-done/references/few-shot-examples/verifier.md +109 -0
  67. package/get-shit-done/references/gates.md +70 -0
  68. package/get-shit-done/references/ios-scaffold.md +123 -0
  69. package/get-shit-done/references/model-profile-resolution.md +6 -7
  70. package/get-shit-done/references/model-profiles.md +20 -14
  71. package/get-shit-done/references/planning-config.md +237 -0
  72. package/get-shit-done/references/thinking-models-debug.md +44 -0
  73. package/get-shit-done/references/thinking-models-execution.md +50 -0
  74. package/get-shit-done/references/thinking-models-planning.md +62 -0
  75. package/get-shit-done/references/thinking-models-research.md +50 -0
  76. package/get-shit-done/references/thinking-models-verification.md +55 -0
  77. package/get-shit-done/references/thinking-partner.md +96 -0
  78. package/get-shit-done/references/universal-anti-patterns.md +6 -1
  79. package/get-shit-done/references/verification-overrides.md +227 -0
  80. package/get-shit-done/templates/AI-SPEC.md +246 -0
  81. package/get-shit-done/workflows/add-tests.md +3 -0
  82. package/get-shit-done/workflows/add-todo.md +2 -0
  83. package/get-shit-done/workflows/ai-integration-phase.md +284 -0
  84. package/get-shit-done/workflows/audit-fix.md +154 -0
  85. package/get-shit-done/workflows/autonomous.md +33 -2
  86. package/get-shit-done/workflows/check-todos.md +2 -0
  87. package/get-shit-done/workflows/cleanup.md +2 -0
  88. package/get-shit-done/workflows/code-review-fix.md +497 -0
  89. package/get-shit-done/workflows/code-review.md +515 -0
  90. package/get-shit-done/workflows/complete-milestone.md +40 -15
  91. package/get-shit-done/workflows/diagnose-issues.md +1 -1
  92. package/get-shit-done/workflows/discovery-phase.md +3 -1
  93. package/get-shit-done/workflows/discuss-phase-assumptions.md +1 -1
  94. package/get-shit-done/workflows/discuss-phase.md +21 -7
  95. package/get-shit-done/workflows/do.md +2 -0
  96. package/get-shit-done/workflows/docs-update.md +2 -0
  97. package/get-shit-done/workflows/eval-review.md +155 -0
  98. package/get-shit-done/workflows/execute-phase.md +307 -57
  99. package/get-shit-done/workflows/execute-plan.md +64 -93
  100. package/get-shit-done/workflows/explore.md +136 -0
  101. package/get-shit-done/workflows/help.md +1 -1
  102. package/get-shit-done/workflows/import.md +273 -0
  103. package/get-shit-done/workflows/inbox.md +387 -0
  104. package/get-shit-done/workflows/manager.md +4 -10
  105. package/get-shit-done/workflows/new-milestone.md +3 -1
  106. package/get-shit-done/workflows/new-project.md +2 -0
  107. package/get-shit-done/workflows/new-workspace.md +2 -0
  108. package/get-shit-done/workflows/next.md +56 -0
  109. package/get-shit-done/workflows/note.md +2 -0
  110. package/get-shit-done/workflows/plan-phase.md +97 -17
  111. package/get-shit-done/workflows/plant-seed.md +3 -0
  112. package/get-shit-done/workflows/pr-branch.md +41 -13
  113. package/get-shit-done/workflows/profile-user.md +4 -2
  114. package/get-shit-done/workflows/quick.md +99 -4
  115. package/get-shit-done/workflows/remove-workspace.md +2 -0
  116. package/get-shit-done/workflows/review.md +53 -6
  117. package/get-shit-done/workflows/scan.md +98 -0
  118. package/get-shit-done/workflows/secure-phase.md +2 -0
  119. package/get-shit-done/workflows/settings.md +18 -3
  120. package/get-shit-done/workflows/ship.md +3 -0
  121. package/get-shit-done/workflows/ui-phase.md +10 -2
  122. package/get-shit-done/workflows/ui-review.md +2 -0
  123. package/get-shit-done/workflows/undo.md +314 -0
  124. package/get-shit-done/workflows/update.md +2 -0
  125. package/get-shit-done/workflows/validate-phase.md +2 -0
  126. package/get-shit-done/workflows/verify-phase.md +83 -0
  127. package/get-shit-done/workflows/verify-work.md +12 -1
  128. package/package.json +1 -1
  129. package/skills/gsd-code-review/SKILL.md +48 -0
  130. package/skills/gsd-code-review-fix/SKILL.md +44 -0
@@ -0,0 +1,109 @@
1
+ ---
2
+ component: verifier
3
+ version: 2
4
+ last_calibrated: 2026-03-25
5
+ calibration_source: "Adapted from thinking-partner verification corpus"
6
+ ---
7
+
8
+ # Verifier Few-Shot Examples
9
+
10
+ ## Positive Examples
11
+
12
+ ### Example 1: Thorough multi-level artifact verification with real gap discovery
13
+
14
+ **Input:** Must-have artifact: `get-shit-done/workflows/context-bridge.md: >50 lines`
15
+
16
+ **Output:**
17
+
18
+ > **L1 (Existence):** EXISTS -- `get-shit-done/workflows/context-bridge.md` found, 187 lines.
19
+ > **L2 (Substantive):** SUBSTANTIVE -- No TODO/FIXME markers, 4 defined sections (`updateContextTier`, `getContextBudget`, `injectContextWarning`, `resetTierState`), non-trivial logic with config reads and threshold calculations.
20
+ > **L3 (Wired):** WIRED -- Referenced by `get-shit-done/workflows/execute-phase.md` at step 3. Called by `agents/gsd-executor.md` via @-reference include. Arguments verified: receives planning directory path matching the expected parameter.
21
+ > **Status: PASSED**
22
+
23
+ **Why this is good:** The verifier checked all three levels independently with specific evidence at each level -- file path, line count, exported symbols, import location, and argument verification. It did not stop at "file exists" but traced wiring through to actual usage with correct arguments.
24
+
25
+ ### Example 2: Correct FAILED classification with grep evidence
26
+
27
+ **Input:** Must-have truth: `validate-commit.js rejects commits missing scope parentheses`
28
+
29
+ **Output:**
30
+
31
+ > **Method:** Ran `grep -n "scope" get-shit-done/bin/validate-commit.js` to locate scope validation logic.
32
+ > **Evidence:** Lines 34-41 show regex `/^(feat|fix|refactor|test|docs|chore|wip)\(/` which requires opening paren after type. However, no test for MISSING closing paren exists -- the regex accepts `feat(: description` (missing scope content and closing paren).
33
+ > **Ran:** `echo "feat(: test" | node get-shit-done/bin/validate-commit.js` -- exit code 0 (accepted).
34
+ > **Status: FAILED** -- Commit messages with empty scope `feat(: desc)` are accepted. The truth "rejects commits missing scope parentheses" does not hold for empty-scope edge case.
35
+
36
+ **Why this is good:** The verifier did not trust the code's intent -- it ran an actual test with an edge case input and reported the specific failure. Evidence includes the regex, the test command, the exit code, and why the truth does not hold.
37
+
38
+ ### Example 3: Catching missing wiring (calibration-derived gap pattern)
39
+
40
+ **Input:** Must-have key_link: `check-subagent-output.js imports and calls feedback-loop.js extractFeedback()`
41
+
42
+ **Output:**
43
+
44
+ > **Method:** Ran `grep -n "feedback-loop\|extractFeedback" get-shit-done/bin/check-subagent-output.js`.
45
+ > **Evidence:** Zero matches. The file `feedback-loop.js` exists (172 lines, substantive), and `tests/feedback-loop.test.js` passes (229 lines). But `check-subagent-output.js` never imports or calls it.
46
+ > **Cross-check:** `grep -rn "require.*feedback-loop" get-shit-done/bin/` returns zero results across all scripts.
47
+ > **Status: FAILED** -- The artifact exists and is tested, but is completely orphaned. The key_link "imports and calls" does not hold. This is a **missing wiring** gap.
48
+
49
+ **Why this is good:** The verifier caught a common calibration pattern: code that exists, is tested, but is never actually wired into the system. L1 and L2 pass, but L3 (wiring) fails. This pattern accounts for 37% of all gaps found in calibration corpus.
50
+
51
+ ### Example 4: Catching missing config schema entries (calibration-derived gap pattern)
52
+
53
+ **Input:** Must-have truth: `Config toggles features.architecture_graph and features.architecture_guard exist with defaults`
54
+
55
+ **Output:**
56
+
57
+ > **Method:** Ran `grep "architecture_graph\|architecture_guard" get-shit-done/bin/lib/config-schema.json`.
58
+ > **Evidence:** Zero matches in schema. However, `grep "architecture" get-shit-done/bin/lib/config.cjs` shows both flags in CONFIG_DEFAULTS (lines 426, 428).
59
+ > **Gap:** Defaults exist in code but schema validation doesn't know about them. `configValidate()` would strip these fields on load, making the defaults unreachable.
60
+ > **Status: FAILED** -- Config flags work in code but are invisible to schema validation. This is a **missing wiring** gap between config layers.
61
+
62
+ **Why this is good:** The verifier checked multiple config layers (schema vs defaults vs code) rather than just one. Config wiring requires schema + defaults + code to agree -- checking only one layer misses layer-mismatch bugs.
63
+
64
+ ### Example 5: Distinguishing planning gaps from execution failures
65
+
66
+ **Input:** Must-have truth: `All MSYS regex patterns consolidated into shared module`
67
+
68
+ **Output:**
69
+
70
+ > **Method:** Ran `grep -rn "\/\[a-zA-Z\]\/" get-shit-done/bin/` to find inline MSYS regex.
71
+ > **Evidence:** 2 matches in `commands/gsd/misc.md` (lines 26, 487). These were NOT in the original plan scope -- Phase 148 extracted code into misc.md AFTER Phase 149's plan was written.
72
+ > **Assessment:** The executor correctly completed all planned tasks. The gap is a **planning ordering issue**, not an execution failure.
73
+ > **Status: PASS_WITH_NOTES** -- Executor did what was planned. Unconsolidated regex noted as follow-up, not as a failure of this phase.
74
+
75
+ **Why this is good:** The verifier distinguished between what was planned vs what exists now. Code that changed AFTER plan creation is a planning gap, not an executor failure. This prevents false FAIL verdicts on correctly-executed work.
76
+
77
+ ## Calibration-Derived Gap Patterns
78
+
79
+ Based on analysis of verification corpus (80% pass rate, 8 gaps):
80
+
81
+ | Pattern | Count | % of Gaps | What to Check |
82
+ |---------|-------|-----------|---------------|
83
+ | Missing wiring | 3 | 37% | File exists + tested but never imported/called by consumer |
84
+ | Missing tests | 2 | 25% | Feature works but test file excluded from CI or never runs |
85
+ | Other | 3 | 38% | Config layer mismatches, planning ordering issues, schema gaps |
86
+
87
+ ## Negative Examples
88
+
89
+ ### Example 1: Blanket pass with no per-criterion evidence
90
+
91
+ **Input:** Must-haves: 5 truths, 3 artifacts, 2 key_links from plan frontmatter.
92
+
93
+ **Output:**
94
+
95
+ > All must-haves have been verified. The implementation matches the plan requirements. Files exist and are properly connected. Status: PASSED.
96
+ > must_haves_checked: 10, must_haves_passed: 10
97
+
98
+ **Why this is bad:** No individual must-have is listed or checked. No file paths, no line numbers, no grep output, no level-by-level breakdown. The verifier restated the must-haves as passing without showing any evidence. This would miss stubs, orphaned exports, and broken wiring.
99
+
100
+ ### Example 2: File existence check without substance or wiring verification
101
+
102
+ **Input:** Must-have artifact: `get-shit-done/bin/lib/audit-checks/index.cjs: >100 lines`
103
+
104
+ **Output:**
105
+
106
+ > **L1 (Existence):** EXISTS -- File found at `get-shit-done/bin/lib/audit-checks/index.cjs`, 142 lines.
107
+ > **Status: PASSED**
108
+
109
+ **Why this is bad:** The verifier stopped at Level 1. The file has 142 lines but could contain `// TODO: implement all checks` with stub functions returning empty objects. Level 2 (substantive) and Level 3 (wired) were skipped entirely. A file that exists but is never imported or contains only placeholder code should not pass.
@@ -0,0 +1,70 @@
1
+ # Gates Taxonomy
2
+
3
+ Canonical gate types used across GSD workflows. Every validation checkpoint maps to one of these four types.
4
+
5
+ ---
6
+
7
+ ## Gate Types
8
+
9
+ ### Pre-flight Gate
10
+ **Purpose:** Validates preconditions before starting an operation.
11
+ **Behavior:** Blocks entry if conditions unmet. No partial work created.
12
+ **Recovery:** Fix the missing precondition, then retry.
13
+ **Examples:**
14
+ - Plan-phase checks for REQUIREMENTS.md before planning
15
+ - Execute-phase validates PLAN.md exists before execution
16
+ - Discuss-phase confirms phase exists in ROADMAP.md
17
+
18
+ ### Revision Gate
19
+ **Purpose:** Evaluates output quality and routes to revision if insufficient.
20
+ **Behavior:** Loops back to producer with specific feedback. Bounded by iteration cap.
21
+ **Recovery:** Producer addresses feedback; checker re-evaluates. The loop also escalates early if issue count does not decrease between consecutive iterations (stall detection). After max iterations, escalates unconditionally.
22
+ **Examples:**
23
+ - Plan-checker reviewing PLAN.md (max 3 iterations)
24
+ - Verifier checking phase deliverables against success criteria
25
+
26
+ ### Escalation Gate
27
+ **Purpose:** Surfaces unresolvable issues to the developer for a decision.
28
+ **Behavior:** Pauses workflow, presents options, waits for human input.
29
+ **Recovery:** Developer chooses action; workflow resumes on selected path.
30
+ **Examples:**
31
+ - Revision loop exhausted after 3 iterations
32
+ - Merge conflict during worktree cleanup
33
+ - Ambiguous requirement needing clarification
34
+
35
+ ### Abort Gate
36
+ **Purpose:** Terminates the operation to prevent damage or waste.
37
+ **Behavior:** Stops immediately, preserves state, reports reason.
38
+ **Recovery:** Developer investigates root cause, fixes, restarts from checkpoint.
39
+ **Examples:**
40
+ - Context window critically low during execution
41
+ - STATE.md in error state blocking /gsd-next
42
+ - Verification finds critical missing deliverables
43
+
44
+ ---
45
+
46
+ ## Gate Matrix
47
+
48
+ | Workflow | Phase | Gate Type | Artifacts Checked | Failure Behavior |
49
+ |----------|-------|-----------|-------------------|------------------|
50
+ | plan-phase | Entry | Pre-flight | REQUIREMENTS.md, ROADMAP.md | Block with missing-file message |
51
+ | plan-phase | Step 12 | Revision | PLAN.md quality | Loop to planner (max 3) |
52
+ | plan-phase | Post-revision | Escalation | Unresolved issues | Surface to developer |
53
+ | execute-phase | Entry | Pre-flight | PLAN.md | Block with missing-plan message |
54
+ | execute-phase | Completion | Revision | SUMMARY.md completeness | Re-run incomplete tasks |
55
+ | verify-work | Entry | Pre-flight | SUMMARY.md | Block with missing-summary |
56
+ | verify-work | Evaluation | Escalation | Failed criteria | Surface gaps to developer |
57
+ | next | Entry | Abort | Error state, checkpoints | Stop with diagnostic |
58
+
59
+ ---
60
+
61
+ ## Implementing Gates
62
+
63
+ Use this taxonomy when designing or auditing workflow validation points:
64
+
65
+ - **Pre-flight** gates belong at workflow entry points. They are cheap, deterministic checks that prevent wasted work. If you can verify a precondition with a file-existence check or a config read, use a pre-flight gate.
66
+ - **Revision** gates belong after a producer step where quality varies. Always pair them with an iteration cap to prevent infinite loops. The cap should reflect the cost of each iteration -- expensive operations get fewer retries.
67
+ - **Escalation** gates belong wherever automated resolution is impossible or ambiguous. They are the safety valve between revision loops and abort. Present the developer with clear options and enough context to decide.
68
+ - **Abort** gates belong at points where continuing would cause damage, waste significant resources, or produce meaningless output. They should preserve state so work can resume after the root cause is fixed.
69
+
70
+ **Selection heuristic:** Start with pre-flight. If the check happens after work is produced, it is a revision gate. If the revision loop cannot resolve the issue, escalate. If continuing is dangerous, abort.
@@ -0,0 +1,123 @@
1
+ # iOS App Scaffold Reference
2
+
3
+ Rules and patterns for scaffolding iOS applications. Apply when any plan involves creating a new iOS app target.
4
+
5
+ ---
6
+
7
+ ## Critical Rule: Never Use Package.swift as the Primary Build System for iOS Apps
8
+
9
+ **NEVER use `Package.swift` with `.executableTarget` (or `.target`) to scaffold an iOS app.** Swift Package Manager executable targets compile as macOS command-line tools — they do not produce `.app` bundles, cannot be signed for iOS devices, and cannot be submitted to the App Store.
10
+
11
+ **Prohibited pattern:**
12
+ ```swift
13
+ // Package.swift — DO NOT USE for iOS apps
14
+ .executableTarget(name: "MyApp", dependencies: [])
15
+ // or
16
+ .target(name: "MyApp", dependencies: [])
17
+ ```
18
+
19
+ Using this pattern produces a macOS CLI binary, not an iOS app. The app will not build for any iOS simulator or device.
20
+
21
+ ---
22
+
23
+ ## Required Pattern: XcodeGen
24
+
25
+ All iOS app scaffolding MUST use XcodeGen to generate the `.xcodeproj`.
26
+
27
+ ### Step 1 — Install XcodeGen (if not present)
28
+
29
+ ```bash
30
+ brew install xcodegen
31
+ ```
32
+
33
+ ### Step 2 — Create `project.yml`
34
+
35
+ `project.yml` is the XcodeGen spec that describes the project structure. Minimum viable spec:
36
+
37
+ ```yaml
38
+ name: MyApp
39
+ options:
40
+ bundleIdPrefix: com.example
41
+ deploymentTarget:
42
+ iOS: "17.0"
43
+ settings:
44
+ SWIFT_VERSION: "5.10"
45
+ IPHONEOS_DEPLOYMENT_TARGET: "17.0"
46
+ targets:
47
+ MyApp:
48
+ type: application
49
+ platform: iOS
50
+ sources: [Sources/MyApp]
51
+ settings:
52
+ PRODUCT_BUNDLE_IDENTIFIER: com.example.MyApp
53
+ INFOPLIST_FILE: Sources/MyApp/Info.plist
54
+ scheme:
55
+ testTargets:
56
+ - MyAppTests
57
+ MyAppTests:
58
+ type: bundle.unit-test
59
+ platform: iOS
60
+ sources: [Tests/MyAppTests]
61
+ dependencies:
62
+ - target: MyApp
63
+ ```
64
+
65
+ ### Step 3 — Generate the .xcodeproj
66
+
67
+ ```bash
68
+ xcodegen generate
69
+ ```
70
+
71
+ This creates `MyApp.xcodeproj` in the project root. Commit `project.yml` but add `*.xcodeproj` to `.gitignore` (regenerate on checkout).
72
+
73
+ ### Step 4 — Standard project layout
74
+
75
+ ```
76
+ MyApp/
77
+ ├── project.yml # XcodeGen spec — commit this
78
+ ├── .gitignore # includes *.xcodeproj
79
+ ├── Sources/
80
+ │ └── MyApp/
81
+ │ ├── MyAppApp.swift # @main entry point
82
+ │ ├── ContentView.swift
83
+ │ └── Info.plist
84
+ └── Tests/
85
+ └── MyAppTests/
86
+ └── MyAppTests.swift
87
+ ```
88
+
89
+ ---
90
+
91
+ ## iOS Deployment Target Compatibility
92
+
93
+ Always verify SwiftUI API availability against the project's `IPHONEOS_DEPLOYMENT_TARGET` before using any SwiftUI component.
94
+
95
+ | API | Minimum iOS |
96
+ |-----|-------------|
97
+ | `NavigationView` | iOS 13 |
98
+ | `NavigationStack` | iOS 16 |
99
+ | `NavigationSplitView` | iOS 16 |
100
+ | `List(selection:)` with multi-select | iOS 17 |
101
+ | `ScrollView` scroll position APIs | iOS 17 |
102
+ | `Observable` macro (`@Observable`) | iOS 17 |
103
+ | `SwiftData` | iOS 17 |
104
+ | `@Bindable` | iOS 17 |
105
+ | `TipKit` | iOS 17 |
106
+
107
+ **Rule:** If a plan requires a SwiftUI API that exceeds the project's deployment target, either:
108
+ 1. Raise the deployment target in `project.yml` (and document the decision), or
109
+ 2. Wrap the call in `if #available(iOS NN, *) { ... }` with a fallback implementation.
110
+
111
+ Do NOT silently use an API that requires a higher iOS version than the declared deployment target — the app will crash at runtime on older devices.
112
+
113
+ ---
114
+
115
+ ## Verification
116
+
117
+ After running `xcodegen generate`, verify the project builds:
118
+
119
+ ```bash
120
+ xcodebuild -project MyApp.xcodeproj -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 16' build
121
+ ```
122
+
123
+ A successful build (exit code 0) confirms the scaffold is valid for iOS.
@@ -14,18 +14,17 @@ Default: `simple` if not set or config missing.
14
14
 
15
15
  @$HOME/.config/opencode/get-shit-done/references/model-profiles.md
16
16
 
17
- Look up the agent in the table for the resolved profile. Pass the model parameter to task calls:
17
+ Look up the agent in the table for the resolved profile. Pass the model parameter to subagent calls:
18
18
 
19
19
  ```
20
- task(
21
- prompt="...",
22
- subagent_type="gsd-planner",
23
- model="{resolved_model}" # "inherit", "sonnet", or "haiku"
24
- )
20
+ @gsd-planner "..."
21
+ # model is resolved from profile lookup
25
22
  ```
26
23
 
27
24
  **Note:** Opus-tier agents resolve to `"inherit"` (not `"opus"`). This causes the agent to use the parent session's model, avoiding conflicts with organization policies that may block specific opus versions.
28
25
 
26
+ If `model_profile` is `"adaptive"`, agents resolve to role-based assignments (opus/sonnet/haiku based on agent type).
27
+
29
28
  If `model_profile` is `"inherit"`, all agents resolve to `"inherit"` (useful for OpenCode `/model`).
30
29
 
31
30
  ## Usage
@@ -33,4 +32,4 @@ If `model_profile` is `"inherit"`, all agents resolve to `"inherit"` (useful for
33
32
  1. Resolve once at orchestration start
34
33
  2. Store the profile value
35
34
  3. Look up each agent's model from the table when spawning
36
- 4. Pass model parameter to each task call (values: `"inherit"`, `"sonnet"`, `"haiku"`)
35
+ 4. Model is resolved automatically from profile for each subagent call
@@ -4,20 +4,20 @@ Model profiles control which OpenCode model each GSD agent uses. This allows bal
4
4
 
5
5
  ## Profile Definitions
6
6
 
7
- | Agent | `quality` | `balanced` | `budget` | `inherit` |
8
- |-------|-----------|------------|----------|-----------|
9
- | gsd-planner | opus | opus | sonnet | inherit |
10
- | gsd-roadmapper | opus | sonnet | sonnet | inherit |
11
- | gsd-executor | opus | sonnet | sonnet | inherit |
12
- | gsd-phase-researcher | opus | sonnet | haiku | inherit |
13
- | gsd-project-researcher | opus | sonnet | haiku | inherit |
14
- | gsd-research-synthesizer | sonnet | sonnet | haiku | inherit |
15
- | gsd-debugger | opus | sonnet | sonnet | inherit |
16
- | gsd-codebase-mapper | sonnet | haiku | haiku | inherit |
17
- | gsd-verifier | sonnet | sonnet | haiku | inherit |
18
- | gsd-plan-checker | sonnet | sonnet | haiku | inherit |
19
- | gsd-integration-checker | sonnet | sonnet | haiku | inherit |
20
- | gsd-nyquist-auditor | sonnet | sonnet | haiku | inherit |
7
+ | Agent | `quality` | `balanced` | `budget` | `adaptive` | `inherit` |
8
+ |-------|-----------|------------|----------|------------|-----------|
9
+ | gsd-planner | opus | opus | sonnet | opus | inherit |
10
+ | gsd-roadmapper | opus | sonnet | sonnet | sonnet | inherit |
11
+ | gsd-executor | opus | sonnet | sonnet | sonnet | inherit |
12
+ | gsd-phase-researcher | opus | sonnet | haiku | sonnet | inherit |
13
+ | gsd-project-researcher | opus | sonnet | haiku | sonnet | inherit |
14
+ | gsd-research-synthesizer | sonnet | sonnet | haiku | haiku | inherit |
15
+ | gsd-debugger | opus | sonnet | sonnet | opus | inherit |
16
+ | gsd-codebase-mapper | sonnet | haiku | haiku | haiku | inherit |
17
+ | gsd-verifier | sonnet | sonnet | haiku | sonnet | inherit |
18
+ | gsd-plan-checker | sonnet | sonnet | haiku | haiku | inherit |
19
+ | gsd-integration-checker | sonnet | sonnet | haiku | haiku | inherit |
20
+ | gsd-nyquist-auditor | sonnet | sonnet | haiku | haiku | inherit |
21
21
 
22
22
  ## Profile Philosophy
23
23
 
@@ -37,6 +37,12 @@ Model profiles control which OpenCode model each GSD agent uses. This allows bal
37
37
  - Haiku for research and verification
38
38
  - Use when: conserving quota, high-volume work, less critical phases
39
39
 
40
+ **adaptive** — Role-based cost optimization
41
+ - Opus for planning and debugging (where reasoning quality has highest impact)
42
+ - Sonnet for execution, research, and verification (follows explicit instructions)
43
+ - Haiku for mapping, checking, and auditing (high volume, structured output)
44
+ - Use when: optimizing cost without sacrificing plan quality, solo development on paid API tiers
45
+
40
46
  **inherit** - Follow the current session model
41
47
  - All agents resolve to `inherit`
42
48
  - Best when you switch models interactively (for example OpenCode or Kilo `/model`)
@@ -214,4 +214,241 @@ Squash merge is recommended — keeps main branch history clean while preserving
214
214
 
215
215
  </branching_strategy_behavior>
216
216
 
217
+ <complete_field_reference>
218
+
219
+ ## Complete Field Reference
220
+
221
+ Generated from `CONFIG_DEFAULTS` (core.cjs) and `VALID_CONFIG_KEYS` (config.cjs).
222
+
223
+ ### Core Fields
224
+
225
+ | Key | Type | Default | Allowed Values | Description |
226
+ |-----|------|---------|----------------|-------------|
227
+ | `model_profile` | string | `"balanced"` | `"quality"`, `"balanced"`, `"budget"`, `"inherit"` | Model selection preset for subagents |
228
+ | `mode` | string | `"interactive"` | `"interactive"`, `"yolo"` | Operation mode: `"interactive"` shows gates and confirmations; `"yolo"` runs autonomously without prompts |
229
+ | `granularity` | string | (none) | `"coarse"`, `"standard"`, `"fine"` | Planning depth for phase plans (migrated from deprecated `depth`) |
230
+ | `commit_docs` | boolean | `true` | `true`, `false` | Commit .planning/ artifacts to git (auto-false if .planning/ is gitignored) |
231
+ | `search_gitignored` | boolean | `false` | `true`, `false` | Include gitignored paths in broad rg searches via `--no-ignore` |
232
+ | `phase_naming` | string | `"sequential"` | `"sequential"`, `"custom"` | Phase numbering: auto-increment or arbitrary string IDs |
233
+ | `project_code` | string\|null | `null` | Any short string | Prefix for phase dirs (e.g., `"CK"` produces `CK-01-foundation`) |
234
+ | `response_language` | string\|null | `null` | Any language name | Language for user-facing prompts (e.g., `"Portuguese"`, `"Japanese"`) |
235
+ | `context_window` | number | `200000` | `200000`, `1000000` | Context window size; set `1000000` for 1M-context models |
236
+ | `resolve_model_ids` | boolean\|string | `false` | `false`, `true`, `"omit"` | Map model aliases to full OpenCode IDs; `"omit"` returns empty string |
237
+ | `context` | string\|null | `null` | `"dev"`, `"research"`, `"review"` | Execution context profile that adjusts agent behavior: `"dev"` for development tasks, `"research"` for investigation/exploration, `"review"` for code review workflows |
238
+ | `review.models.<cli>` | string\|null | `null` | Any model ID string | Per-CLI model override for /gsd-review (e.g., `review.models.gemini`). Falls back to CLI default when null. |
239
+
240
+ ### Workflow Fields
241
+
242
+ Set via `workflow.*` namespace in config.json (e.g., `"workflow": { "research": true }`).
243
+
244
+ | Key | Type | Default | Allowed Values | Description |
245
+ |-----|------|---------|----------------|-------------|
246
+ | `workflow.research` | boolean | `true` | `true`, `false` | Run research agent before planning |
247
+ | `workflow.plan_check` | boolean | `true` | `true`, `false` | Run plan-checker agent to validate plans. _Alias:_ `plan_checker` is the flat-key form used in `CONFIG_DEFAULTS`; `workflow.plan_check` is the canonical namespaced form. |
248
+ | `workflow.verifier` | boolean | `true` | `true`, `false` | Run verifier agent after execution |
249
+ | `workflow.nyquist_validation` | boolean | `true` | `true`, `false` | Enable Nyquist-inspired validation gates |
250
+ | `workflow.auto_advance` | boolean | `false` | `true`, `false` | Auto-advance to next phase after completion |
251
+ | `workflow.node_repair` | boolean | `true` | `true`, `false` | Attempt automatic repair of failed plan nodes |
252
+ | `workflow.node_repair_budget` | number | `2` | Any positive integer | Max repair retries per failed node |
253
+ | `workflow.ai_integration_phase` | boolean | `true` | `true`, `false` | Run /gsd-ai-integration-phase before planning AI system phases |
254
+ | `workflow.ui_phase` | boolean | `true` | `true`, `false` | Generate UI-SPEC.md for frontend phases |
255
+ | `workflow.ui_safety_gate` | boolean | `true` | `true`, `false` | Require safety gate approval for UI changes |
256
+ | `workflow.text_mode` | boolean | `false` | `true`, `false` | Use plain-text numbered lists instead of question menus |
257
+ | `workflow.research_before_questions` | boolean | `false` | `true`, `false` | Run research before interactive questions in discuss phase |
258
+ | `workflow.discuss_mode` | string | `"discuss"` | `"discuss"`, `"assumptions"` | Default mode for discuss-phase: `"discuss"` runs interactive questioning; `"assumptions"` analyzes codebase and surfaces assumptions instead |
259
+ | `workflow.skip_discuss` | boolean | `false` | `true`, `false` | Skip discuss phase entirely |
260
+ | `workflow.use_worktrees` | boolean | `true` | `true`, `false` | Run executor agents in isolated git worktrees |
261
+ | `workflow.subagent_timeout` | number | `300000` | Any positive integer (ms) | Timeout for parallel subagent tasks (default: 5 minutes) |
262
+ | `workflow.code_review` | boolean | `true` | `true`, `false` | Enable built-in code review step in the ship workflow |
263
+ | `workflow.code_review_depth` | string | `"standard"` | `"light"`, `"standard"`, `"deep"` | Depth level for code review analysis in the ship workflow |
264
+ | `workflow._auto_chain_active` | boolean | `false` | `true`, `false` | Internal: tracks whether autonomous chaining is active |
265
+
266
+ ### Git Fields
267
+
268
+ Set via `git.*` namespace (e.g., `"git": { "branching_strategy": "phase" }`).
269
+
270
+ | Key | Type | Default | Allowed Values | Description |
271
+ |-----|------|---------|----------------|-------------|
272
+ | `git.branching_strategy` | string | `"none"` | `"none"`, `"phase"`, `"milestone"` | Git branching approach for phase/milestone isolation |
273
+ | `git.base_branch` | string\|null | `null` (auto-detect) | Any branch name | Target branch for PRs and merges; auto-detects from `origin/HEAD` when `null` |
274
+ | `git.phase_branch_template` | string | `"gsd/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy |
275
+ | `git.milestone_branch_template` | string | `"gsd/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy |
276
+ | `git.quick_branch_template` | string\|null | `null` | Template with `{slug}` | Optional branch template for quick-task runs |
277
+
278
+ ### Search & API Fields
279
+
280
+ These toggle external search integrations. Auto-detected at project creation when API keys are present.
281
+
282
+ | Key | Type | Default | Allowed Values | Description |
283
+ |-----|------|---------|----------------|-------------|
284
+ | `brave_search` | boolean | `false` | `true`, `false` | Enable Brave web search for research agent (requires `BRAVE_API_KEY`) |
285
+ | `firecrawl` | boolean | `false` | `true`, `false` | Enable Firecrawl page scraping (requires `FIRECRAWL_API_KEY`) |
286
+ | `exa_search` | boolean | `false` | `true`, `false` | Enable Exa semantic search (requires `EXA_API_KEY`) |
287
+
288
+ ### Features Fields
289
+
290
+ Set via `features.*` namespace (e.g., `"features": { "thinking_partner": true }`).
291
+
292
+ | Key | Type | Default | Allowed Values | Description |
293
+ |-----|------|---------|----------------|-------------|
294
+ | `features.thinking_partner` | boolean | `false` | `true`, `false` | Enable conditional extended thinking at workflow decision points (used by discuss-phase and plan-phase for architectural tradeoff analysis) |
295
+ | `features.global_learnings` | boolean | `false` | `true`, `false` | Enable injection of global learnings from `~/.gsd/learnings/` into agent prompts |
296
+
297
+ ### Hook Fields
298
+
299
+ Set via `hooks.*` namespace (e.g., `"hooks": { "context_warnings": true }`).
300
+
301
+ | Key | Type | Default | Allowed Values | Description |
302
+ |-----|------|---------|----------------|-------------|
303
+ | `hooks.context_warnings` | boolean | `true` | `true`, `false` | Show warnings when context budget is exceeded |
304
+
305
+ ### Learnings Fields
306
+
307
+ Set via `learnings.*` namespace (e.g., `"learnings": { "max_inject": 5 }`). Used together with `features.global_learnings`.
308
+
309
+ | Key | Type | Default | Allowed Values | Description |
310
+ |-----|------|---------|----------------|-------------|
311
+ | `learnings.max_inject` | number | `10` | Any positive integer | Maximum number of global learning entries to inject into agent prompts per session |
312
+
313
+ ### Intel Fields
314
+
315
+ Set via `intel.*` namespace (e.g., `"intel": { "enabled": true }`). Controls the queryable codebase intelligence system consumed by `/gsd-intel`.
316
+
317
+ | Key | Type | Default | Allowed Values | Description |
318
+ |-----|------|---------|----------------|-------------|
319
+ | `intel.enabled` | boolean | `false` | `true`, `false` | Enable queryable codebase intelligence system. When `true`, `/gsd-intel` commands build and query a JSON index in `.planning/intel/`. |
320
+
321
+ ### Manager Fields
322
+
323
+ Set via `manager.*` namespace (e.g., `"manager": { "flags": { "discuss": "--auto" } }`).
324
+
325
+ | Key | Type | Default | Allowed Values | Description |
326
+ |-----|------|---------|----------------|-------------|
327
+ | `manager.flags.discuss` | string | `""` | Any CLI flags string | Flags passed to `/gsd-discuss-phase` from manager (e.g., `"--auto --analyze"`) |
328
+ | `manager.flags.plan` | string | `""` | Any CLI flags string | Flags passed to plan workflow from manager |
329
+ | `manager.flags.execute` | string | `""` | Any CLI flags string | Flags passed to execute workflow from manager |
330
+
331
+ ### Advanced Fields
332
+
333
+ | Key | Type | Default | Allowed Values | Description |
334
+ |-----|------|---------|----------------|-------------|
335
+ | `parallelization` | boolean\|object | `true` | `true`, `false`, `{ "enabled": true }` | Enable parallel wave execution; object form allows additional sub-keys |
336
+ | `model_overrides` | object\|null | `null` | `{ "<agent-type>": "<model-id>" }` | Override model selection per agent type |
337
+ | `agent_skills` | object | `{}` | `{ "<agent-type>": "<skill-set>" }` | Assign skill sets to specific agent types |
338
+ | `sub_repos` | array | `[]` | Array of relative path strings | Child directories with independent `.git` repos (auto-detected) |
339
+
340
+ ### Planning Fields
341
+
342
+ These can be set at top level or nested under `planning.*` (e.g., `"planning": { "commit_docs": false }`). Both forms are equivalent; top-level takes precedence if both exist.
343
+
344
+ | Key | Type | Default | Allowed Values | Description |
345
+ |-----|------|---------|----------------|-------------|
346
+ | `planning.commit_docs` | boolean | `true` | `true`, `false` | Alias for top-level `commit_docs` |
347
+ | `planning.search_gitignored` | boolean | `false` | `true`, `false` | Alias for top-level `search_gitignored` |
348
+
349
+ ---
350
+
351
+ ## Field Interactions
352
+
353
+ Several config fields affect each other or trigger special behavior:
354
+
355
+ 1. **`commit_docs` auto-detection** -- When no explicit value is set in config.json and `.planning/` is in `.gitignore`, `commit_docs` automatically resolves to `false`. An explicit `true` or `false` in config always overrides auto-detection.
356
+
357
+ 2. **`branching_strategy` controls branch templates** -- The `phase_branch_template` and `milestone_branch_template` fields are only used when `branching_strategy` is set to `"phase"` or `"milestone"` respectively. When `branching_strategy` is `"none"`, all template fields are ignored.
358
+
359
+ 3. **`context_window` threshold triggers** -- When `context_window >= 500000`, workflows enable adaptive context enrichment: full-body reads of prior phase SUMMARYs, cross-phase context injection in plan-phase, and deeper read depth for anti-pattern references. Below 500000, only frontmatter and summaries are read.
360
+
361
+ 4. **`parallelization` polymorphism** -- Accepts both a simple boolean and an object with an `enabled` field. `loadConfig()` normalizes either form to a boolean. `{ "enabled": true }` is equivalent to `true`.
362
+
363
+ 5. **Search API keys and flags** -- `brave_search`, `firecrawl`, and `exa_search` are auto-set to `true` during project creation if the corresponding API key is detected (environment variable or `~/.gsd/<name>_api_key` file). Setting them to `true` without the API key has no effect.
364
+
365
+ 6. **`planning.*` and top-level equivalence** -- `planning.commit_docs` and `commit_docs` are equivalent; `planning.search_gitignored` and `search_gitignored` are equivalent. If both are set, the top-level value takes precedence.
366
+
367
+ 7. **`depth` to `granularity` migration** -- The deprecated `depth` key (`quick`/`standard`/`comprehensive`) is automatically migrated to `granularity` (`coarse`/`standard`/`fine`) on config load and persisted back to disk.
368
+
369
+ 8. **`sub_repos` auto-sync** -- On every config load, GSD scans for child directories with `.git` and updates the `sub_repos` array if the filesystem has changed. Legacy `multiRepo: true` is automatically migrated to a detected `sub_repos` array.
370
+
371
+ ---
372
+
373
+ ## Example Configurations
374
+
375
+ ### Minimal -- Solo Developer
376
+
377
+ ```json
378
+ {
379
+ "model_profile": "balanced",
380
+ "commit_docs": true,
381
+ "workflow": {
382
+ "research": true,
383
+ "plan_check": true,
384
+ "verifier": true,
385
+ "use_worktrees": false
386
+ }
387
+ }
388
+ ```
389
+
390
+ ### Team Project with Branching
391
+
392
+ ```json
393
+ {
394
+ "model_profile": "quality",
395
+ "commit_docs": true,
396
+ "project_code": "APP",
397
+ "git": {
398
+ "branching_strategy": "phase",
399
+ "base_branch": "develop",
400
+ "phase_branch_template": "gsd/phase-{phase}-{slug}"
401
+ },
402
+ "workflow": {
403
+ "research": true,
404
+ "plan_check": true,
405
+ "verifier": true,
406
+ "nyquist_validation": true,
407
+ "use_worktrees": true,
408
+ "discuss_mode": "discuss"
409
+ },
410
+ "manager": {
411
+ "flags": {
412
+ "discuss": "",
413
+ "plan": "",
414
+ "execute": ""
415
+ }
416
+ },
417
+ "response_language": "English"
418
+ }
419
+ ```
420
+
421
+ ### Large Codebase -- 1M Context with Extended Timeouts
422
+
423
+ ```json
424
+ {
425
+ "model_profile": "quality",
426
+ "context_window": 1000000,
427
+ "commit_docs": true,
428
+ "project_code": "MEGA",
429
+ "phase_naming": "sequential",
430
+ "git": {
431
+ "branching_strategy": "milestone",
432
+ "milestone_branch_template": "gsd/{milestone}-{slug}"
433
+ },
434
+ "workflow": {
435
+ "research": true,
436
+ "plan_check": true,
437
+ "verifier": true,
438
+ "nyquist_validation": true,
439
+ "subagent_timeout": 600000,
440
+ "use_worktrees": true,
441
+ "node_repair": true,
442
+ "node_repair_budget": 3,
443
+ "auto_advance": true
444
+ },
445
+ "brave_search": true,
446
+ "hooks": {
447
+ "context_warnings": true
448
+ }
449
+ }
450
+ ```
451
+
452
+ </complete_field_reference>
453
+
217
454
  </planning_config>