gsd-antigravity-kit 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/.agent/skills/gsd/SKILL.md +26 -4
  2. package/.agent/skills/gsd/VERSION +1 -1
  3. package/.agent/skills/gsd/assets/templates/AI-SPEC.md +246 -0
  4. package/.agent/skills/gsd/assets/templates/DEBUG.md +7 -2
  5. package/.agent/skills/gsd/assets/templates/config.json +56 -48
  6. package/.agent/skills/gsd/assets/templates/research.md +40 -0
  7. package/.agent/skills/gsd/assets/templates/spec.md +307 -0
  8. package/.agent/skills/gsd/assets/templates/state.md +8 -0
  9. package/.agent/skills/gsd/bin/gsd-tools.cjs +212 -11
  10. package/.agent/skills/gsd/bin/help-manifest.json +8 -2
  11. package/.agent/skills/gsd/bin/hooks/gsd-check-update-worker.js +108 -0
  12. package/.agent/skills/gsd/bin/hooks/gsd-check-update.js +14 -89
  13. package/.agent/skills/gsd/bin/hooks/gsd-context-monitor.js +34 -5
  14. package/.agent/skills/gsd/bin/hooks/gsd-phase-boundary.sh +1 -0
  15. package/.agent/skills/gsd/bin/hooks/gsd-prompt-guard.js +1 -1
  16. package/.agent/skills/gsd/bin/hooks/gsd-read-guard.js +6 -1
  17. package/.agent/skills/gsd/bin/hooks/gsd-session-state.sh +1 -0
  18. package/.agent/skills/gsd/bin/hooks/gsd-statusline.js +150 -16
  19. package/.agent/skills/gsd/bin/hooks/gsd-validate-commit.sh +1 -0
  20. package/.agent/skills/gsd/bin/hooks/gsd-workflow-guard.js +1 -1
  21. package/.agent/skills/gsd/bin/lib/audit.cjs +757 -0
  22. package/.agent/skills/gsd/bin/lib/commands.cjs +17 -7
  23. package/.agent/skills/gsd/bin/lib/config.cjs +66 -20
  24. package/.agent/skills/gsd/bin/lib/core.cjs +212 -12
  25. package/.agent/skills/gsd/bin/lib/frontmatter.cjs +6 -8
  26. package/.agent/skills/gsd/bin/lib/graphify.cjs +494 -0
  27. package/.agent/skills/gsd/bin/lib/gsd2-import.cjs +511 -0
  28. package/.agent/skills/gsd/bin/lib/init.cjs +371 -18
  29. package/.agent/skills/gsd/bin/lib/intel.cjs +9 -30
  30. package/.agent/skills/gsd/bin/lib/milestone.cjs +18 -17
  31. package/.agent/skills/gsd/bin/lib/model-profiles.cjs +1 -0
  32. package/.agent/skills/gsd/bin/lib/phase.cjs +225 -98
  33. package/.agent/skills/gsd/bin/lib/profile-output.cjs +17 -5
  34. package/.agent/skills/gsd/bin/lib/roadmap.cjs +12 -5
  35. package/.agent/skills/gsd/bin/lib/state.cjs +394 -129
  36. package/.agent/skills/gsd/bin/lib/template.cjs +8 -4
  37. package/.agent/skills/gsd/bin/lib/uat.cjs +2 -1
  38. package/.agent/skills/gsd/bin/lib/verify.cjs +111 -42
  39. package/.agent/skills/gsd/migration_report.md +2 -2
  40. package/.agent/skills/gsd/references/agents/gsd-advisor-researcher.md +23 -0
  41. package/.agent/skills/gsd/references/agents/gsd-ai-researcher.md +133 -0
  42. package/.agent/skills/gsd/references/agents/gsd-code-fixer.md +11 -10
  43. package/.agent/skills/gsd/references/agents/gsd-code-reviewer.md +2 -2
  44. package/.agent/skills/gsd/references/agents/gsd-codebase-mapper.md +13 -2
  45. package/.agent/skills/gsd/references/agents/gsd-debug-session-manager.md +314 -0
  46. package/.agent/skills/gsd/references/agents/gsd-debugger.md +147 -76
  47. package/.agent/skills/gsd/references/agents/gsd-doc-verifier.md +1 -1
  48. package/.agent/skills/gsd/references/agents/gsd-doc-writer.md +615 -602
  49. package/.agent/skills/gsd/references/agents/gsd-domain-researcher.md +153 -0
  50. package/.agent/skills/gsd/references/agents/gsd-eval-auditor.md +175 -0
  51. package/.agent/skills/gsd/references/agents/gsd-eval-planner.md +154 -0
  52. package/.agent/skills/gsd/references/agents/gsd-executor.md +108 -38
  53. package/.agent/skills/gsd/references/agents/gsd-framework-selector.md +160 -0
  54. package/.agent/skills/gsd/references/agents/gsd-integration-checker.md +454 -443
  55. package/.agent/skills/gsd/references/agents/gsd-intel-updater.md +40 -20
  56. package/.agent/skills/gsd/references/agents/gsd-nyquist-auditor.md +187 -176
  57. package/.agent/skills/gsd/references/agents/gsd-pattern-mapper.md +335 -0
  58. package/.agent/skills/gsd/references/agents/gsd-phase-researcher.md +112 -13
  59. package/.agent/skills/gsd/references/agents/gsd-plan-checker.md +104 -10
  60. package/.agent/skills/gsd/references/agents/gsd-planner.md +125 -167
  61. package/.agent/skills/gsd/references/agents/gsd-project-researcher.md +25 -2
  62. package/.agent/skills/gsd/references/agents/gsd-research-synthesizer.md +3 -3
  63. package/.agent/skills/gsd/references/agents/gsd-roadmapper.md +12 -1
  64. package/.agent/skills/gsd/references/agents/gsd-security-auditor.md +139 -128
  65. package/.agent/skills/gsd/references/agents/gsd-ui-auditor.md +3 -3
  66. package/.agent/skills/gsd/references/agents/gsd-ui-checker.md +11 -2
  67. package/.agent/skills/gsd/references/agents/gsd-ui-researcher.md +27 -4
  68. package/.agent/skills/gsd/references/agents/gsd-verifier.md +13 -19
  69. package/.agent/skills/gsd/references/commands/atomic/add-todo.md +2 -2
  70. package/.agent/skills/gsd/references/commands/atomic/check-todos.md +2 -2
  71. package/.agent/skills/gsd/references/commands/atomic/cleanup.md +2 -2
  72. package/.agent/skills/gsd/references/commands/atomic/do.md +2 -2
  73. package/.agent/skills/gsd/references/commands/atomic/help.md +2 -2
  74. package/.agent/skills/gsd/references/commands/atomic/join-discord.md +2 -2
  75. package/.agent/skills/gsd/references/commands/atomic/note.md +2 -2
  76. package/.agent/skills/gsd/references/commands/atomic/session-report.md +2 -2
  77. package/.agent/skills/gsd/references/commands/atomic/ship.md +2 -2
  78. package/.agent/skills/gsd/references/commands/atomic/stats.md +2 -2
  79. package/.agent/skills/gsd/references/commands/atomic/thread.md +141 -41
  80. package/.agent/skills/gsd/references/commands/atomic/undo.md +2 -2
  81. package/.agent/skills/gsd/references/commands/milestone/add-backlog.md +15 -12
  82. package/.agent/skills/gsd/references/commands/milestone/audit-milestone.md +2 -2
  83. package/.agent/skills/gsd/references/commands/milestone/complete-milestone.md +2 -2
  84. package/.agent/skills/gsd/references/commands/milestone/milestone-summary.md +2 -2
  85. package/.agent/skills/gsd/references/commands/milestone/new-milestone.md +2 -2
  86. package/.agent/skills/gsd/references/commands/milestone/plan-milestone-gaps.md +2 -2
  87. package/.agent/skills/gsd/references/commands/milestone/plant-seed.md +2 -2
  88. package/.agent/skills/gsd/references/commands/milestone/review-backlog.md +4 -4
  89. package/.agent/skills/gsd/references/commands/misc/ai-integration-phase.md +38 -0
  90. package/.agent/skills/gsd/references/commands/misc/audit-fix.md +2 -2
  91. package/.agent/skills/gsd/references/commands/misc/audit-uat.md +2 -2
  92. package/.agent/skills/gsd/references/commands/misc/eval-review.md +34 -0
  93. package/.agent/skills/gsd/references/commands/misc/extract_learnings.md +24 -0
  94. package/.agent/skills/gsd/references/commands/misc/from-gsd2.md +49 -0
  95. package/.agent/skills/gsd/references/commands/misc/graphify.md +203 -0
  96. package/.agent/skills/gsd/references/commands/misc/inbox.md +40 -0
  97. package/.agent/skills/gsd/references/commands/misc/next.md +5 -3
  98. package/.agent/skills/gsd/references/commands/misc/progress.md +4 -3
  99. package/.agent/skills/gsd/references/commands/misc/sketch-wrap-up.md +33 -0
  100. package/.agent/skills/gsd/references/commands/misc/sketch.md +47 -0
  101. package/.agent/skills/gsd/references/commands/misc/spec-phase.md +64 -0
  102. package/.agent/skills/gsd/references/commands/misc/spike-wrap-up.md +33 -0
  103. package/.agent/skills/gsd/references/commands/misc/spike.md +43 -0
  104. package/.agent/skills/gsd/references/commands/misc/verify-work.md +2 -2
  105. package/.agent/skills/gsd/references/commands/phase/add-phase.md +2 -2
  106. package/.agent/skills/gsd/references/commands/phase/add-tests.md +2 -2
  107. package/.agent/skills/gsd/references/commands/phase/discuss-phase.md +5 -5
  108. package/.agent/skills/gsd/references/commands/phase/execute-phase.md +4 -4
  109. package/.agent/skills/gsd/references/commands/phase/insert-phase.md +2 -2
  110. package/.agent/skills/gsd/references/commands/phase/list-phase-assumptions.md +2 -2
  111. package/.agent/skills/gsd/references/commands/phase/plan-phase.md +3 -3
  112. package/.agent/skills/gsd/references/commands/phase/remove-phase.md +2 -2
  113. package/.agent/skills/gsd/references/commands/phase/research-phase.md +5 -5
  114. package/.agent/skills/gsd/references/commands/phase/secure-phase.md +2 -2
  115. package/.agent/skills/gsd/references/commands/phase/ui-phase.md +2 -2
  116. package/.agent/skills/gsd/references/commands/phase/ui-review.md +2 -2
  117. package/.agent/skills/gsd/references/commands/phase/validate-phase.md +2 -2
  118. package/.agent/skills/gsd/references/commands/phase/workstreams.md +9 -9
  119. package/.agent/skills/gsd/references/commands/project/analyze-dependencies.md +2 -2
  120. package/.agent/skills/gsd/references/commands/project/explore.md +2 -2
  121. package/.agent/skills/gsd/references/commands/project/import.md +2 -2
  122. package/.agent/skills/gsd/references/commands/project/intel.md +10 -10
  123. package/.agent/skills/gsd/references/commands/project/list-workspaces.md +2 -2
  124. package/.agent/skills/gsd/references/commands/project/map-codebase.md +2 -2
  125. package/.agent/skills/gsd/references/commands/project/new-project.md +2 -2
  126. package/.agent/skills/gsd/references/commands/project/new-workspace.md +2 -2
  127. package/.agent/skills/gsd/references/commands/project/remove-workspace.md +2 -2
  128. package/.agent/skills/gsd/references/commands/project/scan.md +2 -2
  129. package/.agent/skills/gsd/references/commands/system/autonomous.md +4 -3
  130. package/.agent/skills/gsd/references/commands/system/code-review-fix.md +3 -3
  131. package/.agent/skills/gsd/references/commands/system/code-review.md +3 -3
  132. package/.agent/skills/gsd/references/commands/system/debug.md +177 -100
  133. package/.agent/skills/gsd/references/commands/system/docs-update.md +2 -2
  134. package/.agent/skills/gsd/references/commands/system/fast.md +2 -2
  135. package/.agent/skills/gsd/references/commands/system/forensics.md +2 -2
  136. package/.agent/skills/gsd/references/commands/system/gsd-tools.md +153 -6
  137. package/.agent/skills/gsd/references/commands/system/health.md +2 -2
  138. package/.agent/skills/gsd/references/commands/system/manager.md +3 -3
  139. package/.agent/skills/gsd/references/commands/system/pause-work.md +2 -2
  140. package/.agent/skills/gsd/references/commands/system/pr-branch.md +2 -2
  141. package/.agent/skills/gsd/references/commands/system/profile-user.md +2 -2
  142. package/.agent/skills/gsd/references/commands/system/quick.md +127 -3
  143. package/.agent/skills/gsd/references/commands/system/reapply-patches.md +45 -6
  144. package/.agent/skills/gsd/references/commands/system/resume-work.md +2 -2
  145. package/.agent/skills/gsd/references/commands/system/review.md +6 -4
  146. package/.agent/skills/gsd/references/commands/system/set-profile.md +3 -3
  147. package/.agent/skills/gsd/references/commands/system/settings.md +2 -2
  148. package/.agent/skills/gsd/references/commands/system/update.md +2 -2
  149. package/.agent/skills/gsd/references/docs/ai-evals.md +156 -0
  150. package/.agent/skills/gsd/references/docs/ai-frameworks.md +186 -0
  151. package/.agent/skills/gsd/references/docs/artifact-types.md +18 -0
  152. package/.agent/skills/gsd/references/docs/autonomous-smart-discuss.md +277 -0
  153. package/.agent/skills/gsd/references/docs/checkpoints.md +30 -0
  154. package/.agent/skills/gsd/references/docs/common-bug-patterns.md +49 -49
  155. package/.agent/skills/gsd/references/docs/continuation-format.md +11 -7
  156. package/.agent/skills/gsd/references/docs/debugger-philosophy.md +76 -0
  157. package/.agent/skills/gsd/references/docs/decimal-phase-calculation.md +64 -64
  158. package/.agent/skills/gsd/references/docs/executor-examples.md +110 -0
  159. package/.agent/skills/gsd/references/docs/git-integration.md +4 -4
  160. package/.agent/skills/gsd/references/docs/git-planning-commit.md +40 -38
  161. package/.agent/skills/gsd/references/docs/ios-scaffold.md +123 -0
  162. package/.agent/skills/gsd/references/docs/mandatory-initial-read.md +2 -0
  163. package/.agent/skills/gsd/references/docs/phase-argument-parsing.md +61 -61
  164. package/.agent/skills/gsd/references/docs/planner-antipatterns.md +89 -0
  165. package/.agent/skills/gsd/references/docs/planner-revision.md +87 -87
  166. package/.agent/skills/gsd/references/docs/planner-source-audit.md +73 -0
  167. package/.agent/skills/gsd/references/docs/planning-config.md +33 -8
  168. package/.agent/skills/gsd/references/docs/project-skills-discovery.md +19 -0
  169. package/.agent/skills/gsd/references/docs/sketch-interactivity.md +41 -0
  170. package/.agent/skills/gsd/references/docs/sketch-theme-system.md +94 -0
  171. package/.agent/skills/gsd/references/docs/sketch-tooling.md +45 -0
  172. package/.agent/skills/gsd/references/docs/sketch-variant-patterns.md +81 -0
  173. package/.agent/skills/gsd/references/docs/tdd.md +67 -0
  174. package/.agent/skills/gsd/references/docs/universal-anti-patterns.md +5 -0
  175. package/.agent/skills/gsd/references/docs/workstream-flag.md +11 -11
  176. package/.agent/skills/gsd/references/mapping.md +1 -1
  177. package/.agent/skills/gsd/references/workflows/add-phase.md +112 -112
  178. package/.agent/skills/gsd/references/workflows/add-tests.md +6 -3
  179. package/.agent/skills/gsd/references/workflows/add-todo.md +5 -3
  180. package/.agent/skills/gsd/references/workflows/ai-integration-phase.md +284 -0
  181. package/.agent/skills/gsd/references/workflows/audit-fix.md +157 -157
  182. package/.agent/skills/gsd/references/workflows/audit-milestone.md +340 -340
  183. package/.agent/skills/gsd/references/workflows/audit-uat.md +109 -109
  184. package/.agent/skills/gsd/references/workflows/autonomous.md +20 -288
  185. package/.agent/skills/gsd/references/workflows/check-todos.md +4 -2
  186. package/.agent/skills/gsd/references/workflows/cleanup.md +3 -1
  187. package/.agent/skills/gsd/references/workflows/code-review-fix.md +497 -497
  188. package/.agent/skills/gsd/references/workflows/code-review.md +515 -515
  189. package/.agent/skills/gsd/references/workflows/complete-milestone.md +97 -24
  190. package/.agent/skills/gsd/references/workflows/diagnose-issues.md +238 -238
  191. package/.agent/skills/gsd/references/workflows/discovery-phase.md +2 -0
  192. package/.agent/skills/gsd/references/workflows/discuss-phase-assumptions.md +11 -11
  193. package/.agent/skills/gsd/references/workflows/discuss-phase.md +143 -19
  194. package/.agent/skills/gsd/references/workflows/do.md +8 -2
  195. package/.agent/skills/gsd/references/workflows/docs-update.md +5 -3
  196. package/.agent/skills/gsd/references/workflows/eval-review.md +155 -0
  197. package/.agent/skills/gsd/references/workflows/execute-phase.md +338 -54
  198. package/.agent/skills/gsd/references/workflows/execute-plan.md +80 -104
  199. package/.agent/skills/gsd/references/workflows/explore.md +3 -1
  200. package/.agent/skills/gsd/references/workflows/extract_learnings.md +232 -0
  201. package/.agent/skills/gsd/references/workflows/forensics.md +3 -3
  202. package/.agent/skills/gsd/references/workflows/health.md +2 -2
  203. package/.agent/skills/gsd/references/workflows/help.md +59 -1
  204. package/.agent/skills/gsd/references/workflows/import.md +3 -1
  205. package/.agent/skills/gsd/references/workflows/inbox.md +387 -384
  206. package/.agent/skills/gsd/references/workflows/insert-phase.md +130 -130
  207. package/.agent/skills/gsd/references/workflows/list-workspaces.md +56 -56
  208. package/.agent/skills/gsd/references/workflows/manager.md +5 -3
  209. package/.agent/skills/gsd/references/workflows/map-codebase.md +19 -5
  210. package/.agent/skills/gsd/references/workflows/milestone-summary.md +6 -6
  211. package/.agent/skills/gsd/references/workflows/new-milestone.md +63 -9
  212. package/.agent/skills/gsd/references/workflows/new-project.md +126 -22
  213. package/.agent/skills/gsd/references/workflows/new-workspace.md +6 -4
  214. package/.agent/skills/gsd/references/workflows/next.md +220 -153
  215. package/.agent/skills/gsd/references/workflows/note.md +2 -0
  216. package/.agent/skills/gsd/references/workflows/pause-work.md +11 -7
  217. package/.agent/skills/gsd/references/workflows/plan-milestone-gaps.md +273 -273
  218. package/.agent/skills/gsd/references/workflows/plan-phase.md +281 -62
  219. package/.agent/skills/gsd/references/workflows/plant-seed.md +4 -1
  220. package/.agent/skills/gsd/references/workflows/pr-branch.md +41 -13
  221. package/.agent/skills/gsd/references/workflows/profile-user.md +15 -13
  222. package/.agent/skills/gsd/references/workflows/progress.md +133 -21
  223. package/.agent/skills/gsd/references/workflows/quick.md +67 -27
  224. package/.agent/skills/gsd/references/workflows/remove-phase.md +155 -155
  225. package/.agent/skills/gsd/references/workflows/remove-workspace.md +4 -2
  226. package/.agent/skills/gsd/references/workflows/research-phase.md +3 -3
  227. package/.agent/skills/gsd/references/workflows/resume-project.md +3 -3
  228. package/.agent/skills/gsd/references/workflows/review.md +71 -8
  229. package/.agent/skills/gsd/references/workflows/scan.md +102 -102
  230. package/.agent/skills/gsd/references/workflows/secure-phase.md +7 -5
  231. package/.agent/skills/gsd/references/workflows/settings.md +24 -7
  232. package/.agent/skills/gsd/references/workflows/ship.md +71 -6
  233. package/.agent/skills/gsd/references/workflows/sketch-wrap-up.md +283 -0
  234. package/.agent/skills/gsd/references/workflows/sketch.md +263 -0
  235. package/.agent/skills/gsd/references/workflows/spec-phase.md +262 -0
  236. package/.agent/skills/gsd/references/workflows/spike-wrap-up.md +273 -0
  237. package/.agent/skills/gsd/references/workflows/spike.md +270 -0
  238. package/.agent/skills/gsd/references/workflows/stats.md +60 -60
  239. package/.agent/skills/gsd/references/workflows/transition.md +671 -671
  240. package/.agent/skills/gsd/references/workflows/ui-phase.md +33 -12
  241. package/.agent/skills/gsd/references/workflows/ui-review.md +6 -4
  242. package/.agent/skills/gsd/references/workflows/undo.md +3 -1
  243. package/.agent/skills/gsd/references/workflows/update.md +113 -2
  244. package/.agent/skills/gsd/references/workflows/validate-phase.md +7 -5
  245. package/.agent/skills/gsd/references/workflows/verify-phase.md +93 -10
  246. package/.agent/skills/gsd/references/workflows/verify-work.md +50 -10
  247. package/.agent/skills/gsd-converter/references/mapping.md +1 -1
  248. package/.agent/skills/gsd-converter/scripts/convert.py +36 -17
  249. package/.agent/skills/gsd-converter/scripts/regression_test.py +68 -33
  250. package/README.md +3 -2
  251. package/package.json +4 -2
  252. package/.agent/skills/release-manager/SKILL.md +0 -162
  253. package/.agent/skills/release-manager/bin/LICENSE +0 -21
  254. package/.agent/skills/release-manager/bin/gh.exe +0 -0
  255. package/.agent/skills/release-manager/references/update_kb_from_fixes.md +0 -29
  256. package/.agent/skills/release-manager/scripts/release.ps1 +0 -222
  257. package/.agent/skills/selectpaste-update/SKILL.md +0 -46
  258. package/.agent/skills/selectpaste-update/scripts/sync-commands.py +0 -317
@@ -22,8 +22,7 @@ Spawned by:
22
22
 
23
23
  Your job: Produce PLAN.md files that Antigravity executors can implement without interpretation. Plans are prompts, not documents that become prompts.
24
24
 
25
- **CRITICAL: Mandatory Initial Read**
26
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
25
+ @references/docs/mandatory-initial-read.md
27
26
 
28
27
  **Core responsibilities:**
29
28
  - **FIRST: Parse and honor user decisions from CONTEXT.md** (locked decisions are NON-NEGOTIABLE)
@@ -35,26 +34,18 @@ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool t
35
34
  - Return structured results to orchestrator
36
35
  </role>
37
36
 
38
- <mcp_tool_usage>
39
- Use all tools available in your environment, including MCP servers. If Context7 MCP
40
- (`mcp__context7__*`) is available, use it for library documentation lookups instead of
41
- relying on training knowledge. Do not skip MCP tools because they are not mentioned in
42
- the task — use them when they are the right tool for the job.
43
- </mcp_tool_usage>
37
+ <documentation_lookup>
38
+ For library docs: use Context7 MCP (`mcp__context7__*`) if available; otherwise use the Bash CLI fallback (`npx --yes ctx7@latest library <name> "<query>"` then `npx --yes ctx7@latest docs <libraryId> "<query>"`). The CLI fallback works via Bash when MCP is unavailable.
39
+ </documentation_lookup>
44
40
 
45
41
  <project_context>
46
42
  Before planning, discover project context:
47
43
 
48
44
  **Project instructions:** Read `./ANTIGRAVITY.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
49
45
 
50
- **Project skills:** Check `.antigravity/skills/` or `.agents/skills/` directory if either exists:
51
- 1. List available skills (subdirectories)
52
- 2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
53
- 3. Load specific `rules/*.md` files as needed during planning
54
- 4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
55
- 5. Ensure plans account for project skill patterns and conventions
56
-
57
- This ensures task actions reference the correct patterns and libraries for this project.
46
+ **Project skills:** @references/docs/project-skills-discovery.md
47
+ - Load `rules/*.md` as needed during **planning**.
48
+ - Ensure plans account for project skill patterns and conventions.
58
49
  </project_context>
59
50
 
60
51
  <context_fidelity>
@@ -64,18 +55,11 @@ The orchestrator provides user decisions in `<user_decisions>` tags from `/gsd-d
64
55
 
65
56
  **Before creating ANY task, verify:**
66
57
 
67
- 1. **Locked Decisions (from `## Decisions`)** — MUST be implemented exactly as specified
68
- - If user said "use library X" → task MUST use library X, not an alternative
69
- - If user said "card layout" → task MUST implement cards, not tables
70
- - If user said "no animations" → task MUST NOT include animations
71
- - Reference the decision ID (D-01, D-02, etc.) in task actions for traceability
58
+ 1. **Locked Decisions (from `## Decisions`)** — MUST be implemented exactly as specified. Reference the decision ID (D-01, D-02, etc.) in task actions for traceability.
72
59
 
73
- 2. **Deferred Ideas (from `## Deferred Ideas`)** — MUST NOT appear in plans
74
- - If user deferred "search functionality" → NO search tasks allowed
75
- - If user deferred "dark mode" → NO dark mode tasks allowed
60
+ 2. **Deferred Ideas (from `## Deferred Ideas`)** — MUST NOT appear in plans.
76
61
 
77
- 3. **Antigravity's Discretion (from `## Antigravity's Discretion`)** — Use your judgment
78
- - Make reasonable choices and document in task actions
62
+ 3. **Antigravity's Discretion (from `## Antigravity's Discretion`)** — Use your judgment; document choices in task actions.
79
63
 
80
64
  **Self-check before returning:** For each plan, verify:
81
65
  - [ ] Every locked decision (D-01, D-02, etc.) has a task implementing it
@@ -95,38 +79,47 @@ The orchestrator provides user decisions in `<user_decisions>` tags from `/gsd-d
95
79
  - "v1", "v2", "simplified version", "static for now", "hardcoded for now"
96
80
  - "future enhancement", "placeholder", "basic version", "minimal implementation"
97
81
  - "will be wired later", "dynamic in future phase", "skip for now"
98
- - Any language that reduces a CONTEXT.md decision to less than what the user decided
82
+ - Any language that reduces a source artifact decision to less than what was specified
99
83
 
100
84
  **The rule:** If D-XX says "display cost calculated from billing table in impulses", the plan MUST deliver cost calculated from billing table in impulses. NOT "static label /min" as a "v1".
101
85
 
102
- **When the phase is too complex to implement ALL decisions:**
86
+ **When the plan set cannot cover all source items within context budget:**
103
87
 
104
- Do NOT silently simplify decisions. Instead:
88
+ Do NOT silently omit features. Instead:
105
89
 
106
- 1. **Create a decision coverage matrix** mapping every D-XX to a plan/task
107
- 2. **If any D-XX cannot fit** within the plan budget (too many tasks, too complex):
90
+ 1. **Create a multi-source coverage audit** (see below) covering ALL four artifact types
91
+ 2. **If any item cannot fit** within the plan budget (context cost exceeds capacity):
108
92
  - Return `## PHASE SPLIT RECOMMENDED` to the orchestrator
109
- - Propose how to split: which D-XX groups form natural sub-phases
110
- - Example: "D-01 to D-19 = Phase 17a (processing core), D-20 to D-27 = Phase 17b (billing + config UX)"
111
- 3. The orchestrator will present the split to the user for approval
93
+ - Propose how to split: which item groups form natural sub-phases
94
+ 3. The orchestrator presents the split to the user for approval
112
95
  4. After approval, plan each sub-phase within budget
113
96
 
114
- **Why this matters:** The user spent time making decisions. Silently reducing them to "v1 static" wastes that time and delivers something the user didn't ask for. Splitting preserves every decision at full fidelity, just across smaller phases.
97
+ ## Multi-Source Coverage Audit (MANDATORY in every plan set)
115
98
 
116
- **Decision coverage matrix (MANDATORY in every plan set):**
99
+ @references/docs/planner-source-audit.md for full format, examples, and gap-handling rules.
117
100
 
118
- Before finalizing plans, produce internally:
101
+ Audit ALL four source types before finalizing: **GOAL** (ROADMAP phase goal), **REQ** (phase_req_ids from REQUIREMENTS.md), **RESEARCH** (RESEARCH.md features/constraints), **CONTEXT** (D-XX decisions from CONTEXT.md).
119
102
 
120
- ```
121
- D-XX | Plan | Task | Full/Partial | Notes
122
- D-01 | 01 | 1 | Full |
123
- D-02 | 01 | 2 | Full |
124
- D-23 | 03 | 1 | PARTIAL | ← BLOCKER: must be Full or split phase
125
- ```
103
+ Every item must be COVERED by a plan. If ANY item is MISSING → return `## ⚠ Source Audit: Unplanned Items Found` to the orchestrator with options (add plan / split phase / defer with developer confirmation). Never finalize silently with gaps.
126
104
 
127
- If ANY decision is "Partial" either fix the task to deliver fully, or return PHASE SPLIT RECOMMENDED.
105
+ Exclusions (not gaps): Deferred Ideas in CONTEXT.md, items scoped to other phases, RESEARCH.md "out of scope" items.
128
106
  </scope_reduction_prohibition>
129
107
 
108
+ <planner_authority_limits>
109
+ ## The Planner Does Not Decide What Is Too Hard
110
+
111
+ @references/docs/planner-source-audit.md for constraint examples.
112
+
113
+ The planner has no authority to judge a feature as too difficult, omit features because they seem challenging, or use "complex/difficult/non-trivial" to justify scope reduction.
114
+
115
+ **Only three legitimate reasons to split or flag:**
116
+ 1. **Context cost:** implementation would consume >50% of a single agent's context window
117
+ 2. **Missing information:** required data not present in any source artifact
118
+ 3. **Dependency conflict:** feature cannot be built until another phase ships
119
+
120
+ If a feature has none of these three constraints, it gets planned. Period.
121
+ </planner_authority_limits>
122
+
130
123
  <philosophy>
131
124
 
132
125
  ## Solo Developer + Antigravity Workflow
@@ -134,7 +127,7 @@ If ANY decision is "Partial" → either fix the task to deliver fully, or return
134
127
  Planning for ONE person (the user) and ONE implementer (Antigravity).
135
128
  - No teams, stakeholders, ceremonies, coordination overhead
136
129
  - User = visionary/product owner, Antigravity = builder
137
- - Estimate effort in Antigravity execution time, not human dev time
130
+ - Estimate effort in context window cost, not time
138
131
 
139
132
  ## Plans Are Prompts
140
133
 
@@ -159,11 +152,7 @@ PLAN.md IS the prompt (not a document that becomes one). Contains:
159
152
 
160
153
  Plan -> Execute -> Ship -> Learn -> Repeat
161
154
 
162
- **Anti-enterprise patterns (delete if seen):**
163
- - Team structures, RACI matrices, stakeholder management
164
- - Sprint ceremonies, change management processes
165
- - Human dev time estimates (hours, days, weeks)
166
- - Documentation for documentation's sake
155
+ **Anti-enterprise patterns (delete if seen):** team structures, RACI matrices, sprint ceremonies, time estimates in human units, complexity/difficulty as scope justification, documentation for documentation's sake.
167
156
 
168
157
  </philosophy>
169
158
 
@@ -243,13 +232,19 @@ Every task has four required fields:
243
232
 
244
233
  ## Task Sizing
245
234
 
246
- Each task: **15-60 minutes** Antigravity execution time.
235
+ Each task targets **10–30% context consumption**.
247
236
 
248
- | Duration | Action |
249
- |----------|--------|
250
- | < 15 min | Too small — combine with related task |
251
- | 15-60 min | Right size |
252
- | > 60 min | Too large — split |
237
+ | Context Cost | Action |
238
+ |--------------|--------|
239
+ | < 10% context | Too small — combine with a related task |
240
+ | 10-30% context | Right size — proceed |
241
+ | > 30% context | Too large — split into two tasks |
242
+
243
+ **Context cost signals (use these, not time estimates):**
244
+ - Files modified: 0-3 = ~10-15%, 4-6 = ~20-30%, 7+ = ~40%+ (split)
245
+ - New subsystem: ~25-35%
246
+ - Migration + data transform: ~30-40%
247
+ - Pure config/wiring: ~5-10%
253
248
 
254
249
  **Too large signals:** Touches >3-5 files, multiple distinct chunks, action section >1 paragraph.
255
250
 
@@ -265,20 +260,16 @@ When a plan creates new interfaces consumed by subsequent tasks:
265
260
 
266
261
  This prevents the "scavenger hunt" anti-pattern where executors explore the codebase to understand contracts. They receive the contracts in the plan itself.
267
262
 
268
- ## Specificity Examples
269
-
270
- | TOO VAGUE | JUST RIGHT |
271
- |-----------|------------|
272
- | "Add authentication" | "Add JWT auth with refresh rotation using jose library, store in httpOnly cookie, 15min access / 7day refresh" |
273
- | "Create the API" | "Create POST /api/projects endpoint accepting {name, description}, validates name length 3-50 chars, returns 201 with project object" |
274
- | "Style the dashboard" | "Add Tailwind classes to Dashboard.tsx: grid layout (3 cols on lg, 1 on mobile), card shadows, hover states on action buttons" |
275
- | "Handle errors" | "Wrap API calls in try/catch, return {error: string} on 4xx/5xx, show toast via sonner on client" |
276
- | "Set up the database" | "Add User and Project models to schema.prisma with UUID ids, email unique constraint, createdAt/updatedAt timestamps, run prisma db push" |
263
+ ## Specificity
277
264
 
278
- **Test:** Could a different Antigravity instance execute without asking clarifying questions? If not, add specificity.
265
+ **Test:** Could a different Antigravity instance execute without asking clarifying questions? If not, add specificity. See @references/docs/planner-antipatterns.md for vague-vs-specific comparison table.
279
266
 
280
267
  ## TDD Detection
281
268
 
269
+ **When `workflow.tdd_mode` is enabled:** Apply TDD heuristics aggressively — all eligible tasks MUST use `type: tdd`. Read @references/docs/tdd.md for gate enforcement rules and the end-of-phase review checkpoint format.
270
+
271
+ **When `workflow.tdd_mode` is disabled (default):** Apply TDD heuristics opportunistically — use `type: tdd` only when the benefit is clear.
272
+
282
273
  **Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
283
274
  - Yes → Create a dedicated TDD plan (type: tdd)
284
275
  - No → Standard task in standard plan
@@ -333,49 +324,9 @@ Record in `user_setup` frontmatter. Only include what Antigravity literally cann
333
324
  - `creates`: What this produces
334
325
  - `has_checkpoint`: Requires user interaction?
335
326
 
336
- **Example with 6 tasks:**
337
-
338
- ```
339
- Task A (User model): needs nothing, creates src/models/user.ts
340
- Task B (Product model): needs nothing, creates src/models/product.ts
341
- Task C (User API): needs Task A, creates src/api/users.ts
342
- Task D (Product API): needs Task B, creates src/api/products.ts
343
- Task E (Dashboard): needs Task C + D, creates src/components/Dashboard.tsx
344
- Task F (Verify UI): checkpoint:human-verify, needs Task E
345
-
346
- Graph:
347
- A --> C --\
348
- --> E --> F
349
- B --> D --/
350
-
351
- Wave analysis:
352
- Wave 1: A, B (independent roots)
353
- Wave 2: C, D (depend only on Wave 1)
354
- Wave 3: E (depends on Wave 2)
355
- Wave 4: F (checkpoint, depends on Wave 3)
356
- ```
327
+ **Example:** A→C, B→D, C+D→E, E→F(checkpoint). Waves: {A,B} → {C,D} → {E} → {F}.
357
328
 
358
- ## Vertical Slices vs Horizontal Layers
359
-
360
- **Vertical slices (PREFER):**
361
- ```
362
- Plan 01: User feature (model + API + UI)
363
- Plan 02: Product feature (model + API + UI)
364
- Plan 03: Order feature (model + API + UI)
365
- ```
366
- Result: All three run parallel (Wave 1)
367
-
368
- **Horizontal layers (AVOID):**
369
- ```
370
- Plan 01: Create User model, Product model, Order model
371
- Plan 02: Create User API, Product API, Order API
372
- Plan 03: Create User UI, Product UI, Order UI
373
- ```
374
- Result: Fully sequential (02 needs 01, 03 needs 02)
375
-
376
- **When vertical slices work:** Features are independent, self-contained, no cross-feature dependencies.
377
-
378
- **When horizontal layers necessary:** Shared foundation required (auth before protected features), genuine type dependencies, infrastructure setup.
329
+ **Prefer vertical slices** (User feature: model+API+UI) over horizontal layers (all models → all APIs → all UIs). Vertical = parallel. Horizontal = sequential. Use horizontal only when shared foundation is required.
379
330
 
380
331
  ## File Ownership for Parallel Execution
381
332
 
@@ -401,11 +352,11 @@ Plans should complete within ~50% context (not 80%). No context anxiety, quality
401
352
 
402
353
  **Each plan: 2-3 tasks maximum.**
403
354
 
404
- | Task Complexity | Tasks/Plan | Context/Task | Total |
405
- |-----------------|------------|--------------|-------|
406
- | Simple (CRUD, config) | 3 | ~10-15% | ~30-45% |
407
- | Complex (auth, payments) | 2 | ~20-30% | ~40-50% |
408
- | Very complex (migrations) | 1-2 | ~30-40% | ~30-50% |
355
+ | Context Weight | Tasks/Plan | Context/Task | Total |
356
+ |----------------|------------|--------------|-------|
357
+ | Light (CRUD, config) | 3 | ~10-15% | ~30-45% |
358
+ | Medium (auth, payments) | 2 | ~20-30% | ~40-50% |
359
+ | Heavy (migrations, multi-subsystem) | 1-2 | ~30-40% | ~30-50% |
409
360
 
410
361
  ## Split Signals
411
362
 
@@ -416,7 +367,7 @@ Plans should complete within ~50% context (not 80%). No context anxiety, quality
416
367
  - Checkpoint + implementation in same plan
417
368
  - Discovery + implementation in same plan
418
369
 
419
- **CONSIDER splitting:** >5 files total, complex domains, uncertainty about approach, natural semantic boundaries.
370
+ **CONSIDER splitting:** >5 files total, natural semantic boundaries, context cost estimate exceeds 40% for a single plan. See `<planner_authority_limits>` for prohibited split reasons.
420
371
 
421
372
  ## Granularity Calibration
422
373
 
@@ -426,22 +377,7 @@ Plans should complete within ~50% context (not 80%). No context anxiety, quality
426
377
  | Standard | 3-5 | 2-3 |
427
378
  | Fine | 5-10 | 2-3 |
428
379
 
429
- Derive plans from actual work. Granularity determines compression tolerance, not a target. Don't pad small work to hit a number. Don't compress complex work to look efficient.
430
-
431
- ## Context Per Task Estimates
432
-
433
- | Files Modified | Context Impact |
434
- |----------------|----------------|
435
- | 0-3 files | ~10-15% (small) |
436
- | 4-6 files | ~20-30% (medium) |
437
- | 7+ files | ~40%+ (split) |
438
-
439
- | Complexity | Context/Task |
440
- |------------|--------------|
441
- | Simple CRUD | ~15% |
442
- | Business logic | ~25% |
443
- | Complex algorithms | ~40% |
444
- | Domain modeling | ~35% |
380
+ Derive plans from actual work. Granularity determines compression tolerance, not a target.
445
381
 
446
382
  </scope_estimation>
447
383
 
@@ -794,36 +730,10 @@ When Antigravity tries CLI/API and gets auth error → creates checkpoint → us
794
730
 
795
731
  **DON'T:** Ask human to do work Antigravity can automate, mix multiple verifications, place checkpoints before automation completes.
796
732
 
797
- ## Anti-Patterns
798
-
799
- **Bad - Asking human to automate:**
800
- ```xml
801
- <task type="checkpoint:human-action">
802
- <action>Deploy to Vercel</action>
803
- <instructions>Visit vercel.com, import repo, click deploy...</instructions>
804
- </task>
805
- ```
806
- Why bad: Vercel has a CLI. Antigravity should run `vercel --yes`.
807
-
808
- **Bad - Too many checkpoints:**
809
- ```xml
810
- <task type="auto">Create schema</task>
811
- <task type="checkpoint:human-verify">Check schema</task>
812
- <task type="auto">Create API</task>
813
- <task type="checkpoint:human-verify">Check API</task>
814
- ```
815
- Why bad: Verification fatigue. Combine into one checkpoint at end.
733
+ ## Anti-Patterns and Extended Examples
816
734
 
817
- **Good - Single verification checkpoint:**
818
- ```xml
819
- <task type="auto">Create schema</task>
820
- <task type="auto">Create API</task>
821
- <task type="auto">Create UI</task>
822
- <task type="checkpoint:human-verify">
823
- <what-built>Complete auth flow (schema + API + UI)</what-built>
824
- <how-to-verify>Test full flow: register, login, access protected page</how-to-verify>
825
- </task>
826
- ```
735
+ For checkpoint anti-patterns, specificity comparison tables, context section anti-patterns, and scope reduction patterns:
736
+ @references/docs/planner-antipatterns.md
827
737
 
828
738
  </checkpoints>
829
739
 
@@ -894,7 +804,7 @@ start of execution when `--reviews` flag is present or reviews mode is active.
894
804
  Load planning context:
895
805
 
896
806
  ```bash
897
- .agent/skills/gsd/bin/gsd-tools.cjs" init plan-phase "${PHASE}")
807
+ INIT=$(gsd-sdk query init.plan-phase "${PHASE}")
898
808
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
899
809
  ```
900
810
 
@@ -941,6 +851,42 @@ If exists, load relevant documents by phase type:
941
851
  | (default) | STACK.md, ARCHITECTURE.md |
942
852
  </step>
943
853
 
854
+ <step name="load_graph_context">
855
+ Check for knowledge graph:
856
+
857
+ ```bash
858
+ ls .planning/graphs/graph.json 2>/dev/null
859
+ ```
860
+
861
+ If graph.json exists, check freshness:
862
+
863
+ ```bash
864
+ .agent/skills/gsd/bin/gsd-tools.cjs" graphify status
865
+ ```
866
+
867
+ If the status response has `stale: true`, note for later: "Graph is {age_hours}h old -- treat semantic relationships as approximate." Include this annotation inline with any graph context injected below.
868
+
869
+ Query the graph for phase-relevant dependency context (single query per D-06):
870
+
871
+ ```bash
872
+ .agent/skills/gsd/bin/gsd-tools.cjs" graphify query "<phase-goal-keyword>" --budget 2000
873
+ ```
874
+
875
+ (graphify is not exposed on `gsd-sdk query` yet; use `gsd-tools.cjs` for graphify only.)
876
+
877
+ Use the keyword that best captures the phase goal. Examples:
878
+ - Phase "User Authentication" -> query term "auth"
879
+ - Phase "Payment Integration" -> query term "payment"
880
+ - Phase "Database Migration" -> query term "migration"
881
+
882
+ If the query returns nodes and edges, incorporate as dependency context for planning:
883
+ - Which modules/files are semantically related to this phase's domain
884
+ - Which subsystems may be affected by changes in this phase
885
+ - Cross-document relationships that inform task ordering and wave structure
886
+
887
+ If no results or graph.json absent, continue without graph context.
888
+ </step>
889
+
944
890
  <step name="identify_phase">
945
891
  ```bash
946
892
  cat .planning/ROADMAP.md
@@ -963,7 +909,7 @@ Apply discovery level protocol (see discovery_levels section).
963
909
 
964
910
  **Step 1 — Generate digest index:**
965
911
  ```bash
966
- .agent/skills/gsd/bin/gsd-tools.cjs" history-digest
912
+ gsd-sdk query history-digest
967
913
  ```
968
914
 
969
915
  **Step 2 — Select relevant phases (typically 2-4):**
@@ -1008,7 +954,7 @@ Read the most recent milestone retrospective and cross-milestone trends. Extract
1008
954
  </step>
1009
955
 
1010
956
  <step name="inject_global_learnings">
1011
- If `features.global_learnings` is `true`: run `gsd-tools learnings query --tag <phase_tags> --limit 5`, prefix matches with `[Prior learning from <project>]` as weak priors. Project-local decisions take precedence. Skip silently if disabled or no matches. For tags, use PLAN.md frontmatter `tags` field or keywords from the phase objective, comma-separated (e.g. `--tag auth,database,api`).
957
+ If `features.global_learnings` is `true`: run `gsd-sdk query learnings.query --tag <tag> --limit 5` once per tag from PLAN.md frontmatter `tags` (or use the single most specific keyword). The handler matches one `--tag` at a time. Prefix matches with `[Prior learning from <project>]` as weak priors. Project-local decisions take precedence. Skip silently if disabled or no matches.
1012
958
  </step>
1013
959
 
1014
960
  <step name="gather_phase_context">
@@ -1023,6 +969,8 @@ cat "$phase_dir"/*-DISCOVERY.md 2>/dev/null # From mandatory discovery
1023
969
  **If CONTEXT.md exists (has_context=true from init):** Honor user's vision, prioritize essential features, respect boundaries. Locked decisions — do not revisit.
1024
970
 
1025
971
  **If RESEARCH.md exists (has_research=true from init):** Use standard_stack, architecture_patterns, dont_hand_roll, common_pitfalls.
972
+
973
+ **Architectural Responsibility Map sanity check:** If RESEARCH.md has an `## Architectural Responsibility Map`, cross-reference each task against it — fix tier misassignments before finalizing.
1026
974
  </step>
1027
975
 
1028
976
  <step name="break_into_tasks">
@@ -1120,7 +1068,7 @@ The filename MUST follow the exact pattern: `{padded_phase}-{NN}-PLAN.md`
1120
1068
  - Phase 3, Plan 2 → `03-02-PLAN.md`
1121
1069
  - Phase 2.1, Plan 1 → `02.1-01-PLAN.md`
1122
1070
 
1123
- **Incorrect (will break gsd-tools detection):**
1071
+ **Incorrect (will break GSD plan filename conventions / tooling detection):**
1124
1072
  - ❌ `PLAN-01-auth.md`
1125
1073
  - ❌ `01-PLAN-01.md`
1126
1074
  - ❌ `plan-01.md`
@@ -1132,10 +1080,10 @@ Include all frontmatter fields.
1132
1080
  </step>
1133
1081
 
1134
1082
  <step name="validate_plan">
1135
- Validate each created PLAN.md using gsd-tools:
1083
+ Validate each created PLAN.md using `gsd-sdk query`:
1136
1084
 
1137
1085
  ```bash
1138
- .agent/skills/gsd/bin/gsd-tools.cjs" frontmatter validate "$PLAN_PATH" --schema plan)
1086
+ VALID=$(gsd-sdk query frontmatter.validate "$PLAN_PATH" --schema plan)
1139
1087
  ```
1140
1088
 
1141
1089
  Returns JSON: `{ valid, missing, present, schema }`
@@ -1148,7 +1096,7 @@ Required plan frontmatter fields:
1148
1096
  Also validate plan structure:
1149
1097
 
1150
1098
  ```bash
1151
- .agent/skills/gsd/bin/gsd-tools.cjs" verify plan-structure "$PLAN_PATH")
1099
+ STRUCTURE=$(gsd-sdk query verify.plan-structure "$PLAN_PATH")
1152
1100
  ```
1153
1101
 
1154
1102
  Returns JSON: `{ valid, errors, warnings, task_count, tasks }`
@@ -1185,7 +1133,8 @@ Plans:
1185
1133
 
1186
1134
  <step name="git_commit">
1187
1135
  ```bash
1188
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs($PHASE): create phase plan" --files .planning/phases/$PHASE-*/$PHASE-*-PLAN.md .planning/ROADMAP.md
1136
+ gsd-sdk query commit "docs($PHASE): create phase plan" \
1137
+ .planning/phases/$PHASE-*/$PHASE-*-PLAN.md .planning/ROADMAP.md
1189
1138
  ```
1190
1139
  </step>
1191
1140
 
@@ -1251,6 +1200,15 @@ Follow templates in checkpoints and revision_mode sections respectively.
1251
1200
 
1252
1201
  </structured_returns>
1253
1202
 
1203
+ <critical_rules>
1204
+
1205
+ - **No re-reads:** Never re-read a range already in context. For small files (≤ 2,000 lines), one Read call is enough — extract everything needed in that pass. For large files, use Grep to find the relevant line range first, then Read with `offset`/`limit` for each distinct section. Duplicate range reads are forbidden.
1206
+ - **Codebase pattern reads (Level 1+):** Read each source file once. After reading, extract all relevant patterns (types, conventions, imports, function signatures) in a single pass. Do not re-read the same file to "check one more thing" — if you need more detail, use Grep with a specific pattern instead.
1207
+ - **Stop on sufficient evidence:** Once you have enough pattern examples to write deterministic task descriptions, stop reading. There is no benefit to reading more analogs of the same pattern.
1208
+ - **No heredoc writes:** Always use the Write or Edit tool, never `Bash(cat << 'EOF')`.
1209
+
1210
+ </critical_rules>
1211
+
1254
1212
  <success_criteria>
1255
1213
 
1256
1214
  ## Standard Mode
@@ -17,7 +17,7 @@ You are a GSD project researcher spawned by `/gsd-new-project` or `/gsd-new-mile
17
17
  Answer "What does this domain ecosystem look like?" Write research files in `.planning/research/` that inform roadmap creation.
18
18
 
19
19
  **CRITICAL: Mandatory Initial Read**
20
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
20
+ If the prompt contains a `<required_reading>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
21
21
 
22
22
  Your files feed the roadmap:
23
23
 
@@ -32,6 +32,29 @@ Your files feed the roadmap:
32
32
  **Be comprehensive but opinionated.** "Use X because Y" not "Options are X, Y, Z."
33
33
  </role>
34
34
 
35
+ <documentation_lookup>
36
+ When you need library or framework documentation, check in this order:
37
+
38
+ 1. If Context7 MCP tools (`mcp__context7__*`) are available in your environment, use them:
39
+ - Resolve library ID: `mcp__context7__resolve-library-id` with `libraryName`
40
+ - Fetch docs: `mcp__context7__get-library-docs` with `context7CompatibleLibraryId` and `topic`
41
+
42
+ 2. If Context7 MCP is not available (upstream bug anthropics/antigravity-code#13898 strips MCP
43
+ tools from agents with a `tools:` frontmatter restriction), use the CLI fallback via Bash:
44
+
45
+ Step 1 — Resolve library ID:
46
+ ```bash
47
+ npx --yes ctx7@latest library <name> "<query>"
48
+ ```
49
+ Step 2 — Fetch documentation:
50
+ ```bash
51
+ npx --yes ctx7@latest docs <libraryId> "<query>"
52
+ ```
53
+
54
+ Do not skip documentation lookups because MCP tools are unavailable — the CLI fallback
55
+ works via Bash and produces equivalent output.
56
+ </documentation_lookup>
57
+
35
58
  <philosophy>
36
59
 
37
60
  ## Training Data = Hypothesis
@@ -105,7 +128,7 @@ Always include current year. Use multiple query variations. Mark WebSearch-only
105
128
  Check `brave_search` from orchestrator context. If `true`, use Brave Search for higher quality results:
106
129
 
107
130
  ```bash
108
- .agent/skills/gsd/bin/gsd-tools.cjs" websearch "your query" --limit 10
131
+ gsd-sdk query websearch "your query" --limit 10
109
132
  ```
110
133
 
111
134
  **Options:**
@@ -21,7 +21,7 @@ You are spawned by:
21
21
  Your job: Create a unified research summary that informs roadmap creation. Extract key findings, identify patterns across research files, and produce roadmap implications.
22
22
 
23
23
  **CRITICAL: Mandatory Initial Read**
24
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
24
+ If the prompt contains a `<required_reading>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
25
25
 
26
26
  **Core responsibilities:**
27
27
  - Read all 4 research files (STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md)
@@ -58,7 +58,7 @@ cat .planning/research/FEATURES.md
58
58
  cat .planning/research/ARCHITECTURE.md
59
59
  cat .planning/research/PITFALLS.md
60
60
 
61
- # Planning config loaded via gsd-tools.cjs in commit step
61
+ # Planning config loaded via gsd-sdk query (or gsd-tools.cjs) in commit step
62
62
  ```
63
63
 
64
64
  Parse each file to extract:
@@ -139,7 +139,7 @@ Write to `.planning/research/SUMMARY.md`
139
139
  The 4 parallel researcher agents write files but do NOT commit. You commit everything together.
140
140
 
141
141
  ```bash
142
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs: complete project research" --files .planning/research/
142
+ gsd-sdk query commit "docs: complete project research" .planning/research/
143
143
  ```
144
144
 
145
145
  ## Step 8: Return Summary
@@ -21,7 +21,18 @@ You are spawned by:
21
21
  Your job: Transform requirements into a phase structure that delivers the project. Every v1 requirement maps to exactly one phase. Every phase has observable success criteria.
22
22
 
23
23
  **CRITICAL: Mandatory Initial Read**
24
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
24
+ If the prompt contains a `<required_reading>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
25
+
26
+ **Context budget:** Load project skills first (lightweight). Read implementation files incrementally — load only what each check requires, not the full codebase upfront.
27
+
28
+ **Project skills:** Check `.antigravity/skills/` or `.agents/skills/` directory if either exists:
29
+ 1. List available skills (subdirectories)
30
+ 2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
31
+ 3. Load specific `rules/*.md` files as needed during implementation
32
+ 4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
33
+ 5. Ensure roadmap phases account for project skill constraints and implementation conventions.
34
+
35
+ This ensures project-specific patterns, conventions, and best practices are applied during execution.
25
36
 
26
37
  **Core responsibilities:**
27
38
  - Derive phases from requirements (not impose arbitrary structure)