gsd-antigravity-kit 2.0.1 → 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 (251) 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 +1 -1
@@ -1,64 +1,64 @@
1
- # Decimal Phase Calculation
2
-
3
- Calculate the next decimal phase number for urgent insertions.
4
-
5
- ## Using gsd-tools
6
-
7
- ```bash
8
- # Get next decimal phase after phase 6
9
- .agent/skills/gsd/bin/gsd-tools.cjs" phase next-decimal 6
10
- ```
11
-
12
- Output:
13
- ```json
14
- {
15
- "found": true,
16
- "base_phase": "06",
17
- "next": "06.1",
18
- "existing": []
19
- }
20
- ```
21
-
22
- With existing decimals:
23
- ```json
24
- {
25
- "found": true,
26
- "base_phase": "06",
27
- "next": "06.3",
28
- "existing": ["06.1", "06.2"]
29
- }
30
- ```
31
-
32
- ## Extract Values
33
-
34
- ```bash
35
- .agent/skills/gsd/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --pick next)
36
- .agent/skills/gsd/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --pick base_phase)
37
- ```
38
-
39
- Or with --raw flag:
40
- ```bash
41
- .agent/skills/gsd/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --raw)
42
- # Returns just: 06.1
43
- ```
44
-
45
- ## Examples
46
-
47
- | Existing Phases | Next Phase |
48
- |-----------------|------------|
49
- | 06 only | 06.1 |
50
- | 06, 06.1 | 06.2 |
51
- | 06, 06.1, 06.2 | 06.3 |
52
- | 06, 06.1, 06.3 (gap) | 06.4 |
53
-
54
- ## Directory Naming
55
-
56
- Decimal phase directories use the full decimal number:
57
-
58
- ```bash
59
- .agent/skills/gsd/bin/gsd-tools.cjs" generate-slug "$DESCRIPTION" --raw)
60
- PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
61
- mkdir -p "$PHASE_DIR"
62
- ```
63
-
64
- Example: `.planning/phases/06.1-fix-critical-auth-bug/`
1
+ # Decimal Phase Calculation
2
+
3
+ Calculate the next decimal phase number for urgent insertions.
4
+
5
+ ## Using gsd-tools
6
+
7
+ ```bash
8
+ # Get next decimal phase after phase 6
9
+ gsd-sdk query phase.next-decimal 6
10
+ ```
11
+
12
+ Output:
13
+ ```json
14
+ {
15
+ "found": true,
16
+ "base_phase": "06",
17
+ "next": "06.1",
18
+ "existing": []
19
+ }
20
+ ```
21
+
22
+ With existing decimals:
23
+ ```json
24
+ {
25
+ "found": true,
26
+ "base_phase": "06",
27
+ "next": "06.3",
28
+ "existing": ["06.1", "06.2"]
29
+ }
30
+ ```
31
+
32
+ ## Extract Values
33
+
34
+ ```bash
35
+ DECIMAL_PHASE=$(gsd-sdk query phase.next-decimal "${AFTER_PHASE}" --pick next)
36
+ BASE_PHASE=$(gsd-sdk query phase.next-decimal "${AFTER_PHASE}" --pick base_phase)
37
+ ```
38
+
39
+ Or with --raw flag:
40
+ ```bash
41
+ DECIMAL_PHASE=$(gsd-sdk query phase.next-decimal "${AFTER_PHASE}" --raw)
42
+ # Returns just: 06.1
43
+ ```
44
+
45
+ ## Examples
46
+
47
+ | Existing Phases | Next Phase |
48
+ |-----------------|------------|
49
+ | 06 only | 06.1 |
50
+ | 06, 06.1 | 06.2 |
51
+ | 06, 06.1, 06.2 | 06.3 |
52
+ | 06, 06.1, 06.3 (gap) | 06.4 |
53
+
54
+ ## Directory Naming
55
+
56
+ Decimal phase directories use the full decimal number:
57
+
58
+ ```bash
59
+ SLUG=$(gsd-sdk query generate-slug "$DESCRIPTION" --raw)
60
+ PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
61
+ mkdir -p "$PHASE_DIR"
62
+ ```
63
+
64
+ Example: `.planning/phases/06.1-fix-critical-auth-bug/`
@@ -0,0 +1,110 @@
1
+ # Executor Extended Examples
2
+
3
+ > Reference file for gsd-executor agent. Loaded on-demand via `@` reference.
4
+ > For sub-200K context windows, this content is stripped from the agent prompt and available here for on-demand loading.
5
+
6
+ ## Deviation Rule Examples
7
+
8
+ ### Rule 1 — Auto-fix bugs
9
+
10
+ **Examples of Rule 1 triggers:**
11
+ - Wrong queries returning incorrect data
12
+ - Logic errors in conditionals
13
+ - Type errors and type mismatches
14
+ - Null pointer exceptions / undefined access
15
+ - Broken validation (accepts invalid input)
16
+ - Security vulnerabilities (XSS, SQL injection)
17
+ - Race conditions in async code
18
+ - Memory leaks from uncleaned resources
19
+
20
+ ### Rule 2 — Auto-add missing critical functionality
21
+
22
+ **Examples of Rule 2 triggers:**
23
+ - Missing error handling (unhandled promise rejections, no try/catch on I/O)
24
+ - No input validation on user-facing endpoints
25
+ - Missing null checks before property access
26
+ - No auth on protected routes
27
+ - Missing authorization checks (user can access other users' data)
28
+ - No CSRF/CORS configuration
29
+ - No rate limiting on public endpoints
30
+ - Missing DB indexes on frequently queried columns
31
+ - No error logging (failures silently swallowed)
32
+
33
+ ### Rule 3 — Auto-fix blocking issues
34
+
35
+ **Examples of Rule 3 triggers:**
36
+ - Missing dependency not in package.json
37
+ - Wrong types preventing compilation
38
+ - Broken imports (wrong path, wrong export name)
39
+ - Missing env var required at runtime
40
+ - DB connection error (wrong URL, missing credentials)
41
+ - Build config error (wrong entry point, missing loader)
42
+ - Missing referenced file (import points to non-existent module)
43
+ - Circular dependency preventing module load
44
+
45
+ ### Rule 4 — Ask about architectural changes
46
+
47
+ **Examples of Rule 4 triggers:**
48
+ - New DB table (not just adding a column)
49
+ - Major schema changes (renaming tables, changing relationships)
50
+ - New service layer (adding a queue, cache, or message bus)
51
+ - Switching libraries/frameworks (e.g., replacing Express with Fastify)
52
+ - Changing auth approach (switching from session to JWT)
53
+ - New infrastructure (adding Redis, S3, etc.)
54
+ - Breaking API changes (removing or renaming endpoints)
55
+
56
+ ## Edge Case Decision Guide
57
+
58
+ | Scenario | Rule | Rationale |
59
+ |----------|------|-----------|
60
+ | Missing validation on input | Rule 2 | Security requirement |
61
+ | Crashes on null input | Rule 1 | Bug — incorrect behavior |
62
+ | Need new database table | Rule 4 | Architectural decision |
63
+ | Need new column on existing table | Rule 1 or 2 | Depends on context |
64
+ | Pre-existing linting warnings | Out of scope | Not caused by current task |
65
+ | Unrelated test failures | Out of scope | Not caused by current task |
66
+
67
+ **Decision heuristic:** "Does this affect correctness, security, or ability to complete the current task?"
68
+ - YES → Rules 1-3 (fix automatically)
69
+ - MAYBE → Rule 4 (ask the user)
70
+ - NO → Out of scope (log to deferred-items.md)
71
+
72
+ ## Checkpoint Examples
73
+
74
+ ### Good checkpoint placement
75
+
76
+ ```xml
77
+ <!-- Automate everything, then verify at the end -->
78
+ <task type="auto">Create database schema</task>
79
+ <task type="auto">Create API endpoints</task>
80
+ <task type="auto">Create UI components</task>
81
+ <task type="checkpoint:human-verify">
82
+ <what-built>Complete auth flow (schema + API + UI)</what-built>
83
+ <how-to-verify>
84
+ 1. Visit http://localhost:3000/register
85
+ 2. Create account with test@example.com
86
+ 3. Log in with those credentials
87
+ 4. Verify dashboard loads with user name
88
+ </how-to-verify>
89
+ </task>
90
+ ```
91
+
92
+ ### Bad checkpoint placement
93
+
94
+ ```xml
95
+ <!-- Too many checkpoints — causes verification fatigue -->
96
+ <task type="auto">Create schema</task>
97
+ <task type="checkpoint:human-verify">Check schema</task>
98
+ <task type="auto">Create API</task>
99
+ <task type="checkpoint:human-verify">Check API</task>
100
+ <task type="auto">Create UI</task>
101
+ <task type="checkpoint:human-verify">Check UI</task>
102
+ ```
103
+
104
+ ### Auth gate handling
105
+
106
+ When an auth error occurs during `type="auto"` execution:
107
+ 1. Recognize it as an auth gate (not a bug) — indicators: "Not authenticated", "401", "403", "Please run X login"
108
+ 2. STOP the current task
109
+ 3. Return a `checkpoint:human-action` with exact auth steps
110
+ 4. In SUMMARY.md, document auth gates as normal flow, not deviations
@@ -51,7 +51,7 @@ Phases:
51
51
  What to commit:
52
52
 
53
53
  ```bash
54
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs: initialize [project-name] ([N] phases)" --files .planning/
54
+ gsd-sdk query commit "docs: initialize [project-name] ([N] phases)" .planning/
55
55
  ```
56
56
 
57
57
  </format>
@@ -133,7 +133,7 @@ SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
133
133
  What to commit:
134
134
 
135
135
  ```bash
136
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
136
+ gsd-sdk query commit "docs({phase}-{plan}): complete [plan-name] plan" .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
137
137
  ```
138
138
 
139
139
  **Note:** Code files NOT included - already committed per-task.
@@ -153,7 +153,7 @@ Current: [task name]
153
153
  What to commit:
154
154
 
155
155
  ```bash
156
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/
156
+ gsd-sdk query commit "wip: [phase-name] paused at task [X]/[Y]" .planning/
157
157
  ```
158
158
 
159
159
  </format>
@@ -284,7 +284,7 @@ Set `commit_docs: false` so planning docs stay local and are not committed to an
284
284
  Instead of the standard `commit` command, use `commit-to-subrepo` when `sub_repos` is configured:
285
285
 
286
286
  ```bash
287
- .agent/skills/gsd/bin/gsd-tools.cjs commit-to-subrepo "feat(02-01): add user API" \
287
+ gsd-sdk query commit-to-subrepo "feat(02-01): add user API" \
288
288
  --files backend/src/api/users.ts backend/src/types/user.ts frontend/src/components/UserForm.tsx
289
289
  ```
290
290
 
@@ -1,38 +1,40 @@
1
- # Git Planning Commit
2
-
3
- Commit planning artifacts using the gsd-tools CLI, which automatically checks `commit_docs` config and gitignore status.
4
-
5
- ## Commit via CLI
6
-
7
- Always use `gsd-tools.cjs commit` for `.planning/` files it handles `commit_docs` and gitignore checks automatically:
8
-
9
- ```bash
10
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs({scope}): {description}" --files .planning/STATE.md .planning/ROADMAP.md
11
- ```
12
-
13
- The CLI will return `skipped` (with reason) if `commit_docs` is `false` or `.planning/` is gitignored. No manual conditional checks needed.
14
-
15
- ## Amend previous commit
16
-
17
- To fold `.planning/` file changes into the previous commit:
18
-
19
- ```bash
20
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "" --files .planning/codebase/*.md --amend
21
- ```
22
-
23
- ## Commit Message Patterns
24
-
25
- | Command | Scope | Example |
26
- |---------|-------|---------|
27
- | plan-phase | phase | `docs(phase-03): create authentication plans` |
28
- | execute-phase | phase | `docs(phase-03): complete authentication phase` |
29
- | new-milestone | milestone | `docs: start milestone v1.1` |
30
- | remove-phase | chore | `chore: remove phase 17 (dashboard)` |
31
- | insert-phase | phase | `docs: insert phase 16.1 (critical fix)` |
32
- | add-phase | phase | `docs: add phase 07 (settings page)` |
33
-
34
- ## When to Skip
35
-
36
- - `commit_docs: false` in config
37
- - `.planning/` is gitignored
38
- - No changes to commit (check with `git status --porcelain .planning/`)
1
+ # Git Planning Commit
2
+
3
+ Commit planning artifacts via `gsd-sdk query commit`, which checks `commit_docs` config and gitignore status (same behavior as legacy `gsd-tools.cjs commit`).
4
+
5
+ ## Commit via CLI
6
+
7
+ Pass the message first, then file paths (positional). Do not use `--files` for `commit` (that flag is only for `commit-to-subrepo`).
8
+
9
+ Always use this for `.planning/` files — it handles `commit_docs` and gitignore checks automatically:
10
+
11
+ ```bash
12
+ gsd-sdk query commit "docs({scope}): {description}" .planning/STATE.md .planning/ROADMAP.md
13
+ ```
14
+
15
+ The CLI will return `skipped` (with reason) if `commit_docs` is `false` or `.planning/` is gitignored. No manual conditional checks needed.
16
+
17
+ ## Amend previous commit
18
+
19
+ To fold `.planning/` file changes into the previous commit:
20
+
21
+ ```bash
22
+ gsd-sdk query commit "" .planning/codebase/*.md --amend
23
+ ```
24
+
25
+ ## Commit Message Patterns
26
+
27
+ | Command | Scope | Example |
28
+ |---------|-------|---------|
29
+ | plan-phase | phase | `docs(phase-03): create authentication plans` |
30
+ | execute-phase | phase | `docs(phase-03): complete authentication phase` |
31
+ | new-milestone | milestone | `docs: start milestone v1.1` |
32
+ | remove-phase | chore | `chore: remove phase 17 (dashboard)` |
33
+ | insert-phase | phase | `docs: insert phase 16.1 (critical fix)` |
34
+ | add-phase | phase | `docs: add phase 07 (settings page)` |
35
+
36
+ ## When to Skip
37
+
38
+ - `commit_docs: false` in config
39
+ - `.planning/` is gitignored
40
+ - No changes to commit (check with `git status --porcelain .planning/`)
@@ -0,0 +1,123 @@
1
+ # iOS App Scaffold Reference
2
+
3
+ Rules and patterns for scaffolding iOS applications. Apply when any plan involves creating a new iOS app target.
4
+
5
+ ---
6
+
7
+ ## Critical Rule: Never Use Package.swift as the Primary Build System for iOS Apps
8
+
9
+ **NEVER use `Package.swift` with `.executableTarget` (or `.target`) to scaffold an iOS app.** Swift Package Manager executable targets compile as macOS command-line tools — they do not produce `.app` bundles, cannot be signed for iOS devices, and cannot be submitted to the App Store.
10
+
11
+ **Prohibited pattern:**
12
+ ```swift
13
+ // Package.swift — DO NOT USE for iOS apps
14
+ .executableTarget(name: "MyApp", dependencies: [])
15
+ // or
16
+ .target(name: "MyApp", dependencies: [])
17
+ ```
18
+
19
+ Using this pattern produces a macOS CLI binary, not an iOS app. The app will not build for any iOS simulator or device.
20
+
21
+ ---
22
+
23
+ ## Required Pattern: XcodeGen
24
+
25
+ All iOS app scaffolding MUST use XcodeGen to generate the `.xcodeproj`.
26
+
27
+ ### Step 1 — Install XcodeGen (if not present)
28
+
29
+ ```bash
30
+ brew install xcodegen
31
+ ```
32
+
33
+ ### Step 2 — Create `project.yml`
34
+
35
+ `project.yml` is the XcodeGen spec that describes the project structure. Minimum viable spec:
36
+
37
+ ```yaml
38
+ name: MyApp
39
+ options:
40
+ bundleIdPrefix: com.example
41
+ deploymentTarget:
42
+ iOS: "17.0"
43
+ settings:
44
+ SWIFT_VERSION: "5.10"
45
+ IPHONEOS_DEPLOYMENT_TARGET: "17.0"
46
+ targets:
47
+ MyApp:
48
+ type: application
49
+ platform: iOS
50
+ sources: [Sources/MyApp]
51
+ settings:
52
+ PRODUCT_BUNDLE_IDENTIFIER: com.example.MyApp
53
+ INFOPLIST_FILE: Sources/MyApp/Info.plist
54
+ scheme:
55
+ testTargets:
56
+ - MyAppTests
57
+ MyAppTests:
58
+ type: bundle.unit-test
59
+ platform: iOS
60
+ sources: [Tests/MyAppTests]
61
+ dependencies:
62
+ - target: MyApp
63
+ ```
64
+
65
+ ### Step 3 — Generate the .xcodeproj
66
+
67
+ ```bash
68
+ xcodegen generate
69
+ ```
70
+
71
+ This creates `MyApp.xcodeproj` in the project root. Commit `project.yml` but add `*.xcodeproj` to `.gitignore` (regenerate on checkout).
72
+
73
+ ### Step 4 — Standard project layout
74
+
75
+ ```
76
+ MyApp/
77
+ ├── project.yml # XcodeGen spec — commit this
78
+ ├── .gitignore # includes *.xcodeproj
79
+ ├── Sources/
80
+ │ └── MyApp/
81
+ │ ├── MyAppApp.swift # @main entry point
82
+ │ ├── ContentView.swift
83
+ │ └── Info.plist
84
+ └── Tests/
85
+ └── MyAppTests/
86
+ └── MyAppTests.swift
87
+ ```
88
+
89
+ ---
90
+
91
+ ## iOS Deployment Target Compatibility
92
+
93
+ Always verify SwiftUI API availability against the project's `IPHONEOS_DEPLOYMENT_TARGET` before using any SwiftUI component.
94
+
95
+ | API | Minimum iOS |
96
+ |-----|-------------|
97
+ | `NavigationView` | iOS 13 |
98
+ | `NavigationStack` | iOS 16 |
99
+ | `NavigationSplitView` | iOS 16 |
100
+ | `List(selection:)` with multi-select | iOS 17 |
101
+ | `ScrollView` scroll position APIs | iOS 17 |
102
+ | `Observable` macro (`@Observable`) | iOS 17 |
103
+ | `SwiftData` | iOS 17 |
104
+ | `@Bindable` | iOS 17 |
105
+ | `TipKit` | iOS 17 |
106
+
107
+ **Rule:** If a plan requires a SwiftUI API that exceeds the project's deployment target, either:
108
+ 1. Raise the deployment target in `project.yml` (and document the decision), or
109
+ 2. Wrap the call in `if #available(iOS NN, *) { ... }` with a fallback implementation.
110
+
111
+ Do NOT silently use an API that requires a higher iOS version than the declared deployment target — the app will crash at runtime on older devices.
112
+
113
+ ---
114
+
115
+ ## Verification
116
+
117
+ After running `xcodegen generate`, verify the project builds:
118
+
119
+ ```bash
120
+ xcodebuild -project MyApp.xcodeproj -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 16' build
121
+ ```
122
+
123
+ A successful build (exit code 0) confirms the scaffold is valid for iOS.
@@ -0,0 +1,2 @@
1
+ **CRITICAL: Mandatory Initial Read**
2
+ 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.
@@ -1,61 +1,61 @@
1
- # Phase Argument Parsing
2
-
3
- Parse and normalize phase arguments for commands that operate on phases.
4
-
5
- ## Extraction
6
-
7
- From `$ARGUMENTS`:
8
- - Extract phase number (first numeric argument)
9
- - Extract flags (prefixed with `--`)
10
- - Remaining text is description (for insert/add commands)
11
-
12
- ## Using gsd-tools
13
-
14
- The `find-phase` command handles normalization and validation in one step:
15
-
16
- ```bash
17
- .agent/skills/gsd/bin/gsd-tools.cjs" find-phase "${PHASE}")
18
- ```
19
-
20
- Returns JSON with:
21
- - `found`: true/false
22
- - `directory`: Full path to phase directory
23
- - `phase_number`: Normalized number (e.g., "06", "06.1")
24
- - `phase_name`: Name portion (e.g., "foundation")
25
- - `plans`: Array of PLAN.md files
26
- - `summaries`: Array of SUMMARY.md files
27
-
28
- ## Manual Normalization (Legacy)
29
-
30
- Zero-pad integer phases to 2 digits. Preserve decimal suffixes.
31
-
32
- ```bash
33
- # Normalize phase number
34
- if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
35
- # Integer: 8 → 08
36
- PHASE=$(printf "%02d" "$PHASE")
37
- elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
38
- # Decimal: 2.1 → 02.1
39
- PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
40
- fi
41
- ```
42
-
43
- ## Validation
44
-
45
- Use `roadmap get-phase` to validate phase exists:
46
-
47
- ```bash
48
- .agent/skills/gsd/bin/gsd-tools.cjs" roadmap get-phase "${PHASE}" --pick found)
49
- if [ "$PHASE_CHECK" = "false" ]; then
50
- echo "ERROR: Phase ${PHASE} not found in roadmap"
51
- exit 1
52
- fi
53
- ```
54
-
55
- ## Directory Lookup
56
-
57
- Use `find-phase` for directory lookup:
58
-
59
- ```bash
60
- .agent/skills/gsd/bin/gsd-tools.cjs" find-phase "${PHASE}" --raw)
61
- ```
1
+ # Phase Argument Parsing
2
+
3
+ Parse and normalize phase arguments for commands that operate on phases.
4
+
5
+ ## Extraction
6
+
7
+ From `$ARGUMENTS`:
8
+ - Extract phase number (first numeric argument)
9
+ - Extract flags (prefixed with `--`)
10
+ - Remaining text is description (for insert/add commands)
11
+
12
+ ## Using gsd-tools
13
+
14
+ The `find-phase` command handles normalization and validation in one step:
15
+
16
+ ```bash
17
+ PHASE_INFO=$(gsd-sdk query find-phase "${PHASE}")
18
+ ```
19
+
20
+ Returns JSON with:
21
+ - `found`: true/false
22
+ - `directory`: Full path to phase directory
23
+ - `phase_number`: Normalized number (e.g., "06", "06.1")
24
+ - `phase_name`: Name portion (e.g., "foundation")
25
+ - `plans`: Array of PLAN.md files
26
+ - `summaries`: Array of SUMMARY.md files
27
+
28
+ ## Manual Normalization (Legacy)
29
+
30
+ Zero-pad integer phases to 2 digits. Preserve decimal suffixes.
31
+
32
+ ```bash
33
+ # Normalize phase number
34
+ if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
35
+ # Integer: 8 → 08
36
+ PHASE=$(printf "%02d" "$PHASE")
37
+ elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
38
+ # Decimal: 2.1 → 02.1
39
+ PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
40
+ fi
41
+ ```
42
+
43
+ ## Validation
44
+
45
+ Use `roadmap get-phase` to validate phase exists:
46
+
47
+ ```bash
48
+ PHASE_CHECK=$(gsd-sdk query roadmap.get-phase "${PHASE}" --pick found)
49
+ if [ "$PHASE_CHECK" = "false" ]; then
50
+ echo "ERROR: Phase ${PHASE} not found in roadmap"
51
+ exit 1
52
+ fi
53
+ ```
54
+
55
+ ## Directory Lookup
56
+
57
+ Use `find-phase` for directory lookup:
58
+
59
+ ```bash
60
+ PHASE_DIR=$(gsd-sdk query find-phase "${PHASE}" --raw)
61
+ ```