pi-gsd 2.0.22 → 2.0.24

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 (213) hide show
  1. package/README.md +1 -1
  2. package/dist/pi-gsd-hooks.js +38 -11
  3. package/dist/pi-gsd-tools.js +87 -76
  4. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-codebase-mapper.md +13 -13
  5. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-debugger.md +37 -37
  6. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-executor.md +8 -8
  7. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-nyquist-auditor.md +31 -31
  8. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-phase-researcher.md +85 -85
  9. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-plan-checker.md +32 -32
  10. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-planner.md +108 -108
  11. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-project-researcher.md +76 -76
  12. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-research-synthesizer.md +16 -16
  13. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-roadmapper.md +39 -39
  14. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-ui-auditor.md +24 -24
  15. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-ui-checker.md +21 -21
  16. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-ui-researcher.md +35 -35
  17. package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-verifier.md +30 -30
  18. package/gsd/hooks/gsd-context-monitor.js +164 -0
  19. package/gsd/hooks/gsd-prompt-guard.js +99 -0
  20. package/{.gsd/harnesses/pi → gsd}/hooks/gsd-statusline.js +2 -2
  21. package/gsd/hooks/gsd-workflow-guard.js +98 -0
  22. package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/continuation-format.md +11 -11
  23. package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/ui-brand.md +1 -1
  24. package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/DEBUG.md +4 -4
  25. package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/UAT.md +1 -1
  26. package/gsd/workflows/add-phase.md +135 -0
  27. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/audit-milestone.md +3 -3
  28. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/complete-milestone.md +1 -1
  29. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/discuss-phase-assumptions.md +1 -1
  30. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/discuss-phase.md +2 -2
  31. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/execute-phase.md +2 -2
  32. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/execute-plan.md +1 -1
  33. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/help.md +5 -5
  34. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/insert-phase.md +1 -1
  35. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/map-codebase.md +1 -1
  36. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/new-milestone.md +1 -1
  37. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/new-project.md +2 -2
  38. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/plan-milestone-gaps.md +1 -1
  39. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/plan-phase.md +1 -1
  40. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/progress.md +10 -10
  41. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/resume-project.md +2 -2
  42. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/settings.md +1 -1
  43. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/transition.md +3 -3
  44. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/ui-phase.md +1 -1
  45. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/ui-review.md +1 -1
  46. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/validate-phase.md +1 -1
  47. package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/verify-work.md +1 -1
  48. package/package.json +4 -5
  49. package/scripts/postinstall.js +119 -334
  50. package/.gsd/harnesses/pi/get-shit-done/workflows/add-phase.md +0 -167
  51. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase.md.bak +0 -1049
  52. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-phase.md.bak +0 -846
  53. package/.gsd/harnesses/pi/get-shit-done/workflows/new-milestone.md.bak +0 -486
  54. package/.gsd/harnesses/pi/get-shit-done/workflows/new-project.md.bak +0 -1250
  55. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-phase.md.bak +0 -859
  56. package/.gsd/harnesses/pi/gsd-file-manifest.json +0 -219
  57. package/.gsd/harnesses/pi/hooks/gsd-context-monitor.js +0 -159
  58. package/.gsd/harnesses/pi/hooks/gsd-prompt-guard.js +0 -99
  59. package/.gsd/harnesses/pi/hooks/gsd-workflow-guard.js +0 -97
  60. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/VERSION +0 -0
  61. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-advisor-researcher.md +0 -0
  62. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-assumptions-analyzer.md +0 -0
  63. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-integration-checker.md +0 -0
  64. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/agents/gsd-user-profiler.md +0 -0
  65. /package/{.gsd/harnesses/pi → gsd}/hooks/gsd-check-update.js +0 -0
  66. /package/{prompts → gsd/prompts}/gsd-add-backlog.md +0 -0
  67. /package/{prompts → gsd/prompts}/gsd-add-phase.md +0 -0
  68. /package/{prompts → gsd/prompts}/gsd-add-tests.md +0 -0
  69. /package/{prompts → gsd/prompts}/gsd-add-todo.md +0 -0
  70. /package/{prompts → gsd/prompts}/gsd-audit-milestone.md +0 -0
  71. /package/{prompts → gsd/prompts}/gsd-audit-uat.md +0 -0
  72. /package/{prompts → gsd/prompts}/gsd-autonomous.md +0 -0
  73. /package/{prompts → gsd/prompts}/gsd-check-todos.md +0 -0
  74. /package/{prompts → gsd/prompts}/gsd-cleanup.md +0 -0
  75. /package/{prompts → gsd/prompts}/gsd-complete-milestone.md +0 -0
  76. /package/{prompts → gsd/prompts}/gsd-debug.md +0 -0
  77. /package/{prompts → gsd/prompts}/gsd-discuss-phase.md +0 -0
  78. /package/{prompts → gsd/prompts}/gsd-do.md +0 -0
  79. /package/{prompts → gsd/prompts}/gsd-execute-milestone.md +0 -0
  80. /package/{prompts → gsd/prompts}/gsd-execute-phase.md +0 -0
  81. /package/{prompts → gsd/prompts}/gsd-fast.md +0 -0
  82. /package/{prompts → gsd/prompts}/gsd-forensics.md +0 -0
  83. /package/{prompts → gsd/prompts}/gsd-insert-phase.md +0 -0
  84. /package/{prompts → gsd/prompts}/gsd-join-discord.md +0 -0
  85. /package/{prompts → gsd/prompts}/gsd-list-phase-assumptions.md +0 -0
  86. /package/{prompts → gsd/prompts}/gsd-list-workspaces.md +0 -0
  87. /package/{prompts → gsd/prompts}/gsd-manager.md +0 -0
  88. /package/{prompts → gsd/prompts}/gsd-map-codebase.md +0 -0
  89. /package/{prompts → gsd/prompts}/gsd-milestone-summary.md +0 -0
  90. /package/{prompts → gsd/prompts}/gsd-new-milestone.md +0 -0
  91. /package/{prompts → gsd/prompts}/gsd-new-project.md +0 -0
  92. /package/{prompts → gsd/prompts}/gsd-new-workspace.md +0 -0
  93. /package/{prompts → gsd/prompts}/gsd-note.md +0 -0
  94. /package/{prompts → gsd/prompts}/gsd-pause-work.md +0 -0
  95. /package/{prompts → gsd/prompts}/gsd-plan-milestone-gaps.md +0 -0
  96. /package/{prompts → gsd/prompts}/gsd-plan-milestone.md +0 -0
  97. /package/{prompts → gsd/prompts}/gsd-plan-phase.md +0 -0
  98. /package/{prompts → gsd/prompts}/gsd-plant-seed.md +0 -0
  99. /package/{prompts → gsd/prompts}/gsd-pr-branch.md +0 -0
  100. /package/{prompts → gsd/prompts}/gsd-profile-user.md +0 -0
  101. /package/{prompts → gsd/prompts}/gsd-quick.md +0 -0
  102. /package/{prompts → gsd/prompts}/gsd-reapply-patches.md +0 -0
  103. /package/{prompts → gsd/prompts}/gsd-remove-phase.md +0 -0
  104. /package/{prompts → gsd/prompts}/gsd-remove-workspace.md +0 -0
  105. /package/{prompts → gsd/prompts}/gsd-research-phase.md +0 -0
  106. /package/{prompts → gsd/prompts}/gsd-resume-work.md +0 -0
  107. /package/{prompts → gsd/prompts}/gsd-review-backlog.md +0 -0
  108. /package/{prompts → gsd/prompts}/gsd-review.md +0 -0
  109. /package/{prompts → gsd/prompts}/gsd-session-report.md +0 -0
  110. /package/{prompts → gsd/prompts}/gsd-set-profile.md +0 -0
  111. /package/{prompts → gsd/prompts}/gsd-settings.md +0 -0
  112. /package/{prompts → gsd/prompts}/gsd-ship.md +0 -0
  113. /package/{prompts → gsd/prompts}/gsd-thread.md +0 -0
  114. /package/{prompts → gsd/prompts}/gsd-ui-phase.md +0 -0
  115. /package/{prompts → gsd/prompts}/gsd-ui-review.md +0 -0
  116. /package/{prompts → gsd/prompts}/gsd-validate-phase.md +0 -0
  117. /package/{prompts → gsd/prompts}/gsd-verify-work.md +0 -0
  118. /package/{prompts → gsd/prompts}/gsd-workstreams.md +0 -0
  119. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/checkpoints.md +0 -0
  120. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/decimal-phase-calculation.md +0 -0
  121. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/git-integration.md +0 -0
  122. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/git-planning-commit.md +0 -0
  123. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/model-profile-resolution.md +0 -0
  124. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/model-profiles.md +0 -0
  125. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/phase-argument-parsing.md +0 -0
  126. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/planning-config.md +0 -0
  127. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/questioning.md +0 -0
  128. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/tdd.md +0 -0
  129. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/user-profiling.md +0 -0
  130. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/verification-patterns.md +0 -0
  131. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/references/workstream-flag.md +0 -0
  132. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/UI-SPEC.md +0 -0
  133. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/VALIDATION.md +0 -0
  134. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/claude-md.md +0 -0
  135. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/architecture.md +0 -0
  136. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/concerns.md +0 -0
  137. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/conventions.md +0 -0
  138. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/integrations.md +0 -0
  139. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/stack.md +0 -0
  140. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/structure.md +0 -0
  141. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/codebase/testing.md +0 -0
  142. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/config.json +0 -0
  143. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/context.md +0 -0
  144. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/continue-here.md +0 -0
  145. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/copilot-instructions.md +0 -0
  146. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/debug-subagent-prompt.md +0 -0
  147. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/dev-preferences.md +0 -0
  148. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/discovery.md +0 -0
  149. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/discussion-log.md +0 -0
  150. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/milestone-archive.md +0 -0
  151. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/milestone.md +0 -0
  152. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/phase-prompt.md +0 -0
  153. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/planner-subagent-prompt.md +0 -0
  154. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/project.md +0 -0
  155. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/requirements.md +0 -0
  156. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/research-project/ARCHITECTURE.md +0 -0
  157. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/research-project/FEATURES.md +0 -0
  158. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/research-project/PITFALLS.md +0 -0
  159. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/research-project/STACK.md +0 -0
  160. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/research-project/SUMMARY.md +0 -0
  161. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/research.md +0 -0
  162. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/retrospective.md +0 -0
  163. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/roadmap.md +0 -0
  164. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/state.md +0 -0
  165. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/summary-complex.md +0 -0
  166. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/summary-minimal.md +0 -0
  167. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/summary-standard.md +0 -0
  168. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/summary.md +0 -0
  169. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/user-profile.md +0 -0
  170. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/user-setup.md +0 -0
  171. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/templates/verification-report.md +0 -0
  172. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/add-backlog.md +0 -0
  173. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/add-tests.md +0 -0
  174. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/add-todo.md +0 -0
  175. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/audit-uat.md +0 -0
  176. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/autonomous.md +0 -0
  177. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/check-todos.md +0 -0
  178. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/cleanup.md +0 -0
  179. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/debug.md +0 -0
  180. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/diagnose-issues.md +0 -0
  181. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/discovery-phase.md +0 -0
  182. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/do.md +0 -0
  183. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/execute-milestone.md +0 -0
  184. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/fast.md +0 -0
  185. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/forensics.md +0 -0
  186. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/health.md +0 -0
  187. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/list-phase-assumptions.md +0 -0
  188. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/list-workspaces.md +0 -0
  189. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/manager.md +0 -0
  190. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/milestone-summary.md +0 -0
  191. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/new-workspace.md +0 -0
  192. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/next.md +0 -0
  193. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/node-repair.md +0 -0
  194. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/note.md +0 -0
  195. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/pause-work.md +0 -0
  196. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/plan-milestone.md +0 -0
  197. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/plant-seed.md +0 -0
  198. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/pr-branch.md +0 -0
  199. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/profile-user.md +0 -0
  200. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/quick.md +0 -0
  201. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/remove-phase.md +0 -0
  202. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/remove-workspace.md +0 -0
  203. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/research-phase.md +0 -0
  204. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/review-backlog.md +0 -0
  205. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/review.md +0 -0
  206. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/session-report.md +0 -0
  207. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/set-profile.md +0 -0
  208. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/ship.md +0 -0
  209. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/stats.md +0 -0
  210. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/thread.md +0 -0
  211. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/update.md +0 -0
  212. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/verify-phase.md +0 -0
  213. /package/{.gsd/harnesses/pi/get-shit-done → gsd}/workflows/workstreams.md +0 -0
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+ // gsd-hook-version: 1.30.0
3
+ // SHARED CANONICAL FILE - hardlinked into all harness hooks/ directories.
4
+ // Harness config dir is auto-detected from __dirname at runtime.
5
+ // Do NOT hardcode harness-specific paths here. See HOOKS_ARCHITECTURE.md.
6
+ // GSD Workflow Guard - PreToolUse hook
7
+ // Detects when Claude attempts file edits outside a GSD workflow context
8
+ // (no active /gsd- command or Task subagent) and injects an advisory warning.
9
+ //
10
+ // This is a SOFT guard - it advises, not blocks. The edit still proceeds.
11
+ // The warning nudges the agent to use /gsd-quick or /gsd-fast instead of
12
+ // making direct edits that bypass state tracking.
13
+ //
14
+ // Enable via config: hooks.workflow_guard: true (default: false)
15
+ // Only triggers on Write/Edit tool calls to non-.planning/ files.
16
+
17
+ const fs = require("fs");
18
+ const path = require("path");
19
+
20
+ let input = "";
21
+ const stdinTimeout = setTimeout(() => process.exit(0), 3000);
22
+ process.stdin.setEncoding("utf8");
23
+ process.stdin.on("data", (chunk) => (input += chunk));
24
+ process.stdin.on("end", () => {
25
+ clearTimeout(stdinTimeout);
26
+ try {
27
+ const data = JSON.parse(input);
28
+ const toolName = data.tool_name;
29
+
30
+ // Only guard Write and Edit tool calls
31
+ if (toolName !== "Write" && toolName !== "Edit") {
32
+ process.exit(0);
33
+ }
34
+
35
+ // Check if we're inside a GSD workflow (Task subagent or /gsd- command)
36
+ // Subagents have a session_id that differs from the parent
37
+ // and typically have a description field set by the orchestrator
38
+ if (data.tool_input?.is_subagent || data.session_type === "task") {
39
+ process.exit(0);
40
+ }
41
+
42
+ // Check the file being edited
43
+ const filePath = data.tool_input?.file_path || data.tool_input?.path || "";
44
+
45
+ // Allow edits to .planning/ files (GSD state management)
46
+ if (filePath.includes(".planning/") || filePath.includes(".planning\\")) {
47
+ process.exit(0);
48
+ }
49
+
50
+ // Allow edits to common config/docs files that don't need GSD tracking
51
+ const allowedPatterns = [
52
+ /\.gitignore$/,
53
+ /\.env/,
54
+ /CLAUDE\.md$/,
55
+ /AGENTS\.md$/,
56
+ /GEMINI\.md$/,
57
+ /settings\.json$/,
58
+ ];
59
+ if (allowedPatterns.some((p) => p.test(filePath))) {
60
+ process.exit(0);
61
+ }
62
+
63
+ // Check if workflow guard is enabled
64
+ const cwd = data.cwd || process.cwd();
65
+ const configPath = path.join(cwd, ".planning", "config.json");
66
+ if (fs.existsSync(configPath)) {
67
+ try {
68
+ const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
69
+ if (!config.hooks?.workflow_guard) {
70
+ process.exit(0); // Guard disabled (default)
71
+ }
72
+ } catch (e) {
73
+ process.exit(0);
74
+ }
75
+ } else {
76
+ process.exit(0); // No GSD project - don't guard
77
+ }
78
+
79
+ // If we get here: GSD project, guard enabled, file edit outside .planning/,
80
+ // not in a subagent context. Inject advisory warning.
81
+ const output = {
82
+ hookSpecificOutput: {
83
+ hookEventName: "PreToolUse",
84
+ additionalContext:
85
+ `⚠️ WORKFLOW ADVISORY: You're editing ${path.basename(filePath)} directly without a GSD command. ` +
86
+ "This edit will not be tracked in STATE.md or produce a SUMMARY.md. " +
87
+ "Consider using /gsd-fast for trivial fixes or /gsd-quick for larger changes " +
88
+ "to maintain project state tracking. " +
89
+ "If this is intentional (e.g., user explicitly asked for a direct edit), proceed normally.",
90
+ },
91
+ };
92
+
93
+ process.stdout.write(JSON.stringify(output));
94
+ } catch (e) {
95
+ // Silent fail - never block tool execution
96
+ process.exit(0);
97
+ }
98
+ });
@@ -13,7 +13,7 @@ Standard format for presenting next steps after completing a command or workflow
13
13
 
14
14
  `{command to copy-paste}`
15
15
 
16
- <sub>`/clear` first → fresh context window</sub>
16
+ <sub>`/new` first → fresh context window</sub>
17
17
 
18
18
  ---
19
19
 
@@ -29,7 +29,7 @@ Standard format for presenting next steps after completing a command or workflow
29
29
  1. **Always show what it is** - name + description, never just a command path
30
30
  2. **Pull context from source** - ROADMAP.md for phases, PLAN.md `<objective>` for plans
31
31
  3. **Command in inline code** - backticks, easy to copy-paste, renders as clickable link
32
- 4. **`/clear` explanation** - always include, keeps it concise but explains why
32
+ 4. **`/new` explanation** - always include, keeps it concise but explains why
33
33
  5. **"Also available" not "Other options"** - sounds more app-like
34
34
  6. **Visual separators** - `---` above and below to make it stand out
35
35
 
@@ -46,7 +46,7 @@ Standard format for presenting next steps after completing a command or workflow
46
46
 
47
47
  `/gsd-execute-phase 2`
48
48
 
49
- <sub>`/clear` first → fresh context window</sub>
49
+ <sub>`/new` first → fresh context window</sub>
50
50
 
51
51
  ---
52
52
 
@@ -71,7 +71,7 @@ Add note that this is the last plan and what comes after:
71
71
 
72
72
  `/gsd-execute-phase 2`
73
73
 
74
- <sub>`/clear` first → fresh context window</sub>
74
+ <sub>`/new` first → fresh context window</sub>
75
75
 
76
76
  ---
77
77
 
@@ -93,7 +93,7 @@ Add note that this is the last plan and what comes after:
93
93
 
94
94
  `/gsd-plan-phase 2`
95
95
 
96
- <sub>`/clear` first → fresh context window</sub>
96
+ <sub>`/new` first → fresh context window</sub>
97
97
 
98
98
  ---
99
99
 
@@ -122,7 +122,7 @@ Show completion status before next action:
122
122
 
123
123
  `/gsd-plan-phase 3`
124
124
 
125
- <sub>`/clear` first → fresh context window</sub>
125
+ <sub>`/new` first → fresh context window</sub>
126
126
 
127
127
  ---
128
128
 
@@ -151,7 +151,7 @@ When there's no clear primary action:
151
151
 
152
152
  **To research unknowns:** `/gsd-research-phase 3`
153
153
 
154
- <sub>`/clear` first → fresh context window</sub>
154
+ <sub>`/new` first → fresh context window</sub>
155
155
 
156
156
  ---
157
157
  ```
@@ -171,7 +171,7 @@ All 4 phases shipped
171
171
 
172
172
  `/gsd-new-milestone`
173
173
 
174
- <sub>`/clear` first → fresh context window</sub>
174
+ <sub>`/new` first → fresh context window</sub>
175
175
 
176
176
  ---
177
177
  ```
@@ -213,18 +213,18 @@ Extract: `**02-03: Refresh Token Rotation** - Add /api/auth/refresh with sliding
213
213
  ```
214
214
  ## To Continue
215
215
 
216
- Run `/clear`, then paste:
216
+ Run `/new`, then paste:
217
217
  /gsd-execute-phase 2
218
218
  ```
219
219
 
220
220
  User has no idea what 02-03 is about.
221
221
 
222
- ### Don't: Missing /clear explanation
222
+ ### Don't: Missing /new explanation
223
223
 
224
224
  ```
225
225
  `/gsd-plan-phase 3`
226
226
 
227
- Run /clear first.
227
+ Run /new first.
228
228
  ```
229
229
 
230
230
  Doesn't explain why. User might skip it.
@@ -74,7 +74,7 @@ Always at end of major completions.
74
74
 
75
75
  `{copy-paste command}`
76
76
 
77
- <sub>`/clear` first → fresh context window</sub>
77
+ <sub>`/new` first → fresh context window</sub>
78
78
 
79
79
  ───────────────────────────────────────────────────────────────
80
80
 
@@ -32,7 +32,7 @@ reproduction: [how to trigger]
32
32
  started: [when it broke / always broken]
33
33
 
34
34
  ## Eliminated
35
- <!-- APPEND only - prevents re-investigating after /clear -->
35
+ <!-- APPEND only - prevents re-investigating after /new -->
36
36
 
37
37
  - hypothesis: [theory that was wrong]
38
38
  evidence: [what disproved it]
@@ -68,7 +68,7 @@ files_changed: []
68
68
  **Current Focus:**
69
69
  - OVERWRITE entirely on each update
70
70
  - Always reflects what the agent is doing RIGHT NOW
71
- - If the agent reads this after /clear, it knows exactly where to resume
71
+ - If the agent reads this after /new, it knows exactly where to resume
72
72
  - Fields: hypothesis, test, expecting, next_action
73
73
 
74
74
  **Symptoms:**
@@ -81,7 +81,7 @@ files_changed: []
81
81
  - APPEND only - never remove entries
82
82
  - Prevents re-investigating dead ends after context reset
83
83
  - Each entry: hypothesis, evidence that disproved it, timestamp
84
- - Critical for efficiency across /clear boundaries
84
+ - Critical for efficiency across /new boundaries
85
85
 
86
86
  **Evidence:**
87
87
  - APPEND only - never remove entries
@@ -140,7 +140,7 @@ files_changed: []
140
140
 
141
141
  <resume_behavior>
142
142
 
143
- When the agent reads this file after /clear:
143
+ When the agent reads this file after /new:
144
144
 
145
145
  1. Parse frontmatter → know status
146
146
  2. Read Current Focus → know exactly what was happening
@@ -174,7 +174,7 @@ blocked: [N]
174
174
  - `/gsd-verify-work {phase}` picks up from first pending/blocked test
175
175
  - When all items resolved, status advances to "complete"
176
176
 
177
- **Resume after /clear:**
177
+ **Resume after /new:**
178
178
  1. Read frontmatter → know phase and status
179
179
  2. Read Current Test → know where we are
180
180
  3. Find first [pending] result → continue from there
@@ -0,0 +1,135 @@
1
+ <gsd-version v="1.12.5" />
2
+
3
+ <gsd-arguments>
4
+ <settings>
5
+ <keep-extra-args />
6
+ </settings>
7
+ <arg name="description" type="string" optional />
8
+ </gsd-arguments>
9
+
10
+ <gsd-execute>
11
+ <shell command="pi-gsd-tools">
12
+ <args>
13
+ <arg string="init" />
14
+ <arg string="phase-op" />
15
+ <arg string="0" />
16
+ </args>
17
+ <outs>
18
+ <out type="string" name="init" />
19
+ </outs>
20
+ </shell>
21
+ <if>
22
+ <condition>
23
+ <starts-with>
24
+ <left name="init" />
25
+ <right type="string" value="@file:" />
26
+ </starts-with>
27
+ </condition>
28
+ <then>
29
+ <string-op op="split">
30
+ <args>
31
+ <arg name="init" />
32
+ <arg type="string" value="@file:" />
33
+ </args>
34
+ <outs>
35
+ <out type="string" name="init-file" />
36
+ </outs>
37
+ </string-op>
38
+ <shell command="cat">
39
+ <args>
40
+ <arg name="init-file" wrap='"' />
41
+ </args>
42
+ <outs>
43
+ <out type="string" name="init" />
44
+ </outs>
45
+ </shell>
46
+ </then>
47
+ </if>
48
+ <shell command="pi-gsd-tools">
49
+ <args>
50
+ <arg string="phase" />
51
+ <arg string="add-batch" />
52
+ <arg name="description" wrap='"' />
53
+ </args>
54
+ <outs>
55
+ <out type="string" name="batch-result" />
56
+ </outs>
57
+ </shell>
58
+ </gsd-execute>
59
+
60
+ ## Context (pre-injected by WXP)
61
+
62
+ **Init:**
63
+ <gsd-paste name="init" />
64
+
65
+ **Phases added:**
66
+ <gsd-paste name="batch-result" />
67
+
68
+ <process>
69
+
70
+ <step name="parse_arguments">
71
+ If no description was provided (check `<gsd-paste name="description" />` is empty):
72
+
73
+ ```
74
+ ERROR: Phase description required
75
+ Usage: /gsd-add-phase <description>
76
+ /gsd-add-phase <desc1> + <desc2> + ...
77
+ Example: /gsd-add-phase Add authentication system
78
+ ```
79
+
80
+ Exit.
81
+ </step>
82
+
83
+ <step name="check_result">
84
+ The `batch-result` JSON above was already executed by WXP before this message
85
+ reached you. Parse it:
86
+
87
+ - If it contains an error field → report the error and exit.
88
+ - Otherwise extract `phases[]` — each has `phase_number`, `padded`, `name`,
89
+ `slug`, `directory`.
90
+
91
+ Do NOT run `pi-gsd-tools phase add` again, do NOT inspect `.planning/phases/`
92
+ or ROADMAP.md — everything is already done.
93
+ </step>
94
+
95
+ <step name="completion">
96
+ Present a completion summary:
97
+
98
+ ```
99
+ Added <count> phase(s):
100
+
101
+ <for each phase in phases[]>
102
+ • Phase <phase_number>: <name>
103
+ Directory: <directory>
104
+ </for>
105
+
106
+ Roadmap updated: .planning/ROADMAP.md
107
+ State updated: .planning/STATE.md
108
+
109
+ ---
110
+
111
+ ## ▶ Next Up
112
+
113
+ **Phase <last phase_number>: <last name>**
114
+
115
+ `/gsd-plan-phase <last phase_number>`
116
+
117
+ <sub>`/clear` first → fresh context window</sub>
118
+
119
+ ---
120
+
121
+ **Also available:**
122
+ - `/gsd-add-phase <description>` — add another phase
123
+ - `/gsd-plan-phase <N>` — plan any of the new phases
124
+ ```
125
+ </step>
126
+
127
+ </process>
128
+
129
+ <success_criteria>
130
+ - [ ] `pi-gsd-tools phase add-batch` executed by WXP (not by the agent)
131
+ - [ ] Phase directories created under `.planning/phases/`
132
+ - [ ] ROADMAP.md updated with all new phase entries
133
+ - [ ] STATE.md Roadmap Evolution updated (handled inside add-batch)
134
+ - [ ] Agent presented the pre-injected result — no filesystem exploration
135
+ </success_criteria>
@@ -289,7 +289,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
289
289
 
290
290
  /gsd-complete-milestone {version}
291
291
 
292
- <sub>/clear first → fresh context window</sub>
292
+ <sub>/new first → fresh context window</sub>
293
293
 
294
294
  ───────────────────────────────────────────────────────────────
295
295
 
@@ -334,7 +334,7 @@ Phases needing validation: run `/gsd-validate-phase {N}` for each flagged phase.
334
334
 
335
335
  /gsd-plan-milestone-gaps
336
336
 
337
- <sub>/clear first → fresh context window</sub>
337
+ <sub>/new first → fresh context window</sub>
338
338
 
339
339
  ───────────────────────────────────────────────────────────────
340
340
 
@@ -376,7 +376,7 @@ All requirements met. No critical blockers. Accumulated tech debt needs review.
376
376
 
377
377
  /gsd-plan-milestone-gaps
378
378
 
379
- <sub>/clear first → fresh context window</sub>
379
+ <sub>/new first → fresh context window</sub>
380
380
 
381
381
  ───────────────────────────────────────────────────────────────
382
382
  </offer_next>
@@ -234,7 +234,7 @@ Tag: v[X.Y]
234
234
 
235
235
  `/gsd-new-milestone`
236
236
 
237
- <sub>`/clear` first → fresh context window</sub>
237
+ <sub>`/new` first → fresh context window</sub>
238
238
 
239
239
  ---
240
240
  ```
@@ -653,7 +653,7 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
653
653
 
654
654
  `/gsd-plan-phase ${PHASE}`
655
655
 
656
- <sub>`/clear` first → fresh context window</sub>
656
+ <sub>`/new` first → fresh context window</sub>
657
657
 
658
658
  ---
659
659
 
@@ -913,7 +913,7 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
913
913
 
914
914
  `/gsd-plan-phase ${PHASE} ${GSD_WS}`
915
915
 
916
- <sub>`/clear` first → fresh context window</sub>
916
+ <sub>`/new` first → fresh context window</sub>
917
917
 
918
918
  ---
919
919
 
@@ -1045,7 +1045,7 @@ This keeps the auto-advance chain flat - discuss, plan, and execute all run at t
1045
1045
  Auto-advance pipeline finished: discuss → plan → execute
1046
1046
 
1047
1047
  Next: /gsd-discuss-phase ${NEXT_PHASE} --auto ${GSD_WS}
1048
- <sub>/clear first → fresh context window</sub>
1048
+ <sub>/new first → fresh context window</sub>
1049
1049
  ```
1050
1050
  - **PLANNING COMPLETE** → Planning done, execution didn't complete:
1051
1051
  ```
@@ -751,7 +751,7 @@ Items saved to `{phase_num}-HUMAN-UAT.md` - they will appear in `/gsd-progress`
751
751
 
752
752
  `/gsd-plan-phase {X} --gaps ${GSD_WS}`
753
753
 
754
- <sub>`/clear` first → fresh context window</sub>
754
+ <sub>`/new` first → fresh context window</sub>
755
755
 
756
756
  Also: `cat {phase_dir}/{phase_num}-VERIFICATION.md` - full report
757
757
  Also: `/gsd-verify-work {X} ${GSD_WS}` - manual testing first
@@ -889,7 +889,7 @@ Subagents: fresh context each (200k-1M depending on model). No polling (Task blo
889
889
  For 1M+ context models, consider:
890
890
  - Passing richer context (code snippets, dependency outputs) directly to executors instead of just file paths
891
891
  - Running small phases (≤3 plans, no dependencies) inline without subagent spawning overhead
892
- - Relaxing /clear recommendations - context rot onset is much further out with 5x window
892
+ - Relaxing /new recommendations - context rot onset is much further out with 5x window
893
893
  </context_efficiency>
894
894
 
895
895
  <failure_handling>
@@ -533,7 +533,7 @@ If `USER_SETUP_CREATED=true`: display `⚠️ USER SETUP REQUIRED` with path + e
533
533
  | summaries = plans, current < highest phase | **B: Phase done** | Show completion, suggest `/gsd-plan-phase {Z+1}` + `/gsd-verify-work {Z}` + `/gsd-discuss-phase {Z+1}` |
534
534
  | summaries = plans, current = highest phase | **C: Milestone done** | Show banner, suggest `/gsd-complete-milestone` + `/gsd-verify-work` + `/gsd-add-phase` |
535
535
 
536
- All routes: `/clear` first for fresh context.
536
+ All routes: `/new` first for fresh context.
537
537
  </step>
538
538
 
539
539
  </process>
@@ -270,7 +270,7 @@ Systematic debugging with persistent state across context resets.
270
270
  - Gathers symptoms through adaptive questioning
271
271
  - Creates `.planning/debug/[slug].md` to track investigation
272
272
  - Investigates using scientific method (evidence → hypothesis → test)
273
- - Survives `/clear` - run `/gsd-debug` with no args to resume
273
+ - Survives `/new` - run `/gsd-debug` with no args to resume
274
274
  - Archives resolved issues to `.planning/debug/resolved/`
275
275
 
276
276
  Usage: `/gsd-debug "login button doesn't work"`
@@ -553,9 +553,9 @@ Example config:
553
553
 
554
554
  ```
555
555
  /gsd-new-project # Unified flow: questioning → research → requirements → roadmap
556
- /clear
556
+ /new
557
557
  /gsd-plan-phase 1 # Create plans for first phase
558
- /clear
558
+ /new
559
559
  /gsd-execute-phase 1 # Execute all plans in phase
560
560
  ```
561
561
 
@@ -577,7 +577,7 @@ Example config:
577
577
 
578
578
  ```
579
579
  /gsd-complete-milestone 1.0.0
580
- /clear
580
+ /new
581
581
  /gsd-new-milestone # Start next milestone (questioning → research → requirements → roadmap)
582
582
  ```
583
583
 
@@ -595,7 +595,7 @@ Example config:
595
595
  ```
596
596
  /gsd-debug "form submission fails silently" # Start debug session
597
597
  # ... investigation happens, context fills up ...
598
- /clear
598
+ /new
599
599
  /gsd-debug # Resume from where you left off
600
600
  ```
601
601
 
@@ -153,7 +153,7 @@ Project state updated: .planning/STATE.md
153
153
 
154
154
  `/gsd-plan-phase {decimal_phase}`
155
155
 
156
- <sub>`/clear` first -> fresh context window</sub>
156
+ <sub>`/new` first -> fresh context window</sub>
157
157
 
158
158
  ---
159
159
 
@@ -382,7 +382,7 @@ Created .planning/codebase/:
382
382
 
383
383
  `/gsd-new-project`
384
384
 
385
- <sub>`/clear` first → fresh context window</sub>
385
+ <sub>`/new` first → fresh context window</sub>
386
386
 
387
387
  ---
388
388
 
@@ -489,7 +489,7 @@ pi-gsd-tools commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files
489
489
 
490
490
  `/gsd-discuss-phase [N] ${GSD_WS}` - gather context and clarify approach
491
491
 
492
- <sub>`/clear` first → fresh context window</sub>
492
+ <sub>`/new` first → fresh context window</sub>
493
493
 
494
494
  Also: `/gsd-plan-phase [N] ${GSD_WS}` - skip discussion, plan directly
495
495
  ```
@@ -1209,7 +1209,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1209
1209
 
1210
1210
  /gsd-discuss-phase 1 - gather context and clarify approach
1211
1211
 
1212
- <sub>/clear first → fresh context window</sub>
1212
+ <sub>/new first → fresh context window</sub>
1213
1213
 
1214
1214
  ---
1215
1215
 
@@ -1231,7 +1231,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1231
1231
 
1232
1232
  /gsd-discuss-phase 1 - gather context and clarify approach
1233
1233
 
1234
- <sub>/clear first → fresh context window</sub>
1234
+ <sub>/new first → fresh context window</sub>
1235
1235
 
1236
1236
  ---
1237
1237
 
@@ -202,7 +202,7 @@ pi-gsd-tools commit "docs(roadmap): add gap closure phases {N}-{M}" --files .pla
202
202
 
203
203
  `/gsd-plan-phase {N}`
204
204
 
205
- <sub>`/clear` first → fresh context window</sub>
205
+ <sub>`/new` first → fresh context window</sub>
206
206
 
207
207
  ---
208
208
 
@@ -859,7 +859,7 @@ Verification: {Passed | Passed with override | Skipped}
859
859
 
860
860
  /gsd-execute-phase {X} ${GSD_WS}
861
861
 
862
- <sub>/clear first → fresh context window</sub>
862
+ <sub>/new first → fresh context window</sub>
863
863
 
864
864
  ───────────────────────────────────────────────────────────────
865
865
 
@@ -273,7 +273,7 @@ Read its `<objective>` section.
273
273
 
274
274
  `/gsd-execute-phase {phase} ${GSD_WS}`
275
275
 
276
- <sub>`/clear` first → fresh context window</sub>
276
+ <sub>`/new` first → fresh context window</sub>
277
277
 
278
278
  ---
279
279
  ```
@@ -303,7 +303,7 @@ PHASE_HAS_UI=$(echo "$PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true" ||
303
303
 
304
304
  `/gsd-plan-phase {phase-number} ${GSD_WS}`
305
305
 
306
- <sub>`/clear` first → fresh context window</sub>
306
+ <sub>`/new` first → fresh context window</sub>
307
307
 
308
308
  ---
309
309
  ```
@@ -319,7 +319,7 @@ PHASE_HAS_UI=$(echo "$PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true" ||
319
319
 
320
320
  `/gsd-discuss-phase {phase}` - gather context and clarify approach
321
321
 
322
- <sub>`/clear` first → fresh context window</sub>
322
+ <sub>`/new` first → fresh context window</sub>
323
323
 
324
324
  ---
325
325
 
@@ -342,7 +342,7 @@ PHASE_HAS_UI=$(echo "$PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true" ||
342
342
 
343
343
  `/gsd-discuss-phase {phase} ${GSD_WS}` - gather context and clarify approach
344
344
 
345
- <sub>`/clear` first → fresh context window</sub>
345
+ <sub>`/new` first → fresh context window</sub>
346
346
 
347
347
  ---
348
348
 
@@ -368,7 +368,7 @@ UAT.md exists with gaps (diagnosed issues). User needs to plan fixes.
368
368
 
369
369
  `/gsd-plan-phase {phase} --gaps ${GSD_WS}`
370
370
 
371
- <sub>`/clear` first → fresh context window</sub>
371
+ <sub>`/new` first → fresh context window</sub>
372
372
 
373
373
  ---
374
374
 
@@ -394,7 +394,7 @@ UAT.md exists with `status: partial` - testing session ended before all items re
394
394
 
395
395
  `/gsd-verify-work {phase} ${GSD_WS}` - resume testing from where you left off
396
396
 
397
- <sub>`/clear` first → fresh context window</sub>
397
+ <sub>`/new` first → fresh context window</sub>
398
398
 
399
399
  ---
400
400
 
@@ -450,7 +450,7 @@ NEXT_HAS_UI=$(echo "$NEXT_PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true
450
450
 
451
451
  `/gsd-discuss-phase {Z+1}` - gather context and clarify approach
452
452
 
453
- <sub>`/clear` first → fresh context window</sub>
453
+ <sub>`/new` first → fresh context window</sub>
454
454
 
455
455
  ---
456
456
 
@@ -475,7 +475,7 @@ NEXT_HAS_UI=$(echo "$NEXT_PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true
475
475
 
476
476
  `/gsd-discuss-phase {Z+1} ${GSD_WS}` - gather context and clarify approach
477
477
 
478
- <sub>`/clear` first → fresh context window</sub>
478
+ <sub>`/new` first → fresh context window</sub>
479
479
 
480
480
  ---
481
481
 
@@ -503,7 +503,7 @@ All {N} phases finished!
503
503
 
504
504
  `/gsd-complete-milestone ${GSD_WS}`
505
505
 
506
- <sub>`/clear` first → fresh context window</sub>
506
+ <sub>`/new` first → fresh context window</sub>
507
507
 
508
508
  ---
509
509
 
@@ -534,7 +534,7 @@ Ready to plan the next milestone.
534
534
 
535
535
  `/gsd-new-milestone ${GSD_WS}`
536
536
 
537
- <sub>`/clear` first → fresh context window</sub>
537
+ <sub>`/new` first → fresh context window</sub>
538
538
 
539
539
  ---
540
540
  ```