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,313 @@
1
+ # Copilot Context Engineering System
2
+
3
+ > A Copilot-native port of the context engineering concepts from [get-shit-done](https://github.com/closedwiki/get-shit-done) — adapted to work inside **VS Code GitHub Copilot** using its native instruction/prompt/agent/skill/hook system.
4
+
5
+ ---
6
+
7
+ ## What This Is
8
+
9
+ A structured context engineering system that keeps GitHub Copilot grounded in your codebase across sessions. It solves the "blank slate" problem — where every new Copilot session starts with no knowledge of your project's architecture, conventions, decisions, or current state.
10
+
11
+ **How it works:**
12
+ 1. **`.planning/`** (project root) holds the source-of-truth documents about your project
13
+ 2. **`.github/copilot-context/`** (this folder) holds the Copilot consumption layer — instructions, prompt commands, agents, and skills that feed context to Copilot at the right time
14
+ 3. **`.vscode/settings.json`** tells Copilot where to find these files
15
+
16
+ ---
17
+
18
+ ## Folder Structure
19
+
20
+ ```
21
+ .github/
22
+ ├── copilot-instructions.md ← Always-on digest (auto-loaded every request)
23
+ └── copilot-context/
24
+ ├── README.md ← This file
25
+ ├── instructions/ ← Conditional instructions (loaded when relevant)
26
+ │ ├── conventions.instructions.md applyTo: source files
27
+ │ ├── testing.instructions.md applyTo: test files
28
+ │ ├── architecture.instructions.md description-based (backend/API work)
29
+ │ ├── structure.instructions.md description-based (adding new files)
30
+ │ ├── stack.instructions.md description-based (dependencies/config)
31
+ │ ├── integrations.instructions.md description-based (external services)
32
+ │ └── concerns.instructions.md description-based (refactoring/debt)
33
+ ├── prompts/ ← Slash commands for structured workflows
34
+ │ ├── map-codebase.prompt.md /map-codebase
35
+ │ ├── new-project.prompt.md /new-project
36
+ │ ├── plan-phase.prompt.md /plan-phase [N]
37
+ │ ├── execute-phase.prompt.md /execute-phase [N]
38
+ │ ├── verify-work.prompt.md /verify-work [N]
39
+ │ ├── progress.prompt.md /progress
40
+ │ ├── pause-work.prompt.md /pause-work
41
+ │ ├── resume-work.prompt.md /resume-work
42
+ │ └── sync-instructions.prompt.md /sync-instructions
43
+ ├── agents/ ← Specialized personas with constrained tools
44
+ │ ├── planner.agent.md Read-only — plans phases
45
+ │ ├── executor.agent.md Full tools — implements plans
46
+ │ └── verifier.agent.md Read + run — verifies requirements
47
+ ├── skills/ ← Progressive-loading reference capabilities
48
+ │ ├── map-codebase/SKILL.md Codebase analysis capability
49
+ │ └── project-history/SKILL.md Historical context access
50
+ └── hooks/ ← Lifecycle automation (Preview feature)
51
+ ├── hooks.json SessionStart hook config
52
+ └── inject-context.js Injects STATE.md at session start
53
+
54
+ .planning/ ← Source of truth (project root)
55
+ ├── PROJECT.md Project description, requirements, decisions
56
+ ├── REQUIREMENTS.md Requirements with IDs and traceability
57
+ ├── ROADMAP.md Phase list with plans and success criteria
58
+ ├── STATE.md Current position and session continuity
59
+ ├── continue-here.md Session resume snapshot (written by /pause-work)
60
+ └── codebase/
61
+ ├── ARCHITECTURE.md Layers, data flow, entry points
62
+ ├── STRUCTURE.md Where to put new code
63
+ ├── STACK.md Runtime, frameworks, env vars
64
+ ├── CONVENTIONS.md Coding style and naming
65
+ ├── TESTING.md Test framework and patterns
66
+ ├── INTEGRATIONS.md External services and SDKs
67
+ └── CONCERNS.md Tech debt and fragile areas
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Quick Start
73
+
74
+ ### For a new project
75
+
76
+ ```
77
+ 1. Copy this repo's .github/ and .planning/ into your project
78
+ 2. Open Copilot Chat and run: /new-project
79
+ 3. Follow the questions → fills in PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md
80
+ 4. Run: /map-codebase
81
+ 5. Copilot analyzes your code → fills all 7 .planning/codebase/ documents
82
+ 6. Run: /sync-instructions
83
+ 7. .github/copilot-instructions.md is updated with your project digest
84
+ ```
85
+
86
+ ### For an existing project with established context
87
+
88
+ ```
89
+ 1. Copy this repo's .github/ and .planning/ into your project
90
+ 2. Fill in .planning/PROJECT.md manually (description, core value, constraints)
91
+ 3. Run: /map-codebase ← generates all codebase analysis docs automatically
92
+ 4. Run: /sync-instructions ← updates the always-on instructions digest
93
+ ```
94
+
95
+ ---
96
+
97
+ ## How Each Layer Works
98
+
99
+ ### Always-On Instructions — `copilot-instructions.md`
100
+
101
+ Automatically loaded on **every** Copilot Chat request. Contains a synthesized ~80-line digest with:
102
+ - Project identity and core value
103
+ - Current phase/status
104
+ - Active constraints
105
+ - Recent key decisions
106
+ - Links to `.planning/` for deep context
107
+
108
+ **Regenerate it with:** `/sync-instructions` (reads `.planning/` and rewrites the file)
109
+
110
+ **Principle:** Keep it short. Every line competes with your conversation for context tokens. Deep context lives in `.planning/` — not here.
111
+
112
+ ---
113
+
114
+ ### Conditional Instructions — `instructions/*.instructions.md`
115
+
116
+ Loaded only when relevant, using two mechanisms:
117
+
118
+ | File | Trigger |
119
+ |------|---------|
120
+ | `conventions.instructions.md` | `applyTo: "**/*.{ts,tsx,js,jsx}"` — auto on source files |
121
+ | `testing.instructions.md` | `applyTo: "**/*.{test,spec}.*"` — auto on test files |
122
+ | `architecture.instructions.md` | `description:` — semantic match when doing backend/API work |
123
+ | `structure.instructions.md` | `description:` — semantic match when creating new files |
124
+ | `stack.instructions.md` | `description:` — semantic match for dependency/config questions |
125
+ | `integrations.instructions.md` | `description:` — semantic match for external service work |
126
+ | `concerns.instructions.md` | `description:` — semantic match when refactoring/near tech debt |
127
+
128
+ Each instruction file is a **thin reference** — it doesn't duplicate the full content, it points to the relevant `.planning/codebase/` document and surfaces the top rules.
129
+
130
+ ---
131
+
132
+ ### Prompt Files — `prompts/*.prompt.md`
133
+
134
+ Invoked manually via `/command-name` in Copilot Chat. Each prompt implements a full structured workflow:
135
+
136
+ | Command | What it does | Mode |
137
+ |---------|-------------|------|
138
+ | `/map-codebase` | Analyzes codebase → generates 7 `.planning/codebase/` docs | agent |
139
+ | `/new-project` | Sets up `.planning/` docs via guided questions | agent |
140
+ | `/plan-phase [N]` | Plans a phase → produces step-by-step plan files | agent |
141
+ | `/execute-phase [N]` | Executes a planned phase with commits | agent |
142
+ | `/verify-work [N]` | Verifies implementation against requirements | agent |
143
+ | `/progress` | Shows phase/requirement completion status | ask |
144
+ | `/pause-work` | Saves session state to `.planning/continue-here.md` | agent |
145
+ | `/resume-work` | Loads saved state and orients the new session | ask |
146
+ | `/sync-instructions` | Regenerates `copilot-instructions.md` from `.planning/` | agent |
147
+
148
+ ---
149
+
150
+ ### Agents — `agents/*.agent.md`
151
+
152
+ Specialized personas that mirror the GSD multi-agent architecture:
153
+
154
+ ```
155
+ User → Planner (read-only tools)
156
+ ↓ handoff: "Start Executing"
157
+ Executor (full tools — edit, terminal, search)
158
+ ↓ handoff: "Verify This Work"
159
+ Verifier (read + run terminal)
160
+ ↓ handoff: "Fix Gaps" → loops back to Executor
161
+ ```
162
+
163
+ Each agent has constrained tools matching its role:
164
+ - **Planner** — `search` only. Can't edit code; designs plans.
165
+ - **Executor** — `editFiles + runTerminalCommand + search`. Implements plans with commits.
166
+ - **Verifier** — `runTerminalCommand + search`. Runs tests and checks requirements.
167
+
168
+ Switch between agents via the agents dropdown in Copilot Chat, or trigger handoffs with the buttons they surface.
169
+
170
+ ---
171
+
172
+ ### Skills — `skills/*/SKILL.md`
173
+
174
+ Progressive-loading reference capabilities. Only `name` + `description` is initially loaded; the full content is fetched when the agent decides they're relevant (or when explicitly mentioned).
175
+
176
+ | Skill | When used |
177
+ |-------|-----------|
178
+ | `map-codebase` | When asked to analyze/refresh codebase context |
179
+ | `project-history` | When asked about past decisions or previous phase work |
180
+
181
+ ---
182
+
183
+ ### Session Hook — `hooks/inject-context.js`
184
+
185
+ > **Status: Preview** — requires VS Code 1.109.3+
186
+
187
+ A `SessionStart` hook that automatically injects your current project state at the beginning of every new Copilot chat session. It reads `.planning/STATE.md` and `.planning/continue-here.md` and injects the key fields (phase, status, next action) as `additionalContext`.
188
+
189
+ **Effect:** Every session starts knowing where you left off — no manual `/resume-work` needed.
190
+
191
+ **Config:** Registered in `hooks/hooks.json`. Must be enabled in VS Code settings:
192
+ ```json
193
+ { "chat.hooks.enabled": true }
194
+ ```
195
+
196
+ **Fallback:** If hooks aren't available, use `/resume-work` manually at the start of each session.
197
+
198
+ ---
199
+
200
+ ## The `.planning/` Source of Truth
201
+
202
+ `.planning/` lives at the **project root** (not inside `.github/`). It is the source of truth that all Copilot context is derived from.
203
+
204
+ ### Core Project Documents
205
+
206
+ | Document | Purpose | Updated by |
207
+ |----------|---------|------------|
208
+ | `PROJECT.md` | What this project is, core value, requirements, constraints, decisions | `/new-project`, `/sync-instructions`, manually |
209
+ | `REQUIREMENTS.md` | All requirements with IDs (AUTH-01, CORE-02), v1/v2 split, traceability | `/new-project`, `/verify-work` |
210
+ | `ROADMAP.md` | Phase list with plans, success criteria, completion status | `/plan-phase`, `/execute-phase` |
211
+ | `STATE.md` | Living memory — current position, metrics, last activity, next action | `/execute-phase`, `/pause-work` |
212
+ | `continue-here.md` | Session snapshot — exact resume point, decisions, blockers | `/pause-work` |
213
+
214
+ ### Codebase Analysis Documents
215
+
216
+ Generated once by `/map-codebase`, then kept up to date:
217
+
218
+ | Document | Fill first time | Keep updated when |
219
+ |----------|----------------|-------------------|
220
+ | `ARCHITECTURE.md` | `/map-codebase` | Major architectural changes |
221
+ | `STRUCTURE.md` | `/map-codebase` | New directory patterns added |
222
+ | `STACK.md` | `/map-codebase` | New major dependencies added |
223
+ | `CONVENTIONS.md` | `/map-codebase` | Style guide changes |
224
+ | `TESTING.md` | `/map-codebase` | Test framework changes |
225
+ | `INTEGRATIONS.md` | `/map-codebase` | New external services integrated |
226
+ | `CONCERNS.md` | `/map-codebase` | New debt found or old debt resolved |
227
+
228
+ ---
229
+
230
+ ## Typical Session Workflow
231
+
232
+ ```
233
+ New session:
234
+ 1. /resume-work ← orient the session (or auto-injected via hook)
235
+
236
+ Planning session:
237
+ 2. /plan-phase 3 ← or switch to Planner agent
238
+
239
+ Execution session:
240
+ 3. /execute-phase 3 ← or switch to Executor agent
241
+
242
+ Verification:
243
+ 4. /verify-work 3 ← or switch to Verifier agent
244
+
245
+ End of session:
246
+ 5. /pause-work ← save state for next session
247
+ 6. /sync-instructions ← update copilot-instructions.md if context shifted
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Adapting to Your Project
253
+
254
+ ### Customizing instruction `applyTo` patterns
255
+
256
+ Edit `instructions/conventions.instructions.md` to match your language extensions:
257
+ ```yaml
258
+ # Python project:
259
+ applyTo: "**/*.py"
260
+
261
+ # Java project:
262
+ applyTo: "**/*.java"
263
+
264
+ # Multi-language:
265
+ applyTo: "**/*.{ts,tsx,js,jsx,py}"
266
+ ```
267
+
268
+ ### Adding new instruction domains
269
+
270
+ Create a new `instructions/[topic].instructions.md`:
271
+ ```yaml
272
+ ---
273
+ name: Database Patterns
274
+ description: ORM patterns, query conventions, and migration rules for database work
275
+ applyTo: "**/*.migration.*"
276
+ ---
277
+ # Instructions here...
278
+ ```
279
+
280
+ ### Extending the workflow
281
+
282
+ Add new prompts to `prompts/` for domain-specific tasks your team repeats:
283
+ - `debug-session.prompt.md` — structured debugging workflow
284
+ - `write-adr.prompt.md` — create Architecture Decision Records
285
+ - `code-review.prompt.md` — systematic code review checklist
286
+
287
+ ---
288
+
289
+ ## Compatibility
290
+
291
+ | Feature | Requires |
292
+ |---------|---------|
293
+ | `copilot-instructions.md` | VS Code + GitHub Copilot (any recent version) |
294
+ | `*.instructions.md` files | VS Code 1.102+ |
295
+ | `*.prompt.md` files | VS Code 1.102+ |
296
+ | `*.agent.md` files | VS Code 1.106+ |
297
+ | Agent handoffs | VS Code 1.106+ |
298
+ | Skills (`SKILL.md`) | VS Code 1.106+ |
299
+ | `SessionStart` hooks | VS Code 1.109.3+ (Preview) |
300
+ | `chat.*FilesLocations` settings | VS Code 1.102+ |
301
+
302
+ ---
303
+
304
+ ## Credits
305
+
306
+ Context engineering architecture inspired by [get-shit-done](https://github.com/closedwiki/get-shit-done) (GSD) — a spec-driven development system for Claude Code and other terminal-based AI agents. This system implements the same principles natively for VS Code GitHub Copilot.
307
+
308
+ **Key concepts borrowed from GSD:**
309
+ - Structured `.planning/` documents as persistent cross-session context
310
+ - Codebase mapper that generates 7 specialized analysis documents
311
+ - Phase-based lifecycle: plan → execute → verify
312
+ - Context-efficient progressive disclosure (thin always-on + conditional loading)
313
+ - Session continuity via `continue-here.md` + `STATE.md`
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: Executor
3
+ description: Implements planned phases — writes code, runs tests, and makes atomic commits following established conventions. Use me to execute a ready plan.
4
+ tools:
5
+ - editFiles
6
+ - runTerminalCommand
7
+ - search
8
+ model: gpt-4.1
9
+ handoffs:
10
+ - label: Verify This Work
11
+ agent: Verifier
12
+ prompt: "Implementation is complete. Please verify the completed phase against the requirements in .planning/REQUIREMENTS.md and the phase success criteria in .planning/ROADMAP.md."
13
+ - label: Pause & Save State
14
+ agent: Pause
15
+ prompt: "Please save the current session state to .planning/continue-here.md so we can resume in a new session."
16
+ ---
17
+
18
+ # Executor Agent
19
+
20
+ I am an implementation specialist. I execute plans precisely, follow established conventions, commit atomically, and verify with tests at every step.
21
+
22
+ ## My Approach
23
+
24
+ 1. **Load context first:** Before writing a single line of code, I read:
25
+ - The plan files in `.planning/phases/[current-phase]/`
26
+ - `.planning/codebase/CONVENTIONS.md` — coding standards
27
+ - `.planning/codebase/STRUCTURE.md` — where to place files
28
+ - `.planning/codebase/CONCERNS.md` — fragile areas to handle carefully
29
+
30
+ 2. **Pre-flight check:** Run `npm test` to confirm baseline before I start
31
+
32
+ 3. **Implement step by step:** Follow the plan's steps in order — no shortcuts, no improvising architecture
33
+
34
+ 4. **Test continuously:** Run tests after each meaningful change; fix failures immediately
35
+
36
+ 5. **Commit per plan:** After each plan is complete, commit with a descriptive message
37
+
38
+ 6. **Update ROADMAP.md:** Mark completed plans with `[x]`
39
+
40
+ 7. **Hand off to Verifier when done**
41
+
42
+ ## My Rules
43
+
44
+ - **Never skip tests** — if a plan says "write tests", tests are written before moving to the next step
45
+ - **Never improvise architecture** — if the plan is unclear, ask before implementing
46
+ - **Follow conventions exactly** — refer to `.planning/codebase/CONVENTIONS.md` on every new file
47
+ - **Atomic commits** — one commit per completed plan, not per file
48
+ - **If I hit a blocker** — document it in `.planning/STATE.md`, save state, and surface it to you
49
+
50
+ ## Trigger Phrases
51
+
52
+ "Execute phase [N]", "Implement the plan", "Build [feature] from the plan", "Continue implementing"
53
+
54
+ ## Reference Documents
55
+
56
+ - [.planning/codebase/CONVENTIONS.md](../../../.planning/codebase/CONVENTIONS.md) — coding standards
57
+ - [.planning/codebase/STRUCTURE.md](../../../.planning/codebase/STRUCTURE.md) — file placement
58
+ - [.planning/codebase/CONCERNS.md](../../../.planning/codebase/CONCERNS.md) — fragile areas
59
+ - [.planning/codebase/TESTING.md](../../../.planning/codebase/TESTING.md) — test patterns
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: Planner
3
+ description: Plans implementation phases — reads requirements and codebase context to produce executable step-by-step plans. Use me before starting new work.
4
+ tools:
5
+ - search
6
+ model: gpt-4.1
7
+ handoffs:
8
+ - label: Start Executing
9
+ agent: Executor
10
+ prompt: "The plan is ready. Please execute the phase plan just created, following the steps in .planning/phases/ and the conventions in .planning/codebase/CONVENTIONS.md."
11
+ ---
12
+
13
+ # Planner Agent
14
+
15
+ I am a planning specialist. My job is to analyze requirements, study the codebase, and produce concrete, executable plans — but **I do not write implementation code**.
16
+
17
+ ## My Constraints
18
+
19
+ - **Read-only tools only** — I search and read, but never write application code
20
+ - I produce plan documents (written to `.planning/phases/`) and stop
21
+ - I hand off to the Executor agent when a plan is ready
22
+
23
+ ## How I Work
24
+
25
+ When you ask me to plan a phase, I will:
26
+
27
+ 1. **Read the context:** Load `.planning/ROADMAP.md`, `.planning/REQUIREMENTS.md`, `.planning/PROJECT.md`, and the relevant codebase docs from `.planning/codebase/`
28
+
29
+ 2. **Explore the code:** Search for existing patterns, find files that will need modification, understand the current architecture
30
+
31
+ 3. **Ask clarifying questions** (if needed): Ambiguous requirements, architectural tradeoffs, or scope boundaries before committing to an approach
32
+
33
+ 4. **Write the plan:** Produce detailed, step-by-step plan files in `.planning/phases/[NN]-[phase-name]/` with exact file paths, function signatures, and success criteria
34
+
35
+ 5. **Update ROADMAP.md:** Add the plan list to the phase
36
+
37
+ 6. **Hand off:** Offer to hand off to the Executor agent to implement
38
+
39
+ ## Trigger Phrases
40
+
41
+ "Plan phase [N]", "Plan the next phase", "What should we build next?", "Create a plan for [feature]"
42
+
43
+ ## What a Good Plan Includes
44
+
45
+ - Exact file paths for files to create and modify
46
+ - Function/method signatures and their contracts
47
+ - Data structures and API schemas
48
+ - Test cases to write (not just "add tests")
49
+ - Success criteria that are verifiable
50
+
51
+ ## Reference Documents
52
+
53
+ Always load relevant docs before planning:
54
+ - [.planning/PROJECT.md](../../../.planning/PROJECT.md) — requirements and constraints
55
+ - [.planning/REQUIREMENTS.md](../../../.planning/REQUIREMENTS.md) — requirement IDs
56
+ - [.planning/ROADMAP.md](../../../.planning/ROADMAP.md) — phase structure
57
+ - [.planning/codebase/ARCHITECTURE.md](../../../.planning/codebase/ARCHITECTURE.md) — layer design
58
+ - [.planning/codebase/STRUCTURE.md](../../../.planning/codebase/STRUCTURE.md) — where files go
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: Verifier
3
+ description: Verifies completed work against requirements — checks tests, inspects implementation, and produces a verification report. Use me after implementing a phase.
4
+ tools:
5
+ - runTerminalCommand
6
+ - search
7
+ model: gpt-4.1
8
+ handoffs:
9
+ - label: Fix Gaps
10
+ agent: Executor
11
+ prompt: "Verification found gaps. Please implement the gap closures identified in the VERIFICATION.md report, then re-run verification."
12
+ ---
13
+
14
+ # Verifier Agent
15
+
16
+ I am a verification specialist. I verify completed work against requirements, run tests, inspect code, and produce verification reports — but **I do not fix code**.
17
+
18
+ ## My Constraints
19
+
20
+ - **Read + run commands only** — I don't write application code; I run tests and inspect
21
+ - I produce verification reports and identify gaps
22
+ - I hand off to the Executor agent when fixes are needed
23
+
24
+ ## How I Work
25
+
26
+ 1. **Load requirements:** Read `.planning/REQUIREMENTS.md` for the phase's requirement IDs, `.planning/ROADMAP.md` for success criteria
27
+
28
+ 2. **Run the test suite:**
29
+ ```bash
30
+ npm test
31
+ npm run test:coverage
32
+ npx tsc --noEmit
33
+ npm run lint
34
+ ```
35
+
36
+ 3. **Check each requirement:** For each requirement ID listed for the phase, verify:
37
+ - Is there test coverage?
38
+ - Does the implementation exist?
39
+ - Does it match the requirement description?
40
+
41
+ 4. **Check success criteria:** Evaluate each criterion from ROADMAP.md — TRUE or FALSE with evidence
42
+
43
+ 5. **Write the report:** `.planning/phases/[NN]-[phase-name]/VERIFICATION.md`
44
+
45
+ 6. **Update REQUIREMENTS.md:** Mark completed requirements as `[x]`
46
+
47
+ 7. **Hand off:**
48
+ - If PASS: inform the user the phase is verified ✅
49
+ - If FAIL: hand off to Executor with a list of gaps to close
50
+
51
+ ## What I Produce
52
+
53
+ A VERIFICATION.md file with:
54
+ - Test results (counts, coverage %, TypeScript errors, lint warnings)
55
+ - Requirements coverage table (each req ID with status and evidence)
56
+ - Success criteria evaluation
57
+ - PASS / FAIL verdict
58
+ - Gap list (if FAIL) with fix descriptions
59
+
60
+ ## Trigger Phrases
61
+
62
+ "Verify phase [N]", "Check my work", "Does this meet the requirements?", "Run verification"
63
+
64
+ ## Reference Documents
65
+
66
+ - [.planning/REQUIREMENTS.md](../../../.planning/REQUIREMENTS.md) — requirements with IDs
67
+ - [.planning/ROADMAP.md](../../../.planning/ROADMAP.md) — success criteria per phase
68
+ - [.planning/codebase/TESTING.md](../../../.planning/codebase/TESTING.md) — how to run tests
@@ -0,0 +1,11 @@
1
+ {
2
+ "_comment": "Copilot Hooks — Preview feature (VS Code 1.109.3+). See: https://code.visualstudio.com/docs/copilot/chat/chat-hooks",
3
+ "_note": "SessionStart hook: Reads .planning/STATE.md and .planning/continue-here.md at session start and injects them as additional context. Every new chat session immediately knows where you left off.",
4
+ "hooks": [
5
+ {
6
+ "event": "SessionStart",
7
+ "command": "node .github/copilot-context/hooks/inject-context.js",
8
+ "description": "Inject project state and session continuity context at session start"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Copilot SessionStart Hook — Context Injector
4
+ *
5
+ * Reads .planning/STATE.md and .planning/continue-here.md, then outputs
6
+ * additionalContext JSON for Copilot to inject at session start.
7
+ *
8
+ * This ensures every new chat session automatically knows where you left off.
9
+ *
10
+ * Protocol: Read JSON from stdin, write JSON to stdout.
11
+ * See: https://code.visualstudio.com/docs/copilot/chat/chat-hooks
12
+ *
13
+ * Usage: Configured in .github/copilot-context/hooks/hooks.json as a SessionStart event hook.
14
+ */
15
+
16
+ const fs = require('fs');
17
+ const path = require('path');
18
+
19
+ // Read hook input from stdin (Copilot passes session info here)
20
+ let stdin = '';
21
+ process.stdin.on('data', (chunk) => { stdin += chunk; });
22
+
23
+ process.stdin.on('end', () => {
24
+ const workspaceRoot = resolveWorkspaceRoot();
25
+ const contextParts = [];
26
+
27
+ // Load STATE.md
28
+ const statePath = path.join(workspaceRoot, '.planning', 'STATE.md');
29
+ if (fs.existsSync(statePath)) {
30
+ const content = fs.readFileSync(statePath, 'utf8');
31
+ // Extract just the essential sections (avoid dumping the whole file)
32
+ const essential = extractEssentialState(content);
33
+ if (essential) {
34
+ contextParts.push(`## Project State\n\n${essential}`);
35
+ }
36
+ }
37
+
38
+ // Load continue-here.md if it exists (session resumption)
39
+ const continuePath = path.join(workspaceRoot, '.planning', 'continue-here.md');
40
+ if (fs.existsSync(continuePath)) {
41
+ const content = fs.readFileSync(continuePath, 'utf8');
42
+ contextParts.push(`## Resume Context\n\n${content}`);
43
+ }
44
+
45
+ if (contextParts.length === 0) {
46
+ // No context to inject — exit cleanly without output
47
+ process.exit(0);
48
+ }
49
+
50
+ // Output additionalContext for Copilot to inject
51
+ const output = {
52
+ additionalContext: contextParts.join('\n\n---\n\n')
53
+ };
54
+
55
+ process.stdout.write(JSON.stringify(output));
56
+ });
57
+
58
+ /**
59
+ * Extract essential sections from STATE.md to avoid injecting the whole file.
60
+ * Gets: core value, current position, last activity, next action.
61
+ */
62
+ function extractEssentialState(content) {
63
+ const lines = content.split('\n');
64
+ const essential = [];
65
+ let inRelevantSection = false;
66
+ let sectionDepth = 0;
67
+
68
+ for (const line of lines) {
69
+ // Always include core value and current position lines
70
+ if (
71
+ line.includes('Core value:') ||
72
+ line.includes('Current focus:') ||
73
+ line.includes('Phase:') ||
74
+ line.includes('Status:') ||
75
+ line.includes('Last activity:') ||
76
+ line.includes('Next action:') ||
77
+ line.includes('Progress:')
78
+ ) {
79
+ essential.push(line);
80
+ }
81
+ }
82
+
83
+ return essential.join('\n').trim();
84
+ }
85
+
86
+ /**
87
+ * Resolve workspace root — walk up from script location until we find .planning/
88
+ */
89
+ function resolveWorkspaceRoot() {
90
+ // Try to get from stdin (Copilot may pass workspace info)
91
+ try {
92
+ const input = JSON.parse(stdin || '{}');
93
+ if (input.workspaceFolder) return input.workspaceFolder;
94
+ } catch {}
95
+
96
+ // Walk up from script directory
97
+ let dir = __dirname;
98
+ for (let i = 0; i < 5; i++) {
99
+ if (fs.existsSync(path.join(dir, '.planning'))) return dir;
100
+ const parent = path.dirname(dir);
101
+ if (parent === dir) break;
102
+ dir = parent;
103
+ }
104
+
105
+ // Fallback to cwd
106
+ return process.cwd();
107
+ }
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: System Architecture
3
+ description: System architecture, layer organization, data flow, and component boundaries for backend, API, and refactoring work
4
+ ---
5
+
6
+ # System Architecture
7
+
8
+ > Full architecture reference: [.planning/codebase/ARCHITECTURE.md](../../../.planning/codebase/ARCHITECTURE.md)
9
+ >
10
+ > Read this document when: designing new features, deciding where logic belongs, refactoring, or resolving layer violations.
11
+
12
+ ## Core Principle
13
+
14
+ Code belongs in the correct layer. Moving logic between layers is a refactoring task, not a shortcut.
15
+
16
+ ## Layer Summary
17
+
18
+ Read `.planning/codebase/ARCHITECTURE.md` for the full diagram and data flow examples. Key rules:
19
+
20
+ - **Routes/Controllers:** parse input, validate, delegate to service — no business logic here
21
+ - **Services:** all business logic lives here — no direct DB calls, no HTTP knowledge
22
+ - **Repositories:** all database access here — raw queries or ORM calls only, no business logic
23
+ - **Middleware:** cross-cutting concerns (auth, logging, error handling) — applied at application level
24
+ - **Models:** data shapes and ORM definitions — no behavior
25
+
26
+ ## Decision Guide
27
+
28
+ | Question | Answer in |
29
+ |----------|-----------|
30
+ | Where does this request flow? | `.planning/codebase/ARCHITECTURE.md` → Data Flow |
31
+ | What layer handles this logic? | `.planning/codebase/ARCHITECTURE.md` → Layers |
32
+ | What are the entry points? | `.planning/codebase/ARCHITECTURE.md` → Entry Points |
33
+ | How are errors propagated? | `.planning/codebase/ARCHITECTURE.md` → Cross-Cutting Concerns |
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Technical Concerns
3
+ description: Technical debt, known bugs, fragile code areas, security considerations, and areas to approach with caution
4
+ ---
5
+
6
+ # Technical Concerns
7
+
8
+ > Full concerns reference: [.planning/codebase/CONCERNS.md](../../../.planning/codebase/CONCERNS.md)
9
+ >
10
+ > Read this document when: refactoring, touching legacy code, working near known fragile areas, or doing security-sensitive work.
11
+
12
+ ## Core Rule
13
+
14
+ **Before modifying code in a warning area, check `.planning/codebase/CONCERNS.md`.** Modifying fragile code without understanding why it's fragile frequently introduces regressions.
15
+
16
+ ## Quick Guide
17
+
18
+ Read `.planning/codebase/CONCERNS.md` for:
19
+ - **Critical issues:** Active bugs or broken functionality — don't make them worse
20
+ - **High-priority debt:** Significant friction or risk areas worth knowing about
21
+ - **Fragile areas table:** Specific files that are risky to modify and HOW to proceed safely
22
+ - **Security notes:** Known vulnerabilities, applied mitigations, what not to bypass
23
+ - **Performance bottlenecks:** Known slow paths and their workarounds
24
+
25
+ ## Rules
26
+
27
+ - After fixing a known issue, **remove it from CONCERNS.md** or mark it resolved
28
+ - After discovering a new issue, **add it to CONCERNS.md** — don't leave land mines undocumented
29
+ - When a fix is deferred, add a `// TODO(issue-ref):` comment at the affected location
30
+ - **Never introduce new `any` types, disable linting rules, or skip test coverage** without documenting the reason in CONCERNS.md