@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.
- package/.claude/agents/analyst.md +198 -0
- package/.claude/agents/backend-developer.md +126 -0
- package/.claude/agents/brain-keeper.md +229 -0
- package/.claude/agents/code-reviewer.md +181 -0
- package/.claude/agents/database-engineer.md +94 -0
- package/.claude/agents/devops-engineer.md +141 -0
- package/.claude/agents/frontend-developer.md +97 -0
- package/.claude/agents/gate-keeper.md +118 -0
- package/.claude/agents/migrator.md +291 -0
- package/.claude/agents/mobile-developer.md +80 -0
- package/.claude/agents/n8n-specialist.md +94 -0
- package/.claude/agents/product-owner.md +115 -0
- package/.claude/agents/qa-engineer.md +232 -0
- package/.claude/agents/release-engineer.md +204 -0
- package/.claude/agents/scaffold.md +87 -0
- package/.claude/agents/security-engineer.md +199 -0
- package/.claude/agents/sprint-runner.md +44 -0
- package/.claude/agents/stack-resolver.md +84 -0
- package/.claude/agents/tech-lead.md +182 -0
- package/.claude/agents/update-template.md +54 -0
- package/.claude/agents/ux-designer.md +118 -0
- package/.claude/settings.json +44 -0
- package/.claude/skills/README.md +332 -0
- package/.claude/skills/active-project/SKILL.md +129 -0
- package/.claude/skills/api-integration-test/SKILL.md +64 -0
- package/.claude/skills/auto-test-guard/SKILL.md +237 -0
- package/.claude/skills/auto-test-guard/resources/backend-tests.md +20 -0
- package/.claude/skills/auto-test-guard/resources/e2e-tests.md +24 -0
- package/.claude/skills/auto-test-guard/resources/execution-report.md +49 -0
- package/.claude/skills/auto-test-guard/resources/frontend-tests.md +18 -0
- package/.claude/skills/auto-test-guard/resources/initial-setup.md +108 -0
- package/.claude/skills/auto-test-guard/resources/run-suite.md +48 -0
- package/.claude/skills/auto-test-guard/resources/senior-gate.md +19 -0
- package/.claude/skills/brain-keeper/SKILL.md +60 -0
- package/.claude/skills/brain-keeper/obsidian/app.json +9 -0
- package/.claude/skills/brain-keeper/obsidian/appearance.json +4 -0
- package/.claude/skills/brain-keeper/obsidian/core-plugins.json +20 -0
- package/.claude/skills/brain-keeper/obsidian/daily-notes.json +5 -0
- package/.claude/skills/brain-keeper/obsidian/graph.json +32 -0
- package/.claude/skills/brain-keeper/obsidian/snippets/folder-colors.css +90 -0
- package/.claude/skills/brain-keeper/obsidian/templates.json +5 -0
- package/.claude/skills/brain-keeper/templates/README.md +51 -0
- package/.claude/skills/brain-keeper/templates/adr.md +40 -0
- package/.claude/skills/brain-keeper/templates/bug.md +35 -0
- package/.claude/skills/brain-keeper/templates/daily.md +38 -0
- package/.claude/skills/brain-keeper/templates/feature.md +62 -0
- package/.claude/skills/brain-keeper/templates/meeting.md +34 -0
- package/.claude/skills/brain-keeper/templates/tech-debt.md +21 -0
- package/.claude/skills/caveman/SKILL.md +187 -0
- package/.claude/skills/create-stack-pack/SKILL.md +281 -0
- package/.claude/skills/grill-me/SKILL.md +79 -0
- package/.claude/skills/honcho-memory/SKILL.md +207 -0
- package/.claude/skills/honcho-memory/docs/api-endpoints-verified.md +75 -0
- package/.claude/skills/honcho-memory/hooks/on-prompt-submit.js +221 -0
- package/.claude/skills/honcho-memory/hooks/on-stop.js +193 -0
- package/.claude/skills/honcho-memory/lib/honcho-client.js +363 -0
- package/.claude/skills/honcho-memory/lib/memory-injector.js +93 -0
- package/.claude/skills/honcho-memory/package.json +32 -0
- package/.claude/skills/honcho-memory/scripts/cli.js +370 -0
- package/.claude/skills/honcho-memory/scripts/setup.js +109 -0
- package/.claude/skills/honcho-memory/tests/t001-api-endpoints-verified.test.js +89 -0
- package/.claude/skills/honcho-memory/tests/t002-structure.test.js +97 -0
- package/.claude/skills/honcho-memory/tests/t003-honcho-client.test.js +162 -0
- package/.claude/skills/honcho-memory/tests/t004-soft-delete.test.js +259 -0
- package/.claude/skills/honcho-memory/tests/t005-memory-injector.test.js +175 -0
- package/.claude/skills/honcho-memory/tests/t006-on-prompt-submit.test.js +215 -0
- package/.claude/skills/honcho-memory/tests/t007-on-stop.test.js +165 -0
- package/.claude/skills/honcho-memory/tests/t008-cli.test.js +214 -0
- package/.claude/skills/honcho-memory/tests/t009-setup.test.js +232 -0
- package/.claude/skills/honcho-memory/tests/t010-skill-md.test.js +114 -0
- package/.claude/skills/honcho-memory/tests/t011-settings-hooks.test.js +105 -0
- package/.claude/skills/honcho-memory/tests/t012-docs-update.test.js +106 -0
- package/.claude/skills/honcho-memory/tests/t013-smoke-e2e.test.js +90 -0
- package/.claude/skills/pair-debug/SKILL.md +288 -0
- package/.claude/skills/prd-ready-check/SKILL.md +58 -0
- package/.claude/skills/project-manager/SKILL.md +167 -0
- package/.claude/skills/quality-standards/SKILL.md +201 -0
- package/.claude/skills/quick-feature/SKILL.md +264 -0
- package/.claude/skills/run-sprint/SKILL.md +342 -0
- package/.claude/skills/scaffold/SKILL.md +58 -0
- package/.claude/skills/stack-discovery/SKILL.md +159 -0
- package/.claude/skills/test-coverage-auditor/SKILL.md +59 -0
- package/.claude/skills/to-issues/SKILL.md +163 -0
- package/.claude/skills/to-prd/SKILL.md +130 -0
- package/.claude/skills/update-template/SKILL.md +254 -0
- package/.claude/stacks/CODEOWNERS +30 -0
- package/.claude/stacks/README.md +88 -0
- package/.claude/stacks/_template.md +116 -0
- package/.claude/stacks/java/spring-boot-3.md +376 -0
- package/.claude/stacks/java/spring-boot-4.md +438 -0
- package/.claude/stacks/typescript/angular-18.md +420 -0
- package/.claude/stacks/typescript/angular-19.md +397 -0
- package/.claude/stacks/typescript/angular-21.md +494 -0
- package/CLAUDE.md +453 -0
- package/README.md +391 -0
- package/bin/cli.js +773 -0
- package/bin/lib/backup.js +62 -0
- package/bin/lib/detect-stack.js +476 -0
- package/bin/lib/help.js +233 -0
- package/bin/lib/identity.js +108 -0
- package/bin/lib/local-dir.js +69 -0
- package/bin/lib/manifest.js +236 -0
- package/bin/lib/sync-all.js +394 -0
- package/bin/lib/version-check.js +398 -0
- package/dashboard/db.js +199 -0
- package/dashboard/package.json +22 -0
- package/dashboard/public/app.js +709 -0
- package/dashboard/public/content/docs/agents-reference.en.md +911 -0
- package/dashboard/public/content/docs/architecture-overview.en.md +260 -0
- package/dashboard/public/content/docs/autonomy-matrix.en.md +186 -0
- package/dashboard/public/content/docs/git-flow.en.md +525 -0
- package/dashboard/public/content/docs/honcho-memory.en.md +394 -0
- package/dashboard/public/content/docs/hooks-reference.en.md +420 -0
- package/dashboard/public/content/docs/pipeline.en.md +400 -0
- package/dashboard/public/content/docs/quality-gate.en.md +315 -0
- package/dashboard/public/content/docs/skills-reference.en.md +500 -0
- package/dashboard/public/content/docs/stack-rules.en.md +362 -0
- package/dashboard/public/content/docs/troubleshooting.en.md +637 -0
- package/dashboard/public/content/manifest.json +102 -0
- package/dashboard/public/content/manual/backend.en.md +1138 -0
- package/dashboard/public/content/manual/existing-project.en.md +831 -0
- package/dashboard/public/content/manual/frontend.en.md +1065 -0
- package/dashboard/public/content/manual/fullstack.en.md +1508 -0
- package/dashboard/public/content/manual/mobile.en.md +866 -0
- package/dashboard/public/index.html +108 -0
- package/dashboard/public/style.css +610 -0
- package/dashboard/public/vendor/marked.min.js +69 -0
- package/dashboard/rtk.js +143 -0
- package/dashboard/server-app.js +403 -0
- package/dashboard/server.js +104 -0
- package/dashboard/test/sprint1.test.js +406 -0
- package/dashboard/test/sprint2.test.js +571 -0
- package/dashboard/test/sprint3.test.js +560 -0
- package/package.json +33 -0
- package/scripts/hooks/subagent-telemetry.sh +14 -0
- package/scripts/hooks/telemetry-writer.js +250 -0
- package/scripts/latest-versions.json +56 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-standards
|
|
3
|
+
description: Reference knowledge pack for the project's senior+ quality standards — a11y (jest-axe + @axe-core/playwright), performance (Lighthouse CI budgets), and testing pyramid (unit/integration/e2e ratios). Use when configuring jest-axe in a new project, setting up Lighthouse CI, computing pyramid ratios, or interpreting violations of these gates. This is a knowledge skill — it does not execute commands; it provides the canonical reference that `qa-engineer` and `gate-keeper` consult on demand. Triggers on "a11y setup", "jest-axe config", "axe-playwright config", "Lighthouse CI config", "lighthouserc.json", "performance budget", "pyramid ratio", "testing pyramid", "como configurar acessibilidade", "configura lhci". PT triggers: 'a11y setup', 'configura jest-axe', 'pirâmide de testes', 'orçamento de performance'.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Quality Standards — Knowledge Pack
|
|
7
|
+
|
|
8
|
+
> **Knowledge skill, not executor.** This skill provides canonical configuration and rationale for three quality gates that `qa-engineer` and `gate-keeper` implement: accessibility (jest-axe + axe-playwright), performance (Lighthouse CI), and testing pyramid ratios. No commands run here — consult and apply.
|
|
9
|
+
|
|
10
|
+
This pack was extracted from `qa-engineer.md` (368L → ~190L) on 2026-05-27 to keep the qa-engineer agent focused on test authorship while leaving long-form references reusable.
|
|
11
|
+
|
|
12
|
+
Always respond in American English.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. Accessibility (per ADR-007)
|
|
17
|
+
|
|
18
|
+
### 1.1 Component-level — `jest-axe`
|
|
19
|
+
|
|
20
|
+
Install once per Angular project:
|
|
21
|
+
```bash
|
|
22
|
+
npm i -D jest-axe @types/jest-axe
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Every component spec MUST run `axe` after render:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { render } from '@testing-library/angular';
|
|
29
|
+
import { axe, toHaveNoViolations } from 'jest-axe';
|
|
30
|
+
import { ProductFormComponent } from './product-form.component';
|
|
31
|
+
|
|
32
|
+
expect.extend(toHaveNoViolations);
|
|
33
|
+
|
|
34
|
+
test('product-form has no a11y violations', async () => {
|
|
35
|
+
const { container } = await render(ProductFormComponent);
|
|
36
|
+
const results = await axe(container, {
|
|
37
|
+
rules: { /* override only with justification + ADR */ }
|
|
38
|
+
});
|
|
39
|
+
expect(results).toHaveNoViolations();
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Gate enforced by `gate-keeper`**: 0 violations of impact `serious` or `critical`. Violations `minor`/`moderate` go to `docs/brain/architecture/tech-debt.md` with deadline.
|
|
44
|
+
|
|
45
|
+
### 1.2 E2E-level — `@axe-core/playwright`
|
|
46
|
+
|
|
47
|
+
Install once:
|
|
48
|
+
```bash
|
|
49
|
+
npm i -D @axe-core/playwright
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Every Playwright spec MUST run a full-page scan after the critical interaction:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { test, expect } from '@playwright/test';
|
|
56
|
+
import AxeBuilder from '@axe-core/playwright';
|
|
57
|
+
|
|
58
|
+
test('checkout flow is a11y clean', async ({ page }) => {
|
|
59
|
+
await page.goto('/checkout');
|
|
60
|
+
await page.getByRole('button', { name: /confirmar/i }).click();
|
|
61
|
+
|
|
62
|
+
const results = await new AxeBuilder({ page })
|
|
63
|
+
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
|
|
64
|
+
.analyze();
|
|
65
|
+
|
|
66
|
+
expect(results.violations.filter(v => ['serious','critical'].includes(v.impact))).toEqual([]);
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 1.3 Reusable helper
|
|
71
|
+
|
|
72
|
+
`tests/e2e/_axe.ts`:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import AxeBuilder from '@axe-core/playwright';
|
|
76
|
+
import type { Page } from '@playwright/test';
|
|
77
|
+
|
|
78
|
+
export async function expectNoA11yViolations(page: Page) {
|
|
79
|
+
const results = await new AxeBuilder({ page })
|
|
80
|
+
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
|
|
81
|
+
.analyze();
|
|
82
|
+
const blocking = results.violations.filter(v =>
|
|
83
|
+
['serious', 'critical'].includes(v.impact ?? '')
|
|
84
|
+
);
|
|
85
|
+
if (blocking.length > 0) {
|
|
86
|
+
const summary = blocking.map(v => `${v.id} (${v.impact}): ${v.help}`).join('\n');
|
|
87
|
+
throw new Error(`A11y violations:\n${summary}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 2. Performance budget — Lighthouse CI (per ADR-007)
|
|
95
|
+
|
|
96
|
+
Install once:
|
|
97
|
+
```bash
|
|
98
|
+
npm i -D @lhci/cli
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`lighthouserc.json` (project root):
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"ci": {
|
|
106
|
+
"collect": {
|
|
107
|
+
"url": ["http://localhost:4200/"],
|
|
108
|
+
"numberOfRuns": 3,
|
|
109
|
+
"settings": { "preset": "desktop" }
|
|
110
|
+
},
|
|
111
|
+
"assert": {
|
|
112
|
+
"assertions": {
|
|
113
|
+
"categories:performance": ["error", { "minScore": 0.80 }],
|
|
114
|
+
"largest-contentful-paint": ["error", { "maxNumericValue": 2500 }],
|
|
115
|
+
"cumulative-layout-shift": ["error", { "maxNumericValue": 0.1 }],
|
|
116
|
+
"total-blocking-time": ["error", { "maxNumericValue": 300 }]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"upload": { "target": "filesystem", "outputDir": "./.lighthouseci" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Command run by `gate-keeper` after `ng build --configuration=production`:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npx lhci autorun
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`@lhci/cli` runs 3 times and uses median automatically. Fail in 2 of 3 = RED.
|
|
131
|
+
|
|
132
|
+
**Thresholds (hard-fail in median-of-3)**:
|
|
133
|
+
- Performance score ≥ 0.80
|
|
134
|
+
- LCP ≤ 2500ms
|
|
135
|
+
- CLS ≤ 0.1
|
|
136
|
+
- TBT ≤ 300ms
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 3. Testing pyramid — 70/20/10 (per ADR-007)
|
|
141
|
+
|
|
142
|
+
Metric collected by `gate-keeper` counting test files:
|
|
143
|
+
|
|
144
|
+
- **Backend**: `**/*Test.java` (unit) | `**/*IT.java` (integration) | E2E does not count on backend
|
|
145
|
+
- **Frontend**: `**/*.spec.ts` excluding `tests/e2e/**` (unit/integration summed) | `tests/e2e/**/*.spec.ts` (E2E)
|
|
146
|
+
|
|
147
|
+
Calculation:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
total = unit + integration + e2e
|
|
151
|
+
unit_ratio = unit / total
|
|
152
|
+
integration_ratio = integration / total
|
|
153
|
+
e2e_ratio = e2e / total
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 3.1 Targets (warn outside these ranges)
|
|
157
|
+
|
|
158
|
+
- `unit_ratio ≥ 60%` (ideal 70%)
|
|
159
|
+
- `integration_ratio ∈ [15%, 30%]`
|
|
160
|
+
- `e2e_ratio ≤ 15%` (ideal 10%)
|
|
161
|
+
|
|
162
|
+
**Hard-fail only on `e2e_ratio > 30%`.** Above that = architectural smell — the team is testing through the top because the domain is poorly modeled.
|
|
163
|
+
|
|
164
|
+
### 3.2 gate-keeper report line
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Pyramid: unit 72% (180) | integration 22% (55) | e2e 6% (15) → balanced
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
or
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
Pyramid: unit 45% (90) | integration 20% (40) | e2e 35% (70) → RED: e2e_ratio > 30%
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### 3.3 Fixing high `e2e_ratio`
|
|
177
|
+
|
|
178
|
+
The cure is **never** deleting E2E tests. Instead:
|
|
179
|
+
|
|
180
|
+
1. Identify E2E that duplicates integration coverage — promote to integration test (Testcontainers).
|
|
181
|
+
2. Identify E2E that duplicates unit coverage — promote to unit test.
|
|
182
|
+
3. Domain modeling review — if behaviors only assertable end-to-end, the domain has anemic abstractions.
|
|
183
|
+
|
|
184
|
+
The hook `block-test-deletion.sh` (when implemented) refuses `rm` on test files without an ADR.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 4. Who consults this skill
|
|
189
|
+
|
|
190
|
+
- `qa-engineer` agent — reads this when authoring new a11y tests, configuring jest-axe, or interpreting violations.
|
|
191
|
+
- `gate-keeper` agent — reads this when computing pyramid ratio, running lhci, or formatting reports.
|
|
192
|
+
- `auto-test-guard` skill — references this in `resources/senior-gate.md`.
|
|
193
|
+
- `prd-ready-check` skill — consults thresholds when deciding GO/NO-GO.
|
|
194
|
+
|
|
195
|
+
## 5. References
|
|
196
|
+
|
|
197
|
+
- ADR-007 (Senior+ gate: a11y + Lighthouse + pyramid thresholds)
|
|
198
|
+
- ADR-008 (Standard senior+ pipeline — when this skill is consulted in the flow)
|
|
199
|
+
- `.claude/agents/qa-engineer.md` (test author — slim version after this pack was extracted)
|
|
200
|
+
- `.claude/agents/gate-keeper.md` (gate runner)
|
|
201
|
+
- `.claude/skills/auto-test-guard/resources/senior-gate.md` (gate manifest)
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quick-feature
|
|
3
|
+
description: Fast-lane for small/medium features that don't justify the full grill-me → to-prd → to-issues → analyst → run-sprint pipeline. Use when the requirement is concrete enough that a 5-question discovery interview would be friction, not value. Examples: "add a new field to the Product DTO", "fix the search to be case-insensitive", "create endpoint to export sales as CSV", "add pagination to the orders list", "add a confirm dialog before delete". Triggers on "quick feature", "atalho", "fast-lane", "feature pequena", "ajuste rápido", "small feature", "tarefa pequena". Generates a minimal PLAN_*.md (1 sprint, 1-3 tasks, goal-ready DoD) directly from the user's description — no discovery, no PRD, no issues — and hands off to run-sprint. Do NOT use for new bounded contexts, new domain concepts, cross-cutting refactors, or features requiring architectural decisions (those still need grill-me + analyst + ADR). Do NOT use to skip the senior+ gate — gate-keeper still runs at end-of-task. PT triggers: 'feature rápida', 'tarefa pequena', 'ajuste rápido', 'pula a entrevista', 'só vai e faz', 'quick feature', 'atalho'.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Quick Feature — Fast-lane for small features
|
|
7
|
+
|
|
8
|
+
> **Bypass authorized only for low-risk, well-scoped work.** The full pipeline (`grill-me → to-prd → to-issues → analyst → run-sprint`) exists to surface hidden requirements and force discovery. For small features where the requirement is already concrete, that pipeline is friction. This skill is the audited bypass: it generates a minimal PLAN, dispatches `run-sprint`, and lets `gate-keeper` do its job at the end.
|
|
9
|
+
|
|
10
|
+
Always respond in American English.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. When to trigger
|
|
15
|
+
|
|
16
|
+
- "quick feature: <description>"
|
|
17
|
+
- "atalho: <descrição>"
|
|
18
|
+
- "feature pequena: <X>", "tarefa pequena: <X>", "ajuste rápido"
|
|
19
|
+
- "pula a entrevista, é simples"
|
|
20
|
+
- "só vai e faz: <X>"
|
|
21
|
+
- "small feature", "fast-lane"
|
|
22
|
+
- Examples that fit:
|
|
23
|
+
- "add a new field `description` to ProductRequest DTO with validation"
|
|
24
|
+
- "fix the product search to be case-insensitive"
|
|
25
|
+
- "add CSV export to the sales list page"
|
|
26
|
+
- "add a confirmation dialog before deleting an order"
|
|
27
|
+
- "expose a new GET endpoint that returns count by status"
|
|
28
|
+
|
|
29
|
+
## 2. When NOT to trigger
|
|
30
|
+
|
|
31
|
+
This skill is **NOT** for:
|
|
32
|
+
|
|
33
|
+
- **New bounded context** or new domain concept → `grill-me` + `to-prd` + `analyst` (full pipeline).
|
|
34
|
+
- **Cross-cutting refactor** (changing pattern, splitting monolith, redesigning API) → `tech-lead` + ADR.
|
|
35
|
+
- **Architectural decision** (Kafka vs SQS, Hexagonal vs Clean, new lib choice) → `tech-lead` + ADR.
|
|
36
|
+
- **Feature touching > 5 files or > 2 bounded contexts** → use full pipeline; it's not small.
|
|
37
|
+
- **Ambiguous requirements** (you can phrase 3+ different things from the prompt) → `grill-me` instead.
|
|
38
|
+
- **Bug in production** → `pair-debug` (hypothesis-driven), not this.
|
|
39
|
+
- **Performance regression without clear cause** → `pair-debug` + `tech-lead`.
|
|
40
|
+
|
|
41
|
+
When in doubt → full pipeline. Bypass exists for clear cases; ambiguity is the signal to NOT bypass.
|
|
42
|
+
|
|
43
|
+
## 3. Flow
|
|
44
|
+
|
|
45
|
+
### Step 1 — Confirm scope is "small"
|
|
46
|
+
|
|
47
|
+
Apply the 4-question sanity check (silent, do not ask the user):
|
|
48
|
+
|
|
49
|
+
1. Is the requirement concrete enough to phrase as a single user story?
|
|
50
|
+
2. Does it touch ≤ 5 files in a single bounded context?
|
|
51
|
+
3. Does it NOT require an ADR (no pattern change, no new dependency)?
|
|
52
|
+
4. Are inputs/outputs/validation already implied by existing code patterns?
|
|
53
|
+
|
|
54
|
+
If any answer is **no**, **stop and instruct** the user to use the full pipeline (`grill me sobre <X>`). Do not generate the PLAN.
|
|
55
|
+
|
|
56
|
+
### Stage 0 — Stack pre-resolution (per ADR-026 Layer 1)
|
|
57
|
+
|
|
58
|
+
> **MANDATORY after Step 1 sanity check passes and BEFORE Step 2 grounding.** Resolves the project's stack so every downstream dispatch (`sprint-runner` → developers, `qa-engineer`, `gate-keeper`) receives the correct knowledge pack inline in its prompt. Avoids re-resolution in `run-sprint` (optimization: resolve once, propagate).
|
|
59
|
+
|
|
60
|
+
Steps:
|
|
61
|
+
|
|
62
|
+
a) Invoke `stack-resolver` via Task tool:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Task(
|
|
66
|
+
subagent_type: "stack-resolver",
|
|
67
|
+
description: "Resolve stack for project at CWD",
|
|
68
|
+
prompt: "resolve stack for project at CWD"
|
|
69
|
+
)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
b) Parse the first line of `stack-resolver` output:
|
|
73
|
+
|
|
74
|
+
- **`[STACK: <lang>/<framework>-<major> | PACK: loaded]`** — extract the full `STACK CONTEXT` block from the response. Store it in memory as `STACK_CONTEXT_BLOCK` for use in Step 4 dispatch.
|
|
75
|
+
- **`[STACK: <lang>/<framework>-<major> | PACK: none]`** — pack missing. Dispatch the `create-stack-pack` skill conversationally:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Stack pack ausente para `<lang>/<framework>-<major>`. Disparando `create-stack-pack` para gerar agora; depois repito Stage 0.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Once the pack is created, repeat Stage 0a.
|
|
82
|
+
|
|
83
|
+
c) `STACK_CONTEXT_BLOCK` is now ready to inject as a prompt prefix into Step 4 dispatch (and any in-flow Task call this skill makes).
|
|
84
|
+
|
|
85
|
+
If `stack-resolver` cannot determine the stack (no `## Project Identity` in CLAUDE.md, unparseable `Primary stack`), abort with a clear message:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Não consegui resolver a stack do projeto. Preencha a seção `## Project Identity` da CLAUDE.md com `Primary stack: <lang> <version> + <framework> <version>` e tente de novo.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 2 — Ground in the codebase
|
|
92
|
+
|
|
93
|
+
Read existing similar code via `Read`, `Glob`, `Grep`:
|
|
94
|
+
- For backend: find an analogous endpoint/use case/service.
|
|
95
|
+
- For frontend: find an analogous component/feature folder.
|
|
96
|
+
- For database: find existing migration patterns + naming.
|
|
97
|
+
|
|
98
|
+
State to the user in 2-3 lines what you found (anchoring the work in concrete files).
|
|
99
|
+
|
|
100
|
+
### Step 3 — Generate minimal PLAN
|
|
101
|
+
|
|
102
|
+
Write `docs/plans/PLAN_<slug>.md` with this slim structure:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
# PLAN — <feature title>
|
|
106
|
+
|
|
107
|
+
- **Type**: quick-feature (fast-lane, bypassed discovery)
|
|
108
|
+
- **Date**: <ISO>
|
|
109
|
+
- **Estimated effort**: S (small, 1-3 tasks, ≤ 1 sprint)
|
|
110
|
+
- **Bounded context**: <module/feature>
|
|
111
|
+
- **Anchored in**: <list of existing files used as reference>
|
|
112
|
+
- **Stack**: <lang>/<framework>-<major> (from Stage 0)
|
|
113
|
+
|
|
114
|
+
## 1. User story (single, prose)
|
|
115
|
+
|
|
116
|
+
As a <persona>, I want <capability>, so that <value>.
|
|
117
|
+
|
|
118
|
+
## 2. Acceptance criteria (Given/When/Then)
|
|
119
|
+
|
|
120
|
+
- Given <state>, When <action>, Then <result>.
|
|
121
|
+
- (1-3 criteria — happy path + main edge case)
|
|
122
|
+
|
|
123
|
+
## 3. Sprint 1 — Tasks
|
|
124
|
+
|
|
125
|
+
### Task 1.1 — <verb + noun>
|
|
126
|
+
- **Layer**: backend|frontend|migration|test
|
|
127
|
+
- **Files touched** (expected): <list>
|
|
128
|
+
- **Definition of Done** (goal-ready):
|
|
129
|
+
- `<command>` returns exit 0
|
|
130
|
+
- file `<path>` contains `<assertion>`
|
|
131
|
+
- test `<TestClass#method>` passes
|
|
132
|
+
|
|
133
|
+
### Task 1.2 — ...
|
|
134
|
+
|
|
135
|
+
### Task 1.3 — ... (optional)
|
|
136
|
+
|
|
137
|
+
## 4. Out of scope (explicit)
|
|
138
|
+
|
|
139
|
+
- <thing user might expect but isn't included>
|
|
140
|
+
- (1-3 items to prevent scope creep)
|
|
141
|
+
|
|
142
|
+
## 5. /goal block
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
/goal "PLAN_<slug>.md Sprint 1 is done when:
|
|
146
|
+
1. <DoD task 1.1 verbatim>
|
|
147
|
+
2. <DoD task 1.2 verbatim>
|
|
148
|
+
3. ./mvnw verify returns exit 0
|
|
149
|
+
4. npm test -- --watchAll=false returns exit 0
|
|
150
|
+
5. gate-keeper returns GREEN on the new code
|
|
151
|
+
"
|
|
152
|
+
```
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 4 — Hand off to run-sprint
|
|
156
|
+
|
|
157
|
+
Dispatch via Task tool, prefixing the prompt with the `STACK_CONTEXT_BLOCK` captured in Stage 0:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Task(
|
|
161
|
+
subagent_type: "sprint-runner",
|
|
162
|
+
description: "Execute Sprint 1 of PLAN_<slug>.md (quick-feature fast-lane)",
|
|
163
|
+
prompt: """<STACK_CONTEXT_BLOCK from Stage 0>
|
|
164
|
+
|
|
165
|
+
caller: quick-feature
|
|
166
|
+
plan_path: docs/plans/PLAN_<slug>.md
|
|
167
|
+
sprint: 1
|
|
168
|
+
|
|
169
|
+
This PLAN was generated via the quick-feature fast-lane skill — bypassed grill-me/to-prd/to-issues. Treat it as a normal PLAN for execution purposes. TDD is still mandatory (qa-engineer before developer). gate-keeper still validates senior+ thresholds at end-of-task.
|
|
170
|
+
|
|
171
|
+
Stack already resolved upstream; reuse the STACK CONTEXT above when dispatching to backend-developer / frontend-developer / qa-engineer / gate-keeper instead of re-running stack-resolver."""
|
|
172
|
+
)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Step 5 — Done
|
|
176
|
+
|
|
177
|
+
After `run-sprint` returns GREEN, suggest `brain-keeper` to register the feature:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Próximo passo: `registra no cérebro` (brain-keeper salva docs/brain/features/<slug>.md + daily note).
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## 4. Inviolable rules
|
|
184
|
+
|
|
185
|
+
1. **Sanity check in Step 1 is non-negotiable.** Bypass exists for clear cases; ambiguity = full pipeline.
|
|
186
|
+
2. **Stage 0 stack pre-resolution is non-negotiable.** No dispatch to `run-sprint` without `STACK_CONTEXT_BLOCK` from `stack-resolver` (per ADR-026 Layer 1).
|
|
187
|
+
3. **No skip of senior+ gate.** `gate-keeper` runs at end of every task in `run-sprint`, even via fast-lane.
|
|
188
|
+
4. **TDD remains mandatory.** `sprint-runner` still spawns `qa-engineer` to write failing tests before the developer.
|
|
189
|
+
5. **No ADR-level decisions inside quick-feature.** If during execution an architectural question surfaces, `sprint-runner` escalates to `tech-lead`.
|
|
190
|
+
6. **PLAN is goal-ready.** DoD must reference concrete commands/files/tests verifiable by Claude Code's `/goal` evaluator.
|
|
191
|
+
7. **Persist always.** Even fast-lane writes `PLAN_<slug>.md` — auditability is non-negotiable.
|
|
192
|
+
|
|
193
|
+
## 5. Interface with other skills/agents
|
|
194
|
+
|
|
195
|
+
- `stack-resolver` — invoked in Stage 0 to resolve project stack and load knowledge pack (ADR-026 Layer 1).
|
|
196
|
+
- `create-stack-pack` — invoked from Stage 0 when pack is missing for the declared stack.
|
|
197
|
+
- `grill-me` — alternative entry for ambiguous features. Use it when sanity check fails.
|
|
198
|
+
- `analyst` — accepts quick-feature PLAN as valid seed (via `caller: quick-feature` signal in Task prompt; same exemption as `caller: sprint-runner|autonomous`).
|
|
199
|
+
- `sprint-runner` — executes the generated PLAN normally; receives `STACK_CONTEXT_BLOCK` inline in its prompt to skip its own re-resolution.
|
|
200
|
+
- `gate-keeper` — runs senior+ gate end-of-task regardless of how PLAN was produced.
|
|
201
|
+
- `brain-keeper` — registers history post-sprint.
|
|
202
|
+
|
|
203
|
+
## 6. Examples
|
|
204
|
+
|
|
205
|
+
### Example A — adding a field
|
|
206
|
+
|
|
207
|
+
User: `quick-feature: adicionar campo description em ProductRequest com validação NotBlank Size max 500`
|
|
208
|
+
|
|
209
|
+
Skill output (after Stage 0 + Step 2 grounding):
|
|
210
|
+
- Stage 0: `stack-resolver` returned `[STACK: java/spring-boot-4 | PACK: loaded]`. Loaded `.claude/stacks/java/spring-boot-4.md` (record DTO + Bean Validation + jakarta.validation).
|
|
211
|
+
- Identified existing: `application/dto/ProductRequest.java` (current fields: name, price)
|
|
212
|
+
- Identified existing: `web/controller/ProductController.java` (uses @Valid)
|
|
213
|
+
- PLAN with 2 tasks:
|
|
214
|
+
- Task 1.1: add `@NotBlank @Size(max=500) String description` field + update tests
|
|
215
|
+
- Task 1.2: update OpenAPI spec + regenerate frontend types via `openapi-typescript`
|
|
216
|
+
|
|
217
|
+
Step 4 dispatch:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
Task(
|
|
221
|
+
subagent_type: "sprint-runner",
|
|
222
|
+
description: "Execute Sprint 1 of PLAN_product-description-field.md (quick-feature fast-lane)",
|
|
223
|
+
prompt: """[STACK: java/spring-boot-4 | PACK: loaded]
|
|
224
|
+
|
|
225
|
+
STACK CONTEXT
|
|
226
|
+
- Language: Java 25
|
|
227
|
+
- Framework: Spring Boot 4.0.x
|
|
228
|
+
- DTO pattern: record (immutable)
|
|
229
|
+
- Validation: jakarta.validation (@Valid, @NotBlank, @Size)
|
|
230
|
+
- (...pack body inlined...)
|
|
231
|
+
|
|
232
|
+
caller: quick-feature
|
|
233
|
+
plan_path: docs/plans/PLAN_product-description-field.md
|
|
234
|
+
sprint: 1
|
|
235
|
+
(...)"""
|
|
236
|
+
)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Example B — UI ajuste
|
|
240
|
+
|
|
241
|
+
User: `feature pequena: adicionar dialog de confirmação antes de deletar pedido`
|
|
242
|
+
|
|
243
|
+
Skill output:
|
|
244
|
+
- Stage 0: `stack-resolver` returned `[STACK: typescript/angular-21 | PACK: loaded]`.
|
|
245
|
+
- Identified existing: `features/orders/order-list.component.ts` (uses NgbModal already)
|
|
246
|
+
- PLAN with 2 tasks:
|
|
247
|
+
- Task 1.1: extrair ConfirmDialogComponent reutilizável em `shared/components/` (3 arquivos separados conforme pack Angular 21)
|
|
248
|
+
- Task 1.2: integrar em `OrderListComponent.delete()` + teste Jest + a11y
|
|
249
|
+
|
|
250
|
+
### Example C — caso que NÃO encaixa
|
|
251
|
+
|
|
252
|
+
User: `quick-feature: refatorar o módulo de pagamento pra usar Strategy Pattern`
|
|
253
|
+
|
|
254
|
+
Skill output:
|
|
255
|
+
> Sanity check falhou (Q3: requer ADR sobre pattern). Use o fluxo completo: `grill me sobre refatorar pagamento` → produz DISCOVERY → ADR de pattern → PLAN normal. Esta skill é só para features pequenas sem decisão arquitetural.
|
|
256
|
+
|
|
257
|
+
### Example D — pack ausente
|
|
258
|
+
|
|
259
|
+
User: `quick-feature: adicionar endpoint /health customizado`
|
|
260
|
+
|
|
261
|
+
Skill output (Stage 0):
|
|
262
|
+
- `stack-resolver` returned `[STACK: python/fastapi-0.115 | PACK: none]`.
|
|
263
|
+
- Disparando `create-stack-pack` para gerar `.claude/stacks/python/fastapi-0.md` (conversa de 5-8 perguntas).
|
|
264
|
+
- Após pack criado, repito Stage 0a → `PACK: loaded` → segue para Step 2.
|