@eltonssouza/development-utility-kit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/.claude/agents/analyst.md +198 -0
  2. package/.claude/agents/backend-developer.md +126 -0
  3. package/.claude/agents/brain-keeper.md +229 -0
  4. package/.claude/agents/code-reviewer.md +181 -0
  5. package/.claude/agents/database-engineer.md +94 -0
  6. package/.claude/agents/devops-engineer.md +141 -0
  7. package/.claude/agents/frontend-developer.md +97 -0
  8. package/.claude/agents/gate-keeper.md +118 -0
  9. package/.claude/agents/migrator.md +291 -0
  10. package/.claude/agents/mobile-developer.md +80 -0
  11. package/.claude/agents/n8n-specialist.md +94 -0
  12. package/.claude/agents/product-owner.md +115 -0
  13. package/.claude/agents/qa-engineer.md +232 -0
  14. package/.claude/agents/release-engineer.md +204 -0
  15. package/.claude/agents/scaffold.md +87 -0
  16. package/.claude/agents/security-engineer.md +199 -0
  17. package/.claude/agents/sprint-runner.md +44 -0
  18. package/.claude/agents/stack-resolver.md +84 -0
  19. package/.claude/agents/tech-lead.md +182 -0
  20. package/.claude/agents/update-template.md +54 -0
  21. package/.claude/agents/ux-designer.md +118 -0
  22. package/.claude/settings.json +44 -0
  23. package/.claude/skills/README.md +332 -0
  24. package/.claude/skills/active-project/SKILL.md +129 -0
  25. package/.claude/skills/api-integration-test/SKILL.md +64 -0
  26. package/.claude/skills/auto-test-guard/SKILL.md +237 -0
  27. package/.claude/skills/auto-test-guard/resources/backend-tests.md +20 -0
  28. package/.claude/skills/auto-test-guard/resources/e2e-tests.md +24 -0
  29. package/.claude/skills/auto-test-guard/resources/execution-report.md +49 -0
  30. package/.claude/skills/auto-test-guard/resources/frontend-tests.md +18 -0
  31. package/.claude/skills/auto-test-guard/resources/initial-setup.md +108 -0
  32. package/.claude/skills/auto-test-guard/resources/run-suite.md +48 -0
  33. package/.claude/skills/auto-test-guard/resources/senior-gate.md +19 -0
  34. package/.claude/skills/brain-keeper/SKILL.md +60 -0
  35. package/.claude/skills/brain-keeper/obsidian/app.json +9 -0
  36. package/.claude/skills/brain-keeper/obsidian/appearance.json +4 -0
  37. package/.claude/skills/brain-keeper/obsidian/core-plugins.json +20 -0
  38. package/.claude/skills/brain-keeper/obsidian/daily-notes.json +5 -0
  39. package/.claude/skills/brain-keeper/obsidian/graph.json +32 -0
  40. package/.claude/skills/brain-keeper/obsidian/snippets/folder-colors.css +90 -0
  41. package/.claude/skills/brain-keeper/obsidian/templates.json +5 -0
  42. package/.claude/skills/brain-keeper/templates/README.md +51 -0
  43. package/.claude/skills/brain-keeper/templates/adr.md +40 -0
  44. package/.claude/skills/brain-keeper/templates/bug.md +35 -0
  45. package/.claude/skills/brain-keeper/templates/daily.md +38 -0
  46. package/.claude/skills/brain-keeper/templates/feature.md +62 -0
  47. package/.claude/skills/brain-keeper/templates/meeting.md +34 -0
  48. package/.claude/skills/brain-keeper/templates/tech-debt.md +21 -0
  49. package/.claude/skills/caveman/SKILL.md +187 -0
  50. package/.claude/skills/create-stack-pack/SKILL.md +281 -0
  51. package/.claude/skills/grill-me/SKILL.md +79 -0
  52. package/.claude/skills/honcho-memory/SKILL.md +207 -0
  53. package/.claude/skills/honcho-memory/docs/api-endpoints-verified.md +75 -0
  54. package/.claude/skills/honcho-memory/hooks/on-prompt-submit.js +221 -0
  55. package/.claude/skills/honcho-memory/hooks/on-stop.js +193 -0
  56. package/.claude/skills/honcho-memory/lib/honcho-client.js +363 -0
  57. package/.claude/skills/honcho-memory/lib/memory-injector.js +93 -0
  58. package/.claude/skills/honcho-memory/package.json +32 -0
  59. package/.claude/skills/honcho-memory/scripts/cli.js +370 -0
  60. package/.claude/skills/honcho-memory/scripts/setup.js +109 -0
  61. package/.claude/skills/honcho-memory/tests/t001-api-endpoints-verified.test.js +89 -0
  62. package/.claude/skills/honcho-memory/tests/t002-structure.test.js +97 -0
  63. package/.claude/skills/honcho-memory/tests/t003-honcho-client.test.js +162 -0
  64. package/.claude/skills/honcho-memory/tests/t004-soft-delete.test.js +259 -0
  65. package/.claude/skills/honcho-memory/tests/t005-memory-injector.test.js +175 -0
  66. package/.claude/skills/honcho-memory/tests/t006-on-prompt-submit.test.js +215 -0
  67. package/.claude/skills/honcho-memory/tests/t007-on-stop.test.js +165 -0
  68. package/.claude/skills/honcho-memory/tests/t008-cli.test.js +214 -0
  69. package/.claude/skills/honcho-memory/tests/t009-setup.test.js +232 -0
  70. package/.claude/skills/honcho-memory/tests/t010-skill-md.test.js +114 -0
  71. package/.claude/skills/honcho-memory/tests/t011-settings-hooks.test.js +105 -0
  72. package/.claude/skills/honcho-memory/tests/t012-docs-update.test.js +106 -0
  73. package/.claude/skills/honcho-memory/tests/t013-smoke-e2e.test.js +90 -0
  74. package/.claude/skills/pair-debug/SKILL.md +288 -0
  75. package/.claude/skills/prd-ready-check/SKILL.md +58 -0
  76. package/.claude/skills/project-manager/SKILL.md +167 -0
  77. package/.claude/skills/quality-standards/SKILL.md +201 -0
  78. package/.claude/skills/quick-feature/SKILL.md +264 -0
  79. package/.claude/skills/run-sprint/SKILL.md +342 -0
  80. package/.claude/skills/scaffold/SKILL.md +58 -0
  81. package/.claude/skills/stack-discovery/SKILL.md +159 -0
  82. package/.claude/skills/test-coverage-auditor/SKILL.md +59 -0
  83. package/.claude/skills/to-issues/SKILL.md +163 -0
  84. package/.claude/skills/to-prd/SKILL.md +130 -0
  85. package/.claude/skills/update-template/SKILL.md +254 -0
  86. package/.claude/stacks/CODEOWNERS +30 -0
  87. package/.claude/stacks/README.md +88 -0
  88. package/.claude/stacks/_template.md +116 -0
  89. package/.claude/stacks/java/spring-boot-3.md +376 -0
  90. package/.claude/stacks/java/spring-boot-4.md +438 -0
  91. package/.claude/stacks/typescript/angular-18.md +420 -0
  92. package/.claude/stacks/typescript/angular-19.md +397 -0
  93. package/.claude/stacks/typescript/angular-21.md +494 -0
  94. package/CLAUDE.md +453 -0
  95. package/README.md +391 -0
  96. package/bin/cli.js +773 -0
  97. package/bin/lib/backup.js +62 -0
  98. package/bin/lib/detect-stack.js +476 -0
  99. package/bin/lib/help.js +233 -0
  100. package/bin/lib/identity.js +108 -0
  101. package/bin/lib/local-dir.js +69 -0
  102. package/bin/lib/manifest.js +236 -0
  103. package/bin/lib/sync-all.js +394 -0
  104. package/bin/lib/version-check.js +398 -0
  105. package/dashboard/db.js +199 -0
  106. package/dashboard/package.json +22 -0
  107. package/dashboard/public/app.js +709 -0
  108. package/dashboard/public/content/docs/agents-reference.en.md +911 -0
  109. package/dashboard/public/content/docs/architecture-overview.en.md +260 -0
  110. package/dashboard/public/content/docs/autonomy-matrix.en.md +186 -0
  111. package/dashboard/public/content/docs/git-flow.en.md +525 -0
  112. package/dashboard/public/content/docs/honcho-memory.en.md +394 -0
  113. package/dashboard/public/content/docs/hooks-reference.en.md +420 -0
  114. package/dashboard/public/content/docs/pipeline.en.md +400 -0
  115. package/dashboard/public/content/docs/quality-gate.en.md +315 -0
  116. package/dashboard/public/content/docs/skills-reference.en.md +500 -0
  117. package/dashboard/public/content/docs/stack-rules.en.md +362 -0
  118. package/dashboard/public/content/docs/troubleshooting.en.md +637 -0
  119. package/dashboard/public/content/manifest.json +102 -0
  120. package/dashboard/public/content/manual/backend.en.md +1138 -0
  121. package/dashboard/public/content/manual/existing-project.en.md +831 -0
  122. package/dashboard/public/content/manual/frontend.en.md +1065 -0
  123. package/dashboard/public/content/manual/fullstack.en.md +1508 -0
  124. package/dashboard/public/content/manual/mobile.en.md +866 -0
  125. package/dashboard/public/index.html +108 -0
  126. package/dashboard/public/style.css +610 -0
  127. package/dashboard/public/vendor/marked.min.js +69 -0
  128. package/dashboard/rtk.js +143 -0
  129. package/dashboard/server-app.js +403 -0
  130. package/dashboard/server.js +104 -0
  131. package/dashboard/test/sprint1.test.js +406 -0
  132. package/dashboard/test/sprint2.test.js +571 -0
  133. package/dashboard/test/sprint3.test.js +560 -0
  134. package/package.json +33 -0
  135. package/scripts/hooks/subagent-telemetry.sh +14 -0
  136. package/scripts/hooks/telemetry-writer.js +250 -0
  137. package/scripts/latest-versions.json +56 -0
@@ -0,0 +1,342 @@
1
+ ---
2
+ name: run-sprint
3
+ description: Use when an approved development plan exists (in docs/plans/PLAN_*.md) and the user asks to execute a specific sprint. Triggers on phrases like "run sprint 1", "execute sprint 2 of plan X", "implement the current sprint tasks", "let's code this sprint", "take PLAN_product_registration and run sprint 1". This skill does NOT create a plan — it CONSUMES a plan. To create a plan use analyst. This skill does NOT validate for PRD — it implements. For the final gate use prd-ready-check. Do NOT use to create a development plan (use analyst) nor to validate PRD-readiness (use prd-ready-check). PT triggers: 'roda a sprint 1', 'executa a sprint', 'implementa as tarefas da sprint', 'bora codar essa sprint'.
4
+ ---
5
+
6
+ # Run Sprint — Sprint Execution from a Plan
7
+
8
+ You are the sprint executor. Always respond in American English.
9
+
10
+ Your mission: read a plan in `docs/plans/PLAN_<NAME>.md`, locate the indicated sprint, implement each task ~ dependencies, validate, and report.
11
+
12
+ ---
13
+
14
+ ## 0. Input
15
+
16
+ - **Plan**: path to `docs/plans/PLAN_<NAME>.md` (mandatory).
17
+ - **Sprint**: sprint number or name (mandatory). Ex.: "Sprint 1", "2", "backend-base".
18
+
19
+ If anything is missing, ask before starting.
20
+
21
+ ---
22
+
23
+ ## Step 0 — Stack pre-resolution (NON-NEGOTIABLE, per ADR-026 Layer 1)
24
+
25
+ **Runs BEFORE every other phase in this skill.** Determines which stack pack must be injected into the prompt of every downstream agent spawned by this orchestrator. Without this step, downstream agents (`backend-developer`, `frontend-developer`, `qa-engineer`, `gate-keeper`, `database-engineer`) fall back to baked-in defaults that may not match the project's actual stack (e.g. Spring Boot 3.2 vs 4, Angular 18 vs 21).
26
+
27
+ ### 0.a — Invoke `stack-resolver`
28
+
29
+ ```
30
+ Task(
31
+ subagent_type="stack-resolver",
32
+ description="resolve stack for project",
33
+ prompt="Resolve the stack for the project at the current working directory. Read CLAUDE.md > Project Identity, identify primary stack (lang + framework + major version), check whether the matching pack exists under .claude/stacks/<lang>/<framework>-<major>.md, and emit the canonical STACK CONTEXT block as your output."
34
+ )
35
+ ```
36
+
37
+ ### 0.b — Parse the resolver output
38
+
39
+ The resolver's first line is the marker:
40
+
41
+ - `[STACK: <lang>/<framework>-<major> | PACK: loaded]` — extract the full **STACK CONTEXT** block from the body and keep it in memory for Step 4 onward. Proceed to Phase 1.
42
+ - `[STACK: <lang>/<framework>-<major> | PACK: none]` — the project's declared stack has no pack yet. **Stop the sprint orchestration** and dispatch the `create-stack-pack` skill:
43
+ ```
44
+ Skill(name="create-stack-pack")
45
+ ```
46
+ Once the pack has been generated and committed, **repeat Step 0.a**. Do NOT proceed without a loaded pack — running downstream agents with stale defaults is a silent quality regression.
47
+ - `[STACK: unknown | ...]` or no marker — the resolver could not parse `Project Identity`. Report this back to the user and ask them to populate `## Project Identity` in `CLAUDE.md` (project name, type, primary stack, database). Do not proceed.
48
+
49
+ ### 0.c — Capture the STACK CONTEXT for downstream injection
50
+
51
+ Store the entire STACK CONTEXT block returned by the resolver (versions, structure conventions, build commands, anti-patterns, testing tooling). It will be **prepended to every downstream Task prompt** spawned by this skill (see §0.1 below).
52
+
53
+ > Stage 0 runs before any of the example flows in this document — the examples in Phases 1–6 assume `<STACK CONTEXT>` has already been captured.
54
+
55
+ ---
56
+
57
+ ## 0.1 Mandatory delegation via Task tool (NON-NEGOTIABLE)
58
+
59
+ This skill is an **orchestrator**, not an implementer. Every task in the sprint MUST be executed by spawning the matching specialist agent through the `Task` tool. Inline implementation in the orchestrator session is forbidden — wastes Opus tokens, defeats the model-per-agent matrix in CLAUDE.md.
60
+
61
+ ### Task type -> agent mapping
62
+
63
+ | Task type | Agent (`subagent_type`) | Model |
64
+ |---|---|---|
65
+ | Backend (controller, service, DTO, persistence, migration) | `backend-developer` | sonnet |
66
+ | Frontend (component, service, route, form) | `frontend-developer` | sonnet |
67
+ | Frontend vanilla / React Native | `frontend-developer` / `mobile-developer` | sonnet |
68
+ | DB schema / index / query optimization | `database-engineer` | sonnet |
69
+ | Test generation + regression + senior+ gate | `gate-keeper` | sonnet |
70
+ | Brain record at end of sprint | `brain-keeper` | sonnet |
71
+
72
+ ### Required call form — STACK CONTEXT injection mandatory
73
+
74
+ Every Task dispatch from this skill MUST prepend the STACK CONTEXT block captured in Step 0.c to the prompt. Template:
75
+
76
+ ```
77
+ Task(
78
+ subagent_type="backend-developer",
79
+ description="<3-5 words>",
80
+ prompt="""
81
+ <STACK CONTEXT block from Step 0.c — full content, verbatim>
82
+
83
+ ---
84
+
85
+ Task <N> of sprint <S>: <task description from plan>
86
+ Acceptance criteria: <list>
87
+ Files touched: <list or 'detect via git'>
88
+ Run the stack's build + relevant test before returning (commands from STACK CONTEXT).
89
+ Return: list of files created/modified + test commands run.
90
+ Your first output line MUST be: [STACK: <lang>/<framework>-<major> | PACK: loaded]
91
+ """
92
+ )
93
+ ```
94
+
95
+ The same template applies to `frontend-developer`, `qa-engineer`, `database-engineer`, `gate-keeper`, and `brain-keeper` dispatches. The STACK CONTEXT is the contract that prevents version drift (per ADR-026 Layer 1).
96
+
97
+ ### Inviolable
98
+
99
+ - Orchestrator (this skill) only: read plan, route, render checkpoints, aggregate reports.
100
+ - Code, migrations, tests = always inside spawned agents.
101
+ - Direct `Bash(...)` in orchestrator only for fast verification of agent output (e.g., the stack's `compile`/`build` command after an agent claims completion).
102
+ - Every spawned agent receives STACK CONTEXT as the first block of its prompt. No exceptions.
103
+
104
+ ---
105
+
106
+ ## 1. Phase 1 — Plan analysis
107
+
108
+ 1. Read the full plan.
109
+ 2. Locate the indicated sprint.
110
+ 3. Extract:
111
+ - Ordered task list
112
+ - Dependencies (task X depends on task Y)
113
+ - Acceptance criteria per task
114
+ - Suggested agent/specialist per task
115
+ - User stories covered by the sprint
116
+ 5. **CHECKPOINT**: present to the user:
117
+ - Sprint summary (N tasks, X user stories)
118
+ - Proposed execution order
119
+ - Dependencies between tasks
120
+ - Known risks
121
+ - Ask: "Proceed?"
122
+
123
+ Only continue with OK.
124
+
125
+ ---
126
+
127
+ ## 2. Phase 2 — Code reconnaissance
128
+
129
+ Before writing a line, understand the current code. Use the structure conventions from the STACK CONTEXT (Step 0.c) to know where to look:
130
+
131
+ 1. Backend package/module structure (per STACK CONTEXT pack)
132
+ 2. Frontend module structure (per STACK CONTEXT pack)
133
+ 3. Existing migrations (location per STACK CONTEXT pack)
134
+ 4. Routes (location per STACK CONTEXT pack)
135
+ 5. Existing tests: patterns, conventions, helpers
136
+
137
+ Identify:
138
+ - Impacts (which files will be touched).
139
+ - Technical dependencies (libraries already installed or that need to be added).
140
+ - Potential conflicts (does any module already do something similar?).
141
+
142
+ ---
143
+
144
+ ## 3. Phase 3 — Detailed planning
145
+
146
+ Build the **real execution order**, respecting dependencies. Example shape (concrete paths come from the STACK CONTEXT pack):
147
+
148
+ ```
149
+ Sprint 1 — Execution order:
150
+ 1. [backend] Migration V001__create_products_table
151
+ 2. [backend] Product entity + Repository
152
+ 3. [backend] DTOs + Mapper + RegisterProduct use case
153
+ 4. [backend] Controller + error advice
154
+ 5. [backend] Unit + integration tests
155
+ 6. [frontend] Model + HTTP service
156
+ 7. [frontend] List component + lazy route
157
+ 8. [frontend] Reactive form component
158
+ 9. [frontend] Frontend tests
159
+ ```
160
+
161
+ **CHECKPOINT**: show the order. "Proceed with implementation?"
162
+
163
+ Only continue with OK.
164
+
165
+ ---
166
+
167
+ ## 4. Phase 4 — Implementation (task by task)
168
+
169
+ For EACH task, in order:
170
+
171
+ 1. **Announce**: "Starting task X of N: <description>".
172
+ 2. **TDD step — spawn `qa-engineer` FIRST** (NEVER skip — NON-NEGOTIABLE). The prompt MUST be prefixed with the STACK CONTEXT captured in Step 0.c:
173
+ ```
174
+ Task(
175
+ subagent_type="qa-engineer",
176
+ description="write failing tests for task <N>",
177
+ prompt="""
178
+ <STACK CONTEXT block from Step 0.c — full content, verbatim>
179
+
180
+ ---
181
+
182
+ Write failing tests for task <N> of sprint <S>: <task description>
183
+ Acceptance criteria: <list from plan>
184
+ Tests must be RED (failing) before implementation starts.
185
+ Use the testing tooling declared in the STACK CONTEXT (test runner, assertion libs, integration test infra).
186
+ Return: list of test files created + confirmation tests are failing.
187
+ Your first output line MUST be: [STACK: <lang>/<framework>-<major> | PACK: loaded]
188
+ """
189
+ )
190
+ ```
191
+ Wait for `qa-engineer` to confirm tests are written and failing before proceeding to step 3.
192
+ 3. **Implementation step — spawn developer** via `Task` tool (NEVER inline), with STACK CONTEXT prepended:
193
+ - Backend task -> `Task(subagent_type="backend-developer", prompt="""<STACK CONTEXT>\n\n---\n\n<task body>""")`
194
+ - Frontend task -> `Task(subagent_type="frontend-developer", prompt="""<STACK CONTEXT>\n\n---\n\n<task body>""")`
195
+ - Migration/data model -> `Task(subagent_type="database-engineer", ...)` then `Task(subagent_type="backend-developer", ...)` for the entity wiring (both prompts carry STACK CONTEXT)
196
+ - Each spawn returns a structured report (files created/modified, commands run). Aggregate.
197
+ - **Post-hoc validation (ADR-026 Layer 3)**: confirm the first line of the agent's output matches `[STACK: <expected> | PACK: loaded]`. If absent, re-invoke once with an enforcing reminder.
198
+ 4. **Do not advance** to the next task until the current one is:
199
+ - Code complete (no TODO)
200
+ - Compiling (run the stack's compile/build command from STACK CONTEXT)
201
+ - Tests passing for that task (the failing tests from step 2 must now be GREEN)
202
+ 5. **Parallelize backend and frontend** ONLY when:
203
+ - The API contract (endpoint + DTOs) is defined and agreed upon
204
+ - There is no direct dependency between the touched files
205
+ - Both `qa-engineer` spawns (for backend and frontend respectively) complete before their paired developer agents start
206
+
207
+ ### 4.1 Golden rule: do not "implement and pray"
208
+
209
+ After each task, **mandatorily spawn** `gate-keeper` with STACK CONTEXT prepended:
210
+
211
+ ```
212
+ Task(
213
+ subagent_type="gate-keeper",
214
+ description="validate task <N>",
215
+ prompt="""
216
+ <STACK CONTEXT block from Step 0.c — full content, verbatim>
217
+
218
+ ---
219
+
220
+ Validate task <N> of sprint <S> at senior+ gate.
221
+ Generate any additional automated tests for the new code, run the full regression suite using the STACK CONTEXT's commands, and report GREEN/RED.
222
+ Your first output line MUST be: [STACK: <lang>/<framework>-<major> | PACK: loaded]
223
+ """
224
+ )
225
+ ```
226
+
227
+ 1. It **generates** any additional automated tests for the new code (unit + integration + E2E as appropriate) beyond those written by `qa-engineer`.
228
+ 2. It **runs the FULL regression suite** of the project using the test commands declared in the STACK CONTEXT pack.
229
+ 3. **RED return** = task not done. Go back, fix, run the suite again. Never accumulate failures.
230
+ 4. **GREEN return** = you can mark the task as done and move to the next.
231
+
232
+ Manual shortcuts (exploratory only, **do not replace** auto-test-guard) — use the per-test commands from the STACK CONTEXT pack.
233
+
234
+ ---
235
+
236
+ ## 5. Phase 5 — Sprint validation
237
+
238
+ When all sprint tasks are done:
239
+
240
+ 1. **Spawn `gate-keeper`** (with STACK CONTEXT prepended) one last time in the scope of the entire sprint. It:
241
+ - Confirms that the full regression suite is **green** (using the stack's full suite commands from STACK CONTEXT).
242
+ - Generates any missing tests discovered when stitching the tasks together.
243
+ - If it returns RED — **the sprint is not done**. Go back to phase 4.
244
+ 2. **Run lint** (complementary): the lint commands declared in the STACK CONTEXT pack.
245
+ 3. **Verify the sprint's acceptance criteria** (listed in the plan) one by one.
246
+ 4. **Validate user stories** covered by the sprint. Each US must have a corresponding green test.
247
+ 5. If everything is OK, proceed to the report. If something failed, **do not report success** — go back to phase 4 and fix.
248
+
249
+ ---
250
+
251
+ ## 5.1 Phase 5.1 — Brain record (brain-keeper)
252
+
253
+ After `auto-test-guard` GREEN on the sprint:
254
+
255
+ 1. **Spawn** `brain-keeper` with STACK CONTEXT prepended:
256
+ ```
257
+ Task(
258
+ subagent_type="brain-keeper",
259
+ description="record sprint <N>",
260
+ prompt="""
261
+ <STACK CONTEXT block from Step 0.c — full content, verbatim>
262
+
263
+ ---
264
+
265
+ Record outcome of sprint <N> of <PLAN_path>: tasks done, files, ADRs, debt.
266
+ Your first output line MUST be: [STACK: <lang>/<framework>-<major> | PACK: loaded]
267
+ """
268
+ )
269
+ ```
270
+ 2. Provisions `docs/brain/` on the first run with `.obsidian/` + per-folder color snippet.
271
+ 3. Records:
272
+ - `daily/YYYY-MM-DD.md` — daily log (append in `## Update HH:MM` if it already exists).
273
+ - `features/<plan-slug>.md` — updates sprint progress (status: `in-progress` if not the last sprint, `completed` if it is).
274
+ - `decisions/ADR-NNN-*.md` — if there was a new architectural decision.
275
+ - `bugs/<slug>.md` — if there was a relevant fix.
276
+ - `architecture/tech-debt.md` — append the accepted debt.
277
+ 4. Idempotent — running it twice does not duplicate.
278
+
279
+ The sprint **only closes** after brain-keeper returns an OK report.
280
+
281
+ ---
282
+
283
+ ## 6. Phase 6 — Sprint report
284
+
285
+ Print:
286
+
287
+ ```
288
+ ## Sprint <N> — <name> — Completed
289
+
290
+ ### Stack
291
+ - <lang>/<framework>-<major> (pack: loaded)
292
+
293
+ ### Tasks
294
+ - [x] 1. <description> -> files: <list>
295
+ - [x] 2. ...
296
+
297
+ ### Files
298
+ - Created (N):
299
+ - <paths>
300
+ - Modified (M):
301
+ - <paths>
302
+ - Deleted (K):
303
+ - (none | list)
304
+
305
+ ### Tests
306
+ - Backend: N tests (X unit, Y integration) — ALL passing
307
+ - Frontend: M tests — ALL passing
308
+ - Domain coverage: Z%
309
+
310
+ ### User Stories covered
311
+ - [x] US-01
312
+ - [x] US-02
313
+ - [ ] US-03 (deferred to sprint N+1)
314
+
315
+ ### Technical decisions made
316
+ - ...
317
+ - If a new decision was made: ADR-NNN created at
318
+
319
+ ### Accepted technical debt
320
+ - ...
321
+
322
+ ### Next steps
323
+ - Sprint N+1 of plan PLAN_<NAME>.md
324
+ ```
325
+
326
+ ---
327
+
328
+ ## 8. Inviolable rules
329
+
330
+ 1. **Stage 0 (Stack pre-resolution) is non-skippable.** No Task dispatch happens before STACK CONTEXT is captured. Pack missing -> `create-stack-pack` first.
331
+ 2. **Every downstream Task dispatch carries STACK CONTEXT as the first block of its prompt.** No exceptions.
332
+ 3. **Do not skip phases.** Checkpoints in phases 1 and 3 are mandatory.
333
+ 4. **One task at a time**, respecting dependencies.
334
+ 5. **Complete code, no TODO**, with tests that validate the behavior.
335
+ 6. **Follow CLAUDE.md** and the project conventions.
336
+ 7. **NEVER delete, disable (`@Disabled`/`.skip()`/`xit`/`it.skip`), comment out, or move out of scope a test to make a gate pass — NON-NEGOTIABLE.** A red test means: (a) fix the production code, OR (b) fix the test if it is genuinely wrong (requires an ADR justifying why), OR (c) report it as a real failure and stop. Deleting a failing test is a silent bypass of the senior+ gate — the exact opposite of this skill's purpose. The hook `block-test-deletion.sh` enforces this at the filesystem level, but the rule stands even where the hook cannot reach (e.g. an Edit adding `@Disabled`).
337
+ 8. **If a test breaks, fix it** — never comment it out or delete it (see rule 7).
338
+ 9. **If the sprint has ambiguity** that the plan did not resolve, ask the user BEFORE implementing.
339
+ 10. **Every completed task goes through `auto-test-guard`** (generates tests + runs the full suite). There is no "task done" without its GREEN return.
340
+ 11. **Sprint only closes after `brain-keeper`** records daily + feature + ADRs in `docs/brain/`. Project history is part of the deliverable.
341
+ 12. **`qa-engineer` precedes every developer agent** — spawn `qa-engineer` to write failing tests BEFORE spawning `backend-developer` or `frontend-developer`. No implementation without pre-existing failing tests. This rule applies universally to all plans, including those created before this rule was introduced.
342
+
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: scaffold
3
+ description: "Unified entry point for new project scaffolding. Triggers when user wants to create a new project skeleton — backend, frontend, or fullstack. Keyword triggers: 'scaffold the project', 'scaffold backend', 'scaffold frontend', 'scaffold backend and frontend', 'create fullstack skeleton', 'bootstrap fullstack', 'bootstrap backend', 'bootstrap frontend', 'monta o esqueleto', 'scaffolda o projeto', 'monta a estrutura', 'cria o esqueleto', 'inicializa o backend', 'inicializa o frontend', 'cria novo projeto', 'criar esqueleto do projeto', 'criar estrutura do projeto'. Reads `type:` from `## Project Identity` section in CLAUDE.md. DO NOT use for feature implementation after scaffold — use backend-developer / frontend-developer."
4
+ ---
5
+
6
+ # Scaffold — Unified Project Scaffolding Entry Point
7
+
8
+ This skill is the single entry point for all project scaffold operations.
9
+ It reads the project type from CLAUDE.md and dispatches to the `scaffold` agent.
10
+
11
+ ## When to trigger
12
+
13
+ Use this skill at the **very first conversation** of a new project, before any Java or Angular code exists. Scenarios:
14
+
15
+ - "scaffold the project" / "scaffolda o projeto"
16
+ - "monta a estrutura" / "monta o esqueleto"
17
+ - "create fullstack skeleton" / "cria o esqueleto" / "bootstrap fullstack"
18
+ - "scaffold the backend" / "bootstrap backend" / "inicializa o backend"
19
+ - "scaffold the frontend" / "bootstrap frontend" / "inicializa o frontend"
20
+ - "create new project" / "cria novo projeto"
21
+ - Any variant: "criar esqueleto do projeto", "criar estrutura do projeto", "monta o monorepo"
22
+
23
+ ## Prerequisites
24
+
25
+ 1. The project's `CLAUDE.md` must exist at the project root.
26
+ 2. The `## Project Identity` section must have `- **Project type**: \`backend\`` | `\`frontend\`` | `\`fullstack\``.
27
+ 3. The project folder must be under `C:\development\source\projects\<name>\`.
28
+ 4. No `backend/pom.xml`, `frontend/angular.json`, or `frontend/package.json` exists yet (idempotent guard is in the agent).
29
+
30
+ If `Project type` is missing or unrecognized, the `scaffold` agent routes to `tech-lead` automatically.
31
+
32
+ ## Do NOT use for
33
+
34
+ - Implementing features after scaffold is complete — use `backend-developer` / `frontend-developer`.
35
+ - Migrating an existing project to a newer stack — use `migrator`.
36
+ - Updating the harness template — use `update-template`.
37
+ - Adopting the template in an existing project — use `active-project`.
38
+
39
+ ## Dispatch
40
+
41
+ ```
42
+ Task(
43
+ subagent_type: "scaffold",
44
+ description: "Scaffold the project. Read ## Project Identity from CLAUDE.md, detect project type, run the appropriate pipeline (backend | frontend | fullstack).",
45
+ prompt: "<full user message>"
46
+ )
47
+ ```
48
+
49
+ The `scaffold` agent (`.claude/agents/scaffold.md`, model: haiku) handles:
50
+ - Reading `## Project Identity` → parsing `Project type:` value.
51
+ - Running the Spring Initializr pipeline (backend), Angular CLI pipeline (frontend), or both (fullstack).
52
+ - Smoke builds and final report.
53
+
54
+ ## Handoff
55
+
56
+ After dispatch, the `scaffold` agent handles execution autonomously. All decisions about Java packages, ports, optional dependencies are resolved by the agent (it may ask the user for missing values per its inviolable rules).
57
+
58
+ See `.claude/agents/scaffold.md` for the complete execution contract, pipeline steps, and inviolable rules.
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: stack-discovery
3
+ description: "Conversational sabatina for NEW projects with empty Project Identity in CLAUDE.md. Walks user through 5-8 focused questions to declare language, framework, version, database, UI lib, domain. Each question comes with a recommended answer + 1-line rationale (same UX pattern as grill-me, but focused on stack rather than feature requirements). Persists results to ## Project Identity in CLAUDE.md. If the chosen stack has no matching pack in .claude/stacks/, dispatches create-stack-pack skill. Triggers: 'sabatina pra projeto novo', 'stack discovery', 'ajuda escolher stack', 'configura stack', 'duk new chat', auto-triggered after duk new <name> creates empty Project Identity. Do NOT use for feature discovery (use grill-me), to migrate stack of existing project (use migrator), or for code implementation. PT triggers: 'sabatina pra projeto novo', 'discovery da stack', 'configura stack do projeto', 'duk new chat'."
4
+ ---
5
+
6
+ # Stack-discovery — conversational sabatina for new projects
7
+
8
+ > Sonnet conversational skill. Walks the human through declaring the project's stack — language, framework, version, database, UI lib, domain — and persists the answers to `## Project Identity` in `CLAUDE.md`. UX mirrors `grill-me`: one focused question per turn, each with a recommended answer + 1-line rationale.
9
+
10
+ ---
11
+
12
+ ## 1. When you trigger
13
+
14
+ - "sabatina pra projeto novo", "stack discovery", "ajuda escolher stack", "configura stack", "duk new chat".
15
+ - Auto-triggered after `duk new <name>` scaffolds a project with empty `## Project Identity` placeholders (`<project-name>`, etc.).
16
+ - Manual invocation when adopting a new project where the stack is not yet declared.
17
+
18
+ ## 2. When you do NOT trigger
19
+
20
+ - Project already has a populated `## Project Identity` -> use `update-template` to refresh harness files.
21
+ - Existing project changing stack (Java 21 -> 25, Angular 19 -> 21) -> use `migrator`.
22
+ - Feature requirements discovery -> use `grill-me`.
23
+ - Implementation -> use `run-sprint` / specialist agents.
24
+ - Scaffold the project skeleton -> use `scaffold` skill (run AFTER this skill finishes).
25
+
26
+ ## 3. Prerequisites
27
+
28
+ - `CLAUDE.md` exists at project root with the harness template's `## Project Identity` section.
29
+ - An engaged human (this is conversational — never invoke from `sprint-runner` or CI).
30
+
31
+ ## 4. Flow
32
+
33
+ ### Step 1 — Frame
34
+
35
+ Open with a 1-line intro: "Vou entrevistar sobre stack — 6-8 perguntas, uma por turno. Persisto tudo em CLAUDE.md no fim."
36
+
37
+ ### Step 2 — Sabatina (8 questions, one per turn)
38
+
39
+ Each question follows the grill-me pattern: question + recommended answer + 1-line rationale + "Confirm?". Default by context (if user said "API backend" earlier, default Q2 to `java`).
40
+
41
+ **Q1 — Project type**
42
+ > Tipo de projeto: `backend` / `frontend` / `fullstack` / `mobile` / `library` / `cli`?
43
+ > Recomendo: **fullstack** (se você vai ter API + UI integradas). Confirme?
44
+
45
+ **Q2 — Language**
46
+ > Linguagem principal: `java` / `typescript` / `python` / `go` / `rust` / `kotlin`?
47
+ > Recomendo: **java** para backend corporativo (ecossistema maduro, equipe domina). Confirme?
48
+
49
+ **Q3 — Framework**
50
+ > Framework: `spring-boot` / `quarkus` / `micronaut` (Java) | `angular` / `react` / `vue` (TS) | `django` / `fastapi` (Python) | `gin` / `echo` (Go)?
51
+ > Recomendo: **spring-boot** (defaults do harness, packs prontos). Confirme?
52
+
53
+ **Q4 — Major version**
54
+ > Versão major: para Spring Boot, `3` (Java 17/21, legado mantido) ou `4` (Java 25, novos)?
55
+ > Recomendo: **4** para projeto novo (target da equipe, packs canônicos). Confirme?
56
+ >
57
+ > _Nota: stack-discovery PODE consultar Maven Central / npm registry pra confirmar a última GA. Fallback é o hardcoded em `scripts/latest-versions.json`._
58
+
59
+ **Q5 — Database (if backend / fullstack)**
60
+ > SGBD: `postgresql` / `mysql` / `mongodb` / `none`?
61
+ > Recomendo: **postgresql** (default do harness — UUID, JSONB, transações ACID). Confirme?
62
+
63
+ **Q6 — UI library (if frontend / fullstack / mobile)**
64
+ > Lib de UI: `ng-bootstrap` / `material` / `primeng` (Angular) | `mui` / `chakra` / `tailwind` (React)?
65
+ > Recomendo: **ng-bootstrap** (default do harness, a11y WCAG 2.1 AA). Confirme?
66
+
67
+ **Q7 — Domain**
68
+ > Domínio do produto: e-commerce / fintech / healthcare / SaaS interno / marketplace / outro?
69
+ > Recomendo: marque o que mais aproxima — usado em prompts de geração e ADRs. Confirme?
70
+
71
+ **Q8 — Team size**
72
+ > Tamanho do time: solo / 2-3 devs / 4-10 devs / 10+?
73
+ > Recomendo: **2-3 devs** (calibra Autonomy Matrix, ritmo de PR, gate rigor). Confirme?
74
+
75
+ ### Step 3 — Latest version detection (opcional, automático)
76
+
77
+ Antes de fechar a sabatina, se `Q3 + Q4` apontam para uma stack com versão major declarada, consulte (silenciosamente) Maven Central / npm registry para confirmar a última GA daquela major. Se diferir do que o user respondeu, retorne 1 pergunta de confirmação: "Detectei que Spring Boot 4.0.2 é a última GA — usar essa versão na CLAUDE.md? Recomendo: sim."
78
+
79
+ Fallback determinístico: `scripts/latest-versions.json` (hardcoded no harness).
80
+
81
+ ### Step 4 — Confirm
82
+
83
+ Mostre o bloco `## Project Identity` proposto e peça OK final:
84
+
85
+ ```markdown
86
+ ## Project Identity
87
+
88
+ - **Project name**: `meu-projeto`
89
+ - **Project type**: `fullstack`
90
+ - **Primary stack**: `Java 25 + Spring Boot 4.0.2 + Angular 21`
91
+ - **Database**: `PostgreSQL 17 + Redis 7`
92
+ - **Domain**: `e-commerce`
93
+ - **Team size**: `2-3 devs`
94
+ - **Additional rules**: _(vazio)_
95
+ ```
96
+
97
+ ### Step 5 — Persist (MANDATORY)
98
+
99
+ Use `Edit` para substituir SOMENTE a seção `## Project Identity` em `CLAUDE.md`. Demais seções permanecem intactas (base do plugin). Validar via `Read` pós-Edit.
100
+
101
+ ### Step 6 — Pack check + handoff
102
+
103
+ 1. Resolva pack esperado: `.claude/stacks/<lang>/<framework>-<major>.md`.
104
+ 2. **Se pack existe** -> imprima sucesso + próximos passos (ver §Output).
105
+ 3. **Se pack ausente** -> dispatch `create-stack-pack` skill ANTES de finalizar:
106
+ > "Pack `.claude/stacks/java/spring-boot-5.md` não existe. Disparando `create-stack-pack` para gerar antes de continuar."
107
+ Depois que `create-stack-pack` retorna, feche com o output normal.
108
+
109
+ ## 5. Inviolable rules
110
+
111
+ 1. **Sabatina conversacional, opt-in.** Nunca rode em CI, `sprint-runner`, ou qualquer fluxo autônomo.
112
+ 2. **Uma pergunta por turno, sempre com recomendação.** Nunca dump de lista, nunca pergunta aberta sem default.
113
+ 3. **Persistência obrigatória.** Sessão não fecha sem `## Project Identity` preenchida em `CLAUDE.md`.
114
+ 4. **Edit cirúrgico.** Só toca em `## Project Identity` — preserva todo o resto do template (override do plugin).
115
+ 5. **Pack ausente bloqueia handoff.** Dispatch `create-stack-pack` antes do output final.
116
+ 6. **Nunca decide stack pelo user.** Recomenda, mas o user confirma a cada Q.
117
+ 7. **No implementation.** Esta skill só descobre + persiste — código vem do `scaffold` skill depois.
118
+
119
+ ## 6. Output
120
+
121
+ Bloco final em chat:
122
+
123
+ ```
124
+ ✓ Project Identity persistida em CLAUDE.md
125
+ ✓ Pack resolvido: .claude/stacks/java/spring-boot-4.md (loaded)
126
+
127
+ Próximos passos sugeridos:
128
+ 1. Rode 'scaffolda o projeto' para gerar a estrutura inicial (backend + frontend).
129
+ 2. Quando tiver primeira feature em mente, rode 'grill me sobre <feature>' pra discovery.
130
+ 3. Depois, 'analyst' gera PLAN -> 'sprint-runner' executa.
131
+ ```
132
+
133
+ Se pack faltava e foi gerado:
134
+
135
+ ```
136
+ ✓ Project Identity persistida em CLAUDE.md
137
+ ✓ Pack criado via create-stack-pack: .claude/local/stacks/java/spring-boot-5.md
138
+ Considere abrir PR pro harness repo (development-utility-kit) pra reusar.
139
+
140
+ Próximos passos:
141
+ 1. Rode 'scaffolda o projeto' para gerar a estrutura inicial.
142
+ ```
143
+
144
+ ## 7. Interface with other skills/agents
145
+
146
+ - `scaffold` — handoff natural após esta skill (gera esqueleto baseado em `## Project Identity`).
147
+ - `create-stack-pack` — disparado SE pack ausente para a stack escolhida.
148
+ - `stack-resolver` — agente Haiku que valida o pack pós-persistência (usado pelas skills downstream).
149
+ - `grill-me` — fase seguinte, quando user tem primeira feature em mente.
150
+ - `update-template` — não invocar daqui; é caminho separado para sincronizar harness em projeto já adotado.
151
+ - `migrator` — não confundir: este é para projeto NOVO; migrator é para mudar stack de projeto existente.
152
+
153
+ ## 8. References
154
+
155
+ - ADR-026 (Generic agents + stack packs — fundação)
156
+ - ADR-028 (duk workflow — esta skill é o passo "new chat" do fluxo)
157
+ - ADR-029 (Pack canonical format — o que `create-stack-pack` deve gerar)
158
+ - `.claude/skills/grill-me/SKILL.md` (padrão UX de sabatina reusado aqui)
159
+ - `scripts/latest-versions.json` (fallback de versões hardcoded)
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: test-coverage-auditor
3
+ description: Use to AUDIT the project's automated test coverage and flag TECHNICAL DEBT from manual verification. Triggers on "audit the tests", "is there test debt?", "is coverage ok?", "what depends on manual testing here?", "do a coverage audit", "list what has no test", "look for test debt". Also called automatically by `run-sprint` (Stage 5) and is a mandatory prerequisite of `prd-ready-check`. Scans backend code (controllers, services, domain) and frontend code (components, HTTP services, guards), checks whether matching automated tests exist (JUnit/Mockito/Testcontainers or Jest/Testing Library/Playwright), reads recent dailies and feature notes looking for "tested manually", "checked in the browser", "deployed and tested", and emits a debt report. Updates `docs/brain/architecture/tech-debt.md` and creates notes in `docs/brain/bugs/` for critical debt items. Does NOT implement tests — only flags them. To write the tests, use `backend-developer` / `frontend-developer` / `qa-engineer`. Do NOT use to write tests (use those specialists) nor to run the regression suite (use auto-test-guard). PT triggers: 'audita os testes', 'tem débito de teste?', 'cobertura tá ok?', 'o que depende de teste manual aqui?', 'faz auditoria de cobertura', 'lista o que não tem teste', 'procura débito de teste'.
4
+ ---
5
+
6
+ # Test Coverage Auditor — Test technical debt detector
7
+
8
+ Skill that invokes the `test-coverage-auditor` agent. Always respond in American English.
9
+
10
+ ---
11
+
12
+ ## When to trigger
13
+
14
+ **Explicit**:
15
+ - "audit the tests", "is there test debt here?", "is coverage ok?"
16
+ - "what depends on manual testing?", "look for test debt", "list what has no test"
17
+ - "do a coverage audit"
18
+
19
+ **Automatic**:
20
+ - `run-sprint` Stage 5 — mandatory gate between integration (Stage 4) and PRD-ready (Stage 6).
21
+ - `prd-ready-check` — production gate requires an up-to-date report with no open P0/P1.
22
+
23
+ ---
24
+
25
+ ## Prerequisites
26
+
27
+ - Project has `backend/` and/or `frontend/` directories with source code.
28
+ - `CLAUDE.md` exists at the project root with `## Project Identity` declaring the project type.
29
+
30
+ ---
31
+
32
+ ## Do NOT use for
33
+
34
+ - Writing tests — use `qa-engineer` / `backend-developer` / `frontend-developer`.
35
+ - Running the regression suite — use `gate-keeper` (auto-test-guard skill).
36
+ - Performance or security audits — use `security-engineer` for those.
37
+
38
+ ---
39
+
40
+ ## Dispatch
41
+
42
+ ```
43
+ Task(
44
+ subagent_type: "test-coverage-auditor",
45
+ description: "Audit test coverage and flag technical debt. Scan backend and frontend code, identify classes/components without tests, check JaCoCo/Jest thresholds, classify debt P0-P3, update tech-debt.md.",
46
+ prompt: "<full user message>"
47
+ )
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Handoff
53
+
54
+ The `test-coverage-auditor` agent (`.claude/agents/test-coverage-auditor.md`, model: sonnet) owns the complete execution contract:
55
+ - Backend and frontend scan methodology (source ↔ test mapping).
56
+ - JaCoCo and Jest coverage threshold enforcement.
57
+ - P0/P1/P2/P3 severity classification.
58
+ - tech-debt.md update and bug note creation for P0 items.
59
+ - Full audit report format and PRD gate verdict.