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.
Files changed (163) hide show
  1. package/.agent/skills/gsd/SKILL.md +152 -123
  2. package/.agent/skills/gsd/VERSION +1 -0
  3. package/.agent/skills/gsd/assets/templates/user-profile.md +8 -8
  4. package/.agent/skills/gsd/bin/gsd-tools.cjs +81 -3
  5. package/.agent/skills/gsd/bin/help-manifest.json +24 -1
  6. package/.agent/skills/gsd/bin/hooks/gsd-check-update.js +15 -5
  7. package/.agent/skills/gsd/bin/hooks/gsd-context-monitor.js +1 -1
  8. package/.agent/skills/gsd/bin/hooks/gsd-phase-boundary.sh +27 -0
  9. package/.agent/skills/gsd/bin/hooks/gsd-prompt-guard.js +2 -1
  10. package/.agent/skills/gsd/bin/hooks/gsd-read-guard.js +1 -1
  11. package/.agent/skills/gsd/bin/hooks/gsd-session-state.sh +33 -0
  12. package/.agent/skills/gsd/bin/hooks/gsd-statusline.js +5 -5
  13. package/.agent/skills/gsd/bin/hooks/gsd-validate-commit.sh +47 -0
  14. package/.agent/skills/gsd/bin/hooks/gsd-workflow-guard.js +1 -1
  15. package/.agent/skills/gsd/bin/lib/config.cjs +31 -10
  16. package/.agent/skills/gsd/bin/lib/core.cjs +48 -13
  17. package/.agent/skills/gsd/bin/lib/frontmatter.cjs +34 -2
  18. package/.agent/skills/gsd/bin/lib/intel.cjs +660 -0
  19. package/.agent/skills/gsd/bin/lib/learnings.cjs +378 -0
  20. package/.agent/skills/gsd/bin/lib/milestone.cjs +13 -4
  21. package/.agent/skills/gsd/bin/lib/model-profiles.cjs +17 -17
  22. package/.agent/skills/gsd/bin/lib/profile-output.cjs +31 -31
  23. package/.agent/skills/gsd/bin/lib/security.cjs +119 -0
  24. package/.agent/skills/gsd/bin/lib/verify.cjs +15 -15
  25. package/.agent/skills/gsd/migration_report.md +7 -0
  26. package/.agent/skills/gsd/references/agents/gsd-code-fixer.md +516 -0
  27. package/.agent/skills/gsd/references/agents/gsd-code-reviewer.md +355 -0
  28. package/.agent/skills/gsd/references/agents/gsd-debugger.md +10 -1
  29. package/.agent/skills/gsd/references/agents/gsd-executor.md +3 -0
  30. package/.agent/skills/gsd/references/agents/gsd-intel-updater.md +314 -0
  31. package/.agent/skills/gsd/references/agents/gsd-phase-researcher.md +3 -0
  32. package/.agent/skills/gsd/references/agents/gsd-plan-checker.md +16 -4
  33. package/.agent/skills/gsd/references/agents/gsd-planner.md +7 -0
  34. package/.agent/skills/gsd/references/agents/gsd-user-profiler.md +5 -5
  35. package/.agent/skills/gsd/references/agents/gsd-verifier.md +55 -1
  36. package/.agent/skills/gsd/references/agents/profiles/dev.md +21 -0
  37. package/.agent/skills/gsd/references/agents/profiles/research.md +22 -0
  38. package/.agent/skills/gsd/references/agents/profiles/review.md +22 -0
  39. package/.agent/skills/gsd/references/commands/{gsd-add-todo.md → atomic/add-todo.md} +5 -4
  40. package/.agent/skills/gsd/references/commands/{gsd-check-todos.md → atomic/check-todos.md} +5 -4
  41. package/.agent/skills/gsd/references/commands/{gsd-cleanup.md → atomic/cleanup.md} +4 -3
  42. package/.agent/skills/gsd/references/commands/{gsd-do.md → atomic/do.md} +4 -3
  43. package/.agent/skills/gsd/references/commands/{gsd-help.md → atomic/help.md} +4 -3
  44. package/.agent/skills/gsd/references/commands/{gsd-join-discord.md → atomic/join-discord.md} +21 -19
  45. package/.agent/skills/gsd/references/commands/{gsd-note.md → atomic/note.md} +4 -3
  46. package/.agent/skills/gsd/references/commands/{gsd-session-report.md → atomic/session-report.md} +4 -3
  47. package/.agent/skills/gsd/references/commands/{gsd-ship.md → atomic/ship.md} +4 -3
  48. package/.agent/skills/gsd/references/commands/{gsd-stats.md → atomic/stats.md} +4 -3
  49. package/.agent/skills/gsd/references/commands/{gsd-thread.md → atomic/thread.md} +7 -6
  50. package/.agent/skills/gsd/references/commands/atomic/undo.md +36 -0
  51. package/.agent/skills/gsd/references/commands/{gsd-add-backlog.md → milestone/add-backlog.md} +8 -7
  52. package/.agent/skills/gsd/references/commands/{gsd-audit-milestone.md → milestone/audit-milestone.md} +4 -3
  53. package/.agent/skills/gsd/references/commands/{gsd-complete-milestone.md → milestone/complete-milestone.md} +6 -4
  54. package/.agent/skills/gsd/references/commands/{gsd-milestone-summary.md → milestone/milestone-summary.md} +5 -3
  55. package/.agent/skills/gsd/references/commands/{gsd-new-milestone.md → milestone/new-milestone.md} +4 -3
  56. package/.agent/skills/gsd/references/commands/{gsd-plan-milestone-gaps.md → milestone/plan-milestone-gaps.md} +4 -3
  57. package/.agent/skills/gsd/references/commands/{gsd-plant-seed.md → milestone/plant-seed.md} +4 -3
  58. package/.agent/skills/gsd/references/commands/{gsd-review-backlog.md → milestone/review-backlog.md} +6 -5
  59. package/.agent/skills/gsd/references/commands/misc/audit-fix.md +35 -0
  60. package/.agent/skills/gsd/references/commands/{gsd-audit-uat.md → misc/audit-uat.md} +4 -3
  61. package/.agent/skills/gsd/references/commands/{gsd-next.md → misc/next.md} +6 -3
  62. package/.agent/skills/gsd/references/commands/{gsd-progress.md → misc/progress.md} +4 -3
  63. package/.agent/skills/gsd/references/commands/{gsd-verify-work.md → misc/verify-work.md} +4 -3
  64. package/.agent/skills/gsd/references/commands/{gsd-add-phase.md → phase/add-phase.md} +5 -4
  65. package/.agent/skills/gsd/references/commands/{gsd-add-tests.md → phase/add-tests.md} +8 -3
  66. package/.agent/skills/gsd/references/commands/{gsd-discuss-phase.md → phase/discuss-phase.md} +5 -4
  67. package/.agent/skills/gsd/references/commands/{gsd-execute-phase.md → phase/execute-phase.md} +4 -3
  68. package/.agent/skills/gsd/references/commands/{gsd-insert-phase.md → phase/insert-phase.md} +5 -4
  69. package/.agent/skills/gsd/references/commands/{gsd-list-phase-assumptions.md → phase/list-phase-assumptions.md} +4 -3
  70. package/.agent/skills/gsd/references/commands/{gsd-plan-phase.md → phase/plan-phase.md} +4 -3
  71. package/.agent/skills/gsd/references/commands/{gsd-remove-phase.md → phase/remove-phase.md} +5 -4
  72. package/.agent/skills/gsd/references/commands/{gsd-research-phase.md → phase/research-phase.md} +7 -6
  73. package/.agent/skills/gsd/references/commands/{gsd-secure-phase.md → phase/secure-phase.md} +4 -3
  74. package/.agent/skills/gsd/references/commands/{gsd-ui-phase.md → phase/ui-phase.md} +4 -3
  75. package/.agent/skills/gsd/references/commands/{gsd-ui-review.md → phase/ui-review.md} +4 -3
  76. package/.agent/skills/gsd/references/commands/{gsd-validate-phase.md → phase/validate-phase.md} +4 -3
  77. package/.agent/skills/gsd/references/commands/{gsd-workstreams.md → phase/workstreams.md} +71 -70
  78. package/.agent/skills/gsd/references/commands/{gsd-analyze-dependencies.md → project/analyze-dependencies.md} +5 -4
  79. package/.agent/skills/gsd/references/commands/project/explore.md +29 -0
  80. package/.agent/skills/gsd/references/commands/project/import.md +38 -0
  81. package/.agent/skills/gsd/references/commands/project/intel.md +181 -0
  82. package/.agent/skills/gsd/references/commands/{gsd-list-workspaces.md → project/list-workspaces.md} +4 -3
  83. package/.agent/skills/gsd/references/commands/{gsd-map-codebase.md → project/map-codebase.md} +4 -3
  84. package/.agent/skills/gsd/references/commands/{gsd-new-project.md → project/new-project.md} +4 -3
  85. package/.agent/skills/gsd/references/commands/{gsd-new-workspace.md → project/new-workspace.md} +4 -3
  86. package/.agent/skills/gsd/references/commands/{gsd-remove-workspace.md → project/remove-workspace.md} +4 -3
  87. package/.agent/skills/gsd/references/commands/project/scan.md +28 -0
  88. package/.agent/skills/gsd/references/commands/{gsd-autonomous.md → system/autonomous.md} +4 -3
  89. package/.agent/skills/gsd/references/commands/system/code-review-fix.md +54 -0
  90. package/.agent/skills/gsd/references/commands/system/code-review.md +57 -0
  91. package/.agent/skills/gsd/references/commands/{gsd-debug.md → system/debug.md} +7 -6
  92. package/.agent/skills/gsd/references/commands/{gsd-docs-update.md → system/docs-update.md} +4 -3
  93. package/.agent/skills/gsd/references/commands/{gsd-fast.md → system/fast.md} +4 -3
  94. package/.agent/skills/gsd/references/commands/{gsd-forensics.md → system/forensics.md} +5 -3
  95. package/.agent/skills/gsd/references/commands/{gsd-health.md → system/health.md} +5 -4
  96. package/.agent/skills/gsd/references/commands/{gsd-manager.md → system/manager.md} +4 -3
  97. package/.agent/skills/gsd/references/commands/{gsd-pause-work.md → system/pause-work.md} +4 -3
  98. package/.agent/skills/gsd/references/commands/{gsd-pr-branch.md → system/pr-branch.md} +4 -3
  99. package/.agent/skills/gsd/references/commands/{gsd-profile-user.md → system/profile-user.md} +4 -3
  100. package/.agent/skills/gsd/references/commands/{gsd-quick.md → system/quick.md} +4 -3
  101. package/.agent/skills/gsd/references/commands/{gsd-reapply-patches.md → system/reapply-patches.md} +25 -7
  102. package/.agent/skills/gsd/references/commands/{gsd-resume-work.md → system/resume-work.md} +4 -3
  103. package/.agent/skills/gsd/references/commands/{gsd-review.md → system/review.md} +4 -3
  104. package/.agent/skills/gsd/references/commands/system/set-profile.md +14 -0
  105. package/.agent/skills/gsd/references/commands/{gsd-settings.md → system/settings.md} +4 -3
  106. package/.agent/skills/gsd/references/commands/{gsd-update.md → system/update.md} +4 -3
  107. package/.agent/skills/gsd/references/docs/agent-contracts.md +79 -0
  108. package/.agent/skills/gsd/references/docs/common-bug-patterns.md +114 -0
  109. package/.agent/skills/gsd/references/docs/context-budget.md +49 -0
  110. package/.agent/skills/gsd/references/docs/domain-probes.md +125 -0
  111. package/.agent/skills/gsd/references/docs/few-shot-examples/plan-checker.md +73 -0
  112. package/.agent/skills/gsd/references/docs/few-shot-examples/verifier.md +109 -0
  113. package/.agent/skills/gsd/references/docs/gate-prompts.md +100 -0
  114. package/.agent/skills/gsd/references/docs/gates.md +70 -0
  115. package/.agent/skills/gsd/references/docs/model-profile-resolution.md +2 -0
  116. package/.agent/skills/gsd/references/docs/model-profiles.md +20 -14
  117. package/.agent/skills/gsd/references/docs/planning-config.md +216 -1
  118. package/.agent/skills/gsd/references/docs/revision-loop.md +97 -0
  119. package/.agent/skills/gsd/references/docs/thinking-models-debug.md +44 -0
  120. package/.agent/skills/gsd/references/docs/thinking-models-execution.md +50 -0
  121. package/.agent/skills/gsd/references/docs/thinking-models-planning.md +62 -0
  122. package/.agent/skills/gsd/references/docs/thinking-models-research.md +50 -0
  123. package/.agent/skills/gsd/references/docs/thinking-models-verification.md +55 -0
  124. package/.agent/skills/gsd/references/docs/thinking-partner.md +96 -0
  125. package/.agent/skills/gsd/references/docs/universal-anti-patterns.md +58 -0
  126. package/.agent/skills/gsd/references/docs/user-profiling.md +10 -10
  127. package/.agent/skills/gsd/references/docs/verification-overrides.md +227 -0
  128. package/.agent/skills/gsd/references/docs/workstream-flag.md +2 -2
  129. package/.agent/skills/gsd/references/mapping.md +11 -21
  130. package/.agent/skills/gsd/references/workflows/analyze-dependencies.md +3 -3
  131. package/.agent/skills/gsd/references/workflows/audit-fix.md +157 -0
  132. package/.agent/skills/gsd/references/workflows/autonomous.md +22 -1
  133. package/.agent/skills/gsd/references/workflows/code-review-fix.md +497 -0
  134. package/.agent/skills/gsd/references/workflows/code-review.md +515 -0
  135. package/.agent/skills/gsd/references/workflows/discuss-phase-power.md +3 -3
  136. package/.agent/skills/gsd/references/workflows/discuss-phase.md +20 -0
  137. package/.agent/skills/gsd/references/workflows/execute-phase.md +103 -0
  138. package/.agent/skills/gsd/references/workflows/explore.md +139 -0
  139. package/.agent/skills/gsd/references/workflows/import.md +274 -0
  140. package/.agent/skills/gsd/references/workflows/inbox.md +384 -0
  141. package/.agent/skills/gsd/references/workflows/manager.md +5 -5
  142. package/.agent/skills/gsd/references/workflows/new-milestone.md +1 -1
  143. package/.agent/skills/gsd/references/workflows/next.md +56 -0
  144. package/.agent/skills/gsd/references/workflows/plan-phase.md +48 -1
  145. package/.agent/skills/gsd/references/workflows/quick.md +96 -2
  146. package/.agent/skills/gsd/references/workflows/review.md +23 -3
  147. package/.agent/skills/gsd/references/workflows/scan.md +102 -0
  148. package/.agent/skills/gsd/references/workflows/settings.md +1 -1
  149. package/.agent/skills/gsd/references/workflows/ui-review.md +2 -2
  150. package/.agent/skills/gsd/references/workflows/undo.md +312 -0
  151. package/.agent/skills/gsd/references/workflows/update.md +5 -5
  152. package/.agent/skills/gsd-converter/SKILL.md +67 -59
  153. package/.agent/skills/gsd-converter/assets/migration-manifest.json +74 -0
  154. package/.agent/skills/gsd-converter/references/mapping.md +6 -16
  155. package/.agent/skills/gsd-converter/scripts/convert.py +419 -80
  156. package/.agent/skills/gsd-converter/scripts/regression_test.py +33 -0
  157. package/.agent/skills/selectpaste-update/SKILL.md +46 -0
  158. package/.agent/skills/selectpaste-update/scripts/sync-commands.py +317 -0
  159. package/README.md +4 -2
  160. package/bin/install.js +116 -116
  161. package/package.json +1 -1
  162. package/.agent/skills/gsd/references/commands/gsd-set-profile.md +0 -12
  163. /package/.agent/skills/gsd/references/commands/{gsd-tools.md → system/gsd-tools.md} +0 -0
@@ -43,8 +43,28 @@ Then run /gsd-review again.
43
43
  ```
44
44
  Exit.
45
45
 
46
- If only one CLI is the current runtime (e.g. running inside Antigravity), skip it for the review
47
- to ensure independence. At least one DIFFERENT CLI must be available.
46
+ Determine which CLI to skip based on the current runtime environment:
47
+
48
+ ```bash
49
+ # Environment-based runtime detection (priority order)
50
+ if [ "$ANTIGRAVITY_AGENT" = "1" ]; then
51
+ # Antigravity is a separate client — all CLIs are external, skip none
52
+ SELF_CLI="none"
53
+ elif [ -n "$ANTIGRAVITY_ENTRYPOINT" ]; then
54
+ # Running inside Antigravity CLI — skip antigravity for independence
55
+ SELF_CLI="antigravity"
56
+ else
57
+ # Other environments (Gemini CLI, Codex CLI, etc.)
58
+ # Fall back to AI self-identification to decide which CLI to skip
59
+ SELF_CLI="auto"
60
+ fi
61
+ ```
62
+
63
+ Rules:
64
+ - If `SELF_CLI="none"` → invoke ALL available CLIs (no skip)
65
+ - If `SELF_CLI="antigravity"` → skip antigravity, use gemini/codex
66
+ - If `SELF_CLI="auto"` → the executing AI identifies itself and skips its own CLI
67
+ - At least one DIFFERENT CLI must be available for the review to proceed.
48
68
  </step>
49
69
 
50
70
  <step name="gather_context">
@@ -128,7 +148,7 @@ gemini -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-revi
128
148
 
129
149
  **Antigravity (separate session):**
130
150
  ```bash
131
- antigravity -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" --no-input 2>/dev/null > /tmp/gsd-review-antigravity-{phase}.md
151
+ antigravity -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-review-antigravity-{phase}.md
132
152
  ```
133
153
 
134
154
  **Codex:**
@@ -0,0 +1,102 @@
1
+ <purpose>
2
+ Lightweight codebase assessment. Spawns a single gsd-codebase-mapper agent for one focus area,
3
+ producing targeted documents in `.planning/codebase/`.
4
+ </purpose>
5
+
6
+ <required_reading>
7
+ Read all files referenced by the invoking prompt's execution_context before starting.
8
+ </required_reading>
9
+
10
+ <available_agent_types>
11
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
12
+ - gsd-codebase-mapper — Maps project structure and dependencies
13
+ </available_agent_types>
14
+
15
+ <process>
16
+
17
+ ## Focus-to-Document Mapping
18
+
19
+ | Focus | Documents Produced |
20
+ |-------|-------------------|
21
+ | `tech` | STACK.md, INTEGRATIONS.md |
22
+ | `arch` | ARCHITECTURE.md, STRUCTURE.md |
23
+ | `quality` | CONVENTIONS.md, TESTING.md |
24
+ | `concerns` | CONCERNS.md |
25
+ | `tech+arch` | STACK.md, INTEGRATIONS.md, ARCHITECTURE.md, STRUCTURE.md |
26
+
27
+ ## Step 1: Parse arguments and resolve focus
28
+
29
+ Parse the user's input for `--focus <area>`. Default to `tech+arch` if not specified.
30
+
31
+ Validate that the focus is one of: `tech`, `arch`, `quality`, `concerns`, `tech+arch`.
32
+
33
+ If invalid:
34
+ ```
35
+ Unknown focus area: "{input}". Valid options: tech, arch, quality, concerns, tech+arch
36
+ ```
37
+ Exit.
38
+
39
+ ## Step 2: Check for existing documents
40
+
41
+ ```bash
42
+ .agent/skills/gsd/bin/gsd-tools.cjs" init map-codebase 2>/dev/null || echo "{}")
43
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
44
+ ```
45
+
46
+ Look up which documents would be produced for the selected focus (from the mapping table above).
47
+
48
+ For each target document, check if it already exists in `.planning/codebase/`:
49
+ ```bash
50
+ ls -la .planning/codebase/{DOCUMENT}.md 2>/dev/null
51
+ ```
52
+
53
+ If any exist, show their modification dates and ask:
54
+ ```
55
+ Existing documents found:
56
+ - STACK.md (modified 2026-04-03)
57
+ - INTEGRATIONS.md (modified 2026-04-01)
58
+
59
+ Overwrite with fresh scan? [y/N]
60
+ ```
61
+
62
+ If user says no, exit.
63
+
64
+ ## Step 3: Create output directory
65
+
66
+ ```bash
67
+ mkdir -p .planning/codebase
68
+ ```
69
+
70
+ ## Step 4: Spawn mapper agent
71
+
72
+ Spawn a single `gsd-codebase-mapper` agent with the selected focus area:
73
+
74
+ ```
75
+ Task(
76
+ prompt="Scan this codebase with focus: {focus}. Write results to .planning/codebase/. Produce only: {document_list}",
77
+ subagent_type="gsd-codebase-mapper",
78
+ model="{resolved_model}"
79
+ )
80
+ ```
81
+
82
+ ## Step 5: Report
83
+
84
+ ```
85
+ ## Scan Complete
86
+
87
+ **Focus:** {focus}
88
+ **Documents produced:**
89
+ {list of documents written with line counts}
90
+
91
+ Use `/gsd-map-codebase` for a comprehensive 4-area parallel scan.
92
+ ```
93
+
94
+ </process>
95
+
96
+ <success_criteria>
97
+ - [ ] Focus area correctly parsed (default: tech+arch)
98
+ - [ ] Existing documents detected with modification dates shown
99
+ - [ ] User prompted before overwriting
100
+ - [ ] Single mapper agent spawned with correct focus
101
+ - [ ] Output documents written to .planning/codebase/
102
+ </success_criteria>
@@ -174,7 +174,7 @@ Merge new settings into existing config.json:
174
174
  ```json
175
175
  {
176
176
  ...existing_config,
177
- "model_profile": "quality" | "balanced" | "budget" | "inherit",
177
+ "model_profile": "quality" | "balanced" | "budget" | "adaptive" | "inherit",
178
178
  "workflow": {
179
179
  "research": true/false,
180
180
  "plan_check": true/false,
@@ -140,8 +140,8 @@ Full review: {path to UI-REVIEW.md}
140
140
 
141
141
  `/clear` then one of:
142
142
 
143
- - `/gsd:verify-work {N}` — UAT testing
144
- - `/gsd:plan-phase {N+1}` — plan next phase
143
+ - `/gsd-verify-work {N}` — UAT testing
144
+ - `/gsd-plan-phase {N+1}` — plan next phase
145
145
 
146
146
  - `/gsd-verify-work {N}` — UAT testing
147
147
  - `/gsd-plan-phase {N+1}` — plan next phase
@@ -0,0 +1,312 @@
1
+ <purpose>
2
+ Safe git revert workflow. Rolls back GSD phase or plan commits using the phase manifest with dependency checks and a confirmation gate. Uses git revert --no-commit (NEVER git reset) to preserve history.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ @references/docs/ui-brand.md
7
+ @references/docs/gate-prompts.md
8
+ </required_reading>
9
+
10
+ <process>
11
+
12
+ <step name="banner" priority="first">
13
+ Display the stage banner:
14
+
15
+ ```
16
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17
+ GSD ► UNDO
18
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
19
+ ```
20
+ </step>
21
+
22
+ <step name="parse_arguments">
23
+ Parse $ARGUMENTS for the undo mode:
24
+
25
+ - `--last N` → MODE=last, COUNT=N (integer, default 10 if N missing)
26
+ - `--phase NN` → MODE=phase, TARGET_PHASE=NN (two-digit phase number)
27
+ - `--plan NN-MM` → MODE=plan, TARGET_PLAN=NN-MM (phase-plan ID)
28
+
29
+ If no valid argument is provided, display usage and exit:
30
+
31
+ ```
32
+ Usage: /gsd-undo --last N | --phase NN | --plan NN-MM
33
+
34
+ Modes:
35
+ --last N Show last N GSD commits for interactive selection
36
+ --phase NN Revert all commits for phase NN
37
+ --plan NN-MM Revert all commits for plan NN-MM
38
+
39
+ Examples:
40
+ /gsd-undo --last 5
41
+ /gsd-undo --phase 03
42
+ /gsd-undo --plan 03-02
43
+ ```
44
+ </step>
45
+
46
+ <step name="gather_commits">
47
+ Based on MODE, gather candidate commits.
48
+
49
+ **MODE=last:**
50
+
51
+ Run:
52
+ ```bash
53
+ git log --oneline --no-merges -${COUNT}
54
+ ```
55
+
56
+ Filter for GSD conventional commits matching `type(scope): message` pattern (e.g., `feat(04-01):`, `docs(03):`, `fix(02-03):`).
57
+
58
+ Display a numbered list of matching commits:
59
+ ```
60
+ Recent GSD commits:
61
+ 1. abc1234 feat(04-01): implement auth endpoint
62
+ 2. def5678 docs(03-02): complete plan summary
63
+ 3. ghi9012 fix(02-03): correct validation logic
64
+ ```
65
+
66
+ Use AskUserQuestion to ask:
67
+ - question: "Which commits to revert? Enter numbers (e.g., 1,3) or 'all'"
68
+ - header: "Select"
69
+
70
+ Parse the user's selection into COMMITS list.
71
+
72
+ ---
73
+
74
+ **MODE=phase:**
75
+
76
+ Read `.planning/.phase-manifest.json` if it exists.
77
+
78
+ If the file exists and `manifest.phases?.[TARGET_PHASE]?.commits` is a non-empty array:
79
+ - Use `manifest.phases[TARGET_PHASE].commits` entries as COMMITS (each entry is a commit hash)
80
+
81
+ If the file does not exist, or `manifest.phases?.[TARGET_PHASE]` is missing:
82
+ - Display: "Manifest has no entry for phase ${TARGET_PHASE} (or file missing), falling back to git log search"
83
+ - Fallback: run git log and filter for the target phase scope:
84
+ ```bash
85
+ git log --oneline --no-merges --all | grep -E "\(0*${TARGET_PHASE}(-[0-9]+)?\):" | head -50
86
+ ```
87
+ - Use matching commits as COMMITS
88
+
89
+ ---
90
+
91
+ **MODE=plan:**
92
+
93
+ Run:
94
+ ```bash
95
+ git log --oneline --no-merges --all | grep -E "\(${TARGET_PLAN}\)" | head -50
96
+ ```
97
+
98
+ Use matching commits as COMMITS.
99
+
100
+ ---
101
+
102
+ **Empty check:**
103
+
104
+ If COMMITS is empty after gathering:
105
+ ```
106
+ No commits found for ${MODE} ${TARGET}. Nothing to revert.
107
+ ```
108
+ Exit cleanly.
109
+ </step>
110
+
111
+ <step name="dependency_check">
112
+ **Applies when MODE=phase or MODE=plan.**
113
+
114
+ Skip this step entirely for MODE=last.
115
+
116
+ ---
117
+
118
+ **MODE=phase:**
119
+
120
+ Read `.planning/ROADMAP.md` inline.
121
+
122
+ Search for phases that list a dependency on the target phase. Look for patterns like:
123
+ - "Depends on: Phase ${TARGET_PHASE}"
124
+ - "Depends on: ${TARGET_PHASE}"
125
+ - "depends_on: [${TARGET_PHASE}]"
126
+
127
+ For each dependent phase N found:
128
+ 1. Check if `.planning/phases/${N}-*/` directory exists
129
+ 2. If directory exists, check for any PLAN.md or SUMMARY.md files inside it
130
+
131
+ If any downstream phase has started work, collect warnings:
132
+ ```
133
+ ⚠ Downstream dependency detected:
134
+ Phase ${N} depends on Phase ${TARGET_PHASE} and has started work.
135
+ ```
136
+
137
+ ---
138
+
139
+ **MODE=plan:**
140
+
141
+ Extract the phase number from TARGET_PLAN (the NN part of NN-MM). Extract the plan number (the MM part).
142
+
143
+ Look for later plans in the same phase directory (`.planning/phases/${NN}-*/`). For each later plan (plans with number > MM):
144
+ 1. Read the later plan's PLAN.md
145
+ 2. Check if its `<files>` sections or `consumes` fields reference outputs from the target plan
146
+
147
+ If any later plan references the target plan's outputs, collect warnings:
148
+ ```
149
+ ⚠ Intra-phase dependency detected:
150
+ Plan ${LATER_PLAN} in phase ${NN} references outputs from plan ${TARGET_PLAN}.
151
+ ```
152
+
153
+ ---
154
+
155
+ If any warnings exist (from either mode):
156
+ - Display all warnings
157
+ - Use AskUserQuestion with approve-revise-abort pattern:
158
+ - question: "Downstream work depends on the target being reverted. Proceed anyway?"
159
+ - header: "Confirm"
160
+ - options: Proceed | Abort
161
+
162
+ If user selects "Abort": exit with "Revert cancelled. No changes made."
163
+ </step>
164
+
165
+ <step name="confirm_revert">
166
+ Display the confirmation gate using approve-revise-abort pattern from gate-prompts.md.
167
+
168
+ Show:
169
+ ```
170
+ The following commits will be reverted (in reverse chronological order):
171
+
172
+ {hash} — {message}
173
+ {hash} — {message}
174
+ ...
175
+
176
+ Total: {N} commit(s) to revert
177
+ ```
178
+
179
+ Use AskUserQuestion:
180
+ - question: "Proceed with revert?"
181
+ - header: "Approve?"
182
+ - options: Approve | Abort
183
+
184
+ If "Abort": display "Revert cancelled. No changes made." and exit.
185
+ If "Approve": ask for a reason:
186
+
187
+ ```
188
+ AskUserQuestion(
189
+ header: "Reason",
190
+ question: "Brief reason for the revert (used in commit message):",
191
+ options: []
192
+ )
193
+ ```
194
+
195
+ Store the response as REVERT_REASON. Continue to execute_revert.
196
+ </step>
197
+
198
+ <step name="execute_revert">
199
+ **HARD CONSTRAINT: Use git revert --no-commit. NEVER use git reset (except for conflict cleanup as documented below).**
200
+
201
+ **Dirty-tree guard (run first, before any revert):**
202
+
203
+ Run `git status --porcelain`. If the output is non-empty, display the dirty files and abort:
204
+ ```
205
+ Working tree has uncommitted changes. Commit or stash them before running /gsd-undo.
206
+ ```
207
+ Exit immediately — do not proceed to any revert operations.
208
+
209
+ ---
210
+
211
+ Sort COMMITS in reverse chronological order (newest first). If commits came from git log (already newest-first), they are already in correct order.
212
+
213
+ For each commit hash in COMMITS:
214
+ ```bash
215
+ git revert --no-commit ${HASH}
216
+ ```
217
+
218
+ If any revert fails (merge conflict or error):
219
+ 1. Display the error message
220
+ 2. Run cleanup — handle both first-call and mid-sequence cases:
221
+ ```bash
222
+ # Try git revert --abort first (works if this is the first failed revert)
223
+ git revert --abort 2>/dev/null
224
+ # If prior --no-commit reverts already staged cleanly before this failure,
225
+ # revert --abort may be a no-op. Clean up staged and working tree changes:
226
+ git reset HEAD 2>/dev/null
227
+ git restore . 2>/dev/null
228
+ ```
229
+ 3. Display:
230
+ ```
231
+ ╔══════════════════════════════════════════════════════════════╗
232
+ ║ ERROR ║
233
+ ╚══════════════════════════════════════════════════════════════╝
234
+
235
+ Revert failed on commit ${HASH}.
236
+ Likely cause: merge conflict with subsequent changes.
237
+
238
+ **To fix:** Resolve the conflict manually or revert commits individually.
239
+ All pending reverts have been aborted — working tree is clean.
240
+ ```
241
+ 4. Exit with error.
242
+
243
+ After all reverts are staged successfully, create a single commit:
244
+
245
+ For MODE=phase:
246
+ ```bash
247
+ git commit -m "revert(${TARGET_PHASE}): undo phase ${TARGET_PHASE} — ${REVERT_REASON}"
248
+ ```
249
+
250
+ For MODE=plan:
251
+ ```bash
252
+ git commit -m "revert(${TARGET_PLAN}): undo plan ${TARGET_PLAN} — ${REVERT_REASON}"
253
+ ```
254
+
255
+ For MODE=last:
256
+ ```bash
257
+ git commit -m "revert: undo ${N} selected commits — ${REVERT_REASON}"
258
+ ```
259
+ </step>
260
+
261
+ <step name="summary">
262
+ Display the completion banner:
263
+
264
+ ```
265
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
266
+ GSD ► UNDO COMPLETE ✓
267
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
268
+ ```
269
+
270
+ Show summary:
271
+ ```
272
+ ✓ ${N} commit(s) reverted
273
+ ✓ Single revert commit created: ${REVERT_HASH}
274
+ ```
275
+
276
+ Show next steps:
277
+ ```
278
+ ───────────────────────────────────────────────────────────────
279
+
280
+ ## ▶ Next Up
281
+
282
+ **Review state** — verify project is in expected state after revert
283
+
284
+ /clear then:
285
+
286
+ /gsd-progress
287
+
288
+ ───────────────────────────────────────────────────────────────
289
+
290
+ **Also available:**
291
+ - `/gsd-execute-phase ${PHASE}` — re-execute if needed
292
+ - `/gsd-undo --last 1` — undo the revert itself if something went wrong
293
+
294
+ ───────────────────────────────────────────────────────────────
295
+ ```
296
+ </step>
297
+
298
+ </process>
299
+
300
+ <success_criteria>
301
+ - [ ] Arguments parsed correctly for all three modes
302
+ - [ ] --phase mode reads .planning/.phase-manifest.json using manifest.phases[TARGET_PHASE].commits
303
+ - [ ] --phase mode falls back to git log if manifest entry missing
304
+ - [ ] Dependency check warns when downstream phases have started (MODE=phase)
305
+ - [ ] Dependency check warns when later plans reference target plan outputs (MODE=plan)
306
+ - [ ] Dirty-tree guard aborts if working tree has uncommitted changes
307
+ - [ ] Confirmation gate shown before any revert execution
308
+ - [ ] Reverts use git revert --no-commit in reverse chronological order
309
+ - [ ] Single commit created after all reverts staged
310
+ - [ ] Error handling cleans up both first-call and mid-sequence conflict cases
311
+ - [ ] git reset --hard is NEVER used anywhere in this workflow
312
+ </success_criteria>
@@ -66,7 +66,7 @@ if [ -z "$PREFERRED_RUNTIME" ]; then
66
66
  PREFERRED_RUNTIME="kilo"
67
67
  elif [ -n "$OPENCODE_CONFIG_DIR" ] || [ -n "$OPENCODE_CONFIG" ]; then
68
68
  PREFERRED_RUNTIME="opencode"
69
- elif [ -n "$CLAUDE_CONFIG_DIR" ]; then
69
+ elif [ -n "$ANTIGRAVITY_CONFIG_DIR" ]; then
70
70
  PREFERRED_RUNTIME="antigravity"
71
71
  else
72
72
  PREFERRED_RUNTIME="antigravity"
@@ -99,8 +99,8 @@ if [ -n "$PREFERRED_CONFIG_DIR" ] && { [ -f "$PREFERRED_CONFIG_DIR/get-shit-done
99
99
  fi
100
100
 
101
101
  # Absolute global candidates from env overrides (covers custom config dirs).
102
- if [ -n "$CLAUDE_CONFIG_DIR" ]; then
103
- ENV_RUNTIME_DIRS+=( "antigravity:$(expand_home "$CLAUDE_CONFIG_DIR")" )
102
+ if [ -n "$ANTIGRAVITY_CONFIG_DIR" ]; then
103
+ ENV_RUNTIME_DIRS+=( "antigravity:$(expand_home "$ANTIGRAVITY_CONFIG_DIR")" )
104
104
  fi
105
105
  if [ -n "$GEMINI_CONFIG_DIR" ]; then
106
106
  ENV_RUNTIME_DIRS+=( "gemini:$(expand_home "$GEMINI_CONFIG_DIR")" )
@@ -390,8 +390,8 @@ CACHE_DIRS=()
390
390
  if [ -n "$PREFERRED_CONFIG_DIR" ]; then
391
391
  CACHE_DIRS+=( "$(expand_home "$PREFERRED_CONFIG_DIR")" )
392
392
  fi
393
- if [ -n "$CLAUDE_CONFIG_DIR" ]; then
394
- CACHE_DIRS+=( "$(expand_home "$CLAUDE_CONFIG_DIR")" )
393
+ if [ -n "$ANTIGRAVITY_CONFIG_DIR" ]; then
394
+ CACHE_DIRS+=( "$(expand_home "$ANTIGRAVITY_CONFIG_DIR")" )
395
395
  fi
396
396
  if [ -n "$GEMINI_CONFIG_DIR" ]; then
397
397
  CACHE_DIRS+=( "$(expand_home "$GEMINI_CONFIG_DIR")" )
@@ -1,59 +1,67 @@
1
- ---
2
- name: gsd-converter
3
- version: 1.27.0
4
- description: "A tool for converting standard GSD (Get Shit Done) installations into the Antigravity Skill format. Use this skill when you want to migrate `.claude/gsd` commands, agents, and templates into a portable, spec-driven skill structure for Claude Code."
5
- ---
6
-
7
- # GSD to Antigravity Skill Converter
8
-
9
- This skill provides the logic and resources to package a locally installed GSD system into a structured Antigravity Skill.
10
-
11
- ## Why Convert?
12
- 1. **Portability**: Skills can be shared and loaded across different projects more easily than local `.claude` commands.
13
- 2. **Spec-Driven**: Leverages the Antigravity spec-driven coding system for better reliability.
14
- 3. **Organized**: Separates commands, documentation, workflows, and templates into clear directories.
15
-
16
- ## Conversion Workflow
17
-
18
- 1. **Cleanup**: Deletes existing `.agent/skills/gsd/` folder to ensure a clean slate.
19
-
20
- 2. **Installation**: Runs `npx get-shit-done-cc --claude --local --force-statusline` to fetch/refresh the source files in `.claude/`.
21
-
22
- 3. **Detection**: The skill locates the fresh GSD files:
23
- - Commands: `.claude/commands/gsd/`
24
- - Docs/Workflows: `.claude/get-shit-done/`
25
- - Agents: `.claude/agents/`
26
-
27
- 4. **Initialization**: Re-creates the target skill structure in `.agent/skills/gsd/`.
28
-
29
- 5. **Migration**:
30
- - Copies command markdown files to `references/commands/`.
31
- - Copies reference docs to `references/docs/`.
32
- - Copies workflows to `references/workflows/`.
33
- - Copies agents to `references/agents/`.
34
- - Copies templates to `assets/templates/`.
35
-
36
- 6. **Refactoring**:
37
- - Rewrites file inclusion paths (e.g., `@./.claude/...`) to the new skill-relative format (e.g., `@references/...`).
38
- - Updates `Task()` prompt paths for subagents.
39
- - **Rebranding**: Automatically converts "Claude" and "Claude Code" mentions to "Antigravity" throughout all migrated files.
40
-
41
- 7. **Optimization & Enhancement** (gsd-tools.cjs):
42
- - Runs `optimize-gsd-tools.cjs` to apply DRY refactoring and **injection of advanced features**:
43
- - Converts 4-space indentation to 2-space + LF line endings (~25KB savings).
44
- - Condenses the 124-line header comment to 12 lines.
45
- - **Injected Feature: Smart Inclusions**: Adds `parseIncludeFlag()`, `applyIncludes()`, and `buildPhaseBase()` to handle the `--include` flag.
46
- - **Injected Feature: Artifact Discovery**: Adds `discoverPhaseArtifacts()` for automated lookup of phase documents.
47
- - **Injected Feature: Model Profiles**: Adds `MODEL_PROFILES` for optimized model selection.
48
- - Refactors existing commands to utilize these new helper functions.
49
-
50
- 8. **Packaging**: Generates a comprehensive `SKILL.md` using the `assets/gsd_skill_template.md` template, ensuring compliance with skill-developer best practices.
51
-
52
- ## Usage
53
-
54
- Run the conversion script:
55
- ```bash
56
- python .agent/skills/gsd-converter/scripts/convert.py <target-skill-name>
57
- ```
58
-
59
- Refer to `references/mapping.md` for details on how paths are translated.
1
+ ---
2
+ name: gsd-converter
3
+ version: 1.35.0
4
+ description: "A tool for converting standard GSD (Get Shit Done) installations into the Antigravity Skill format. Use this skill when you want to migrate `.claude/gsd` commands, agents, and templates into a portable, spec-driven skill structure for Claude Code."
5
+ ---
6
+
7
+ # GSD to Antigravity Skill Converter
8
+
9
+ This skill provides the logic and resources to package a locally installed GSD system into a structured Antigravity Skill.
10
+
11
+ ## Why Convert?
12
+ 1. **Portability**: Skills can be shared and loaded across different projects more easily than local `.claude` commands.
13
+ 2. **Spec-Driven**: Leverages the Antigravity spec-driven coding system for better reliability.
14
+ 3. **Organized**: Separates commands, documentation, workflows, and templates into clear directories.
15
+
16
+ ## Conversion Workflow
17
+
18
+ 1. **Detection & Audit**:
19
+ - Scans `.claude/` for directories and identifies components vs. unmapped folders.
20
+ - Audits the internal `mappings` list against the documented `mapping.md` spec to ensure synchronization.
21
+
22
+ 2. **Cleanup**: Deletes existing `.agent/skills/gsd/` folder to ensure a clean slate.
23
+
24
+ 3. **Installation**: Runs `npx get-shit-done-cc --claude --local --force-statusline` to fetch/refresh the source files in `.claude/`.
25
+
26
+ 4. **Detection**: The skill locates the fresh GSD files:
27
+ - Commands: `.claude/commands/gsd/`
28
+ - Docs/Workflows: `.claude/get-shit-done/`
29
+ - Agents: `.claude/agents/`
30
+
31
+ 5. **Initialization**: Re-creates the target skill structure in `.agent/skills/gsd/`.
32
+
33
+ 6. **Migration**:
34
+ - Copies command markdown files to `references/commands/`.
35
+ - Copies reference docs to `references/docs/`.
36
+ - Copies workflows to `references/workflows/`.
37
+ - Copies agents to `references/agents/`.
38
+ - Copies templates to `assets/templates/`.
39
+
40
+ 7. **Refactoring**:
41
+ - Rewrites file inclusion paths (e.g., `@./.claude/...`) to the new skill-relative format (e.g., `@references/...`).
42
+ - Updates `Task()` prompt paths for subagents.
43
+ - **Rebranding**: Automatically converts "Claude" and "Claude Code" mentions to "Antigravity" throughout all migrated files.
44
+
45
+ 8. **Optimization & Enhancement** (gsd-tools.cjs):
46
+ - Runs `optimize-gsd-tools.cjs` to apply DRY refactoring and **injection of advanced features**:
47
+ - Converts 4-space indentation to 2-space + LF line endings (~25KB savings).
48
+ - Condenses the 124-line header comment to 12 lines.
49
+ - **Injected Feature: Smart Inclusions**: Adds `parseIncludeFlag()`, `applyIncludes()`, and `buildPhaseBase()` to handle the `--include` flag.
50
+ - **Injected Feature: Artifact Discovery**: Adds `discoverPhaseArtifacts()` for automated lookup of phase documents.
51
+ - **Injected Feature: Model Profiles**: Adds `MODEL_PROFILES` for optimized model selection.
52
+ - Refactors existing commands to utilize these new helper functions.
53
+
54
+ 9. **Verification**:
55
+ - Performs a pre-flight integrity check on the migrated skill (help manifest, router logic, command presence).
56
+ - Generates a `migration_report.md` artifact in the target skill folder.
57
+
58
+ 10. **Packaging**: Generates a comprehensive `SKILL.md` using the `assets/gsd_skill_template.md` template, ensuring compliance with skill-developer best practices.
59
+
60
+ ## Usage
61
+
62
+ Run the conversion script:
63
+ ```bash
64
+ python .agent/skills/gsd-converter/scripts/convert.py <target-skill-name>
65
+ ```
66
+
67
+ Refer to `references/mapping.md` for details on how paths are translated.