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,79 @@
|
|
|
1
|
+
# Agent Contracts
|
|
2
|
+
|
|
3
|
+
Completion markers and handoff schemas for all GSD agents. Workflows use these markers to detect agent completion and route accordingly.
|
|
4
|
+
|
|
5
|
+
This doc describes what IS, not what should be. Casing inconsistencies are documented as they appear in agent source files.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Agent Registry
|
|
10
|
+
|
|
11
|
+
| Agent | Role | Completion Markers |
|
|
12
|
+
|-------|------|--------------------|
|
|
13
|
+
| gsd-planner | Plan creation | `## PLANNING COMPLETE` |
|
|
14
|
+
| gsd-executor | Plan execution | `## PLAN COMPLETE`, `## CHECKPOINT REACHED` |
|
|
15
|
+
| gsd-phase-researcher | Phase-scoped research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` |
|
|
16
|
+
| gsd-project-researcher | Project-wide research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` |
|
|
17
|
+
| gsd-plan-checker | Plan validation | `## VERIFICATION PASSED`, `## ISSUES FOUND` |
|
|
18
|
+
| gsd-research-synthesizer | Multi-research synthesis | `## SYNTHESIS COMPLETE`, `## SYNTHESIS BLOCKED` |
|
|
19
|
+
| gsd-debugger | Debug investigation | `## DEBUG COMPLETE`, `## ROOT CAUSE FOUND`, `## CHECKPOINT REACHED` |
|
|
20
|
+
| gsd-roadmapper | Roadmap creation/revision | `## ROADMAP CREATED`, `## ROADMAP REVISED`, `## ROADMAP BLOCKED` |
|
|
21
|
+
| gsd-ui-auditor | UI review | `## UI REVIEW COMPLETE` |
|
|
22
|
+
| gsd-ui-checker | UI validation | `## ISSUES FOUND` |
|
|
23
|
+
| gsd-ui-researcher | UI spec creation | `## UI-SPEC COMPLETE`, `## UI-SPEC BLOCKED` |
|
|
24
|
+
| gsd-verifier | Post-execution verification | `## Verification Complete` (title case) |
|
|
25
|
+
| gsd-integration-checker | Cross-phase integration check | `## Integration Check Complete` (title case) |
|
|
26
|
+
| gsd-nyquist-auditor | Sampling audit | `## PARTIAL`, `## ESCALATE` (non-standard) |
|
|
27
|
+
| gsd-security-auditor | Security audit | `## OPEN_THREATS`, `## ESCALATE` (non-standard) |
|
|
28
|
+
| gsd-codebase-mapper | Codebase analysis | No marker (writes docs directly) |
|
|
29
|
+
| gsd-assumptions-analyzer | Assumption extraction | No marker (returns `## Assumptions` sections) |
|
|
30
|
+
| gsd-doc-verifier | Doc validation | No marker (writes JSON to `.planning/tmp/`) |
|
|
31
|
+
| gsd-doc-writer | Doc generation | No marker (writes docs directly) |
|
|
32
|
+
| gsd-advisor-researcher | Advisory research | No marker (utility agent) |
|
|
33
|
+
| gsd-user-profiler | User profiling | No marker (returns JSON in analysis tags) |
|
|
34
|
+
| gsd-intel-updater | Codebase intelligence analysis | `## INTEL UPDATE COMPLETE`, `## INTEL UPDATE FAILED` |
|
|
35
|
+
|
|
36
|
+
## Marker Rules
|
|
37
|
+
|
|
38
|
+
1. **ALL-CAPS markers** (e.g., `## PLANNING COMPLETE`) are the standard convention
|
|
39
|
+
2. **Title-case markers** (e.g., `## Verification Complete`) exist in gsd-verifier and gsd-integration-checker -- these are intentional as-is, not bugs
|
|
40
|
+
3. **Non-standard markers** (e.g., `## PARTIAL`, `## ESCALATE`) in audit agents indicate partial results requiring orchestrator judgment
|
|
41
|
+
4. **Agents without markers** either write artifacts directly to disk or return structured data (JSON/sections) that the caller parses
|
|
42
|
+
5. Markers must appear as H2 headings (`## `) at the start of a line in the agent's final output
|
|
43
|
+
|
|
44
|
+
## Key Handoff Contracts
|
|
45
|
+
|
|
46
|
+
### Planner -> Executor (via PLAN.md)
|
|
47
|
+
|
|
48
|
+
| Field | Required | Description |
|
|
49
|
+
|-------|----------|-------------|
|
|
50
|
+
| Frontmatter | Yes | phase, plan, type, wave, depends_on, files_modified, autonomous, requirements |
|
|
51
|
+
| `<objective>` | Yes | What the plan achieves |
|
|
52
|
+
| `<tasks>` | Yes | Ordered task list with type, files, action, verify, acceptance_criteria |
|
|
53
|
+
| `<verification>` | Yes | Overall verification steps |
|
|
54
|
+
| `<success_criteria>` | Yes | Measurable completion criteria |
|
|
55
|
+
|
|
56
|
+
### Executor -> Verifier (via SUMMARY.md)
|
|
57
|
+
|
|
58
|
+
| Field | Required | Description |
|
|
59
|
+
|-------|----------|-------------|
|
|
60
|
+
| Frontmatter | Yes | phase, plan, subsystem, tags, key-files, metrics |
|
|
61
|
+
| Commits table | Yes | Per-task commit hashes and descriptions |
|
|
62
|
+
| Deviations section | Yes | Auto-fixed issues or "None" |
|
|
63
|
+
| Self-Check | Yes | PASSED or FAILED with details |
|
|
64
|
+
|
|
65
|
+
## Workflow Regex Patterns
|
|
66
|
+
|
|
67
|
+
Workflows match these markers to detect agent completion:
|
|
68
|
+
|
|
69
|
+
**plan-phase.md matches:**
|
|
70
|
+
- `## RESEARCH COMPLETE` / `## RESEARCH BLOCKED` (researcher output)
|
|
71
|
+
- `## PLANNING COMPLETE` (planner output)
|
|
72
|
+
- `## CHECKPOINT REACHED` (planner/executor pause)
|
|
73
|
+
- `## VERIFICATION PASSED` / `## ISSUES FOUND` (plan-checker output)
|
|
74
|
+
|
|
75
|
+
**execute-phase.md matches:**
|
|
76
|
+
- `## PHASE COMPLETE` (all plans in phase done)
|
|
77
|
+
- `## Self-Check: FAILED` (summary self-check)
|
|
78
|
+
|
|
79
|
+
> **NOTE:** `## PLAN COMPLETE` is the gsd-executor's completion marker but execute-phase.md does not regex-match it. Instead, it detects executor completion via spot-checks (SUMMARY.md existence, git commit state). This is intentional behavior, not a mismatch.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Common Bug Patterns
|
|
2
|
+
|
|
3
|
+
Checklist of frequent bug patterns to scan before forming hypotheses. Ordered by frequency. Check these FIRST — they cover ~80% of bugs across all technology stacks.
|
|
4
|
+
|
|
5
|
+
<patterns>
|
|
6
|
+
|
|
7
|
+
## Null / Undefined Access
|
|
8
|
+
|
|
9
|
+
- [ ] Accessing property on `null` or `undefined` — missing null check or optional chaining
|
|
10
|
+
- [ ] Function returns `undefined` instead of expected value — missing `return` statement or wrong branch
|
|
11
|
+
- [ ] Array/object destructuring on `null`/`undefined` — API returned error shape instead of data
|
|
12
|
+
- [ ] Optional parameter used without default — caller omitted argument
|
|
13
|
+
|
|
14
|
+
## Off-by-One / Boundary
|
|
15
|
+
|
|
16
|
+
- [ ] Loop starts at 1 instead of 0, or ends at `length` instead of `length - 1`
|
|
17
|
+
- [ ] Fence-post error — "N items need N-1 separators" miscounted
|
|
18
|
+
- [ ] Inclusive vs exclusive range boundary — `<` vs `<=`, slice/substring end index
|
|
19
|
+
- [ ] Empty collection not handled — `.length === 0` falls through to logic assuming items exist
|
|
20
|
+
|
|
21
|
+
## Async / Timing
|
|
22
|
+
|
|
23
|
+
- [ ] Missing `await` on async function — gets Promise object instead of resolved value
|
|
24
|
+
- [ ] Race condition — two async operations read/write same state without coordination
|
|
25
|
+
- [ ] Stale closure — callback captures old variable value, not current one
|
|
26
|
+
- [ ] Event handler fires before setup complete — initialization order dependency
|
|
27
|
+
- [ ] Timeout/interval not cleaned up — fires after component/context destroyed
|
|
28
|
+
|
|
29
|
+
## State Management
|
|
30
|
+
|
|
31
|
+
- [ ] Mutating shared state — object/array modified in place affects other consumers
|
|
32
|
+
- [ ] State updated but UI not re-rendered — missing reactive trigger or wrong reference
|
|
33
|
+
- [ ] Stale state in event handler — closure captures state at bind time, not current value
|
|
34
|
+
- [ ] Multiple sources of truth — same data stored in two places, one gets out of sync
|
|
35
|
+
- [ ] State machine allows invalid transition — missing guard condition
|
|
36
|
+
|
|
37
|
+
## Import / Module
|
|
38
|
+
|
|
39
|
+
- [ ] Circular dependency — module A imports B, B imports A, one gets `undefined`
|
|
40
|
+
- [ ] Default vs named export mismatch — `import X` vs `import { X }`
|
|
41
|
+
- [ ] Wrong file extension — `.js` vs `.cjs` vs `.mjs`, `.ts` vs `.tsx`
|
|
42
|
+
- [ ] Path case sensitivity — works on Windows/macOS, fails on Linux
|
|
43
|
+
- [ ] Missing file extension in import — ESM requires explicit extensions
|
|
44
|
+
|
|
45
|
+
## Type / Coercion
|
|
46
|
+
|
|
47
|
+
- [ ] String vs number comparison — `"5" > "10"` is `true` (lexicographic), `5 > 10` is `false`
|
|
48
|
+
- [ ] Implicit type coercion — `==` instead of `===`, truthy/falsy surprises (`0`, `""`, `[]`)
|
|
49
|
+
- [ ] Integer overflow or floating point — `0.1 + 0.2 !== 0.3`, large numbers lose precision
|
|
50
|
+
- [ ] Boolean vs truthy check — value is `0` or `""` which is valid but falsy
|
|
51
|
+
|
|
52
|
+
## Environment / Config
|
|
53
|
+
|
|
54
|
+
- [ ] Environment variable missing or wrong — different value in dev vs prod vs CI
|
|
55
|
+
- [ ] Hardcoded path or URL — works on one machine, fails on another
|
|
56
|
+
- [ ] Port already in use — previous process still running
|
|
57
|
+
- [ ] File permission denied — different user/group in deployment
|
|
58
|
+
- [ ] Missing dependency — not in package.json or not installed
|
|
59
|
+
|
|
60
|
+
## Data Shape / API Contract
|
|
61
|
+
|
|
62
|
+
- [ ] API response shape changed — backend updated, frontend expects old format
|
|
63
|
+
- [ ] Array where object expected (or vice versa) — `data` vs `data.results` vs `data[0]`
|
|
64
|
+
- [ ] Missing field in payload — required field omitted, backend returns validation error
|
|
65
|
+
- [ ] Date/time format mismatch — ISO string vs timestamp vs locale string
|
|
66
|
+
- [ ] Encoding mismatch — UTF-8 vs Latin-1, URL encoding, HTML entities
|
|
67
|
+
|
|
68
|
+
## Regex / String
|
|
69
|
+
|
|
70
|
+
- [ ] Regex `g` flag with `.test()` then `.exec()` — `lastIndex` not reset between calls
|
|
71
|
+
- [ ] Missing escape — `.` matches any char, `$` is special, backslash needs doubling
|
|
72
|
+
- [ ] Greedy match captures too much — `.*` eats through delimiters, need `.*?`
|
|
73
|
+
- [ ] String interpolation in wrong quote type — template literals need backticks
|
|
74
|
+
|
|
75
|
+
## Error Handling
|
|
76
|
+
|
|
77
|
+
- [ ] Catch block swallows error — empty `catch {}` or logs but doesn't rethrow/handle
|
|
78
|
+
- [ ] Wrong error type caught — catches base `Error` when specific type needed
|
|
79
|
+
- [ ] Error in error handler — cleanup code throws, masking original error
|
|
80
|
+
- [ ] Promise rejection unhandled — missing `.catch()` or try/catch around `await`
|
|
81
|
+
|
|
82
|
+
## Scope / Closure
|
|
83
|
+
|
|
84
|
+
- [ ] Variable shadowing — inner scope declares same name, hides outer variable
|
|
85
|
+
- [ ] Loop variable capture — all closures share same `var i`, use `let` or bind
|
|
86
|
+
- [ ] `this` binding lost — callback loses context, need `.bind()` or arrow function
|
|
87
|
+
- [ ] Block scope vs function scope — `var` hoisted to function, `let`/`const` block-scoped
|
|
88
|
+
|
|
89
|
+
</patterns>
|
|
90
|
+
|
|
91
|
+
<usage>
|
|
92
|
+
|
|
93
|
+
## How to Use This Checklist
|
|
94
|
+
|
|
95
|
+
1. **Before forming any hypothesis**, scan the relevant categories based on the symptom
|
|
96
|
+
2. **Match symptom to pattern** — if the bug involves "undefined is not an object", check Null/Undefined first
|
|
97
|
+
3. **Each checked pattern is a hypothesis candidate** — verify or eliminate with evidence
|
|
98
|
+
4. **If no pattern matches**, proceed to open-ended investigation
|
|
99
|
+
|
|
100
|
+
### Symptom-to-Category Quick Map
|
|
101
|
+
|
|
102
|
+
| Symptom | Check First |
|
|
103
|
+
|---------|------------|
|
|
104
|
+
| "Cannot read property of undefined/null" | Null/Undefined Access |
|
|
105
|
+
| "X is not a function" | Import/Module, Type/Coercion |
|
|
106
|
+
| Works sometimes, fails sometimes | Async/Timing, State Management |
|
|
107
|
+
| Works locally, fails in CI/prod | Environment/Config |
|
|
108
|
+
| Wrong data displayed | Data Shape, State Management |
|
|
109
|
+
| Off by one item / missing last item | Off-by-One/Boundary |
|
|
110
|
+
| "Unexpected token" / parse error | Data Shape, Type/Coercion |
|
|
111
|
+
| Memory leak / growing resource usage | Async/Timing (cleanup), Scope/Closure |
|
|
112
|
+
| Infinite loop / max call stack | State Management, Async/Timing |
|
|
113
|
+
|
|
114
|
+
</usage>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Context Budget Rules
|
|
2
|
+
|
|
3
|
+
Standard rules for keeping orchestrator context lean. Reference this in workflows that spawn subagents or read significant content.
|
|
4
|
+
|
|
5
|
+
See also: `references/universal-anti-patterns.md` for the complete set of universal rules.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Universal Rules
|
|
10
|
+
|
|
11
|
+
Every workflow that spawns agents or reads significant content must follow these rules:
|
|
12
|
+
|
|
13
|
+
1. **Never** read agent definition files (`agents/*.md`) -- `subagent_type` auto-loads them
|
|
14
|
+
2. **Never** inline large files into subagent prompts -- tell agents to read files from disk instead
|
|
15
|
+
3. **Read depth scales with context window** -- check `context_window_tokens` in `.planning/config.json`:
|
|
16
|
+
- At < 500000 tokens (default 200k): read only frontmatter, status fields, or summaries. Never read full SUMMARY.md, VERIFICATION.md, or RESEARCH.md bodies.
|
|
17
|
+
- At >= 500000 tokens (1M model): MAY read full subagent output bodies when the content is needed for inline presentation or decision-making. Still avoid unnecessary reads.
|
|
18
|
+
4. **Delegate** heavy work to subagents -- the orchestrator routes, it doesn't execute
|
|
19
|
+
5. **Proactive warning**: If you've already consumed significant context (large file reads, multiple subagent results), warn the user: "Context budget is getting heavy. Consider checkpointing progress."
|
|
20
|
+
|
|
21
|
+
## Read Depth by Context Window
|
|
22
|
+
|
|
23
|
+
| Context Window | Subagent Output Reading | SUMMARY.md | VERIFICATION.md | PLAN.md (other phases) |
|
|
24
|
+
|---------------|------------------------|------------|-----------------|------------------------|
|
|
25
|
+
| < 500k (200k model) | Frontmatter only | Frontmatter only | Frontmatter only | Current phase only |
|
|
26
|
+
| >= 500k (1M model) | Full body permitted | Full body permitted | Full body permitted | Current phase only |
|
|
27
|
+
|
|
28
|
+
**How to check:** Read `.planning/config.json` and inspect `context_window_tokens`. If the field is absent, treat as 200k (conservative default).
|
|
29
|
+
|
|
30
|
+
## Context Degradation Tiers
|
|
31
|
+
|
|
32
|
+
Monitor context usage and adjust behavior accordingly:
|
|
33
|
+
|
|
34
|
+
| Tier | Usage | Behavior |
|
|
35
|
+
|------|-------|----------|
|
|
36
|
+
| PEAK | 0-30% | Full operations. Read bodies, spawn multiple agents, inline results. |
|
|
37
|
+
| GOOD | 30-50% | Normal operations. Prefer frontmatter reads, delegate aggressively. |
|
|
38
|
+
| DEGRADING | 50-70% | Economize. Frontmatter-only reads, minimal inlining, warn user about budget. |
|
|
39
|
+
| POOR | 70%+ | Emergency mode. Checkpoint progress immediately. No new reads unless critical. |
|
|
40
|
+
|
|
41
|
+
## Context Degradation Warning Signs
|
|
42
|
+
|
|
43
|
+
Quality degrades gradually before panic thresholds fire. Watch for these early signals:
|
|
44
|
+
|
|
45
|
+
- **Silent partial completion** -- agent claims task is done but implementation is incomplete. Self-check catches file existence but not semantic completeness. Always verify agent output meets the plan's must_haves, not just that files exist.
|
|
46
|
+
- **Increasing vagueness** -- agent starts using phrases like "appropriate handling" or "standard patterns" instead of specific code. This indicates context pressure even before budget warnings fire.
|
|
47
|
+
- **Skipped steps** -- agent omits protocol steps it would normally follow. If an agent's success criteria has 8 items but it only reports 5, suspect context pressure.
|
|
48
|
+
|
|
49
|
+
When delegating to agents, the orchestrator cannot verify semantic correctness of agent output -- only structural completeness. This is a fundamental limitation. Mitigate with must_haves.truths and spot-check verification.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Domain-Aware Probing Patterns
|
|
2
|
+
|
|
3
|
+
Shared reference for `/gsd-begin`, `/gsd-discuss-phase`, and domain exploration workflows.
|
|
4
|
+
|
|
5
|
+
When the user mentions a technology area, use these probes to ask insightful follow-up questions. Don't run through them as a checklist -- pick the 2-3 most relevant based on context. The goal is to surface hidden assumptions and trade-offs the user may not have considered yet.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Authentication
|
|
10
|
+
|
|
11
|
+
| User mentions | Agent probes with domain knowledge |
|
|
12
|
+
|---|---|
|
|
13
|
+
| "login" or "auth" | OAuth (which providers?), JWT, or session-based? Do you need social login or just email/password? |
|
|
14
|
+
| "users" or "accounts" | MFA required? Password reset flow? Email verification? |
|
|
15
|
+
| "sessions" | Session duration and refresh strategy? Server-side sessions or stateless tokens? |
|
|
16
|
+
| "roles" or "permissions" | RBAC, ABAC, or simple role checks? How many distinct roles? |
|
|
17
|
+
| "API keys" | Key rotation strategy? Scoped permissions per key? Rate limiting per key? |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Real-Time Updates
|
|
22
|
+
|
|
23
|
+
| User mentions | Agent probes with domain knowledge |
|
|
24
|
+
|---|---|
|
|
25
|
+
| "real-time" or "live updates" | WebSockets, SSE, or polling? What specifically needs to be real-time vs. eventual? |
|
|
26
|
+
| "notifications" | Push notifications (browser/mobile), in-app only, or both? Persistence and read receipts? |
|
|
27
|
+
| "collaboration" or "multiplayer" | Conflict resolution strategy? Operational transforms or CRDTs? Expected concurrent users? |
|
|
28
|
+
| "chat" or "messaging" | Message history and search? Typing indicators? Read receipts? |
|
|
29
|
+
| "streaming" | Reconnection strategy? What happens when the connection drops -- queue or discard? |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Dashboard
|
|
34
|
+
|
|
35
|
+
| User mentions | Agent probes with domain knowledge |
|
|
36
|
+
|---|---|
|
|
37
|
+
| "dashboard" | What data sources feed it? How many distinct views? |
|
|
38
|
+
| "charts" or "graphs" | Interactive or static? Drill-down capability? Export to CSV/PDF? |
|
|
39
|
+
| "metrics" or "KPIs" | Refresh strategy -- real-time, periodic polling, or on-demand? Acceptable staleness? |
|
|
40
|
+
| "admin panel" | Role-based visibility? Which actions beyond viewing (edit, delete, approve)? |
|
|
41
|
+
| "mobile" or "responsive" | Simplified mobile view or full parity? Touch interactions for charts? |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## API Design
|
|
46
|
+
|
|
47
|
+
| User mentions | Agent probes with domain knowledge |
|
|
48
|
+
|---|---|
|
|
49
|
+
| "API" | REST, GraphQL, or RPC-style? Internal only or public-facing? |
|
|
50
|
+
| "endpoints" or "routes" | Versioning strategy (URL path, header, query param)? Breaking change policy? |
|
|
51
|
+
| "pagination" | Cursor-based or offset? Expected result set sizes? Stable ordering guarantee? |
|
|
52
|
+
| "rate limiting" | Per-user, per-IP, or per-API-key? Burst allowance? How to communicate limits to clients? |
|
|
53
|
+
| "errors" | Structured error format? Error codes vs. messages? How much detail in production errors? |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Database
|
|
58
|
+
|
|
59
|
+
| User mentions | Agent probes with domain knowledge |
|
|
60
|
+
|---|---|
|
|
61
|
+
| "database" or "storage" | SQL or NoSQL? What drives the choice -- relational integrity, flexibility, scale? |
|
|
62
|
+
| "ORM" or "queries" | ORM (which one?) or raw queries? Query builder as middle ground? |
|
|
63
|
+
| "migrations" | Migration tool? Rollback strategy? How do you handle data migrations vs. schema migrations? |
|
|
64
|
+
| "seeding" or "test data" | Seed data for development? Realistic fake data or minimal fixtures? |
|
|
65
|
+
| "scale" or "performance" | Read/write ratio? Read replicas? Connection pooling strategy? |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Search
|
|
70
|
+
|
|
71
|
+
| User mentions | Agent probes with domain knowledge |
|
|
72
|
+
|---|---|
|
|
73
|
+
| "search" | Full-text or exact match? Dedicated search engine (Elasticsearch, Meilisearch) or database-level? |
|
|
74
|
+
| "filtering" or "facets" | Faceted filtering? How many filter dimensions? Combined filters (AND/OR)? |
|
|
75
|
+
| "autocomplete" or "typeahead" | Debounce strategy? Minimum character threshold? Result ranking? |
|
|
76
|
+
| "indexing" | Index size and update frequency? Real-time indexing or batch? Acceptable index lag? |
|
|
77
|
+
| "fuzzy" or "typo tolerance" | Fuzzy matching? Synonym support? Language-specific stemming? |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## File Upload/Storage
|
|
82
|
+
|
|
83
|
+
| User mentions | Agent probes with domain knowledge |
|
|
84
|
+
|---|---|
|
|
85
|
+
| "upload" or "file upload" | Local filesystem or cloud (S3, GCS, Azure Blob)? Direct upload or through server? |
|
|
86
|
+
| "images" or "media" | Processing pipeline -- resize, compress, thumbnail generation? Format conversion? |
|
|
87
|
+
| "size limits" | Max file size? Max total storage per user? What happens when limits are hit? |
|
|
88
|
+
| "CDN" | CDN for delivery? Cache invalidation for updated files? Signed URLs for access control? |
|
|
89
|
+
| "documents" or "attachments" | Virus scanning? Preview generation? Versioning of uploaded files? |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Caching
|
|
94
|
+
|
|
95
|
+
| User mentions | Agent probes with domain knowledge |
|
|
96
|
+
|---|---|
|
|
97
|
+
| "caching" or "performance" | Where to cache -- browser, CDN, application layer, database query cache? |
|
|
98
|
+
| "invalidation" | Invalidation strategy -- TTL, event-driven, or manual? Cache-aside vs. write-through? |
|
|
99
|
+
| "stale data" | Acceptable staleness window? Stale-while-revalidate pattern? |
|
|
100
|
+
| "Redis" or "Memcached" | Cache topology -- single node or clustered? Persistence needed or pure cache? |
|
|
101
|
+
| "CDN" or "edge" | Edge caching for static assets? Dynamic content at the edge? Cache key strategy? |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Testing
|
|
106
|
+
|
|
107
|
+
| User mentions | Agent probes with domain knowledge |
|
|
108
|
+
|---|---|
|
|
109
|
+
| "testing" or "tests" | Unit, integration, and E2E balance? Where do you invest most testing effort? |
|
|
110
|
+
| "mocking" or "stubs" | Mock external services or use test containers? Database mocking strategy? |
|
|
111
|
+
| "CI" or "pipeline" | Tests in CI? Parallel test execution? Test-on-PR or test-on-push? |
|
|
112
|
+
| "coverage" | Coverage targets? Coverage as gate or advisory? Which metrics (line, branch, function)? |
|
|
113
|
+
| "E2E" or "browser testing" | Playwright, Cypress, or other? Headed vs. headless? Visual regression testing? |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Deployment
|
|
118
|
+
|
|
119
|
+
| User mentions | Agent probes with domain knowledge |
|
|
120
|
+
|---|---|
|
|
121
|
+
| "deploy" or "hosting" | Container, serverless, or traditional VM/VPS? Managed platform (Vercel, Railway) or self-hosted? |
|
|
122
|
+
| "CI/CD" or "pipeline" | GitHub Actions, GitLab CI, or other? Deploy on merge to main or manual trigger? |
|
|
123
|
+
| "environments" | How many environments (dev, staging, prod)? Environment parity strategy? |
|
|
124
|
+
| "rollback" | Rollback strategy? Blue-green, canary, or instant rollback? Database rollback considerations? |
|
|
125
|
+
| "secrets" or "config" | Secret management -- env vars, vault, or platform-native? Per-environment config strategy? |
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: plan-checker
|
|
3
|
+
version: 1
|
|
4
|
+
last_calibrated: 2026-03-24
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan-Checker Few-Shot Examples
|
|
8
|
+
|
|
9
|
+
## Positive Examples
|
|
10
|
+
|
|
11
|
+
### Example 1: BLOCKER flagged for vague task action missing file and function names
|
|
12
|
+
|
|
13
|
+
**Input:** Plan task with action: "Implement the authentication feature for the API routes."
|
|
14
|
+
|
|
15
|
+
**Output:**
|
|
16
|
+
|
|
17
|
+
> ```yaml
|
|
18
|
+
> issues:
|
|
19
|
+
> - dimension: task_completeness
|
|
20
|
+
> severity: BLOCKER
|
|
21
|
+
> finding: "Task T1 action says 'implement the authentication feature' without naming target files, functions to create, or middleware to apply. Executor cannot determine what to build."
|
|
22
|
+
> affected_field: "<action>"
|
|
23
|
+
> suggested_fix: "Specify: create authMiddleware in src/middleware/auth.js, apply to routes in src/routes/api.js lines 12-45, verify with integration test"
|
|
24
|
+
> ```
|
|
25
|
+
|
|
26
|
+
**Why this is good:** The checker cited the specific dimension (task_completeness), quoted the problematic text, explained why it is a blocker (executor cannot determine what to build), and gave a concrete fix with file paths and function names. The finding is actionable -- the planner knows exactly what to add.
|
|
27
|
+
|
|
28
|
+
### Example 2: BLOCKER for same-wave file conflict between two plans
|
|
29
|
+
|
|
30
|
+
**Input:** Two plans in wave 1 -- Plan 01 modifies `get-shit-done/workflows/execute-phase.md`, Plan 02 also modifies `get-shit-done/workflows/execute-phase.md`. No `depends_on` declared.
|
|
31
|
+
|
|
32
|
+
**Output:**
|
|
33
|
+
|
|
34
|
+
> ```yaml
|
|
35
|
+
> issues:
|
|
36
|
+
> - dimension: dependency_correctness
|
|
37
|
+
> severity: BLOCKER
|
|
38
|
+
> finding: "Plans 01 and 02 both modify get-shit-done/workflows/execute-phase.md in wave 1 with no depends_on relationship. Concurrent execution will cause merge conflicts or lost changes."
|
|
39
|
+
> affected_field: "files_modified"
|
|
40
|
+
> suggested_fix: "Either move Plan 02 to wave 2 with depends_on: ['01'] or consolidate the file changes into a single plan"
|
|
41
|
+
> ```
|
|
42
|
+
|
|
43
|
+
**Why this is good:** The checker identified a real structural problem -- two plans modifying the same file in the same wave without a dependency relationship. It cited dependency_correctness, named both plans, the conflicting file, and provided two alternative fixes.
|
|
44
|
+
|
|
45
|
+
## Negative Examples
|
|
46
|
+
|
|
47
|
+
### Example 1: All dimensions pass when verify commands are missing
|
|
48
|
+
|
|
49
|
+
**Input:** Plan with 3 tasks. Task T2 has `<verify></verify>` (empty). Task T3 has `<verify>echo "done"</verify>` (trivial, cannot distinguish pass from fail).
|
|
50
|
+
|
|
51
|
+
**Output:**
|
|
52
|
+
|
|
53
|
+
> ## CHECK PASSED
|
|
54
|
+
> Plans: 1 | Tasks: 3 | Dimensions: 10 | Issues: 0
|
|
55
|
+
|
|
56
|
+
**Why this is bad:** The checker missed two violations. verification_derivation requires verify commands to be runnable and test actual output -- an empty verify block is a BLOCKER. Verify commands must distinguish pass from fail -- `echo "done"` always returns 0 regardless of implementation state. Both should have been flagged.
|
|
57
|
+
|
|
58
|
+
### Example 2: False positive INFO for a correctly-sized plan
|
|
59
|
+
|
|
60
|
+
**Input:** Plan with 3 tasks, 6 unique files, 1 dependency. All within limits.
|
|
61
|
+
|
|
62
|
+
**Output:**
|
|
63
|
+
|
|
64
|
+
> ```yaml
|
|
65
|
+
> issues:
|
|
66
|
+
> - dimension: scope_sanity
|
|
67
|
+
> severity: INFO
|
|
68
|
+
> finding: "Plan has 3 tasks -- consider splitting into smaller plans for faster iteration"
|
|
69
|
+
> affected_field: "task count"
|
|
70
|
+
> suggested_fix: "Split tasks into separate plans"
|
|
71
|
+
> ```
|
|
72
|
+
|
|
73
|
+
**Why this is bad:** The checker flagged a non-issue. scope_sanity allows 2-3 tasks per plan -- 3 tasks is within limits. The checker applied a personal preference ("smaller is better") rather than the documented threshold. This wastes planner time on false positives and erodes trust in the checker's judgment. A correct check would produce no issue for this plan.
|
|
@@ -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,100 @@
|
|
|
1
|
+
# Gate Prompt Patterns
|
|
2
|
+
|
|
3
|
+
Reusable prompt patterns for structured gate checks in workflows and agents.
|
|
4
|
+
|
|
5
|
+
**For checkpoint box format details, see `references/ui-brand.md`** -- checkpoint boxes use double-line border drawing with 62-character inner width.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- `header` must be max 12 characters
|
|
10
|
+
- `multiSelect` is always `false` for gate checks
|
|
11
|
+
- Always handle the "Other" case (user typed a freeform response instead of selecting)
|
|
12
|
+
- Max 4 options per prompt -- if more are needed, use a 2-step flow
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Pattern: approve-revise-abort
|
|
17
|
+
3-option gate for plan approval, gap-closure approval.
|
|
18
|
+
- question: "Approve these {noun}?"
|
|
19
|
+
- header: "Approve?"
|
|
20
|
+
- options: Approve | Request changes | Abort
|
|
21
|
+
|
|
22
|
+
## Pattern: yes-no
|
|
23
|
+
Simple 2-option confirmation for re-planning, rebuild, replace plans, commit.
|
|
24
|
+
- question: "{Specific question about the action}"
|
|
25
|
+
- header: "Confirm"
|
|
26
|
+
- options: Yes | No
|
|
27
|
+
|
|
28
|
+
## Pattern: stale-continue
|
|
29
|
+
2-option refresh gate for staleness warnings, timestamp freshness.
|
|
30
|
+
- question: "{Artifact} may be outdated. Refresh or continue?"
|
|
31
|
+
- header: "Stale"
|
|
32
|
+
- options: Refresh | Continue anyway
|
|
33
|
+
|
|
34
|
+
## Pattern: yes-no-pick
|
|
35
|
+
3-option selection for seed selection, item inclusion.
|
|
36
|
+
- question: "Include {items} in planning?"
|
|
37
|
+
- header: "Include?"
|
|
38
|
+
- options: Yes, all | Let me pick | No
|
|
39
|
+
|
|
40
|
+
## Pattern: multi-option-failure
|
|
41
|
+
4-option failure handler for build failures.
|
|
42
|
+
- question: "Plan {id} failed. How should we proceed?"
|
|
43
|
+
- header: "Failed"
|
|
44
|
+
- options: Retry | Skip | Rollback | Abort
|
|
45
|
+
|
|
46
|
+
## Pattern: multi-option-escalation
|
|
47
|
+
4-option escalation for review escalation (max retries exceeded).
|
|
48
|
+
- question: "Phase {N} has failed verification {attempt} times. How should we proceed?"
|
|
49
|
+
- header: "Escalate"
|
|
50
|
+
- options: Accept gaps | Re-plan (via /gsd-plan-phase) | Debug (via /gsd-debug) | Retry
|
|
51
|
+
|
|
52
|
+
## Pattern: multi-option-gaps
|
|
53
|
+
4-option gap handler for review gaps-found.
|
|
54
|
+
- question: "{count} verification gaps need attention. How should we proceed?"
|
|
55
|
+
- header: "Gaps"
|
|
56
|
+
- options: Auto-fix | Override | Manual | Skip
|
|
57
|
+
|
|
58
|
+
## Pattern: multi-option-priority
|
|
59
|
+
4-option priority selection for milestone gap priority.
|
|
60
|
+
- question: "Which gaps should we address?"
|
|
61
|
+
- header: "Priority"
|
|
62
|
+
- options: Must-fix only | Must + should | Everything | Let me pick
|
|
63
|
+
|
|
64
|
+
## Pattern: toggle-confirm
|
|
65
|
+
2-option confirmation for enabling/disabling boolean features.
|
|
66
|
+
- question: "Enable {feature_name}?"
|
|
67
|
+
- header: "Toggle"
|
|
68
|
+
- options: Enable | Disable
|
|
69
|
+
|
|
70
|
+
## Pattern: action-routing
|
|
71
|
+
Up to 4 suggested next actions with selection (status, resume workflows).
|
|
72
|
+
- question: "What would you like to do next?"
|
|
73
|
+
- header: "Next Step"
|
|
74
|
+
- options: {primary action} | {alternative 1} | {alternative 2} | Something else
|
|
75
|
+
- Note: Dynamically generate options from workflow state. Always include "Something else" as last option.
|
|
76
|
+
|
|
77
|
+
## Pattern: scope-confirm
|
|
78
|
+
3-option confirmation for quick task scope validation.
|
|
79
|
+
- question: "This task looks complex. Proceed as quick task or use full planning?"
|
|
80
|
+
- header: "Scope"
|
|
81
|
+
- options: Quick task | Full plan (via /gsd-plan-phase) | Revise
|
|
82
|
+
|
|
83
|
+
## Pattern: depth-select
|
|
84
|
+
3-option depth selection for planning workflow preferences.
|
|
85
|
+
- question: "How thorough should planning be?"
|
|
86
|
+
- header: "Depth"
|
|
87
|
+
- options: Quick (3-5 phases, skip research) | Standard (5-8 phases, default) | Comprehensive (8-12 phases, deep research)
|
|
88
|
+
|
|
89
|
+
## Pattern: context-handling
|
|
90
|
+
3-option handler for existing CONTEXT.md in discuss workflow.
|
|
91
|
+
- question: "Phase {N} already has a CONTEXT.md. How should we handle it?"
|
|
92
|
+
- header: "Context"
|
|
93
|
+
- options: Overwrite | Append | Cancel
|
|
94
|
+
|
|
95
|
+
## Pattern: gray-area-option
|
|
96
|
+
Dynamic template for presenting gray area choices in discuss workflow.
|
|
97
|
+
- question: "{Gray area title}"
|
|
98
|
+
- header: "Decision"
|
|
99
|
+
- options: {Option 1} | {Option 2} | Let Antigravity decide
|
|
100
|
+
- Note: Options generated at runtime. Always include "Let Antigravity decide" as last option.
|