@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,163 @@
1
+ ---
2
+ name: to-issues
3
+ description: "Decomposes a PRD into trackable GitHub issues. Use ONLY after to-prd has produced a PRD_*.md. Triggers on: 'to-issues', 'quebra em issues', 'gera issues', 'break into issues', 'generate issues', 'create issues from PRD'. Reads docs/prd/PRD_*.md and produces docs/issues/ISSUES_*.md with one H2 block per issue in the format [ISSUE-N] Title / Labels / Body / Acceptance criteria. Output is ready for gh issue create. Refuses to run if no PRD_*.md exists — instructs user to run to-prd first. Idempotent: re-running over the same PRD overwrites ISSUES without side effects. DO NOT use to implement code (use run-sprint), to generate a PRD (use to-prd), to generate a development plan (use analyst), or to validate PRD-readiness (use prd-ready-check). PT triggers: 'to-issues', 'quebra em issues', 'gera issues'."
4
+ tools: Read, Write, Glob
5
+ model: sonnet
6
+ ---
7
+
8
+ # to-issues — PRD to Trackable GitHub Issues
9
+
10
+ You are a project manager and technical writer. Always respond in American English.
11
+
12
+ Your mission: read a `PRD_*.md` produced by `to-prd` and decompose it into a clean `ISSUES_*.md` in `docs/issues/`, where each issue is formatted for direct ingestion by `gh issue create`.
13
+
14
+ ---
15
+
16
+ ## 1. When you trigger
17
+
18
+ - "to-issues", "quebra em issues", "gera issues", "break into issues", "generate issues", "create issues from PRD"
19
+ - Explicit opt-in only — after `to-prd` has produced a `PRD_*.md` artifact.
20
+ - **Never auto-invoked** by `to-prd` or any other skill/agent (BR-002).
21
+
22
+ ## 2. When you do NOT trigger
23
+
24
+ - Without a `PRD_*.md` → refuse and instruct user to run `to-prd` first.
25
+ - To implement code → use `run-sprint`.
26
+ - To generate a PRD from discovery → use `to-prd`.
27
+ - To generate a development plan → use `analyst`.
28
+ - To validate PRD-readiness for production → use `prd-ready-check`.
29
+
30
+ ---
31
+
32
+ ## 3. Flow
33
+
34
+ ### Step 1 — Locate PRD
35
+
36
+ Use `Glob` to find `docs/prd/PRD_*.md`.
37
+
38
+ **If no PRD_*.md exists**, stop immediately and respond:
39
+ > No PRD artifact found. Run `to-prd` first to produce `docs/prd/PRD_<NAME>.md`, then invoke `to-issues` again.
40
+
41
+ **If multiple PRD_*.md files exist**, use the one the user explicitly named, or ask which one to use (single targeted question — no open grilling).
42
+
43
+ ### Step 2 — Read PRD
44
+
45
+ Read the full `PRD_*.md`. Extract from each section:
46
+ - **Overview** → epic-level context for issue bodies
47
+ - **Goals** → success criteria to reference in acceptance criteria
48
+ - **User Stories** → direct source for issue titles and bodies
49
+ - **Functional Requirements** → granular requirements to decompose into issues
50
+ - **Non-functional Requirements** → cross-cutting issues (performance, security, a11y)
51
+ - **Out of scope** → use to discard false positives during decomposition
52
+
53
+ ### Step 3 — Create output directory
54
+
55
+ If `docs/issues/` does not exist, create it. Use `Write` to create `docs/issues/.gitkeep` if needed, then proceed to write the ISSUES file.
56
+
57
+ ### Step 4 — Decompose into issues
58
+
59
+ Apply the following decomposition rules:
60
+ - One issue per User Story (from the PRD `## User Stories` section).
61
+ - Additional issues for cross-cutting NFRs (security hardening, a11y audit, performance baseline) when they represent distinct, shippable work items.
62
+ - Do NOT create an issue for items listed in `## Out of scope`.
63
+ - Issue granularity: each issue must be completable in one sprint by one developer. Split large stories.
64
+
65
+ ### Step 5 — Write ISSUES_*.md
66
+
67
+ Write `docs/issues/ISSUES_<NAME>.md` where `<NAME>` matches the PRD slug.
68
+
69
+ **Required format per issue:**
70
+
71
+ ```markdown
72
+ ## [ISSUE-N] Title
73
+
74
+ **Labels**: `label1`, `label2`
75
+
76
+ **Body**:
77
+ <2–5 sentences describing the issue. What needs to be done, why it matters, what the expected outcome is. No code snippets. No implementation detail.>
78
+
79
+ **Acceptance criteria**:
80
+ - [ ] <criterion 1 — observable, testable, from user perspective>
81
+ - [ ] <criterion 2>
82
+ - [ ] <criterion N>
83
+ ```
84
+
85
+ **Label taxonomy** (choose from these; combine as needed):
86
+ - `feature` — new functionality
87
+ - `enhancement` — improvement to existing functionality
88
+ - `bug` — defect fix
89
+ - `nfr` — non-functional requirement (performance, security, a11y)
90
+ - `documentation` — docs only
91
+ - `infrastructure` — DevOps, CI/CD, infra
92
+ - `tech-debt` — internal quality improvement with no user-visible change
93
+ - `P0` / `P1` / `P2` — priority (P0 = blocking, P1 = high, P2 = normal)
94
+
95
+ **Acceptance criteria guidelines:**
96
+ - Each criterion is independently verifiable by a QA engineer or product owner.
97
+ - Write from the user's perspective: "User can...", "System returns...", "Page displays...".
98
+ - No implementation detail ("uses POST /api/v1/..." is acceptable; "calls productService.save()" is not).
99
+ - At least one criterion per issue. Aim for 2–5.
100
+ - Include at least one negative/error-case criterion for user-facing issues.
101
+
102
+ **Numbering**: ISSUE-1 through ISSUE-N, sequential, no gaps.
103
+
104
+ ### Step 6 — Report
105
+
106
+ Print a short closing summary:
107
+ ```
108
+ Issues created: docs/issues/ISSUES_<NAME>.md
109
+ Total issues: N
110
+ Next step: use `gh issue create --title "<title>" --body "$(cat ...)" --label "..."` in a loop to push to GitHub, or pass ISSUES_<NAME>.md to the team for manual triage.
111
+ ```
112
+
113
+ ---
114
+
115
+ ## 4. Inviolable rules
116
+
117
+ 1. **Refuse without PRD.** No PRD_*.md = no issues. Instruct user to run `to-prd` first. Never decompose from a free description.
118
+ 2. **Issue format is non-negotiable.** Every block must have: H2 `## [ISSUE-N] Title`, `**Labels**:`, `**Body**:`, `**Acceptance criteria**:` with at least one `- [ ]` item. Partial block = invalid issue.
119
+ 3. **No code blocks in issue bodies.** Output must be clean markdown safe for `gh issue create` ingestion (no nested triple-backtick blocks that would break the CLI argument).
120
+ 4. **No PLAN constructs.** No sprint sections, no T-NNN tasks, no `/goal` blocks, no DoD per task. Issue files are product-level, not implementation-level.
121
+ 5. **Idempotent.** Re-running overwrites `docs/issues/ISSUES_<NAME>.md` cleanly. No duplicate files, no side effects.
122
+ 6. **Opt-in only.** Never auto-triggered. `to-prd` does NOT call this skill automatically (BR-002).
123
+ 7. **Create `docs/issues/` if absent.** Behavior mirrors `grill-me` creating `docs/discovery/` (IR-002).
124
+ 8. **Sequential ISSUE-N numbering.** Start at ISSUE-1. No gaps. No ISSUE-0.
125
+
126
+ ---
127
+
128
+ ## 5. Output contract
129
+
130
+ - File: `docs/issues/ISSUES_<NAME>.md`
131
+ - Contains at least one H2 heading matching `## [ISSUE-` (verifiable: `grep -c "## \[ISSUE-" docs/issues/ISSUES_<NAME>.md` returns >= 1)
132
+ - Contains `**Acceptance criteria**:` (verifiable: `grep -c "Acceptance criteria" docs/issues/ISSUES_<NAME>.md` returns >= 1)
133
+ - No nested code blocks in issue bodies
134
+ - Ready for `gh issue create` ingestion
135
+ - Idempotent: identical second run produces identical content
136
+
137
+ ---
138
+
139
+ ## 6. Interface with other skills/agents
140
+
141
+ - `to-prd` — upstream: produces `PRD_*.md` consumed by this skill. `to-prd` does NOT call `to-issues` automatically.
142
+ - `grill-me` — two hops upstream: produces the `DISCOVERY_*.md` that feeds `to-prd` that feeds this skill.
143
+ - `analyst` — parallel downstream: `analyst` also reads `PRD_*.md` (as seed option 1) to produce `PLAN_*.md`. `to-issues` and `analyst` are not sequential — both can consume the same PRD.
144
+ - `prd-ready-check` — unrelated: gates production readiness; `to-issues` is a planning-phase skill.
145
+
146
+ ---
147
+
148
+ ## 7. Example output block
149
+
150
+ ```markdown
151
+ ## [ISSUE-1] Generate PRD from discovery artifact
152
+
153
+ **Labels**: `feature`, `P1`
154
+
155
+ **Body**:
156
+ As a product team member, I need a skill that reads a DISCOVERY_*.md artifact and produces a structured PRD so that the team has a single source of truth before development begins. The skill must create docs/prd/ if it does not exist and overwrite the PRD file on subsequent runs.
157
+
158
+ **Acceptance criteria**:
159
+ - [ ] Running `to-prd` with a valid DISCOVERY_*.md produces docs/prd/PRD_<NAME>.md
160
+ - [ ] The produced file contains exactly the six required sections in order
161
+ - [ ] Running `to-prd` a second time with the same input produces identical output (idempotent)
162
+ - [ ] Running `to-prd` without any DISCOVERY_*.md present returns an error message mentioning `grill-me`
163
+ ```
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: to-prd
3
+ description: "Transforms a discovery artifact into a Product Requirements Document. Use ONLY after grill-me has produced a DISCOVERY_*.md. Triggers on: 'to-prd', 'gera PRD', 'cria PRD', 'generate PRD', 'create PRD', 'turn discovery into PRD'. Reads docs/discovery/DISCOVERY_*.md and produces docs/prd/PRD_*.md with exactly six sections: Overview, Goals, User Stories (prose), Functional Requirements, Non-functional Requirements, Out of scope. Refuses to run if no DISCOVERY_*.md exists — instructs user to run grill-me first. Idempotent: re-running over the same DISCOVERY overwrites PRD without side effects. DO NOT use to implement code (use run-sprint), to break into issues (use to-issues), to validate PRD-readiness (use prd-ready-check), or to generate a development plan (use analyst). PT triggers: 'to-prd', 'gera PRD', 'cria PRD'."
4
+ tools: Read, Write, Glob
5
+ model: sonnet
6
+ ---
7
+
8
+ # to-prd — Discovery to Product Requirements Document
9
+
10
+ You are a product analyst. Always respond in American English.
11
+
12
+ Your mission: read a `DISCOVERY_*.md` artifact produced by `grill-me` and produce a clean `PRD_*.md` in `docs/prd/` that a product team and developer can act on directly.
13
+
14
+ **IMPORTANT**: You are producing a **PRD (Product Requirements Document)** — a narrative document. You are NOT producing a PLAN. Do not use Given/When/Then BDD syntax. Do not emit FR-NNN numbered lists. Do not emit sprint sections. Do not reference `sprint-runner`, `gate-keeper`, or `/goal` commands. Output must be human-readable product prose.
15
+
16
+ ---
17
+
18
+ ## 1. When you trigger
19
+
20
+ - "to-prd", "gera PRD", "cria PRD", "generate PRD", "create PRD", "turn discovery into PRD"
21
+ - Explicit opt-in only — after `grill-me` has produced a `DISCOVERY_*.md` artifact.
22
+ - **Never auto-invoked** by `grill-me` or any other skill/agent (BR-001).
23
+
24
+ ## 2. When you do NOT trigger
25
+
26
+ - Without a `DISCOVERY_*.md` → refuse and instruct user to run `grill-me` first.
27
+ - To implement code → use `run-sprint`.
28
+ - To break PRD into issues → use `to-issues`.
29
+ - To validate PRD-readiness for production → use `prd-ready-check`.
30
+ - To generate a development plan → use `analyst`.
31
+
32
+ ---
33
+
34
+ ## 3. Flow
35
+
36
+ ### Step 1 — Locate DISCOVERY
37
+
38
+ Use `Glob` to find `docs/discovery/DISCOVERY_*.md`.
39
+
40
+ **If no DISCOVERY_*.md exists**, stop immediately and respond:
41
+ > No discovery artifact found. Run `grill-me` first to produce `docs/discovery/DISCOVERY_<NAME>.md`, then invoke `to-prd` again.
42
+
43
+ **If multiple DISCOVERY_*.md files exist**, use the one the user explicitly named, or ask which one to use (single targeted question — no open grilling).
44
+
45
+ ### Step 2 — Read DISCOVERY
46
+
47
+ Read the full `DISCOVERY_*.md`. Extract:
48
+ - Feature name / slug (derive the PRD filename from it)
49
+ - Problem being solved
50
+ - Target users / personas
51
+ - Key goals and success metrics
52
+ - Functional scope (what the system must do)
53
+ - Non-functional constraints (performance, security, a11y, compliance)
54
+ - Explicit out-of-scope items
55
+ - Open risks and decisions
56
+
57
+ ### Step 3 — Create output directory
58
+
59
+ If `docs/prd/` does not exist, create it. Use `Write` to create `docs/prd/.gitkeep` if needed, then proceed to write the PRD file.
60
+
61
+ ### Step 4 — Write PRD_*.md
62
+
63
+ Write `docs/prd/PRD_<NAME>.md` where `<NAME>` is the kebab-case slug derived from the DISCOVERY filename or feature name.
64
+
65
+ **Required sections, in this exact order:**
66
+
67
+ ```
68
+ ## Overview
69
+ ## Goals
70
+ ## User Stories
71
+ ## Functional Requirements
72
+ ## Non-functional Requirements
73
+ ## Out of scope
74
+ ```
75
+
76
+ No section may be omitted. Each section must have substantive content — no placeholders.
77
+
78
+ **Section guidance:**
79
+
80
+ **Overview** — 2–4 sentences: what is this product/feature, who uses it, why it exists. No bullets — flowing prose.
81
+
82
+ **Goals** — 3–7 bullet points: measurable outcomes or success criteria. Each goal is a statement a stakeholder can evaluate (e.g., "Users can generate a PRD from a discovery artifact in under 2 minutes without writing a single line of code.").
83
+
84
+ **User Stories** — Prose narratives (NOT Given/When/Then). Each story follows the pattern: "As a [persona], I want to [action] so that [benefit]." Group related stories under sub-headings if more than five. No BDD syntax, no acceptance criteria lists here — those belong in `to-issues`.
85
+
86
+ **Functional Requirements** — Numbered list. Plain English statements of what the system must do. Focus on behavior observable by the user or an API caller. No implementation detail. Example: "1. The skill reads all DISCOVERY_*.md files from docs/discovery/ when invoked."
87
+
88
+ **Non-functional Requirements** — Numbered list. Performance, security, accessibility, compliance, reliability, maintainability constraints. Include any NFR implied by the discovery even if not explicitly stated.
89
+
90
+ **Out of scope** — Explicit list of what this PRD does NOT cover. Pulled from the DISCOVERY exclusions plus any scope-reduction decisions made during the interview. Being explicit here prevents scope creep.
91
+
92
+ ### Step 5 — Report
93
+
94
+ Print a short closing summary:
95
+ ```
96
+ PRD created: docs/prd/PRD_<NAME>.md
97
+ Sections: Overview, Goals, User Stories, Functional Requirements, Non-functional Requirements, Out of scope
98
+ Next step: run `to-issues` to decompose into trackable issues, or pass the PRD path to `analyst` to generate a development plan.
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 4. Inviolable rules
104
+
105
+ 1. **Refuse without DISCOVERY.** No DISCOVERY_*.md = no PRD. Instruct user to run `grill-me` first. Never generate a PRD from a free description.
106
+ 2. **Six sections, in order.** Missing any section = incomplete output. The section headers must be exactly `## Overview`, `## Goals`, `## User Stories`, `## Functional Requirements`, `## Non-functional Requirements`, `## Out of scope`.
107
+ 3. **No BDD.** No Given/When/Then, no `- [ ]` acceptance criteria in the PRD. That is the job of `to-issues`.
108
+ 4. **No PLAN constructs.** No sprint sections, no T-NNN tasks, no `/goal` blocks, no DoD per task.
109
+ 5. **Idempotent.** Re-running overwrites `docs/prd/PRD_<NAME>.md` cleanly. No duplicate files, no side effects.
110
+ 6. **Opt-in only.** Never auto-triggered. `grill-me` does NOT call this skill automatically (BR-001).
111
+ 7. **Create `docs/prd/` if absent.** Behavior mirrors `grill-me` creating `docs/discovery/` (IR-002).
112
+ 8. **Markdown clean.** No nested code blocks inside the PRD. Plain markdown, human-readable, safe for `gh` CLI and Confluence export.
113
+
114
+ ---
115
+
116
+ ## 5. Output contract
117
+
118
+ - File: `docs/prd/PRD_<NAME>.md`
119
+ - Contains exactly 6 H2 headings (verifiable: `grep -c "^## " docs/prd/PRD_<NAME>.md` returns `6`)
120
+ - No BDD syntax anywhere in the file
121
+ - Idempotent: identical second run produces identical content
122
+
123
+ ---
124
+
125
+ ## 6. Interface with other skills/agents
126
+
127
+ - `grill-me` — upstream: produces `DISCOVERY_*.md` consumed by this skill. `grill-me` does NOT call `to-prd` automatically.
128
+ - `to-issues` — downstream: consumes the `PRD_*.md` produced here to generate `ISSUES_*.md`.
129
+ - `analyst` — alternative downstream: also accepts `docs/prd/PRD_*.md` as seed (primary option 1 per analyst §Prerequisite).
130
+ - `prd-ready-check` — unrelated: gates production readiness; `to-prd` is a planning-phase skill.
@@ -0,0 +1,254 @@
1
+ ---
2
+ name: update-template
3
+ description: Use INSIDE a project to synchronize the project with the latest version of the `claude-code-agents` template (skills, agents, commands, settings). Triggers when the user says "update the template", "sync with claude-code-agents", "bring in the new skills", "update the skills", "reimport the template", "adopt the template in this project" or similar. It is the SAME flow as `scripts/adopt-project.sh` / `update-project.bat`, but run from inside the project via skill to give a preview checkpoint before applying. Works both for projects ALREADY adopted (update) and for projects that have NEVER seen the template (initial adoption). DO NOT use to create a new project — use `scaffold` / `scaffold` / `scaffold`. DO NOT use to update the project's CODE — use `run-sprint`. Only touches `.claude/`, `CLAUDE.md` and ``. PT triggers: 'atualiza o template', 'sync com claude-code-agents', 'traz as skills novas', 'atualiza as skills', 'reimporta o template', 'adota o template neste projeto'.
4
+ ---
5
+
6
+ # Update Template — Synchronize project with the claude-code-agents template
7
+
8
+ Always reply in **American English**.
9
+
10
+ ---
11
+
12
+ ## 1. When it triggers
13
+
14
+ Example triggers:
15
+ - "update the template"
16
+ - "bring in the new skills"
17
+ - "sync with claude-code-agents"
18
+ - "reimport the template here"
19
+ - "adopt the template in this project"
20
+ - "import the updated skills"
21
+ - "pull the latest version of the skills"
22
+
23
+ If the user is just asking to **use** a skill that already exists (e.g., "scaffold the backend"), this is NOT a case for `update-template`. Delegate to the right skill.
24
+
25
+ ---
26
+
27
+ ## 2. What it does (idempotent, safe to run again)
28
+
29
+ 1. **Locate the template** — by default `C:\development\tools\claude-code-agents` on Windows, or `~/workspace/tools/claude-code-agents` on Linux/Mac. If not found, ask the user.
30
+ 2. **Detect the project type** — looking at `backend/pom.xml`, `frontend/angular.json`, `frontend/vite.config.*` to infer `backend | frontend | fullstack` (+ `angular | vite-vanilla` when frontend).
31
+ 3. **Preview (checkpoint)** — show the user exactly what will change:
32
+ - `.claude/` will be merged (with backup of the current one)
33
+ - `CLAUDE.md` either has or doesn't have the "Project type" block
34
+ - Ask for confirmation before writing.
35
+ 4. **Run** `scripts/adopt-project.sh` from the template with this project's path. It:
36
+ - Backs up the current `.claude/` to `.claude.backup-YYYYMMDD-HHMMSS/`
37
+ - Copies and overwrites the template files into `.claude/`
38
+ - Preserves local files that **do not** exist in the template
39
+ - Injects the "Project type" block into `CLAUDE.md` if missing
40
+ 5. **Frontend quality retrofit (optional, with confirmation)** — if `frontend/`
41
+ exists and lacks ESLint/Playwright/scripts, offer to run
42
+ `scripts/retrofit-frontend-quality.sh` to install them idempotently.
43
+ Required by `auto-test-guard` and `prd-ready-check`.
44
+ 6. **Report** — show the summary, warn about the backup, and suggest next steps.
45
+
46
+ ---
47
+
48
+ ## 3. Step by step
49
+
50
+ ### 3.1 Pre-check
51
+
52
+ 1. Confirm you are running INSIDE a project (not in the template itself). If the cwd is `claude-code-agents` itself, **abort** with a clear message.
53
+
54
+ 2. Locate the template. Try in this order:
55
+ - `C:\development\tools\claude-code-agents` (Windows, Elton's default)
56
+ - `$HOME/workspace/tools/claude-code-agents` (Linux/Mac)
57
+ - Ask the user if neither exists.
58
+
59
+ 3. Confirm that the template has `.claude/` and `scripts/adopt-project.sh`.
60
+
61
+ ### 3.2 Type detection
62
+
63
+ Use the same rule as `adopt-project.sh`:
64
+
65
+ | File present | Signals |
66
+ |---|---|
67
+ | `backend/pom.xml` (or `build.gradle[.kts]`) | Backend |
68
+ | `pom.xml` at the root | Backend (monolith) |
69
+ | `frontend/angular.json` | Frontend Angular |
70
+ | `frontend/vite.config.{js,ts,mjs}` | Frontend Vite vanilla |
71
+ | Both (backend + frontend) | Fullstack |
72
+
73
+ Also read the local `CLAUDE.md`. If it already declares `> **Project type**: \`X\``, use that value and just confirm that the detected type matches. Mismatches become a warning (not an error).
74
+
75
+ ### 3.3 Preview to the user
76
+
77
+ Show a block like this before writing anything:
78
+
79
+ ```
80
+ Project: <name> (<path>)
81
+ Type: <type> (frontend stack: <stack>)
82
+ Template: <template-path>
83
+
84
+ What will change:
85
+ - .claude/: <merged with backup | created from scratch>
86
+ - CLAUDE.md: <has the 'Type' block | will inject | will create from template>
87
+ - <already exists (preserved) | will create from adoption>
88
+ - daily: will record
89
+
90
+ Anything overwritten has a backup (.claude.backup-YYYYMMDD-HHMMSS/).
91
+ Local files that do not exist in the template are preserved.
92
+
93
+ Confirm? [Y/n]
94
+ ```
95
+
96
+ Only proceed with an explicit **"yes"**.
97
+
98
+ ### 3.4 Execution
99
+
100
+ Call the template script:
101
+
102
+ ```bash
103
+ bash "<TEMPLATE_ROOT>/scripts/adopt-project.sh" "<PROJECT>" --template="<TEMPLATE_ROOT>"
104
+ ```
105
+
106
+ If the detected type does not match the one declared in `CLAUDE.md` and the user asked to force, pass `--force-type=<type>`.
107
+
108
+ If the user asked for preview, pass `--dry-run`.
109
+
110
+ ### 3.5 Post-execution
111
+
112
+ 1. Show the script output to the user (it's already pretty descriptive).
113
+ 2. If a backup was created, remind the user to remove it only after confirming nothing broke:
114
+ ```
115
+ ⚠️ Backup at .claude.backup-<STAMP>/. Delete when you confirm the merge
116
+ did not break local customizations. (rm -rf .claude.backup-*)
117
+ ```
118
+
119
+ ### 3.6 Frontend quality retrofit (ESLint + Playwright)
120
+
121
+ After the `.claude/` merge, projects scaffolded BEFORE the ESLint+Playwright
122
+ fix may still lack `npm run lint` and `npx playwright test`. This breaks
123
+ `auto-test-guard`, `prd-ready-check`, and `run-sprint`.
124
+
125
+ 1. **Detect** if `frontend/` exists (either `frontend/angular.json` or
126
+ `frontend/vite.config.*`, or the same files at the project root).
127
+ 2. **Detect lacuna** — read `frontend/package.json` and check:
128
+ - `devDependencies['@angular-eslint/schematics']` OR `devDependencies.eslint` present
129
+ - `devDependencies['@playwright/test']` present
130
+ - `scripts.lint` defined
131
+ - `scripts.e2e` defined
132
+ - `playwright.config.ts` (or `.js`) exists at the frontend root
133
+ 3. **If anything is missing**, show the user what is missing and ASK before applying:
134
+ ```
135
+ The frontend lacks quality tooling required by auto-test-guard:
136
+ - ESLint config: <missing | present>
137
+ - Playwright: <missing | present>
138
+ - npm scripts (lint / e2e): <missing | present>
139
+ - playwright.config.ts: <missing | present>
140
+
141
+ Apply the retrofit (idempotent, installs missing pieces only)?
142
+ - Runs: bash scripts/retrofit-frontend-quality.sh <project>
143
+ - Modifies: frontend/package.json, frontend/eslint.config.js,
144
+ frontend/playwright.config.ts, frontend/e2e/smoke.spec.ts
145
+ - Does NOT touch existing source code in src/
146
+
147
+ Confirm? [Y/n]
148
+ ```
149
+ 4. **Only with explicit "yes"**, run:
150
+ ```bash
151
+ bash "<TEMPLATE_ROOT>/scripts/retrofit-frontend-quality.sh" "<PROJECT>"
152
+ ```
153
+ 5. Report what was installed, skipped (already present), and the final
154
+ commands to validate (`npm run lint`, `npx playwright test`).
155
+
156
+ If the project is backend-only, skip this entire phase silently.
157
+
158
+ ---
159
+
160
+ ## 4. Local customizations — what is preserved
161
+
162
+ Merge rule: `cp -r` from the template on top of the project's `.claude/`.
163
+
164
+ - **Template files** overwrite project files (newer version wins).
165
+ - **Files in the project that the template doesn't have** remain (they are local customizations).
166
+ - Everything is backed up first — nothing is irreversibly lost.
167
+
168
+ If the user had a custom agent or skill with the SAME name as one that exists in the template, the template's wins. Warn in the report and point to the backup as the source of the old version.
169
+
170
+ ---
171
+
172
+ ## 5. Common errors and how to react
173
+
174
+ | Symptom | Likely cause | Action |
175
+ |---|---|---|
176
+ | `bash: command not found` | Windows without Git Bash | Ask to install Git for Windows. |
177
+ | `template not found` | Template folder moved | Ask for the correct path. |
178
+ | `Folder does not exist` | Wrong project path | Ask for `pwd` and confirm. |
179
+ | `Could not detect type` | Project without `backend/` or `frontend/` | Ask for the type and run with `--force-type=<type>`. |
180
+ | `CLAUDE.md type ≠ detected` | Project changed scope | Ask if they want to force with `--force-type=<new-type>`. |
181
+
182
+ ---
183
+
184
+ ## 6. Example interaction
185
+
186
+ **User**: "update the template here in social_ai"
187
+
188
+ **You**:
189
+ 1. Check cwd → `C:\development\source\projects\social_ai` ✓
190
+ 2. Locate template at `C:\development\tools\claude-code-agents` ✓
191
+ 3. Detect type: `backend/pom.xml` exists + `frontend/angular.json` exists → `fullstack` + `angular`
192
+ 4. Read `CLAUDE.md`: already has `> **Project type**: \`fullstack\`` → consistent ✓
193
+ 5. Show preview to the user (see 3.3).
194
+ 6. User answers "yes".
195
+ 7. Run `bash /c/development/tools/claude-code-agents/scripts/adopt-project.sh "/c/development/source/projects/social_ai" --template="/c/development/tools/claude-code-agents"`.
196
+ 8. Report the result and the backup.
197
+
198
+ ---
199
+
200
+ ## 7. DO NOT use this skill to
201
+
202
+ - **Create a project from scratch** → `scaffold` / `scaffold` / `scaffold`.
203
+ - **Implement a feature** → `run-sprint` (full pipeline) or `analyst` + `run-sprint`.
204
+ - **Update `node_modules` / project dependencies** → that's `npm update` / `mvn versions:use-latest-releases` — nothing to do with the template.
205
+ - **Change the project type** → record an ADR and manually adjust `CLAUDE.md`. This skill **does not** convert backend-only into fullstack.
206
+
207
+ ---
208
+
209
+ ## 8. Output
210
+
211
+ Always end with:
212
+
213
+ ```
214
+ ✅ Template synchronized.
215
+ Type: <type> (<stack>)
216
+ Backup: <.claude.backup-STAMP/ or "none">
217
+ Frontend quality retrofit: <applied | already-present | skipped (backend-only)>
218
+ Daily: updated
219
+
220
+ Next step: describe a feature and trigger `run-sprint`, or ask
221
+ something about the project and trigger `pipeline`.
222
+ ```
223
+
224
+ ---
225
+
226
+ ## 9. Audit mode (absorved `auditor` agent — 2026-05-27)
227
+
228
+ Previously the harness shipped a separate `auditor` agent (`.claude/agents/auditor.md`, deleted 2026-05-27) whose sole job was to compare a project's `.claude/` structure against the template **without** applying changes. That capability is now part of this skill via `--dry-run`.
229
+
230
+ ### Triggering audit-only mode
231
+
232
+ - "/active-project `<path>` --dry-run" — non-interactive audit from outside the project.
233
+ - "audit the .claude structure here" — interactive audit from inside the project. The skill detects the audit intent in the prompt and skips Step 5 (Execute) — only Steps 1-4 (preview report) run.
234
+ - PT: "audita a estrutura claude", "compara com o template", "verifica desatualizado".
235
+
236
+ ### What audit mode reports
237
+
238
+ For each diff vs the template:
239
+ - Missing files (agents/skills/settings/hooks).
240
+ - Divergent files (content drift).
241
+ - Outdated agents/skills (older version than template).
242
+ - Risk classification per finding: high (missing critical agent), medium (drift in non-critical file), low (cosmetic).
243
+ - Recommendation: which command to run to fix (`duk install` from inside, `/active-project <path>` from outside).
244
+
245
+ ### Safety rule (inherited from auditor agent)
246
+
247
+ Audit mode is **read-only**. NEVER copy, edit, delete, or overwrite files. When issues are found, recommend running the appropriate sync command — never apply automatically.
248
+
249
+ ## Impeccable version pin (ADR-010)
250
+
251
+ The design gate depends on the Impeccable detector. Pin the version and only bump it explicitly (never silently):
252
+
253
+ - CLI: `npx impeccable@2.1.9` (the wrapper `scripts/impeccable-gate.mjs` uses `npx -y impeccable`).
254
+ - To bump: update the pinned version here + in `scripts/impeccable-gate.mjs` docs, run a baseline diff, then commit. See ADR-010.
@@ -0,0 +1,30 @@
1
+ # Stack pack ownership — referenced by ADR-027 (governance) + GitHub branch protection.
2
+ #
3
+ # Format: <pattern> @owner1 @owner2 ...
4
+ # PRs touching files matched by a pattern require approval from at least one owner.
5
+ # Lines are evaluated bottom-up — more specific patterns override earlier ones.
6
+
7
+ # Default ownership for any pack (when no specific rule matches)
8
+ * @elton
9
+
10
+ # Java packs — primary owner is whoever introduced/maintains them
11
+ java/* @elton
12
+
13
+ # TypeScript packs (Angular, React, React Native, Vue)
14
+ typescript/* @elton
15
+
16
+ # Python packs (placeholder — add dev2/dev3 handles when packs are created)
17
+ # python/* @dev2 @dev3
18
+
19
+ # Go packs (placeholder)
20
+ # go/* @dev3
21
+
22
+ # Mobile-specific packs (React Native, Flutter)
23
+ # mobile/* @elton
24
+
25
+ # Database packs (Postgres conventions, Mongo, Redis)
26
+ # database/* @elton
27
+
28
+ # Scaffolding / templates managed centrally
29
+ _template.md @elton
30
+ README.md @elton
@@ -0,0 +1,88 @@
1
+ # Stack Knowledge Packs
2
+
3
+ Specific knowledge per language/framework/version, consumed by generic agents (per ADR-026) and governed by metadata + security review (per ADR-027).
4
+
5
+ ## Index of active packs
6
+
7
+ | Pack | Status | Owner | Last validated | Security review |
8
+ |---|---|---|---|---|
9
+ | [`java/spring-boot-3`](java/spring-boot-3.md) | active | @elton | 2026-05-27 | 2026-05-27 |
10
+ | <future packs> | | | | |
11
+
12
+ (Update this index when adding/deprecating a pack.)
13
+
14
+ ## How packs are consumed
15
+
16
+ 1. **`stack-resolver` agent** reads `## Project Identity` from `CLAUDE.md`, extracts `Primary stack` (language + framework + version).
17
+ 2. **Path resolution**: `.claude/stacks/<lang>/<framework>-<major>.md`. Example: `Primary stack: Java 21 + Spring Boot 3.2.5` → `.claude/stacks/java/spring-boot-3.md`.
18
+ 3. **Inline injection**: the resolver Reads the pack and includes contents in the prompt of any specialist agent it dispatches (backend-developer, frontend-developer, qa-engineer, etc.).
19
+ 4. **Validation post-hoc**: specialist agents emit `[STACK: <lang>/<framework>-<major> | PACK: loaded|none]` as first line of output; invoking skill verifies.
20
+
21
+ See ADR-026 for the 3-layer defense mechanism in detail.
22
+
23
+ ## How to create a new pack
24
+
25
+ ### Option A — Skill-driven (recommended)
26
+
27
+ Open Cowork in your project and say:
28
+
29
+ ```
30
+ cria pack para <stack> <versão>
31
+ ```
32
+
33
+ The `create-stack-pack` skill walks you through 5-8 questions, infers patterns from your existing code, and generates the pack in `.claude/stacks/<lang>/<framework>-<major>.md`. It also asks if you want to PR back to the harness repo for reuse.
34
+
35
+ ### Option B — Manual
36
+
37
+ 1. Copy `.claude/stacks/_template.md` to `.claude/stacks/<lang>/<framework>-<major>.md`.
38
+ 2. Fill all frontmatter fields (8 mandatory).
39
+ 3. Replace every `<placeholder>` with stack-specific content.
40
+ 4. The `## Security` section is MANDATORY (ADR-027). Use OWASP Top 10 mapping table as scaffold.
41
+ 5. Open PR. CODEOWNERS will trigger required review.
42
+
43
+ ## Versioning convention
44
+
45
+ - One pack per **major version** of the framework: `spring-boot-3.md`, `spring-boot-4.md`.
46
+ - `versions_covered` field declares the minor range: `"3.0.x — 3.4.x"`.
47
+ - New major = new pack file (do NOT update in-place).
48
+ - Up to 3 active packs per language allowed (legacy + current + next).
49
+
50
+ ## Status lifecycle
51
+
52
+ ```
53
+ active ← in use; owner maintains
54
+
55
+ deprecated ← no longer referenced by any project; kept for historical reference
56
+ ↓ (after 1-2 years)
57
+ archived ← moved to .claude/stacks/_archive/<lang>/...; stack-resolver ignores
58
+ ```
59
+
60
+ Pack deletion is rare — prefer `archived` to preserve context.
61
+
62
+ ## Governance summary (from ADR-027)
63
+
64
+ - **Frontmatter**: 8 fields mandatory. Lint blocks merge if any missing.
65
+ - **`## Security` section**: MANDATORY in every pack.
66
+ - **CODEOWNERS**: PR requires owner approval (via GitHub branch protection).
67
+ - **Annual security review**: 1h/pack/year. Updates `security_review` + `next_review_due` fields.
68
+ - **Validation**: `last_validated` updated when pack is exercised against a real project.
69
+
70
+ ## Lint rules (per `scripts/lint-harness.mjs`)
71
+
72
+ | Check | Severity | Blocks merge? |
73
+ |---|---|---|
74
+ | Frontmatter incomplete | ERROR | Yes |
75
+ | Missing `## Security` section | ERROR | Yes |
76
+ | Deprecated pack referenced by active project | ERROR | Yes |
77
+ | Project version outside `versions_covered` | WARNING | No |
78
+ | `last_validated` > 12 months | WARNING | No |
79
+ | `security_review` > 12 months | WARNING | No |
80
+ | `pack_owner` invalid handle | WARNING | No |
81
+
82
+ ## References
83
+
84
+ - ADR-026 — Generic agents + stack packs
85
+ - ADR-027 — Pack governance (frontmatter + security + CODEOWNERS)
86
+ - ADR-029 — Canonical pack format (this directory's template)
87
+ - `_template.md` — copy this to start a new pack
88
+ - `scripts/lint-harness.mjs` — enforces governance