gsd-antigravity-kit 1.32.0 → 2.0.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.
- package/.agent/skills/gsd/SKILL.md +152 -123
- package/.agent/skills/gsd/VERSION +1 -0
- package/.agent/skills/gsd/assets/templates/user-profile.md +8 -8
- package/.agent/skills/gsd/bin/gsd-tools.cjs +81 -3
- package/.agent/skills/gsd/bin/help-manifest.json +24 -1
- package/.agent/skills/gsd/bin/hooks/gsd-check-update.js +15 -5
- package/.agent/skills/gsd/bin/hooks/gsd-context-monitor.js +1 -1
- package/.agent/skills/gsd/bin/hooks/gsd-phase-boundary.sh +27 -0
- package/.agent/skills/gsd/bin/hooks/gsd-prompt-guard.js +2 -1
- package/.agent/skills/gsd/bin/hooks/gsd-read-guard.js +1 -1
- package/.agent/skills/gsd/bin/hooks/gsd-session-state.sh +33 -0
- package/.agent/skills/gsd/bin/hooks/gsd-statusline.js +5 -5
- package/.agent/skills/gsd/bin/hooks/gsd-validate-commit.sh +47 -0
- package/.agent/skills/gsd/bin/hooks/gsd-workflow-guard.js +1 -1
- package/.agent/skills/gsd/bin/lib/config.cjs +31 -10
- package/.agent/skills/gsd/bin/lib/core.cjs +48 -13
- package/.agent/skills/gsd/bin/lib/frontmatter.cjs +34 -2
- package/.agent/skills/gsd/bin/lib/intel.cjs +660 -0
- package/.agent/skills/gsd/bin/lib/learnings.cjs +378 -0
- package/.agent/skills/gsd/bin/lib/milestone.cjs +13 -4
- package/.agent/skills/gsd/bin/lib/model-profiles.cjs +17 -17
- package/.agent/skills/gsd/bin/lib/profile-output.cjs +31 -31
- package/.agent/skills/gsd/bin/lib/security.cjs +119 -0
- package/.agent/skills/gsd/bin/lib/verify.cjs +15 -15
- package/.agent/skills/gsd/migration_report.md +7 -0
- package/.agent/skills/gsd/references/agents/gsd-code-fixer.md +516 -0
- package/.agent/skills/gsd/references/agents/gsd-code-reviewer.md +355 -0
- package/.agent/skills/gsd/references/agents/gsd-debugger.md +10 -1
- package/.agent/skills/gsd/references/agents/gsd-executor.md +3 -0
- package/.agent/skills/gsd/references/agents/gsd-intel-updater.md +314 -0
- package/.agent/skills/gsd/references/agents/gsd-phase-researcher.md +3 -0
- package/.agent/skills/gsd/references/agents/gsd-plan-checker.md +16 -4
- package/.agent/skills/gsd/references/agents/gsd-planner.md +7 -0
- package/.agent/skills/gsd/references/agents/gsd-user-profiler.md +5 -5
- package/.agent/skills/gsd/references/agents/gsd-verifier.md +55 -1
- package/.agent/skills/gsd/references/agents/profiles/dev.md +21 -0
- package/.agent/skills/gsd/references/agents/profiles/research.md +22 -0
- package/.agent/skills/gsd/references/agents/profiles/review.md +22 -0
- package/.agent/skills/gsd/references/commands/{gsd-add-todo.md → atomic/add-todo.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-check-todos.md → atomic/check-todos.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-cleanup.md → atomic/cleanup.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-do.md → atomic/do.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-help.md → atomic/help.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-join-discord.md → atomic/join-discord.md} +21 -19
- package/.agent/skills/gsd/references/commands/{gsd-note.md → atomic/note.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-session-report.md → atomic/session-report.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-ship.md → atomic/ship.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-stats.md → atomic/stats.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-thread.md → atomic/thread.md} +7 -6
- package/.agent/skills/gsd/references/commands/atomic/undo.md +36 -0
- package/.agent/skills/gsd/references/commands/{gsd-add-backlog.md → milestone/add-backlog.md} +8 -7
- package/.agent/skills/gsd/references/commands/{gsd-audit-milestone.md → milestone/audit-milestone.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-complete-milestone.md → milestone/complete-milestone.md} +6 -4
- package/.agent/skills/gsd/references/commands/{gsd-milestone-summary.md → milestone/milestone-summary.md} +5 -3
- package/.agent/skills/gsd/references/commands/{gsd-new-milestone.md → milestone/new-milestone.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-plan-milestone-gaps.md → milestone/plan-milestone-gaps.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-plant-seed.md → milestone/plant-seed.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-review-backlog.md → milestone/review-backlog.md} +6 -5
- package/.agent/skills/gsd/references/commands/misc/audit-fix.md +35 -0
- package/.agent/skills/gsd/references/commands/{gsd-audit-uat.md → misc/audit-uat.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-next.md → misc/next.md} +6 -3
- package/.agent/skills/gsd/references/commands/{gsd-progress.md → misc/progress.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-verify-work.md → misc/verify-work.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-add-phase.md → phase/add-phase.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-add-tests.md → phase/add-tests.md} +8 -3
- package/.agent/skills/gsd/references/commands/{gsd-discuss-phase.md → phase/discuss-phase.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-execute-phase.md → phase/execute-phase.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-insert-phase.md → phase/insert-phase.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-list-phase-assumptions.md → phase/list-phase-assumptions.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-plan-phase.md → phase/plan-phase.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-remove-phase.md → phase/remove-phase.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-research-phase.md → phase/research-phase.md} +7 -6
- package/.agent/skills/gsd/references/commands/{gsd-secure-phase.md → phase/secure-phase.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-ui-phase.md → phase/ui-phase.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-ui-review.md → phase/ui-review.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-validate-phase.md → phase/validate-phase.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-workstreams.md → phase/workstreams.md} +71 -70
- package/.agent/skills/gsd/references/commands/{gsd-analyze-dependencies.md → project/analyze-dependencies.md} +5 -4
- package/.agent/skills/gsd/references/commands/project/explore.md +29 -0
- package/.agent/skills/gsd/references/commands/project/import.md +38 -0
- package/.agent/skills/gsd/references/commands/project/intel.md +181 -0
- package/.agent/skills/gsd/references/commands/{gsd-list-workspaces.md → project/list-workspaces.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-map-codebase.md → project/map-codebase.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-new-project.md → project/new-project.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-new-workspace.md → project/new-workspace.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-remove-workspace.md → project/remove-workspace.md} +4 -3
- package/.agent/skills/gsd/references/commands/project/scan.md +28 -0
- package/.agent/skills/gsd/references/commands/{gsd-autonomous.md → system/autonomous.md} +4 -3
- package/.agent/skills/gsd/references/commands/system/code-review-fix.md +54 -0
- package/.agent/skills/gsd/references/commands/system/code-review.md +57 -0
- package/.agent/skills/gsd/references/commands/{gsd-debug.md → system/debug.md} +7 -6
- package/.agent/skills/gsd/references/commands/{gsd-docs-update.md → system/docs-update.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-fast.md → system/fast.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-forensics.md → system/forensics.md} +5 -3
- package/.agent/skills/gsd/references/commands/{gsd-health.md → system/health.md} +5 -4
- package/.agent/skills/gsd/references/commands/{gsd-manager.md → system/manager.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-pause-work.md → system/pause-work.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-pr-branch.md → system/pr-branch.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-profile-user.md → system/profile-user.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-quick.md → system/quick.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-reapply-patches.md → system/reapply-patches.md} +25 -7
- package/.agent/skills/gsd/references/commands/{gsd-resume-work.md → system/resume-work.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-review.md → system/review.md} +4 -3
- package/.agent/skills/gsd/references/commands/system/set-profile.md +14 -0
- package/.agent/skills/gsd/references/commands/{gsd-settings.md → system/settings.md} +4 -3
- package/.agent/skills/gsd/references/commands/{gsd-update.md → system/update.md} +4 -3
- package/.agent/skills/gsd/references/docs/agent-contracts.md +79 -0
- package/.agent/skills/gsd/references/docs/common-bug-patterns.md +114 -0
- package/.agent/skills/gsd/references/docs/context-budget.md +49 -0
- package/.agent/skills/gsd/references/docs/domain-probes.md +125 -0
- package/.agent/skills/gsd/references/docs/few-shot-examples/plan-checker.md +73 -0
- package/.agent/skills/gsd/references/docs/few-shot-examples/verifier.md +109 -0
- package/.agent/skills/gsd/references/docs/gate-prompts.md +100 -0
- package/.agent/skills/gsd/references/docs/gates.md +70 -0
- package/.agent/skills/gsd/references/docs/model-profile-resolution.md +2 -0
- package/.agent/skills/gsd/references/docs/model-profiles.md +20 -14
- package/.agent/skills/gsd/references/docs/planning-config.md +216 -1
- package/.agent/skills/gsd/references/docs/revision-loop.md +97 -0
- package/.agent/skills/gsd/references/docs/thinking-models-debug.md +44 -0
- package/.agent/skills/gsd/references/docs/thinking-models-execution.md +50 -0
- package/.agent/skills/gsd/references/docs/thinking-models-planning.md +62 -0
- package/.agent/skills/gsd/references/docs/thinking-models-research.md +50 -0
- package/.agent/skills/gsd/references/docs/thinking-models-verification.md +55 -0
- package/.agent/skills/gsd/references/docs/thinking-partner.md +96 -0
- package/.agent/skills/gsd/references/docs/universal-anti-patterns.md +58 -0
- package/.agent/skills/gsd/references/docs/user-profiling.md +10 -10
- package/.agent/skills/gsd/references/docs/verification-overrides.md +227 -0
- package/.agent/skills/gsd/references/docs/workstream-flag.md +2 -2
- package/.agent/skills/gsd/references/mapping.md +11 -21
- package/.agent/skills/gsd/references/workflows/analyze-dependencies.md +3 -3
- package/.agent/skills/gsd/references/workflows/audit-fix.md +157 -0
- package/.agent/skills/gsd/references/workflows/autonomous.md +22 -1
- package/.agent/skills/gsd/references/workflows/code-review-fix.md +497 -0
- package/.agent/skills/gsd/references/workflows/code-review.md +515 -0
- package/.agent/skills/gsd/references/workflows/discuss-phase-power.md +3 -3
- package/.agent/skills/gsd/references/workflows/discuss-phase.md +20 -0
- package/.agent/skills/gsd/references/workflows/execute-phase.md +103 -0
- package/.agent/skills/gsd/references/workflows/explore.md +139 -0
- package/.agent/skills/gsd/references/workflows/import.md +274 -0
- package/.agent/skills/gsd/references/workflows/inbox.md +384 -0
- package/.agent/skills/gsd/references/workflows/manager.md +5 -5
- package/.agent/skills/gsd/references/workflows/new-milestone.md +1 -1
- package/.agent/skills/gsd/references/workflows/next.md +56 -0
- package/.agent/skills/gsd/references/workflows/plan-phase.md +48 -1
- package/.agent/skills/gsd/references/workflows/quick.md +96 -2
- package/.agent/skills/gsd/references/workflows/review.md +23 -3
- package/.agent/skills/gsd/references/workflows/scan.md +102 -0
- package/.agent/skills/gsd/references/workflows/settings.md +1 -1
- package/.agent/skills/gsd/references/workflows/ui-review.md +2 -2
- package/.agent/skills/gsd/references/workflows/undo.md +312 -0
- package/.agent/skills/gsd/references/workflows/update.md +5 -5
- package/.agent/skills/gsd-converter/SKILL.md +67 -59
- package/.agent/skills/gsd-converter/assets/migration-manifest.json +74 -0
- package/.agent/skills/gsd-converter/references/mapping.md +6 -16
- package/.agent/skills/gsd-converter/scripts/convert.py +419 -80
- package/.agent/skills/gsd-converter/scripts/regression_test.py +33 -0
- package/.agent/skills/selectpaste-update/SKILL.md +46 -0
- package/.agent/skills/selectpaste-update/scripts/sync-commands.py +317 -0
- package/README.md +4 -2
- package/bin/install.js +116 -116
- package/package.json +1 -1
- package/.agent/skills/gsd/references/commands/gsd-set-profile.md +0 -12
- /package/.agent/skills/gsd/references/commands/{gsd-tools.md → system/gsd-tools.md} +0 -0
|
@@ -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.
|
|
@@ -26,6 +26,8 @@ Task(
|
|
|
26
26
|
|
|
27
27
|
**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
28
|
|
|
29
|
+
If `model_profile` is `"adaptive"`, agents resolve to role-based assignments (opus/sonnet/haiku based on agent type).
|
|
30
|
+
|
|
29
31
|
If `model_profile` is `"inherit"`, all agents resolve to `"inherit"` (useful for OpenCode `/model`).
|
|
30
32
|
|
|
31
33
|
## Usage
|
|
@@ -4,20 +4,20 @@ Model profiles control which Antigravity model each GSD agent uses. This allows
|
|
|
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 Antigravity model each GSD agent uses. This allows
|
|
|
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`)
|
|
@@ -35,7 +35,7 @@ Configuration options for `.planning/` directory behavior.
|
|
|
35
35
|
| `git.quick_branch_template` | `null` | Optional branch template for quick-task runs |
|
|
36
36
|
| `workflow.use_worktrees` | `true` | Whether executor agents run in isolated git worktrees. Set to `false` to disable worktrees — agents execute sequentially on the main working tree instead. Recommended for solo developers or when worktree merges cause issues. |
|
|
37
37
|
| `workflow.subagent_timeout` | `300000` | Timeout in milliseconds for parallel subagent tasks (e.g. codebase mapping). Increase for large codebases or slower models. Default: 300000 (5 minutes). |
|
|
38
|
-
| `manager.flags.discuss` | `""` | Flags passed to `/gsd
|
|
38
|
+
| `manager.flags.discuss` | `""` | Flags passed to `/gsd-discuss-phase` when dispatched from manager (e.g. `"--auto --analyze"`) |
|
|
39
39
|
| `manager.flags.plan` | `""` | Flags passed to plan workflow when dispatched from manager |
|
|
40
40
|
| `manager.flags.execute` | `""` | Flags passed to execute workflow when dispatched from manager |
|
|
41
41
|
| `response_language` | `null` | Language for user-facing questions and prompts across all phases/subagents (e.g. `"Portuguese"`, `"Japanese"`, `"Spanish"`). When set, all spawned agents include a directive to respond in this language. |
|
|
@@ -214,4 +214,219 @@ 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 | (none) | `"code-first"`, `"plan-first"`, `"hybrid"` | Per-phase workflow mode controlling discuss/plan/execute flow |
|
|
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 Antigravity IDs; `"omit"` returns empty string |
|
|
237
|
+
|
|
238
|
+
### Workflow Fields
|
|
239
|
+
|
|
240
|
+
Set via `workflow.*` namespace in config.json (e.g., `"workflow": { "research": true }`).
|
|
241
|
+
|
|
242
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
243
|
+
|-----|------|---------|----------------|-------------|
|
|
244
|
+
| `workflow.research` | boolean | `true` | `true`, `false` | Run research agent before planning |
|
|
245
|
+
| `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. |
|
|
246
|
+
| `workflow.verifier` | boolean | `true` | `true`, `false` | Run verifier agent after execution |
|
|
247
|
+
| `workflow.nyquist_validation` | boolean | `true` | `true`, `false` | Enable Nyquist-inspired validation gates |
|
|
248
|
+
| `workflow.auto_advance` | boolean | `false` | `true`, `false` | Auto-advance to next phase after completion |
|
|
249
|
+
| `workflow.node_repair` | boolean | `true` | `true`, `false` | Attempt automatic repair of failed plan nodes |
|
|
250
|
+
| `workflow.node_repair_budget` | number | `2` | Any positive integer | Max repair retries per failed node |
|
|
251
|
+
| `workflow.ui_phase` | boolean | `true` | `true`, `false` | Generate UI-SPEC.md for frontend phases |
|
|
252
|
+
| `workflow.ui_safety_gate` | boolean | `true` | `true`, `false` | Require safety gate approval for UI changes |
|
|
253
|
+
| `workflow.text_mode` | boolean | `false` | `true`, `false` | Use plain-text numbered lists instead of AskUserQuestion menus |
|
|
254
|
+
| `workflow.research_before_questions` | boolean | `false` | `true`, `false` | Run research before interactive questions in discuss phase |
|
|
255
|
+
| `workflow.discuss_mode` | string | `"discuss"` | `"discuss"`, `"auto"`, `"analyze"` | Default mode for discuss-phase agent |
|
|
256
|
+
| `workflow.skip_discuss` | boolean | `false` | `true`, `false` | Skip discuss phase entirely |
|
|
257
|
+
| `workflow.use_worktrees` | boolean | `true` | `true`, `false` | Run executor agents in isolated git worktrees |
|
|
258
|
+
| `workflow.subagent_timeout` | number | `300000` | Any positive integer (ms) | Timeout for parallel subagent tasks (default: 5 minutes) |
|
|
259
|
+
| `workflow._auto_chain_active` | boolean | `false` | `true`, `false` | Internal: tracks whether autonomous chaining is active |
|
|
260
|
+
|
|
261
|
+
### Git Fields
|
|
262
|
+
|
|
263
|
+
Set via `git.*` namespace (e.g., `"git": { "branching_strategy": "phase" }`).
|
|
264
|
+
|
|
265
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
266
|
+
|-----|------|---------|----------------|-------------|
|
|
267
|
+
| `git.branching_strategy` | string | `"none"` | `"none"`, `"phase"`, `"milestone"` | Git branching approach for phase/milestone isolation |
|
|
268
|
+
| `git.base_branch` | string\|null | `null` (auto-detect) | Any branch name | Target branch for PRs and merges; auto-detects from `origin/HEAD` when `null` |
|
|
269
|
+
| `git.phase_branch_template` | string | `"gsd/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy |
|
|
270
|
+
| `git.milestone_branch_template` | string | `"gsd/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy |
|
|
271
|
+
| `git.quick_branch_template` | string\|null | `null` | Template with `{slug}` | Optional branch template for quick-task runs |
|
|
272
|
+
|
|
273
|
+
### Search & API Fields
|
|
274
|
+
|
|
275
|
+
These toggle external search integrations. Auto-detected at project creation when API keys are present.
|
|
276
|
+
|
|
277
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
278
|
+
|-----|------|---------|----------------|-------------|
|
|
279
|
+
| `brave_search` | boolean | `false` | `true`, `false` | Enable Brave web search for research agent (requires `BRAVE_API_KEY`) |
|
|
280
|
+
| `firecrawl` | boolean | `false` | `true`, `false` | Enable Firecrawl page scraping (requires `FIRECRAWL_API_KEY`) |
|
|
281
|
+
| `exa_search` | boolean | `false` | `true`, `false` | Enable Exa semantic search (requires `EXA_API_KEY`) |
|
|
282
|
+
|
|
283
|
+
### Features Fields
|
|
284
|
+
|
|
285
|
+
Set via `features.*` namespace (e.g., `"features": { "thinking_partner": true }`).
|
|
286
|
+
|
|
287
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
288
|
+
|-----|------|---------|----------------|-------------|
|
|
289
|
+
| `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) |
|
|
290
|
+
|
|
291
|
+
### Hook Fields
|
|
292
|
+
|
|
293
|
+
Set via `hooks.*` namespace (e.g., `"hooks": { "context_warnings": true }`).
|
|
294
|
+
|
|
295
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
296
|
+
|-----|------|---------|----------------|-------------|
|
|
297
|
+
| `hooks.context_warnings` | boolean | `true` | `true`, `false` | Show warnings when context budget is exceeded |
|
|
298
|
+
|
|
299
|
+
### Manager Fields
|
|
300
|
+
|
|
301
|
+
Set via `manager.*` namespace (e.g., `"manager": { "flags": { "discuss": "--auto" } }`).
|
|
302
|
+
|
|
303
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
304
|
+
|-----|------|---------|----------------|-------------|
|
|
305
|
+
| `manager.flags.discuss` | string | `""` | Any CLI flags string | Flags passed to `/gsd-discuss-phase` from manager (e.g., `"--auto --analyze"`) |
|
|
306
|
+
| `manager.flags.plan` | string | `""` | Any CLI flags string | Flags passed to plan workflow from manager |
|
|
307
|
+
| `manager.flags.execute` | string | `""` | Any CLI flags string | Flags passed to execute workflow from manager |
|
|
308
|
+
|
|
309
|
+
### Advanced Fields
|
|
310
|
+
|
|
311
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
312
|
+
|-----|------|---------|----------------|-------------|
|
|
313
|
+
| `parallelization` | boolean\|object | `true` | `true`, `false`, `{ "enabled": true }` | Enable parallel wave execution; object form allows additional sub-keys |
|
|
314
|
+
| `model_overrides` | object\|null | `null` | `{ "<agent-type>": "<model-id>" }` | Override model selection per agent type |
|
|
315
|
+
| `agent_skills` | object | `{}` | `{ "<agent-type>": "<skill-set>" }` | Assign skill sets to specific agent types |
|
|
316
|
+
| `sub_repos` | array | `[]` | Array of relative path strings | Child directories with independent `.git` repos (auto-detected) |
|
|
317
|
+
|
|
318
|
+
### Planning Fields
|
|
319
|
+
|
|
320
|
+
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.
|
|
321
|
+
|
|
322
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
323
|
+
|-----|------|---------|----------------|-------------|
|
|
324
|
+
| `planning.commit_docs` | boolean | `true` | `true`, `false` | Alias for top-level `commit_docs` |
|
|
325
|
+
| `planning.search_gitignored` | boolean | `false` | `true`, `false` | Alias for top-level `search_gitignored` |
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Field Interactions
|
|
330
|
+
|
|
331
|
+
Several config fields affect each other or trigger special behavior:
|
|
332
|
+
|
|
333
|
+
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.
|
|
334
|
+
|
|
335
|
+
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.
|
|
336
|
+
|
|
337
|
+
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.
|
|
338
|
+
|
|
339
|
+
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`.
|
|
340
|
+
|
|
341
|
+
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.
|
|
342
|
+
|
|
343
|
+
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.
|
|
344
|
+
|
|
345
|
+
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.
|
|
346
|
+
|
|
347
|
+
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.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Example Configurations
|
|
352
|
+
|
|
353
|
+
### Minimal -- Solo Developer
|
|
354
|
+
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"model_profile": "balanced",
|
|
358
|
+
"commit_docs": true,
|
|
359
|
+
"workflow": {
|
|
360
|
+
"research": true,
|
|
361
|
+
"plan_check": true,
|
|
362
|
+
"verifier": true,
|
|
363
|
+
"use_worktrees": false
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Team Project with Branching
|
|
369
|
+
|
|
370
|
+
```json
|
|
371
|
+
{
|
|
372
|
+
"model_profile": "quality",
|
|
373
|
+
"commit_docs": true,
|
|
374
|
+
"project_code": "APP",
|
|
375
|
+
"git": {
|
|
376
|
+
"branching_strategy": "phase",
|
|
377
|
+
"base_branch": "develop",
|
|
378
|
+
"phase_branch_template": "gsd/phase-{phase}-{slug}"
|
|
379
|
+
},
|
|
380
|
+
"workflow": {
|
|
381
|
+
"research": true,
|
|
382
|
+
"plan_check": true,
|
|
383
|
+
"verifier": true,
|
|
384
|
+
"nyquist_validation": true,
|
|
385
|
+
"use_worktrees": true,
|
|
386
|
+
"discuss_mode": "discuss"
|
|
387
|
+
},
|
|
388
|
+
"manager": {
|
|
389
|
+
"flags": {
|
|
390
|
+
"discuss": "",
|
|
391
|
+
"plan": "",
|
|
392
|
+
"execute": ""
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"response_language": "English"
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Large Codebase -- 1M Context with Extended Timeouts
|
|
400
|
+
|
|
401
|
+
```json
|
|
402
|
+
{
|
|
403
|
+
"model_profile": "quality",
|
|
404
|
+
"context_window": 1000000,
|
|
405
|
+
"commit_docs": true,
|
|
406
|
+
"project_code": "MEGA",
|
|
407
|
+
"phase_naming": "sequential",
|
|
408
|
+
"git": {
|
|
409
|
+
"branching_strategy": "milestone",
|
|
410
|
+
"milestone_branch_template": "gsd/{milestone}-{slug}"
|
|
411
|
+
},
|
|
412
|
+
"workflow": {
|
|
413
|
+
"research": true,
|
|
414
|
+
"plan_check": true,
|
|
415
|
+
"verifier": true,
|
|
416
|
+
"nyquist_validation": true,
|
|
417
|
+
"subagent_timeout": 600000,
|
|
418
|
+
"use_worktrees": true,
|
|
419
|
+
"node_repair": true,
|
|
420
|
+
"node_repair_budget": 3,
|
|
421
|
+
"auto_advance": true
|
|
422
|
+
},
|
|
423
|
+
"brave_search": true,
|
|
424
|
+
"hooks": {
|
|
425
|
+
"context_warnings": true
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
</complete_field_reference>
|
|
431
|
+
|
|
217
432
|
</planning_config>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Revision Loop Pattern
|
|
2
|
+
|
|
3
|
+
Standard pattern for iterative agent revision with feedback. Used when a checker/validator finds issues and the producing agent needs to revise its output.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pattern: Check-Revise-Escalate (max 3 iterations)
|
|
8
|
+
|
|
9
|
+
This pattern applies whenever:
|
|
10
|
+
1. An agent produces output (plans, imports, gap-closure plans)
|
|
11
|
+
2. A checker/validator evaluates that output
|
|
12
|
+
3. Issues are found that need revision
|
|
13
|
+
|
|
14
|
+
### Flow
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
prev_issue_count = Infinity
|
|
18
|
+
iteration = 0
|
|
19
|
+
|
|
20
|
+
LOOP:
|
|
21
|
+
1. Run checker/validator on current output
|
|
22
|
+
2. Read checker results
|
|
23
|
+
3. If PASSED or only INFO-level issues:
|
|
24
|
+
-> Accept output, exit loop
|
|
25
|
+
4. If BLOCKER or WARNING issues found:
|
|
26
|
+
a. iteration += 1
|
|
27
|
+
b. If iteration > 3:
|
|
28
|
+
-> Escalate to user (see "After 3 Iterations" below)
|
|
29
|
+
c. Parse issue count from checker output
|
|
30
|
+
d. If issue_count >= prev_issue_count:
|
|
31
|
+
-> Escalate to user: "Revision loop stalled (issue count not decreasing)"
|
|
32
|
+
e. prev_issue_count = issue_count
|
|
33
|
+
f. Re-spawn the producing agent with checker feedback appended
|
|
34
|
+
g. After revision completes, go to LOOP
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Issue Count Tracking
|
|
38
|
+
|
|
39
|
+
Track the number of BLOCKER + WARNING issues returned by the checker on each iteration. If the count does not decrease between consecutive iterations, the producing agent is stuck and further iterations will not help. Break early and escalate to the user.
|
|
40
|
+
|
|
41
|
+
Display iteration progress before each revision spawn:
|
|
42
|
+
`Revision iteration {N}/3 -- {blocker_count} blockers, {warning_count} warnings`
|
|
43
|
+
|
|
44
|
+
### Re-spawn Prompt Structure
|
|
45
|
+
|
|
46
|
+
When re-spawning the producing agent for revision, pass the checker's YAML-formatted issues. The checker's output contains a `## Issues` heading followed by a YAML block. Parse this block and pass it verbatim to the revision agent.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
<checker_issues>
|
|
50
|
+
The issues below are in YAML format. Each has: dimension, severity, finding,
|
|
51
|
+
affected_field, suggested_fix. Address ALL BLOCKER issues. Address WARNING
|
|
52
|
+
issues where feasible.
|
|
53
|
+
|
|
54
|
+
{YAML issues block from checker output -- passed verbatim}
|
|
55
|
+
</checker_issues>
|
|
56
|
+
|
|
57
|
+
<revision_instructions>
|
|
58
|
+
Address ALL BLOCKER and WARNING issues identified above.
|
|
59
|
+
- For each BLOCKER: make the required change
|
|
60
|
+
- For each WARNING: address or explain why it's acceptable
|
|
61
|
+
- Do NOT introduce new issues while fixing existing ones
|
|
62
|
+
- Preserve all content not flagged by the checker
|
|
63
|
+
This is revision iteration {N} of max 3. Previous iteration had {prev_count}
|
|
64
|
+
issues. You must reduce the count or the loop will terminate.
|
|
65
|
+
</revision_instructions>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### After 3 Iterations
|
|
69
|
+
|
|
70
|
+
If issues persist after 3 revision cycles:
|
|
71
|
+
|
|
72
|
+
1. Present remaining issues to the user
|
|
73
|
+
2. Use gate prompt (pattern: yes-no from `references/gate-prompts.md`):
|
|
74
|
+
question: "Issues remain after 3 revision attempts. Proceed with current output?"
|
|
75
|
+
header: "Proceed?"
|
|
76
|
+
options:
|
|
77
|
+
- label: "Proceed anyway" description: "Accept output with remaining issues"
|
|
78
|
+
- label: "Adjust approach" description: "Discuss a different approach"
|
|
79
|
+
3. If "Proceed anyway": accept current output and continue
|
|
80
|
+
4. If "Adjust approach" or "Other": discuss with user, then re-enter the producing step with updated context
|
|
81
|
+
|
|
82
|
+
### Workflow-Specific Variations
|
|
83
|
+
|
|
84
|
+
| Workflow | Producer Agent | Checker Agent | Notes |
|
|
85
|
+
|----------|---------------|---------------|-------|
|
|
86
|
+
| plan-phase | gsd-planner | gsd-plan-checker | Revision prompt via planner-revision.md |
|
|
87
|
+
| execute-phase | gsd-executor | gsd-verifier | Post-execution verification |
|
|
88
|
+
| discuss-phase | orchestrator | gsd-plan-checker | Inline revision by orchestrator |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Important Notes
|
|
93
|
+
|
|
94
|
+
- **INFO-level issues are always acceptable** -- they don't trigger revision
|
|
95
|
+
- **Each iteration gets a fresh agent spawn** -- don't try to continue in the same context
|
|
96
|
+
- **Checker feedback must be inlined** -- the revision agent needs to see exactly what failed
|
|
97
|
+
- **Don't silently swallow issues** -- always present the final state to the user after exiting the loop
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Thinking Models: Debug Cluster
|
|
2
|
+
|
|
3
|
+
Structured reasoning models for the **debugger** agent. Apply these at decision points during investigation, not continuously. Each model counters a specific documented failure mode.
|
|
4
|
+
|
|
5
|
+
Source: Curated from [thinking-partner](https://github.com/mattnowdev/thinking-partner) model catalog (150+ models). Selected for direct applicability to GSD debugging workflow.
|
|
6
|
+
|
|
7
|
+
## Conflict Resolution
|
|
8
|
+
|
|
9
|
+
**Fault Tree and Hypothesis-Driven are sequential:** Fault Tree FIRST (generate the tree of possible causes), Hypothesis-Driven SECOND (test each branch systematically). Fault Tree provides the map; Hypothesis-Driven provides the discipline to traverse it.
|
|
10
|
+
|
|
11
|
+
## 1. Fault Tree Analysis
|
|
12
|
+
|
|
13
|
+
**Counters:** Jumping to conclusions without systematically mapping failure paths.
|
|
14
|
+
|
|
15
|
+
Before testing any hypothesis, build a fault tree: start with the observed symptom as the root node, then branch into all possible causes at each level (hardware, software, configuration, data, environment). Use AND/OR gates -- some failures require multiple conditions (AND), others have independent triggers (OR). This tree becomes your investigation roadmap. Prioritize branches by likelihood and testability, but do NOT prune branches just because they seem unlikely -- unlikely causes that are easy to test should be tested early.
|
|
16
|
+
|
|
17
|
+
## 2. Hypothesis-Driven Investigation
|
|
18
|
+
|
|
19
|
+
**Counters:** Making random changes and hoping something works -- the "shotgun debugging" anti-pattern.
|
|
20
|
+
|
|
21
|
+
For each hypothesis from the fault tree, follow the strict protocol: PREDICT ("If hypothesis H is correct, then test T should produce result R"), TEST (execute exactly one test), OBSERVE (record the actual result), CONCLUDE (matched = SUPPORTED, failed = ELIMINATED, unexpected = new evidence). Never skip the PREDICT step -- without a prediction, you cannot distinguish a meaningful result from noise. Never change more than one variable per test -- if you change two things and the bug disappears, you don't know which change fixed it.
|
|
22
|
+
|
|
23
|
+
## 3. Occam's Razor
|
|
24
|
+
|
|
25
|
+
**Counters:** Pursuing elaborate explanations when simple ones have not been ruled out.
|
|
26
|
+
|
|
27
|
+
Before investigating complex multi-component interaction bugs, race conditions, or framework-level issues, verify the simple explanations first: typo in variable name, wrong file path, missing import, incorrect config value, stale cache, wrong environment variable. These "boring" causes account for the majority of bugs. Only escalate to complex hypotheses AFTER the simple ones are eliminated. If your current hypothesis requires 3+ things to go wrong simultaneously, step back and look for a single-point failure.
|
|
28
|
+
|
|
29
|
+
## 4. Counterfactual Thinking
|
|
30
|
+
|
|
31
|
+
**Counters:** Failing to isolate causation by not asking "what if we changed just this one thing?"
|
|
32
|
+
|
|
33
|
+
When you have a hypothesis about the root cause, construct a counterfactual: "If I change ONLY this one variable/config/line, the bug should disappear (or appear)." Execute the counterfactual test. If the bug persists after your targeted change, your hypothesis is wrong -- the cause is elsewhere. If the bug disappears, you have strong causal evidence. This is more powerful than correlation ("the bug appeared after deploy X") because it tests the mechanism, not just the timeline.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## When NOT to Think
|
|
38
|
+
|
|
39
|
+
Skip structured reasoning models when the situation does not benefit from them:
|
|
40
|
+
|
|
41
|
+
- **Obvious single-cause bugs** -- If the error message names the exact file, line, and cause (e.g., `TypeError: Cannot read property 'x' of undefined at foo.js:42`), fix it directly. Do not build a fault tree for a null reference with a stack trace.
|
|
42
|
+
- **Reproducing a known fix** -- If you already know the root cause from a previous investigation or the user told you exactly what is wrong, skip hypothesis-driven investigation and go straight to the fix.
|
|
43
|
+
- **Typos, missing imports, wrong paths** -- If Occam's Razor would immediately resolve it, apply the fix without invoking the full model. The model exists for when simple checks fail, not to gate simple checks.
|
|
44
|
+
- **Reading error logs** -- Reading and understanding error output is normal debugging, not a "decision point." Only invoke models when you have multiple plausible hypotheses and need to choose which to test first.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Thinking Models: Execution Cluster
|
|
2
|
+
|
|
3
|
+
Structured reasoning models for the **executor** agent. Apply these at decision points during task execution, not continuously. Each model counters a specific documented failure mode.
|
|
4
|
+
|
|
5
|
+
Source: Curated from [thinking-partner](https://github.com/mattnowdev/thinking-partner) model catalog (150+ models). Selected for direct applicability to GSD execution workflow.
|
|
6
|
+
|
|
7
|
+
## Conflict Resolution
|
|
8
|
+
|
|
9
|
+
**Forcing Function and First Principles both push toward "do it now".** Run First Principles FIRST (understand the constraint), Forcing Function SECOND (create the mechanism). Sequential, not competing.
|
|
10
|
+
|
|
11
|
+
## 1. Circle of Concern vs Circle of Control
|
|
12
|
+
|
|
13
|
+
**Counters:** Executor trying to fix things outside its scope -- upstream bugs, unrelated tech debt, infrastructure issues.
|
|
14
|
+
|
|
15
|
+
Before modifying any code not explicitly listed in the plan's `<files>` section, ask: Is this in my Circle of Control (plan scope) or my Circle of Concern (things I notice but shouldn't fix)? If Circle of Concern: document it as a deviation note or deferred item, do NOT fix it. The executor's job is to build what the plan says, not to improve the codebase. Scope creep from "while I'm here" fixes is the #1 cause of executor overruns.
|
|
16
|
+
|
|
17
|
+
## 2. Forcing Function
|
|
18
|
+
|
|
19
|
+
**Counters:** Deferring hard decisions to runtime instead of resolving them at build time.
|
|
20
|
+
|
|
21
|
+
When you encounter an ambiguous requirement or unclear integration point, create a forcing function that makes the decision explicit NOW rather than hiding it behind a TODO or runtime check. Examples: use a TypeScript `never` type to force exhaustive switches, add a build-time assertion for required config values, create an interface that forces callers to handle error cases. If a decision truly cannot be made at build time, document it as a `checkpoint:decision` deviation -- do not silently defer.
|
|
22
|
+
|
|
23
|
+
## 3. First Principles Thinking
|
|
24
|
+
|
|
25
|
+
**Counters:** Copying patterns from existing code without understanding whether they fit the current task.
|
|
26
|
+
|
|
27
|
+
Before copying a pattern from another file or phase, decompose WHY that pattern exists: What constraint does it satisfy? Does your current task have the same constraint? If not, the pattern may be cargo cult. Build your implementation from the task's actual requirements, not from the nearest existing example. When in doubt, the plan's `<action>` steps define what to build -- derive the implementation from those, not from adjacent code.
|
|
28
|
+
|
|
29
|
+
## 4. Occam's Razor
|
|
30
|
+
|
|
31
|
+
**Counters:** Over-engineering simple tasks with unnecessary abstractions, generics, or future-proofing.
|
|
32
|
+
|
|
33
|
+
Before adding an abstraction layer, generic type parameter, factory pattern, or configuration option, ask: Does the plan REQUIRE this flexibility? If the plan says "create a function that does X", create a function that does X -- not a configurable, extensible, pluggable framework that could theoretically do X through Y through Z. The simplest implementation that satisfies the plan's `<done>` condition is the correct one. Add complexity only when the plan explicitly calls for it.
|
|
34
|
+
|
|
35
|
+
## 5. Chesterton's Fence
|
|
36
|
+
|
|
37
|
+
**Counters:** Removing or modifying existing code without understanding why it was written that way.
|
|
38
|
+
|
|
39
|
+
Before removing, replacing, or significantly modifying existing code that the plan touches, determine WHY it exists. Check: git blame for the commit that introduced it, comments explaining the rationale, test cases that exercise it, the PLAN.md or SUMMARY.md that created it. If the purpose is unclear, keep it and add a comment noting the uncertainty -- do NOT remove code whose purpose you don't understand. If the plan explicitly says to remove it, still document what it did in the deviation notes.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## When NOT to Think
|
|
44
|
+
|
|
45
|
+
Skip structured reasoning models when the situation does not benefit from them:
|
|
46
|
+
|
|
47
|
+
- **Straightforward task actions** -- If the plan says "create file X with content Y" and the action is unambiguous, execute it directly. Do not invoke First Principles to analyze why you are creating a file the plan told you to create.
|
|
48
|
+
- **Following established project patterns** -- If the codebase has a clear, consistent pattern (e.g., every route handler follows the same structure) and the plan says to add another one, follow the pattern. Chesterton's Fence applies to removing patterns, not to following them.
|
|
49
|
+
- **Trivial file edits** -- Adding an import, fixing a typo, updating a version number. These are mechanical changes that do not involve design decisions.
|
|
50
|
+
- **Running verify commands** -- Executing the plan's `<verify>` steps is procedural. Only invoke models if a verify step fails and you need to decide how to respond.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Thinking Models: Planning Cluster
|
|
2
|
+
|
|
3
|
+
Structured reasoning models for the **planner** and **roadmapper** agents. Apply these at decision points during plan creation, not continuously. Each model counters a specific documented failure mode.
|
|
4
|
+
|
|
5
|
+
Source: Curated from [thinking-partner](https://github.com/mattnowdev/thinking-partner) model catalog (150+ models). Selected for direct applicability to GSD planning workflow.
|
|
6
|
+
|
|
7
|
+
## Conflict Resolution
|
|
8
|
+
|
|
9
|
+
Pre-Mortem and Constraint Analysis both analyze risk at different granularities. Run Constraint Analysis FIRST (identify the hardest constraint), then Pre-Mortem (enumerate failure modes around that constraint and the rest of the plan).
|
|
10
|
+
|
|
11
|
+
## 1. Pre-Mortem Analysis
|
|
12
|
+
|
|
13
|
+
**Counters:** Optimistic plan decomposition that ignores failure modes.
|
|
14
|
+
|
|
15
|
+
Before finalizing this plan, assume it has already failed. List the 3 most likely reasons for failure -- missing dependency, wrong decomposition, underestimated complexity -- and add mitigation steps or acceptance criteria that would catch each failure early.
|
|
16
|
+
|
|
17
|
+
## 2. MECE Decomposition
|
|
18
|
+
|
|
19
|
+
**Counters:** Overlapping tasks (merge conflicts) or gapped tasks (missing requirements).
|
|
20
|
+
|
|
21
|
+
Verify this task breakdown is MECE at the REQUIREMENT level: (1) list every requirement from the phase goal, (2) confirm each maps to exactly one task's `<done>`, (3) if two tasks modify the same file, confirm they modify DIFFERENT sections or serve DIFFERENT requirements, (4) flag any requirement not covered by any task.
|
|
22
|
+
|
|
23
|
+
## 3. Constraint Analysis
|
|
24
|
+
|
|
25
|
+
**Counters:** Deferring the hardest constraint to the last task, causing late-stage failures.
|
|
26
|
+
|
|
27
|
+
Identify the single hardest constraint in this phase -- the one thing that, if it doesn't work, makes everything else irrelevant. Schedule that constraint as Task 1 or 2, not last. If the constraint involves an external API or unfamiliar library, add a spike/proof-of-concept task before the main implementation.
|
|
28
|
+
|
|
29
|
+
## 4. Reversibility Test
|
|
30
|
+
|
|
31
|
+
**Counters:** Over-analyzing cheap decisions, under-analyzing costly ones.
|
|
32
|
+
|
|
33
|
+
For each significant decision in this plan, classify as REVERSIBLE (can change later with low cost) or IRREVERSIBLE (changing later requires migration, breaking changes, or significant rework). Spend analysis time proportional to irreversibility. For irreversible decisions, document the rationale in the plan.
|
|
34
|
+
|
|
35
|
+
## 5. Curse of Knowledge Counter
|
|
36
|
+
|
|
37
|
+
**Counters:** Plan-to-executor ambiguity from compressed instructions.
|
|
38
|
+
|
|
39
|
+
For each `<action>` step, re-read it as if you have NEVER seen this codebase. Is every noun unambiguous (which file? which function? which endpoint?)? Is every verb specific (add WHERE? modify HOW?)? If a step could be interpreted two ways, rewrite it. Include file paths, function names, and expected behavior in every action step.
|
|
40
|
+
|
|
41
|
+
## 6. Base Rate Neglect Counter
|
|
42
|
+
|
|
43
|
+
**Counters:** Planners ignoring low-confidence research caveats.
|
|
44
|
+
|
|
45
|
+
Before finalizing the plan, read ALL `[NEEDS DECISION]` items and LOW-confidence recommendations from SUMMARY.md. For each: either (a) create a `checkpoint:decision` task to resolve it, or (b) document why the risk is acceptable in the plan's deviation notes. LOW-confidence items that are silently accepted become undocumented technical debt.
|
|
46
|
+
|
|
47
|
+
## Gap Closure Mode: Root-Cause Check
|
|
48
|
+
|
|
49
|
+
**Applies only when:** Planner enters gap closure mode (triggered by `gaps_found` in VERIFICATION.md).
|
|
50
|
+
|
|
51
|
+
Before writing the fix plan, apply a single "why" round: Why did this gap occur? Was it a plan deficiency (wrong task), an execution miss (correct task, wrong implementation), or a changed assumption (environment/dependency shift)? The fix plan must target the root cause category, not just the symptom.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## When NOT to Think
|
|
56
|
+
|
|
57
|
+
Skip structured reasoning models when the situation does not benefit from them:
|
|
58
|
+
|
|
59
|
+
- **Single-task plans** -- If the phase has one clear requirement and one obvious task, do not run Pre-Mortem or MECE analysis. Write the task directly.
|
|
60
|
+
- **Well-researched phases** -- If RESEARCH.md has HIGH-confidence recommendations for every decision and no `[NEEDS DECISION]` items, skip Base Rate Neglect Counter. The research already resolved uncertainty.
|
|
61
|
+
- **Revision iterations** -- When revising a plan based on checker feedback, focus on fixing the flagged issues. Do not re-run the full model suite on every revision pass -- apply only the model relevant to the specific issue (e.g., MECE if the checker found a coverage gap).
|
|
62
|
+
- **Boilerplate plans** -- Configuration changes, version bumps, documentation updates. These do not have failure modes worth pre-mortem analysis.
|