ragarciaruben 1.20.7

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 (184) hide show
  1. package/.github/copilot-context/README.md +313 -0
  2. package/.github/copilot-context/agents/executor.agent.md +59 -0
  3. package/.github/copilot-context/agents/planner.agent.md +58 -0
  4. package/.github/copilot-context/agents/verifier.agent.md +68 -0
  5. package/.github/copilot-context/hooks/hooks.json +11 -0
  6. package/.github/copilot-context/hooks/inject-context.js +107 -0
  7. package/.github/copilot-context/instructions/architecture.instructions.md +33 -0
  8. package/.github/copilot-context/instructions/concerns.instructions.md +30 -0
  9. package/.github/copilot-context/instructions/conventions.instructions.md +25 -0
  10. package/.github/copilot-context/instructions/integrations.instructions.md +30 -0
  11. package/.github/copilot-context/instructions/stack.instructions.md +30 -0
  12. package/.github/copilot-context/instructions/structure.instructions.md +32 -0
  13. package/.github/copilot-context/instructions/testing.instructions.md +25 -0
  14. package/.github/copilot-context/prompts/execute-phase.prompt.md +148 -0
  15. package/.github/copilot-context/prompts/map-codebase.prompt.md +115 -0
  16. package/.github/copilot-context/prompts/new-project.prompt.md +85 -0
  17. package/.github/copilot-context/prompts/pause-work.prompt.md +104 -0
  18. package/.github/copilot-context/prompts/plan-phase.prompt.md +137 -0
  19. package/.github/copilot-context/prompts/progress.prompt.md +69 -0
  20. package/.github/copilot-context/prompts/resume-work.prompt.md +74 -0
  21. package/.github/copilot-context/prompts/sync-instructions.prompt.md +86 -0
  22. package/.github/copilot-context/prompts/verify-work.prompt.md +126 -0
  23. package/.github/copilot-context/skills/map-codebase/SKILL.md +49 -0
  24. package/.github/copilot-context/skills/project-history/SKILL.md +46 -0
  25. package/.github/copilot-instructions.md +68 -0
  26. package/.planning/PROJECT.md +61 -0
  27. package/.planning/REQUIREMENTS.md +70 -0
  28. package/.planning/ROADMAP.md +75 -0
  29. package/.planning/STATE.md +75 -0
  30. package/.planning/codebase/ARCHITECTURE.md +76 -0
  31. package/.planning/codebase/CONCERNS.md +102 -0
  32. package/.planning/codebase/CONVENTIONS.md +119 -0
  33. package/.planning/codebase/INTEGRATIONS.md +114 -0
  34. package/.planning/codebase/STACK.md +78 -0
  35. package/.planning/codebase/STRUCTURE.md +75 -0
  36. package/.planning/codebase/TESTING.md +157 -0
  37. package/.planning/continue-here.md +44 -0
  38. package/.vscode/settings.json +16 -0
  39. package/LICENSE +21 -0
  40. package/README.md +704 -0
  41. package/agents/gsd-codebase-mapper.md +764 -0
  42. package/agents/gsd-debugger.md +1246 -0
  43. package/agents/gsd-executor.md +469 -0
  44. package/agents/gsd-integration-checker.md +443 -0
  45. package/agents/gsd-phase-researcher.md +546 -0
  46. package/agents/gsd-plan-checker.md +690 -0
  47. package/agents/gsd-planner.md +1275 -0
  48. package/agents/gsd-project-researcher.md +621 -0
  49. package/agents/gsd-research-synthesizer.md +239 -0
  50. package/agents/gsd-roadmapper.md +642 -0
  51. package/agents/gsd-verifier.md +573 -0
  52. package/bin/install.js +2091 -0
  53. package/bin/setup-copilot-context.js +180 -0
  54. package/commands/gsd/add-phase.md +43 -0
  55. package/commands/gsd/add-tests.md +41 -0
  56. package/commands/gsd/add-todo.md +47 -0
  57. package/commands/gsd/audit-milestone.md +36 -0
  58. package/commands/gsd/check-todos.md +45 -0
  59. package/commands/gsd/cleanup.md +18 -0
  60. package/commands/gsd/complete-milestone.md +136 -0
  61. package/commands/gsd/debug.md +167 -0
  62. package/commands/gsd/discuss-phase.md +83 -0
  63. package/commands/gsd/execute-phase.md +41 -0
  64. package/commands/gsd/health.md +22 -0
  65. package/commands/gsd/help.md +22 -0
  66. package/commands/gsd/insert-phase.md +32 -0
  67. package/commands/gsd/join-discord.md +18 -0
  68. package/commands/gsd/list-phase-assumptions.md +46 -0
  69. package/commands/gsd/map-codebase.md +71 -0
  70. package/commands/gsd/new-milestone.md +44 -0
  71. package/commands/gsd/new-project.md +42 -0
  72. package/commands/gsd/new-project.md.bak +1041 -0
  73. package/commands/gsd/pause-work.md +38 -0
  74. package/commands/gsd/plan-milestone-gaps.md +34 -0
  75. package/commands/gsd/plan-phase.md +45 -0
  76. package/commands/gsd/progress.md +24 -0
  77. package/commands/gsd/quick.md +41 -0
  78. package/commands/gsd/reapply-patches.md +110 -0
  79. package/commands/gsd/remove-phase.md +31 -0
  80. package/commands/gsd/research-phase.md +189 -0
  81. package/commands/gsd/resume-work.md +40 -0
  82. package/commands/gsd/set-profile.md +34 -0
  83. package/commands/gsd/settings.md +36 -0
  84. package/commands/gsd/update.md +37 -0
  85. package/commands/gsd/verify-work.md +38 -0
  86. package/get-shit-done/bin/gsd-tools.cjs +585 -0
  87. package/get-shit-done/bin/lib/commands.cjs +553 -0
  88. package/get-shit-done/bin/lib/config.cjs +162 -0
  89. package/get-shit-done/bin/lib/core.cjs +411 -0
  90. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  91. package/get-shit-done/bin/lib/init.cjs +710 -0
  92. package/get-shit-done/bin/lib/milestone.cjs +215 -0
  93. package/get-shit-done/bin/lib/phase.cjs +870 -0
  94. package/get-shit-done/bin/lib/roadmap.cjs +298 -0
  95. package/get-shit-done/bin/lib/state.cjs +521 -0
  96. package/get-shit-done/bin/lib/template.cjs +222 -0
  97. package/get-shit-done/bin/lib/verify.cjs +772 -0
  98. package/get-shit-done/references/checkpoints.md +776 -0
  99. package/get-shit-done/references/continuation-format.md +249 -0
  100. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  101. package/get-shit-done/references/git-integration.md +248 -0
  102. package/get-shit-done/references/git-planning-commit.md +38 -0
  103. package/get-shit-done/references/model-profile-resolution.md +34 -0
  104. package/get-shit-done/references/model-profiles.md +92 -0
  105. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  106. package/get-shit-done/references/planning-config.md +196 -0
  107. package/get-shit-done/references/questioning.md +145 -0
  108. package/get-shit-done/references/tdd.md +263 -0
  109. package/get-shit-done/references/ui-brand.md +160 -0
  110. package/get-shit-done/references/verification-patterns.md +612 -0
  111. package/get-shit-done/templates/DEBUG.md +164 -0
  112. package/get-shit-done/templates/UAT.md +247 -0
  113. package/get-shit-done/templates/VALIDATION.md +76 -0
  114. package/get-shit-done/templates/codebase/architecture.md +255 -0
  115. package/get-shit-done/templates/codebase/concerns.md +310 -0
  116. package/get-shit-done/templates/codebase/conventions.md +307 -0
  117. package/get-shit-done/templates/codebase/integrations.md +280 -0
  118. package/get-shit-done/templates/codebase/stack.md +186 -0
  119. package/get-shit-done/templates/codebase/structure.md +285 -0
  120. package/get-shit-done/templates/codebase/testing.md +480 -0
  121. package/get-shit-done/templates/config.json +37 -0
  122. package/get-shit-done/templates/context.md +283 -0
  123. package/get-shit-done/templates/continue-here.md +78 -0
  124. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  125. package/get-shit-done/templates/discovery.md +146 -0
  126. package/get-shit-done/templates/milestone-archive.md +123 -0
  127. package/get-shit-done/templates/milestone.md +115 -0
  128. package/get-shit-done/templates/phase-prompt.md +569 -0
  129. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  130. package/get-shit-done/templates/project.md +184 -0
  131. package/get-shit-done/templates/requirements.md +231 -0
  132. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  133. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  134. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  135. package/get-shit-done/templates/research-project/STACK.md +120 -0
  136. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  137. package/get-shit-done/templates/research.md +552 -0
  138. package/get-shit-done/templates/retrospective.md +54 -0
  139. package/get-shit-done/templates/roadmap.md +202 -0
  140. package/get-shit-done/templates/state.md +176 -0
  141. package/get-shit-done/templates/summary-complex.md +59 -0
  142. package/get-shit-done/templates/summary-minimal.md +41 -0
  143. package/get-shit-done/templates/summary-standard.md +48 -0
  144. package/get-shit-done/templates/summary.md +248 -0
  145. package/get-shit-done/templates/user-setup.md +311 -0
  146. package/get-shit-done/templates/verification-report.md +322 -0
  147. package/get-shit-done/workflows/add-phase.md +111 -0
  148. package/get-shit-done/workflows/add-tests.md +350 -0
  149. package/get-shit-done/workflows/add-todo.md +157 -0
  150. package/get-shit-done/workflows/audit-milestone.md +297 -0
  151. package/get-shit-done/workflows/check-todos.md +176 -0
  152. package/get-shit-done/workflows/cleanup.md +152 -0
  153. package/get-shit-done/workflows/complete-milestone.md +763 -0
  154. package/get-shit-done/workflows/diagnose-issues.md +219 -0
  155. package/get-shit-done/workflows/discovery-phase.md +289 -0
  156. package/get-shit-done/workflows/discuss-phase.md +542 -0
  157. package/get-shit-done/workflows/execute-phase.md +449 -0
  158. package/get-shit-done/workflows/execute-plan.md +448 -0
  159. package/get-shit-done/workflows/health.md +156 -0
  160. package/get-shit-done/workflows/help.md +489 -0
  161. package/get-shit-done/workflows/insert-phase.md +129 -0
  162. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  163. package/get-shit-done/workflows/map-codebase.md +315 -0
  164. package/get-shit-done/workflows/new-milestone.md +382 -0
  165. package/get-shit-done/workflows/new-project.md +1116 -0
  166. package/get-shit-done/workflows/pause-work.md +122 -0
  167. package/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  168. package/get-shit-done/workflows/plan-phase.md +569 -0
  169. package/get-shit-done/workflows/progress.md +381 -0
  170. package/get-shit-done/workflows/quick.md +453 -0
  171. package/get-shit-done/workflows/remove-phase.md +154 -0
  172. package/get-shit-done/workflows/research-phase.md +73 -0
  173. package/get-shit-done/workflows/resume-project.md +306 -0
  174. package/get-shit-done/workflows/set-profile.md +80 -0
  175. package/get-shit-done/workflows/settings.md +213 -0
  176. package/get-shit-done/workflows/transition.md +544 -0
  177. package/get-shit-done/workflows/update.md +219 -0
  178. package/get-shit-done/workflows/verify-phase.md +242 -0
  179. package/get-shit-done/workflows/verify-work.md +569 -0
  180. package/hooks/dist/gsd-check-update.js +62 -0
  181. package/hooks/dist/gsd-context-monitor.js +122 -0
  182. package/hooks/dist/gsd-statusline.js +108 -0
  183. package/package.json +54 -0
  184. package/scripts/build-hooks.js +43 -0
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Coding Conventions
3
+ description: Coding style, naming conventions, error handling, and formatting standards for this codebase
4
+ applyTo: "**/*.{ts,tsx,js,jsx,mts,cts}"
5
+ ---
6
+
7
+ # Coding Conventions
8
+
9
+ > Full conventions reference: [.planning/codebase/CONVENTIONS.md](../../../.planning/codebase/CONVENTIONS.md)
10
+ >
11
+ > **This file is auto-loaded when you edit source files. Always follow these patterns.**
12
+ > When in doubt, look at existing files in the codebase and match their style.
13
+
14
+ ## Quick Reference
15
+
16
+ Read `.planning/codebase/CONVENTIONS.md` for the full guide. Key rules:
17
+
18
+ - **Naming:** variables/functions = `camelCase`, classes = `PascalCase`, constants = `SCREAMING_SNAKE_CASE`, files = `kebab-case.ts`
19
+ - **Imports:** built-ins → external packages → internal (`@/`) → relative — always in this order
20
+ - **Error handling:** never swallow errors silently; use custom error classes; let `src/middleware/error.ts` handle HTTP errors
21
+ - **Functions:** single responsibility; max ~50 lines; prefer early returns over deep nesting; always annotate return types
22
+ - **Comments:** explain WHY not WHAT; JSDoc on all exported functions; include ticket ref in TODO comments
23
+ - **No `any`:** use `unknown` + type guards instead; strict TypeScript throughout
24
+
25
+ When writing new code, always check `.planning/codebase/CONVENTIONS.md` to confirm you're matching the exact patterns established in this codebase.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: External Integrations
3
+ description: External API integrations, third-party services, SDK usage patterns, and service configuration
4
+ ---
5
+
6
+ # External Integrations
7
+
8
+ > Full integrations reference: [.planning/codebase/INTEGRATIONS.md](../../../.planning/codebase/INTEGRATIONS.md)
9
+ >
10
+ > Read this document when: touching external service code, adding a new integration, debugging third-party API issues, or handling webhooks.
11
+
12
+ ## Core Rule
13
+
14
+ **Before writing code that touches an external service, read the relevant section in `.planning/codebase/INTEGRATIONS.md`.** It documents which SDK is used, where the client is initialized, how errors are handled, and which environment variables are required.
15
+
16
+ ## Quick Guide
17
+
18
+ Read `.planning/codebase/INTEGRATIONS.md` for:
19
+ - **Database:** ORM/client used, connection config location, migration commands
20
+ - **Authentication:** Provider, middleware location, how user identity is propagated
21
+ - **Payment / billing:** SDK, webhook handling location, key operations
22
+ - **Email:** Provider, template locations, key send operations
23
+ - **CI/CD:** Pipeline config, what triggers what
24
+
25
+ ## Rules
26
+
27
+ - **Client singletons:** never create a new SDK client instance inside a function — use the initialized instance from `src/config/`
28
+ - **Environment variables:** required vars for each service are documented in INTEGRATIONS.md — ensure they're in `.env.example`
29
+ - **Webhook security:** always verify webhook signatures; never trust payload without verification
30
+ - New integrations: add the service to INTEGRATIONS.md with its SDK, config location, and env vars before implementing
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Technology Stack
3
+ description: Technology stack, framework choices, key dependencies, runtime environment, and configuration
4
+ ---
5
+
6
+ # Technology Stack
7
+
8
+ > Full stack reference: [.planning/codebase/STACK.md](../../../.planning/codebase/STACK.md)
9
+ >
10
+ > Read this document when: adding dependencies, modifying configuration, setting up environments, or debugging infrastructure issues.
11
+
12
+ ## Core Rule
13
+
14
+ **Do not introduce new dependencies or change the build configuration without first checking `.planning/codebase/STACK.md`.** The stack is intentional — changes to core dependencies have broad impact.
15
+
16
+ ## Quick Guide
17
+
18
+ Read `.planning/codebase/STACK.md` for:
19
+ - **Runtime:** Language version, Node.js version, package manager
20
+ - **Key frameworks:** Web framework, ORM, auth library — and how they're configured
21
+ - **Dev toolchain:** TypeScript config, ESLint, Prettier, test runner setup
22
+ - **Infrastructure:** Database, cache, object storage, message queue details
23
+ - **Environment variables:** Full list of required env vars and their purpose
24
+
25
+ ## Rules
26
+
27
+ - Always check if a required capability already exists in the stack before adding a new package
28
+ - New dependencies: add to the appropriate section in STACK.md after installation
29
+ - Breaking upgrades: document the upgrade decision in `.planning/PROJECT.md` Key Decisions
30
+ - **Never read `.env` file contents** — work only with `.env.example` and environment variable names
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: File Structure
3
+ description: File and directory organization, naming conventions, and where to place new code, components, routes, or modules
4
+ ---
5
+
6
+ # File Structure
7
+
8
+ > Full structure reference: [.planning/codebase/STRUCTURE.md](../../../.planning/codebase/STRUCTURE.md)
9
+ >
10
+ > Read this document when: creating new files, deciding on location for new code, or setting up new modules.
11
+
12
+ ## Core Rule
13
+
14
+ **Always check `.planning/codebase/STRUCTURE.md` before creating a new file.** It contains a "Where to Put New Code" table that answers exactly where each type of file belongs and what naming convention to use.
15
+
16
+ ## Quick Guide
17
+
18
+ | I'm creating... | Check STRUCTURE.md section |
19
+ |----------------|---------------------------|
20
+ | A new API endpoint | "Where to Put New Code" → routes row |
21
+ | A new service | "Where to Put New Code" → services row |
22
+ | A new component | "Where to Put New Code" → components row |
23
+ | A test for existing code | Mirror the source path in the `tests/` directory |
24
+ | A new database model | "Where to Put New Code" → models row |
25
+ | A utility function | "Where to Put New Code" → utilities row |
26
+
27
+ ## Rules
28
+
29
+ - **Never create files at the root of `src/`** — always find the correct subdirectory
30
+ - **Follow the naming convention exactly** as specified in STRUCTURE.md for each file type
31
+ - **Use barrel exports (`index.ts`)** where the pattern exists — don't skip them for convenience
32
+ - When creating a feature that spans multiple layers (route + service + repository), create all files before wiring them together
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Testing Patterns
3
+ description: Test framework, patterns, mocking strategy, and test organization for writing and running tests
4
+ applyTo: "**/*.{test,spec}.{ts,tsx,js,jsx}"
5
+ ---
6
+
7
+ # Testing Patterns
8
+
9
+ > Full testing reference: [.planning/codebase/TESTING.md](../../../.planning/codebase/TESTING.md)
10
+ >
11
+ > **This file is auto-loaded when you edit test files. Always follow these patterns.**
12
+
13
+ ## Quick Reference
14
+
15
+ Read `.planning/codebase/TESTING.md` for the full guide. Key rules:
16
+
17
+ - **Structure:** `describe('[ClassName/Function]')` → `describe('[methodName()]')` → `it('[readable description of behavior]')`
18
+ - **Pattern:** Arrange-Act-Assert — comment each section if the test is non-trivial
19
+ - **Test data:** always use factory functions from `tests/helpers/factories.ts`, never hardcoded raw objects
20
+ - **Mocking:** mock at the outermost layer (repositories for service tests, network for integration tests); use `vi.mock()` / `jest.mock()`
21
+ - **Isolation:** each test must pass in isolation and in any order; no shared mutable state between tests
22
+ - **What to test:** business logic, API contract (status codes + response shape), error paths, edge cases
23
+ - **What NOT to test:** framework internals, private implementation details, trivial getters/setters
24
+
25
+ When writing a new test, check `.planning/codebase/TESTING.md` for the exact patterns used in this project, including how the test database is set up for integration tests.
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: execute-phase
3
+ description: Execute a planned phase step-by-step, implementing each plan and running tests
4
+ mode: agent
5
+ tools:
6
+ - editFiles
7
+ - runTerminalCommand
8
+ - search
9
+ ---
10
+
11
+ # Execute Phase
12
+
13
+ **Usage:** `/execute-phase [phase-number]` — e.g., `/execute-phase 1`
14
+
15
+ Implement the planned phase. Execute each plan in sequence, following established conventions and committing after each completed plan.
16
+
17
+ ## Step 1: Load Execution Context
18
+
19
+ Read these files:
20
+ - `.planning/ROADMAP.md` — find the phase and its plans
21
+ - `.planning/phases/[NN]-[phase-name]/` — load all plan files for this phase
22
+ - `.planning/codebase/CONVENTIONS.md` — coding standards to follow throughout
23
+ - `.planning/codebase/STRUCTURE.md` — where to place new files
24
+ - `.planning/codebase/CONCERNS.md` — fragile areas to handle carefully
25
+ - `.planning/STATE.md` — current position and any blockers
26
+
27
+ If `.planning/continue-here.md` exists, read it first — it tells you exactly where to resume.
28
+
29
+ ## Step 2: Pre-flight Check
30
+
31
+ Before writing any code:
32
+ ```bash
33
+ # Verify tests are passing before starting
34
+ npm test 2>&1 | tail -20
35
+
36
+ # Check TypeScript compilation
37
+ npx tsc --noEmit 2>&1 | head -20
38
+
39
+ # Confirm current branch and status
40
+ git status
41
+ git branch --show-current
42
+ ```
43
+
44
+ If tests are already failing before you start, note them in STATE.md and proceed cautiously.
45
+
46
+ ## Step 3: Execute Plans
47
+
48
+ For each plan file in the phase (in order):
49
+
50
+ ### 3a. Read the plan fully before writing any code
51
+
52
+ Understand all steps and success criteria before implementing step 1.
53
+
54
+ ### 3b. Implement step by step
55
+
56
+ Follow the plan's steps precisely:
57
+ - Create files in the correct location (check `.planning/codebase/STRUCTURE.md`)
58
+ - Follow naming conventions (check `.planning/codebase/CONVENTIONS.md`)
59
+ - Before touching any file listed in `.planning/codebase/CONCERNS.md` fragile areas — re-read that section
60
+ - Write tests for each piece of functionality before moving to the next
61
+
62
+ ### 3c. Verify after each step
63
+
64
+ ```bash
65
+ # Run tests after each meaningful change
66
+ npm test
67
+
68
+ # Type-check
69
+ npx tsc --noEmit
70
+ ```
71
+
72
+ Fix failures immediately — don't accumulate broken tests.
73
+
74
+ ### 3d. Commit after each completed plan
75
+
76
+ ```bash
77
+ git add -A
78
+ git commit -m "[NN]-[plan]: [descriptive message]
79
+
80
+ - [What was implemented]
81
+ - [Tests written]
82
+ - [Key decisions]"
83
+ ```
84
+
85
+ ### 3e. Update ROADMAP.md
86
+
87
+ Mark the completed plan:
88
+ ```
89
+ - [x] [NN]-01: [Description] ← mark completed
90
+ ```
91
+
92
+ ## Step 4: Post-Phase Verification
93
+
94
+ After all plans in the phase are complete:
95
+
96
+ ```bash
97
+ # Full test suite
98
+ npm test
99
+
100
+ # Coverage check
101
+ npm run test:coverage
102
+
103
+ # Type check
104
+ npx tsc --noEmit
105
+
106
+ # Lint
107
+ npm run lint
108
+ ```
109
+
110
+ Verify against the phase's **Success Criteria** in ROADMAP.md — each criterion must be TRUE.
111
+
112
+ ## Step 5: Update State
113
+
114
+ Update `.planning/STATE.md`:
115
+ - Mark phase complete if all plans done
116
+ - Update progress percentage
117
+ - Advance to next phase
118
+
119
+ Update `.planning/ROADMAP.md`:
120
+ - Mark phase checkbox: `- [x] **Phase N: ...**`
121
+
122
+ ## Handling Blockers
123
+
124
+ If you hit a significant blocker (ambiguous requirement, architectural conflict, missing context):
125
+ 1. Document the blocker in `.planning/STATE.md`
126
+ 2. Run `/pause-work` to save session state
127
+ 3. Describe the blocker clearly for the user to resolve
128
+
129
+ ## Completion
130
+
131
+ Print a summary:
132
+ ```
133
+ ✅ Phase [N] complete: [Phase Name]
134
+
135
+ Implemented:
136
+ - [NN]-01: [Name] — [key outcome]
137
+ - [NN]-02: [Name] — [key outcome]
138
+
139
+ Tests: [N] passing, 0 failing
140
+ Coverage: [X]%
141
+
142
+ Success Criteria:
143
+ ✅ [Criterion 1]
144
+ ✅ [Criterion 2]
145
+ ✅ [Criterion 3]
146
+
147
+ Run /verify-work [N] to validate against requirements.
148
+ ```
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: map-codebase
3
+ description: Analyze the codebase and generate structured context documents in .planning/codebase/
4
+ mode: agent
5
+ tools:
6
+ - editFiles
7
+ - runTerminalCommand
8
+ - search
9
+ - fetch
10
+ ---
11
+
12
+ # Map Codebase
13
+
14
+ Analyze this codebase thoroughly and generate 7 structured context documents in `.planning/codebase/`. These documents will be used by Copilot on every future request to understand the project's architecture, conventions, and constraints.
15
+
16
+ ## Process
17
+
18
+ Work through 4 focus areas in sequence. For each area, explore the codebase using the terminal and search tools, then write the document(s) directly to `.planning/codebase/`.
19
+
20
+ ---
21
+
22
+ ### Focus 1: Technology Stack → STACK.md + INTEGRATIONS.md
23
+
24
+ **Explore:**
25
+ ```bash
26
+ # Package manifests
27
+ cat package.json 2>/dev/null | head -100
28
+ cat requirements.txt 2>/dev/null || cat pyproject.toml 2>/dev/null | head -50
29
+ cat go.mod 2>/dev/null | head -30
30
+
31
+ # Config files (list only — NEVER read .env contents)
32
+ ls -la *.config.* tsconfig.json .nvmrc .python-version 2>/dev/null
33
+ ls .env* 2>/dev/null # Note existence only
34
+
35
+ # Find external integrations
36
+ grep -r "import.*stripe\|import.*supabase\|import.*aws\|import.*prisma\|import.*redis\|import.*sendgrid\|import.*twilio\|import.*openai" src/ --include="*.ts" --include="*.py" 2>/dev/null | head -40
37
+ ```
38
+
39
+ **Write `.planning/codebase/STACK.md`** with: runtime, frameworks, key dependencies table, dev toolchain, infrastructure, environment variables.
40
+
41
+ **Write `.planning/codebase/INTEGRATIONS.md`** with: a section per external service including SDK used, config file location, required env vars, key operations.
42
+
43
+ ---
44
+
45
+ ### Focus 2: Architecture + Structure → ARCHITECTURE.md + STRUCTURE.md
46
+
47
+ **Explore:**
48
+ ```bash
49
+ # Directory structure
50
+ find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/.planning/*' -not -path '*/.github/*' | sort | head -60
51
+
52
+ # Entry points
53
+ ls src/index.* src/main.* src/app.* src/server.* app/page.* 2>/dev/null
54
+
55
+ # Understanding layer imports
56
+ grep -r "^import\|^from" src/ --include="*.ts" --include="*.py" 2>/dev/null | head -80
57
+ ```
58
+
59
+ **Write `.planning/codebase/ARCHITECTURE.md`** with: architectural style + rationale, layer diagram with file paths, data flow example (trace a typical request end-to-end), key abstractions table, entry points table, cross-cutting concerns (error handling, logging, auth, validation).
60
+
61
+ **Write `.planning/codebase/STRUCTURE.md`** with: root layout, source tree, and most importantly a **"Where to Put New Code"** table that tells exactly which directory and naming convention to use for each type of file (routes, services, repositories, models, utils, tests, components, etc.).
62
+
63
+ ---
64
+
65
+ ### Focus 3: Conventions + Testing → CONVENTIONS.md + TESTING.md
66
+
67
+ **Explore:**
68
+ ```bash
69
+ # Formatting/linting config
70
+ cat .prettierrc .eslintrc.js .eslintrc.json biome.json 2>/dev/null | head -60
71
+ cat pyproject.toml 2>/dev/null | grep -A 20 "\[tool\."
72
+
73
+ # Test framework
74
+ ls jest.config.* vitest.config.* pytest.ini setup.cfg 2>/dev/null
75
+ find . -name "*.test.*" -o -name "*.spec.*" | grep -v node_modules | head -20
76
+
77
+ # Look at real code for patterns
78
+ find src/ -name "*.ts" -not -name "*.test.*" 2>/dev/null | head -5 | xargs head -40 2>/dev/null
79
+ find tests/ -name "*.test.*" 2>/dev/null | head -3 | xargs head -60 2>/dev/null
80
+ ```
81
+
82
+ **Write `.planning/codebase/CONVENTIONS.md`** — be prescriptive ("Use X" not "X is used"). Include: language/formatting rules, naming conventions table, import ordering, error handling patterns, function patterns, TypeScript specifics, comment style. Include real code examples from the codebase.
83
+
84
+ **Write `.planning/codebase/TESTING.md`** with: test framework and run commands, file organization, test structure pattern with real example, mocking strategy, test data approach (factories), integration test setup, what to test and what NOT to test.
85
+
86
+ ---
87
+
88
+ ### Focus 4: Technical Concerns → CONCERNS.md
89
+
90
+ **Explore:**
91
+ ```bash
92
+ # TODO/FIXME/HACK comments
93
+ grep -rn "TODO\|FIXME\|HACK\|XXX\|TEMP\|@deprecated" src/ --include="*.ts" --include="*.py" 2>/dev/null | head -40
94
+
95
+ # Potential issues
96
+ grep -rn "any\b\|@ts-ignore\|@ts-nocheck\|eslint-disable\|# type: ignore\|# noqa" src/ --include="*.ts" --include="*.py" 2>/dev/null | head -30
97
+
98
+ # Security patterns
99
+ grep -rn "eval\|innerHTML\|dangerouslySetInnerHTML\|exec\|shell=True" src/ --include="*.ts" --include="*.py" 2>/dev/null | head -20
100
+
101
+ # Large/complex files
102
+ find src/ -name "*.ts" -o -name "*.py" 2>/dev/null | xargs wc -l 2>/dev/null | sort -rn | head -15
103
+ ```
104
+
105
+ **Write `.planning/codebase/CONCERNS.md`** with: health summary table (critical/high/medium counts), critical issues section (with file paths, impact, root cause, fix approach), high-priority debt, fragile areas table with safe-approach guidance, security notes, performance bottlenecks, scaling limits.
106
+
107
+ ---
108
+
109
+ ## Completion
110
+
111
+ After all 7 files are written, update `.github/copilot-instructions.md`:
112
+ - Fill in the "What This Project Is" section from what you learned
113
+ - Keep it to 2-3 sentences describing what the product does
114
+
115
+ Then confirm: "Codebase mapping complete. Generated 7 documents in `.planning/codebase/`. Use `/sync-instructions` to update the Copilot instructions digest."
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: new-project
3
+ description: Initialize .planning/ documentation for a new or existing project — creates PROJECT.md, REQUIREMENTS.md, ROADMAP.md, and STATE.md
4
+ mode: agent
5
+ tools:
6
+ - editFiles
7
+ - search
8
+ ---
9
+
10
+ # New Project Initialization
11
+
12
+ Initialize the `.planning/` documentation structure for this project. This generates the source-of-truth documents that power all other Copilot context.
13
+
14
+ ## Step 1: Gather Project Context
15
+
16
+ Before writing anything, ask the user these questions (batch them together):
17
+
18
+ 1. **What is this project?** (2-3 sentence description of what it does and who uses it)
19
+ 2. **What is the core value?** (The one thing that MUST always work)
20
+ 3. **What are the v1 requirements?** (The features needed for initial release — list them, or paste existing ones)
21
+ 4. **What constraints apply?** (Tech stack locked in, timeline, compliance requirements, team size, etc.)
22
+ 5. **Is this greenfield or an existing codebase?** (If existing, I'll run map-codebase after this)
23
+
24
+ If the user can't answer some questions, use reasonable defaults and note them as assumptions.
25
+
26
+ ## Step 2: Create PROJECT.md
27
+
28
+ Write `.planning/PROJECT.md` with:
29
+ - **What This Is:** User's description of the project
30
+ - **Core Value:** Single sentence of what must always work
31
+ - **Requirements > Active:** List of v1 requirements as checkboxes
32
+ - **Requirements > Out of Scope:** Anything explicitly excluded (infer 2-3 common exclusions from the project type)
33
+ - **Context:** Background from the conversation
34
+ - **Constraints:** What the user listed + inferred constraints
35
+
36
+ ## Step 3: Create REQUIREMENTS.md
37
+
38
+ Extract requirements from the conversation into `.planning/REQUIREMENTS.md`:
39
+ - Assign IDs: `[CATEGORY]-[NN]` (e.g., AUTH-01, CORE-01, UI-01)
40
+ - Group by logical category (Authentication, Core Features, UI, etc.)
41
+ - v2 requirements: anything out of scope for now but likely future
42
+ - Traceability table: leave Phase column as TBD until roadmap is created
43
+
44
+ ## Step 4: Create ROADMAP.md
45
+
46
+ Design a logical phase sequence in `.planning/ROADMAP.md`:
47
+ - Each phase delivers a user-visible increment
48
+ - Earlier phases enable later phases (dependency chain)
49
+ - Group related requirements into phases
50
+ - Phase names should be clear and action-oriented (e.g., "Authentication & User Management", "Core Feature MVP")
51
+ - Each phase: goal, dependencies, requirements covered, 2-4 success criteria, planned plan count (TBD is fine)
52
+ - Typically 4-8 phases for a standard project
53
+
54
+ ## Step 5: Create STATE.md
55
+
56
+ Initialize `.planning/STATE.md`:
57
+ - Phase: 1 of [N]
58
+ - Status: Ready to plan
59
+ - Progress: 0%
60
+ - Last activity: today's date + "Project initialized"
61
+ - All metrics at zero
62
+
63
+ ## Step 6: Update copilot-instructions.md
64
+
65
+ Update `.github/copilot-instructions.md`:
66
+ - Fill in "What This Project Is" with the 2-3 sentence description
67
+ - Fill in "Core value"
68
+ - Set "Phase: 1 of [N] — [Phase Name]"
69
+ - Set "Status: Ready to plan"
70
+ - Fill in "Active Constraints" from the constraints list
71
+
72
+ ## Completion
73
+
74
+ Print a summary:
75
+ ```
76
+ ✅ Project initialized: [Project Name]
77
+ .planning/PROJECT.md — requirements + decisions
78
+ .planning/REQUIREMENTS.md — [N] requirements with IDs
79
+ .planning/ROADMAP.md — [N] phases
80
+ .planning/STATE.md — ready to plan
81
+
82
+ Next steps:
83
+ 1. Run /map-codebase (if existing codebase)
84
+ 2. Run /plan-phase 1 to plan the first phase
85
+ ```
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: pause-work
3
+ description: Save current session state so work can be resumed in a new session — writes .planning/continue-here.md
4
+ mode: agent
5
+ tools:
6
+ - editFiles
7
+ - runTerminalCommand
8
+ - search
9
+ ---
10
+
11
+ # Pause Work
12
+
13
+ Save the current session state to `.planning/continue-here.md` so the next session can resume exactly where you left off.
14
+
15
+ ## Step 1: Assess Current State
16
+
17
+ Gather current state information:
18
+
19
+ ```bash
20
+ # Last few commits
21
+ git log --oneline -5
22
+
23
+ # Uncommitted changes
24
+ git status
25
+ git diff --stat HEAD
26
+
27
+ # Test status
28
+ npm test 2>&1 | tail -10
29
+ ```
30
+
31
+ Read `.planning/STATE.md` for project-level context.
32
+
33
+ ## Step 2: Document Current State
34
+
35
+ Think through:
36
+ - What was the last **completed** action? (Be concrete — a test passing, a file created, a PR merged)
37
+ - What work is **in progress** and where exactly did it stop?
38
+ - What **remains** in the current plan? What comes after?
39
+ - What **decisions** were made this session?
40
+ - Are there any **blockers** or watch-outs for the next session?
41
+ - What is the **exact next action** to resume?
42
+
43
+ ## Step 3: Write continue-here.md
44
+
45
+ Write `.planning/continue-here.md`:
46
+
47
+ ```markdown
48
+ # Continue Here
49
+
50
+ ## Where We Are
51
+
52
+ **Phase:** [X] — [Phase Name]
53
+ **Plan:** [A] of [B]
54
+ **As of:** [timestamp]
55
+
56
+ ## What Was Just Completed
57
+
58
+ [Concrete description of the last completed action]
59
+
60
+ - ✅ [Completed item 1 — file created / test passing / feature shipped]
61
+ - ✅ [Completed item 2]
62
+
63
+ ## What Remains
64
+
65
+ In current plan ([NN]-[plan]):
66
+ - [ ] [Next task]
67
+ - [ ] [Task after that]
68
+
69
+ Upcoming plans:
70
+ - [ ] [NN]-[N+1]: [Brief name]
71
+
72
+ ## Decisions Made This Session
73
+
74
+ - [Decision and rationale — lock these in]
75
+ - [Decision and rationale]
76
+
77
+ ## Blockers / Watch-Outs
78
+
79
+ - [Any issue the next session needs to know before touching code]
80
+
81
+ ## Exact Next Action
82
+
83
+ **Resume by doing:** [Single, concrete action — e.g., "Open `src/services/user.service.ts` and implement the `sendWelcomeEmail()` call at line ~45, then run `npm test` to verify"]
84
+
85
+ ---
86
+ *Saved: [timestamp]*
87
+ ```
88
+
89
+ ## Step 4: Update STATE.md
90
+
91
+ Update `.planning/STATE.md`:
92
+ - `Last session:` — today's date/time
93
+ - `Stopped at:` — what was last completed
94
+ - `Resume file:` — `.planning/continue-here.md`
95
+ - `Next action:` — the exact next step
96
+
97
+ ## Completion
98
+
99
+ ```
100
+ ✅ Session saved to .planning/continue-here.md
101
+
102
+ Resume in any new session with: /resume-work
103
+ Or start fresh with: /progress
104
+ ```