@thierrynakoa/fire-flow 10.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-plugin/plugin.json +64 -0
- package/ARCHITECTURE-DIAGRAM.md +440 -0
- package/COMMAND-REFERENCE.md +172 -0
- package/DOMINION-FLOW-OVERVIEW.md +421 -0
- package/LICENSE +21 -0
- package/QUICK-START.md +351 -0
- package/README.md +398 -0
- package/TROUBLESHOOTING.md +264 -0
- package/agents/fire-codebase-mapper.md +484 -0
- package/agents/fire-debugger.md +535 -0
- package/agents/fire-executor.md +949 -0
- package/agents/fire-fact-checker.md +276 -0
- package/agents/fire-learncoding-explainer.md +237 -0
- package/agents/fire-learncoding-walker.md +147 -0
- package/agents/fire-planner.md +675 -0
- package/agents/fire-project-researcher.md +155 -0
- package/agents/fire-research-synthesizer.md +166 -0
- package/agents/fire-researcher.md +723 -0
- package/agents/fire-reviewer.md +499 -0
- package/agents/fire-roadmapper.md +203 -0
- package/agents/fire-verifier.md +880 -0
- package/bin/cli.js +208 -0
- package/commands/fire-0-orient.md +476 -0
- package/commands/fire-1-new.md +281 -0
- package/commands/fire-1a-discuss.md +455 -0
- package/commands/fire-2-plan.md +527 -0
- package/commands/fire-3-execute.md +1303 -0
- package/commands/fire-4-verify.md +845 -0
- package/commands/fire-5-handoff.md +515 -0
- package/commands/fire-6-resume.md +501 -0
- package/commands/fire-7-review.md +409 -0
- package/commands/fire-add-new-skill.md +598 -0
- package/commands/fire-analytics.md +499 -0
- package/commands/fire-assumptions.md +78 -0
- package/commands/fire-autonomous.md +528 -0
- package/commands/fire-brainstorm.md +413 -0
- package/commands/fire-complete-milestone.md +270 -0
- package/commands/fire-dashboard.md +375 -0
- package/commands/fire-debug.md +663 -0
- package/commands/fire-discover.md +616 -0
- package/commands/fire-double-check.md +460 -0
- package/commands/fire-execute-plan.md +182 -0
- package/commands/fire-learncoding.md +242 -0
- package/commands/fire-loop-resume.md +272 -0
- package/commands/fire-loop-stop.md +198 -0
- package/commands/fire-loop.md +1168 -0
- package/commands/fire-map-codebase.md +313 -0
- package/commands/fire-new-milestone.md +356 -0
- package/commands/fire-reflect.md +235 -0
- package/commands/fire-research.md +246 -0
- package/commands/fire-search.md +330 -0
- package/commands/fire-security-audit-repo.md +293 -0
- package/commands/fire-security-scan.md +484 -0
- package/commands/fire-session-summary.md +252 -0
- package/commands/fire-skills-diff.md +506 -0
- package/commands/fire-skills-history.md +388 -0
- package/commands/fire-skills-rollback.md +408 -0
- package/commands/fire-skills-sync.md +470 -0
- package/commands/fire-test.md +520 -0
- package/commands/fire-todos.md +335 -0
- package/commands/fire-transition.md +186 -0
- package/commands/fire-update.md +312 -0
- package/commands/fire-verify-uat.md +146 -0
- package/commands/fire-vuln-scan.md +493 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +69 -0
- package/hooks/run-hook.sh +8 -0
- package/hooks/run-session-end.cmd +49 -0
- package/hooks/run-session-end.sh +7 -0
- package/hooks/session-end.sh +90 -0
- package/hooks/session-start.sh +111 -0
- package/package.json +52 -0
- package/plugin.json +7 -0
- package/references/auto-skill-extraction.md +136 -0
- package/references/behavioral-directives.md +365 -0
- package/references/blocker-tracking.md +155 -0
- package/references/checkpoints.md +165 -0
- package/references/circuit-breaker.md +410 -0
- package/references/context-engineering.md +587 -0
- package/references/decision-time-guidance.md +289 -0
- package/references/error-classification.md +326 -0
- package/references/execution-mode-intelligence.md +242 -0
- package/references/git-integration.md +217 -0
- package/references/honesty-protocols.md +304 -0
- package/references/integration-architecture.md +470 -0
- package/references/issue-to-pr-pipeline.md +150 -0
- package/references/metrics-and-trends.md +234 -0
- package/references/playwright-e2e-testing.md +326 -0
- package/references/questioning.md +125 -0
- package/references/research-improvements.md +110 -0
- package/references/skills-usage-guide.md +429 -0
- package/references/tdd.md +131 -0
- package/references/testing-enforcement.md +192 -0
- package/references/ui-brand.md +383 -0
- package/references/validation-checklist.md +456 -0
- package/references/verification-patterns.md +187 -0
- package/references/warrior-principles.md +173 -0
- package/skills-library/SKILLS-INDEX.md +588 -0
- package/skills-library/_general/frontend/html-visual-reports.md +292 -0
- package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -0
- package/skills-library/_general/methodology/learncoding-agentic-pattern.md +114 -0
- package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +238 -0
- package/skills-library/basics/api-rest-basics.md +162 -0
- package/skills-library/basics/env-variables.md +96 -0
- package/skills-library/basics/error-handling-basics.md +125 -0
- package/skills-library/basics/git-commit-conventions.md +106 -0
- package/skills-library/basics/readme-template.md +108 -0
- package/skills-library/common-tasks/async-await-patterns.md +157 -0
- package/skills-library/common-tasks/auth-jwt-basics.md +164 -0
- package/skills-library/common-tasks/database-schema-design.md +166 -0
- package/skills-library/common-tasks/file-upload-basics.md +166 -0
- package/skills-library/common-tasks/form-validation.md +159 -0
- package/skills-library/debugging/FAILURE_TAXONOMY_CLASSIFICATION.md +117 -0
- package/skills-library/debugging/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +86 -0
- package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +678 -0
- package/skills-library/methodology/CONFIDENCE_GATED_EXECUTION.md +243 -0
- package/skills-library/methodology/EVIDENCE_BASED_VALIDATION.md +308 -0
- package/skills-library/methodology/MULTI_PERSPECTIVE_CODE_REVIEW.md +330 -0
- package/skills-library/methodology/PATH_VERIFICATION_GATE.md +211 -0
- package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +183 -0
- package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +263 -0
- package/skills-library/methodology/SABBATH_REST_PATTERN.md +267 -0
- package/skills-library/methodology/STONE_AND_SCAFFOLD.md +220 -0
- package/skills-library/performance/cache-augmented-generation.md +172 -0
- package/skills-library/quality-safety/debugging-steps.md +147 -0
- package/skills-library/quality-safety/deployment-checklist.md +155 -0
- package/skills-library/quality-safety/security-checklist.md +204 -0
- package/skills-library/quality-safety/testing-basics.md +180 -0
- package/skills-library/security/agent-security-scanner.md +445 -0
- package/skills-library/specialists/api-architecture/api-designer.md +49 -0
- package/skills-library/specialists/api-architecture/graphql-architect.md +49 -0
- package/skills-library/specialists/api-architecture/mcp-developer.md +51 -0
- package/skills-library/specialists/api-architecture/microservices-architect.md +50 -0
- package/skills-library/specialists/api-architecture/websocket-engineer.md +48 -0
- package/skills-library/specialists/backend/django-expert.md +52 -0
- package/skills-library/specialists/backend/fastapi-expert.md +52 -0
- package/skills-library/specialists/backend/laravel-specialist.md +52 -0
- package/skills-library/specialists/backend/nestjs-expert.md +51 -0
- package/skills-library/specialists/backend/rails-expert.md +53 -0
- package/skills-library/specialists/backend/spring-boot-engineer.md +56 -0
- package/skills-library/specialists/data-ml/fine-tuning-expert.md +48 -0
- package/skills-library/specialists/data-ml/ml-pipeline.md +47 -0
- package/skills-library/specialists/data-ml/pandas-pro.md +47 -0
- package/skills-library/specialists/data-ml/rag-architect.md +51 -0
- package/skills-library/specialists/data-ml/spark-engineer.md +47 -0
- package/skills-library/specialists/frontend/angular-architect.md +52 -0
- package/skills-library/specialists/frontend/flutter-expert.md +51 -0
- package/skills-library/specialists/frontend/nextjs-developer.md +54 -0
- package/skills-library/specialists/frontend/react-native-expert.md +50 -0
- package/skills-library/specialists/frontend/vue-expert.md +51 -0
- package/skills-library/specialists/infrastructure/chaos-engineer.md +74 -0
- package/skills-library/specialists/infrastructure/cloud-architect.md +70 -0
- package/skills-library/specialists/infrastructure/database-optimizer.md +64 -0
- package/skills-library/specialists/infrastructure/devops-engineer.md +70 -0
- package/skills-library/specialists/infrastructure/kubernetes-specialist.md +52 -0
- package/skills-library/specialists/infrastructure/monitoring-expert.md +70 -0
- package/skills-library/specialists/infrastructure/sre-engineer.md +70 -0
- package/skills-library/specialists/infrastructure/terraform-engineer.md +51 -0
- package/skills-library/specialists/languages/cpp-pro.md +74 -0
- package/skills-library/specialists/languages/csharp-developer.md +69 -0
- package/skills-library/specialists/languages/dotnet-core-expert.md +54 -0
- package/skills-library/specialists/languages/golang-pro.md +51 -0
- package/skills-library/specialists/languages/java-architect.md +49 -0
- package/skills-library/specialists/languages/javascript-pro.md +68 -0
- package/skills-library/specialists/languages/kotlin-specialist.md +68 -0
- package/skills-library/specialists/languages/php-pro.md +49 -0
- package/skills-library/specialists/languages/python-pro.md +52 -0
- package/skills-library/specialists/languages/react-expert.md +51 -0
- package/skills-library/specialists/languages/rust-engineer.md +50 -0
- package/skills-library/specialists/languages/sql-pro.md +56 -0
- package/skills-library/specialists/languages/swift-expert.md +69 -0
- package/skills-library/specialists/languages/typescript-pro.md +51 -0
- package/skills-library/specialists/platform/atlassian-mcp.md +52 -0
- package/skills-library/specialists/platform/embedded-systems.md +53 -0
- package/skills-library/specialists/platform/game-developer.md +53 -0
- package/skills-library/specialists/platform/salesforce-developer.md +53 -0
- package/skills-library/specialists/platform/shopify-expert.md +49 -0
- package/skills-library/specialists/platform/wordpress-pro.md +49 -0
- package/skills-library/specialists/quality/code-documenter.md +51 -0
- package/skills-library/specialists/quality/code-reviewer.md +67 -0
- package/skills-library/specialists/quality/debugging-wizard.md +51 -0
- package/skills-library/specialists/quality/fullstack-guardian.md +51 -0
- package/skills-library/specialists/quality/legacy-modernizer.md +50 -0
- package/skills-library/specialists/quality/playwright-expert.md +65 -0
- package/skills-library/specialists/quality/spec-miner.md +56 -0
- package/skills-library/specialists/quality/test-master.md +65 -0
- package/skills-library/specialists/security/secure-code-guardian.md +55 -0
- package/skills-library/specialists/security/security-reviewer.md +53 -0
- package/skills-library/specialists/workflow/architecture-designer.md +53 -0
- package/skills-library/specialists/workflow/cli-developer.md +70 -0
- package/skills-library/specialists/workflow/feature-forge.md +65 -0
- package/skills-library/specialists/workflow/prompt-engineer.md +54 -0
- package/skills-library/specialists/workflow/the-fool.md +62 -0
- package/templates/ASSUMPTIONS.md +125 -0
- package/templates/BLOCKERS.md +73 -0
- package/templates/DECISION_LOG.md +116 -0
- package/templates/UAT.md +96 -0
- package/templates/blueprint.md +94 -0
- package/templates/brainstorm.md +185 -0
- package/templates/conscience.md +92 -0
- package/templates/fire-handoff.md +159 -0
- package/templates/metrics.md +67 -0
- package/templates/phase-prompt.md +142 -0
- package/templates/record.md +131 -0
- package/templates/review-report.md +117 -0
- package/templates/skills-index.md +157 -0
- package/templates/verification.md +149 -0
- package/templates/vision.md +79 -0
- package/validation-config.yml +793 -0
- package/version.json +7 -0
- package/workflows/execute-phase.md +732 -0
- package/workflows/handoff-session.md +678 -0
- package/workflows/new-project.md +578 -0
- package/workflows/plan-phase.md +592 -0
- package/workflows/verify-phase.md +874 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
# Validation Checklist
|
|
2
|
+
|
|
3
|
+
> 70+ validation items for production-ready code (includes Playwright E2E)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick Reference
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Total Items: 70+
|
|
11
|
+
Categories: 9 (8 original + E2E Testing)
|
|
12
|
+
Critical Items: 26 (marked with ⚠)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use this checklist before marking any significant work as complete.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 1. Code Quality (6 Items)
|
|
20
|
+
|
|
21
|
+
| # | Item | Check | Notes |
|
|
22
|
+
|---|------|-------|-------|
|
|
23
|
+
| 1.1 | ⚠ **Build succeeds** | `npm run build` or equivalent passes | No TypeScript errors, no compilation failures |
|
|
24
|
+
| 1.2 | ⚠ **TypeScript strict mode** | No `any` types without justification | Check tsconfig.json strict settings |
|
|
25
|
+
| 1.3 | **ESLint passes** | `npm run lint` returns no errors | Warnings acceptable if documented |
|
|
26
|
+
| 1.4 | **No console.logs** | Remove debug statements | Use proper logging library instead |
|
|
27
|
+
| 1.5 | **Comments are meaningful** | No obvious/redundant comments | Explain "why", not "what" |
|
|
28
|
+
| 1.6 | **JSDoc on public APIs** | Functions/classes have documentation | Include params, returns, examples |
|
|
29
|
+
|
|
30
|
+
### Verification Commands
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Build check
|
|
34
|
+
npm run build
|
|
35
|
+
|
|
36
|
+
# TypeScript check
|
|
37
|
+
npx tsc --noEmit
|
|
38
|
+
|
|
39
|
+
# Lint check
|
|
40
|
+
npm run lint
|
|
41
|
+
|
|
42
|
+
# Find console.logs
|
|
43
|
+
grep -r "console.log" src/ --include="*.ts" --include="*.tsx"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 2. Testing (5 Items)
|
|
49
|
+
|
|
50
|
+
| # | Item | Check | Notes |
|
|
51
|
+
|---|------|-------|-------|
|
|
52
|
+
| 2.1 | ⚠ **Unit tests exist** | New code has corresponding tests | Aim for 1:1 coverage of functions |
|
|
53
|
+
| 2.2 | ⚠ **Unit tests pass** | `npm test` succeeds | No skipped tests without reason |
|
|
54
|
+
| 2.3 | **Integration tests** | API endpoints have integration tests | Test real database interactions |
|
|
55
|
+
| 2.4 | **Coverage meets threshold** | Usually 80%+ for new code | Check coverage reports |
|
|
56
|
+
| 2.5 | **Manual testing done** | Features tested in browser/app | Document test scenarios |
|
|
57
|
+
|
|
58
|
+
### Additional Testing Considerations
|
|
59
|
+
|
|
60
|
+
- [ ] Edge cases covered (empty inputs, max values, null)
|
|
61
|
+
- [ ] Error paths tested (not just happy path)
|
|
62
|
+
- [ ] Async behavior tested correctly
|
|
63
|
+
- [ ] Mocks are appropriate (not hiding bugs)
|
|
64
|
+
- [ ] E2E tests for critical user flows
|
|
65
|
+
|
|
66
|
+
### Verification Commands
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Run all tests
|
|
70
|
+
npm test
|
|
71
|
+
|
|
72
|
+
# Run with coverage
|
|
73
|
+
npm test -- --coverage
|
|
74
|
+
|
|
75
|
+
# Run specific test file
|
|
76
|
+
npm test -- auth.spec.ts
|
|
77
|
+
|
|
78
|
+
# E2E tests
|
|
79
|
+
npm run test:e2e
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 3. Security (8 Items)
|
|
85
|
+
|
|
86
|
+
| # | Item | Check | Notes |
|
|
87
|
+
|---|------|-------|-------|
|
|
88
|
+
| 3.1 | ⚠ **No hardcoded credentials** | No API keys, passwords in code | Use environment variables |
|
|
89
|
+
| 3.2 | ⚠ **Input validation** | All user input validated | Use schemas (Zod, Joi) |
|
|
90
|
+
| 3.3 | ⚠ **SQL injection prevented** | Use parameterized queries | ORMs typically handle this |
|
|
91
|
+
| 3.4 | ⚠ **XSS prevented** | Output properly escaped | React handles most cases |
|
|
92
|
+
| 3.5 | ⚠ **HTTPS enforced** | No HTTP in production | Check redirect rules |
|
|
93
|
+
| 3.6 | **CORS configured** | Only allow trusted origins | Review cors middleware |
|
|
94
|
+
| 3.7 | **Rate limiting** | Protect against abuse | Check rate limit middleware |
|
|
95
|
+
| 3.8 | ⚠ **Auth on protected routes** | Middleware applied correctly | Test with/without tokens |
|
|
96
|
+
|
|
97
|
+
### Security Audit Commands
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Find potential secrets
|
|
101
|
+
grep -rE "(password|secret|api_key|apikey|token).*=.*['\"]" src/
|
|
102
|
+
|
|
103
|
+
# Check for SQL string concatenation
|
|
104
|
+
grep -rE "SELECT.*\+" src/
|
|
105
|
+
|
|
106
|
+
# Find unvalidated inputs
|
|
107
|
+
grep -r "req.body\." src/ --include="*.ts"
|
|
108
|
+
|
|
109
|
+
# Audit npm packages
|
|
110
|
+
npm audit
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Security Checklist Detail
|
|
114
|
+
|
|
115
|
+
- [ ] Sensitive data not logged
|
|
116
|
+
- [ ] Session tokens properly invalidated
|
|
117
|
+
- [ ] File uploads validated (type, size)
|
|
118
|
+
- [ ] Admin routes have role checks
|
|
119
|
+
- [ ] Password hashing uses bcrypt/argon2
|
|
120
|
+
- [ ] JWT secrets are strong and rotated
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 4. Performance (6 Items)
|
|
125
|
+
|
|
126
|
+
| # | Item | Check | Notes |
|
|
127
|
+
|---|------|-------|-------|
|
|
128
|
+
| 4.1 | **Page load < 3s** | Test with throttling | Use Lighthouse |
|
|
129
|
+
| 4.2 | ⚠ **No N+1 queries** | Check database access patterns | Use query logging |
|
|
130
|
+
| 4.3 | **Database indexes** | Queries use indexes | Check EXPLAIN plans |
|
|
131
|
+
| 4.4 | **No memory leaks** | Event listeners cleaned up | Check useEffect cleanup |
|
|
132
|
+
| 4.5 | **API response < 200ms** | Typical operations are fast | Set up monitoring |
|
|
133
|
+
| 4.6 | **Bundle size reasonable** | No unnecessary dependencies | Check with bundle analyzer |
|
|
134
|
+
|
|
135
|
+
### Performance Verification
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Check bundle size
|
|
139
|
+
npm run build && ls -la dist/
|
|
140
|
+
|
|
141
|
+
# Analyze bundle
|
|
142
|
+
npx webpack-bundle-analyzer
|
|
143
|
+
|
|
144
|
+
# Database query logging (in dev)
|
|
145
|
+
# Add to database config: logging: true
|
|
146
|
+
|
|
147
|
+
# Lighthouse audit
|
|
148
|
+
npx lighthouse http://localhost:3000 --view
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Performance Checklist Detail
|
|
152
|
+
|
|
153
|
+
- [ ] Images optimized (WebP, lazy loading)
|
|
154
|
+
- [ ] API responses paginated
|
|
155
|
+
- [ ] Heavy computations debounced
|
|
156
|
+
- [ ] Caching implemented where appropriate
|
|
157
|
+
- [ ] No blocking operations on main thread
|
|
158
|
+
- [ ] Database connection pooling configured
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 5. Documentation (4 Items)
|
|
163
|
+
|
|
164
|
+
| # | Item | Check | Notes |
|
|
165
|
+
|---|------|-------|-------|
|
|
166
|
+
| 5.1 | **Code comments** | Complex logic explained | Focus on "why" |
|
|
167
|
+
| 5.2 | **Setup instructions** | New devs can run locally | Test on fresh machine |
|
|
168
|
+
| 5.3 | **API documentation** | Endpoints documented | OpenAPI/Swagger preferred |
|
|
169
|
+
| 5.4 | **README updated** | Reflects current state | Include new features |
|
|
170
|
+
|
|
171
|
+
### Documentation Checklist Detail
|
|
172
|
+
|
|
173
|
+
- [ ] Environment variables documented
|
|
174
|
+
- [ ] Database schema explained
|
|
175
|
+
- [ ] Architecture decisions recorded
|
|
176
|
+
- [ ] Deployment process documented
|
|
177
|
+
- [ ] Troubleshooting guide exists
|
|
178
|
+
- [ ] Changelog updated
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 6. Database (5 Items)
|
|
183
|
+
|
|
184
|
+
| # | Item | Check | Notes |
|
|
185
|
+
|---|------|-------|-------|
|
|
186
|
+
| 6.1 | ⚠ **Migrations created** | Schema changes are versioned | Never modify existing migrations |
|
|
187
|
+
| 6.2 | ⚠ **Migrations tested** | Up and down migrations work | Test rollback |
|
|
188
|
+
| 6.3 | **Indexes added** | Foreign keys and search fields | Check query patterns |
|
|
189
|
+
| 6.4 | **Constraints defined** | NOT NULL, UNIQUE, CHECK | Enforce data integrity |
|
|
190
|
+
| 6.5 | **Connection pooling** | Pool size appropriate | Prevent connection exhaustion |
|
|
191
|
+
|
|
192
|
+
### Database Verification
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Run migrations
|
|
196
|
+
npx prisma migrate dev
|
|
197
|
+
|
|
198
|
+
# Test rollback
|
|
199
|
+
npx prisma migrate reset
|
|
200
|
+
|
|
201
|
+
# Check for missing indexes
|
|
202
|
+
# In psql: \di to list indexes
|
|
203
|
+
|
|
204
|
+
# Verify constraints
|
|
205
|
+
npx prisma db pull # Compare with schema
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Database Checklist Detail
|
|
209
|
+
|
|
210
|
+
- [ ] Backup/restore tested
|
|
211
|
+
- [ ] Soft delete implemented where needed
|
|
212
|
+
- [ ] Timestamps (createdAt, updatedAt) present
|
|
213
|
+
- [ ] Foreign key cascades appropriate
|
|
214
|
+
- [ ] Enum types used for fixed values
|
|
215
|
+
- [ ] Transactions used for multi-step operations
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 7. API Design (6 Items)
|
|
220
|
+
|
|
221
|
+
| # | Item | Check | Notes |
|
|
222
|
+
|---|------|-------|-------|
|
|
223
|
+
| 7.1 | **Versioning** | API version in path or header | Plan for breaking changes |
|
|
224
|
+
| 7.2 | **Pagination** | List endpoints paginated | Use cursor or offset |
|
|
225
|
+
| 7.3 | ⚠ **Error handling** | Consistent error responses | Include error codes |
|
|
226
|
+
| 7.4 | ⚠ **Input validation** | Request bodies validated | Return 400 for bad input |
|
|
227
|
+
| 7.5 | **Rate limiting** | Endpoints protected | Different limits per tier |
|
|
228
|
+
| 7.6 | ⚠ **Authentication** | Protected routes require auth | Return 401/403 correctly |
|
|
229
|
+
|
|
230
|
+
### API Checklist Detail
|
|
231
|
+
|
|
232
|
+
- [ ] RESTful conventions followed
|
|
233
|
+
- [ ] HTTP status codes correct
|
|
234
|
+
- [ ] Response format consistent
|
|
235
|
+
- [ ] HATEOAS links where appropriate
|
|
236
|
+
- [ ] Idempotent operations are safe to retry
|
|
237
|
+
- [ ] Request/response examples documented
|
|
238
|
+
|
|
239
|
+
### Error Response Format
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"error": {
|
|
244
|
+
"code": "VALIDATION_ERROR",
|
|
245
|
+
"message": "Invalid email format",
|
|
246
|
+
"details": [
|
|
247
|
+
{
|
|
248
|
+
"field": "email",
|
|
249
|
+
"message": "Must be a valid email address"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 8. Infrastructure (4 Items)
|
|
259
|
+
|
|
260
|
+
| # | Item | Check | Notes |
|
|
261
|
+
|---|------|-------|-------|
|
|
262
|
+
| 8.1 | **Docker works** | `docker build` succeeds | Test locally first |
|
|
263
|
+
| 8.2 | ⚠ **CI/CD pipeline** | All checks pass | Don't merge red builds |
|
|
264
|
+
| 8.3 | **Monitoring** | Errors are captured | Sentry, LogRocket, etc. |
|
|
265
|
+
| 8.4 | **Logging** | Structured logs in place | JSON format preferred |
|
|
266
|
+
|
|
267
|
+
### Infrastructure Verification
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Build Docker image
|
|
271
|
+
docker build -t app .
|
|
272
|
+
|
|
273
|
+
# Run container
|
|
274
|
+
docker run -p 3000:3000 app
|
|
275
|
+
|
|
276
|
+
# Check CI status
|
|
277
|
+
gh pr checks
|
|
278
|
+
|
|
279
|
+
# Test logging
|
|
280
|
+
# Verify logs appear in monitoring tool
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Infrastructure Checklist Detail
|
|
284
|
+
|
|
285
|
+
- [ ] Health check endpoint exists
|
|
286
|
+
- [ ] Graceful shutdown implemented
|
|
287
|
+
- [ ] Environment-specific configs
|
|
288
|
+
- [ ] Secrets in secret manager
|
|
289
|
+
- [ ] Auto-scaling configured
|
|
290
|
+
- [ ] Disaster recovery plan documented
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 9. E2E Testing - Playwright (10 Items)
|
|
295
|
+
|
|
296
|
+
| # | Item | Check | Notes |
|
|
297
|
+
|---|------|-------|-------|
|
|
298
|
+
| 9.1 | ⚠ **Playwright installed** | `npx playwright --version` succeeds | Browsers installed via `npx playwright install` |
|
|
299
|
+
| 9.2 | ⚠ **Config file exists** | `playwright.config.ts` or `.js` present | Proper baseURL, timeouts, retries configured |
|
|
300
|
+
| 9.3 | ⚠ **Critical user flows tested** | Login, signup, core CRUD operations | Happy path + error states |
|
|
301
|
+
| 9.4 | **All E2E tests pass** | `npx playwright test` exits 0 | No flaky tests (retry < 3) |
|
|
302
|
+
| 9.5 | **Cross-browser coverage** | Tests run on chromium + firefox minimum | webkit optional but recommended |
|
|
303
|
+
| 9.6 | **Mobile viewport tested** | Tests include mobile breakpoints | Use `playwright.config.ts` projects for viewports |
|
|
304
|
+
| 9.7 | **Network/API assertions** | API responses validated in E2E | Use `page.waitForResponse()` or route interception |
|
|
305
|
+
| 9.8 | **Visual regression baseline** | Screenshots captured for key pages | Use `expect(page).toHaveScreenshot()` |
|
|
306
|
+
| 9.9 | **Test isolation** | Each test independent, no shared state | Use `beforeEach` for setup, proper teardown |
|
|
307
|
+
| 9.10 | **CI-ready configuration** | Tests run headless in CI pipeline | Proper reporter config for CI output |
|
|
308
|
+
|
|
309
|
+
### Verification Commands
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# Check Playwright installation
|
|
313
|
+
npx playwright --version
|
|
314
|
+
|
|
315
|
+
# Install browsers if missing
|
|
316
|
+
npx playwright install
|
|
317
|
+
|
|
318
|
+
# Run all E2E tests
|
|
319
|
+
npx playwright test
|
|
320
|
+
|
|
321
|
+
# Run specific test file
|
|
322
|
+
npx playwright test tests/e2e/auth.spec.ts
|
|
323
|
+
|
|
324
|
+
# Run with specific browser
|
|
325
|
+
npx playwright test --project=chromium
|
|
326
|
+
|
|
327
|
+
# Run with UI mode (interactive debugging)
|
|
328
|
+
npx playwright test --ui
|
|
329
|
+
|
|
330
|
+
# Run headed (visible browser)
|
|
331
|
+
npx playwright test --headed
|
|
332
|
+
|
|
333
|
+
# Generate HTML report
|
|
334
|
+
npx playwright show-report
|
|
335
|
+
|
|
336
|
+
# Update visual snapshots
|
|
337
|
+
npx playwright test --update-snapshots
|
|
338
|
+
|
|
339
|
+
# Run with trace for debugging failures
|
|
340
|
+
npx playwright test --trace on
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### E2E Test Patterns
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
// Standard page object pattern
|
|
347
|
+
import { test, expect } from '@playwright/test';
|
|
348
|
+
|
|
349
|
+
test.describe('Feature: User Authentication', () => {
|
|
350
|
+
test.beforeEach(async ({ page }) => {
|
|
351
|
+
await page.goto('/login');
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
test('should login with valid credentials', async ({ page }) => {
|
|
355
|
+
await page.fill('[data-testid="email"]', 'user@example.com');
|
|
356
|
+
await page.fill('[data-testid="password"]', 'password123');
|
|
357
|
+
await page.click('[data-testid="login-button"]');
|
|
358
|
+
await expect(page).toHaveURL('/dashboard');
|
|
359
|
+
await expect(page.locator('[data-testid="welcome-msg"]')).toBeVisible();
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
test('should show error for invalid credentials', async ({ page }) => {
|
|
363
|
+
await page.fill('[data-testid="email"]', 'bad@example.com');
|
|
364
|
+
await page.fill('[data-testid="password"]', 'wrong');
|
|
365
|
+
await page.click('[data-testid="login-button"]');
|
|
366
|
+
await expect(page.locator('[data-testid="error-msg"]')).toBeVisible();
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### MCP Playwright Tools Integration
|
|
372
|
+
|
|
373
|
+
When running E2E tests interactively via Claude Code's Playwright MCP, use:
|
|
374
|
+
- `browser_navigate` - Navigate to pages
|
|
375
|
+
- `browser_snapshot` - Capture accessibility tree (preferred over screenshots for assertions)
|
|
376
|
+
- `browser_click` - Interact with elements
|
|
377
|
+
- `browser_fill_form` - Fill form fields
|
|
378
|
+
- `browser_take_screenshot` - Visual verification
|
|
379
|
+
- `browser_console_messages` - Check for JS errors
|
|
380
|
+
- `browser_network_requests` - Validate API calls
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Checklist Usage
|
|
385
|
+
|
|
386
|
+
### Pre-Commit Check (Quick)
|
|
387
|
+
|
|
388
|
+
Focus on items marked with ⚠:
|
|
389
|
+
- [ ] 1.1 Build succeeds
|
|
390
|
+
- [ ] 1.2 TypeScript strict
|
|
391
|
+
- [ ] 2.1 Unit tests exist
|
|
392
|
+
- [ ] 2.2 Unit tests pass
|
|
393
|
+
- [ ] 3.1 No hardcoded credentials
|
|
394
|
+
- [ ] 3.2 Input validation
|
|
395
|
+
- [ ] 3.3 SQL injection prevented
|
|
396
|
+
- [ ] 3.4 XSS prevented
|
|
397
|
+
- [ ] 3.5 HTTPS enforced
|
|
398
|
+
- [ ] 3.8 Auth on protected routes
|
|
399
|
+
- [ ] 4.2 No N+1 queries
|
|
400
|
+
- [ ] 6.1 Migrations created
|
|
401
|
+
- [ ] 6.2 Migrations tested
|
|
402
|
+
- [ ] 7.3 Error handling
|
|
403
|
+
- [ ] 7.4 Input validation
|
|
404
|
+
- [ ] 7.6 Authentication
|
|
405
|
+
- [ ] 8.2 CI/CD pipeline
|
|
406
|
+
- [ ] 9.1 Playwright installed
|
|
407
|
+
- [ ] 9.2 Config file exists
|
|
408
|
+
- [ ] 9.3 Critical user flows tested
|
|
409
|
+
|
|
410
|
+
### Pre-Release Check (Full)
|
|
411
|
+
|
|
412
|
+
Run through all 70+ items systematically.
|
|
413
|
+
|
|
414
|
+
### Category-Specific Check
|
|
415
|
+
|
|
416
|
+
Use when working on specific areas:
|
|
417
|
+
- **New API endpoint**: Sections 3, 7, 9
|
|
418
|
+
- **Database change**: Sections 6, 4
|
|
419
|
+
- **Frontend feature**: Sections 1, 2, 4, 9
|
|
420
|
+
- **Security fix**: Section 3 (all items)
|
|
421
|
+
- **Full feature (frontend + backend)**: Sections 1-4, 7, 9
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## Automated Validation Script
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
#!/bin/bash
|
|
429
|
+
# validation-check.sh
|
|
430
|
+
|
|
431
|
+
echo "━━━ DOMINION FLOW > VALIDATION CHECK ━━━"
|
|
432
|
+
|
|
433
|
+
# Code Quality
|
|
434
|
+
echo "◆ Code Quality..."
|
|
435
|
+
npm run build && echo " ✓ Build passes" || echo " ✗ Build failed"
|
|
436
|
+
npm run lint && echo " ✓ Lint passes" || echo " ✗ Lint failed"
|
|
437
|
+
|
|
438
|
+
# Testing
|
|
439
|
+
echo "◆ Testing..."
|
|
440
|
+
npm test && echo " ✓ Tests pass" || echo " ✗ Tests failed"
|
|
441
|
+
|
|
442
|
+
# Security
|
|
443
|
+
echo "◆ Security..."
|
|
444
|
+
grep -rq "console.log" src/ && echo " ⚠ console.logs found" || echo " ✓ No console.logs"
|
|
445
|
+
npm audit --audit-level=high && echo " ✓ No high vulnerabilities" || echo " ⚠ Vulnerabilities found"
|
|
446
|
+
|
|
447
|
+
# E2E Testing (Playwright)
|
|
448
|
+
echo "◆ E2E Testing..."
|
|
449
|
+
npx playwright test --reporter=list 2>&1 | tail -5 && echo " ✓ E2E tests pass" || echo " ✗ E2E tests failed"
|
|
450
|
+
|
|
451
|
+
echo "━━━ VALIDATION COMPLETE ━━━"
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
*Every item exists because its absence caused a production issue somewhere.*
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Dominion Flow Verification Patterns Reference
|
|
2
|
+
|
|
3
|
+
> **Origin:** Ported from Dominion Flow `verification-patterns.md` with Dominion Flow WARRIOR additions.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Goal-backward verification: verify that the GOAL was achieved, not just that tasks were completed. Check observable truths, then artifacts, then wiring between them.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Verification Order
|
|
12
|
+
|
|
13
|
+
### Level 1: Observable Truths (Most Important)
|
|
14
|
+
|
|
15
|
+
Can a user actually DO what the phase promised?
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Example: "Users can register and login"
|
|
19
|
+
# Verify the BEHAVIOR, not the code:
|
|
20
|
+
curl -X POST /api/auth/register -d '{"email":"test@x.com","password":"Test123!"}' | jq .token
|
|
21
|
+
# Expected: Returns JWT token
|
|
22
|
+
curl -H "Authorization: Bearer $TOKEN" /api/auth/me | jq .email
|
|
23
|
+
# Expected: Returns "test@x.com"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Level 2: Artifact Existence
|
|
27
|
+
|
|
28
|
+
Do the required files exist with real implementation?
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Check files exist and have substance
|
|
32
|
+
wc -l src/api/auth.ts # Should be >30 lines (not a stub)
|
|
33
|
+
grep -c "function\|const\|export" src/api/auth.ts # Should have real code
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Dominion Flow addition - stub detection:**
|
|
37
|
+
```bash
|
|
38
|
+
# Flag files with TODO/FIXME/placeholder patterns
|
|
39
|
+
grep -rn "TODO\|FIXME\|placeholder\|not implemented" src/ --include="*.ts" --include="*.tsx"
|
|
40
|
+
# Any matches = verification WARNING
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Level 3: Key Links (Wiring)
|
|
44
|
+
|
|
45
|
+
Are the pieces actually connected?
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Check that API route is importable from frontend
|
|
49
|
+
grep -r "api/auth" src/app/ --include="*.tsx" # Frontend calls backend
|
|
50
|
+
grep -r "prisma\|db\." src/api/auth.ts # Backend uses database
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Verification Patterns by Feature Type
|
|
56
|
+
|
|
57
|
+
### API Endpoint
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
truths:
|
|
61
|
+
- "POST /api/[resource] returns 201 with valid data"
|
|
62
|
+
- "GET /api/[resource] returns array of items"
|
|
63
|
+
- "Unauthorized request returns 401"
|
|
64
|
+
artifacts:
|
|
65
|
+
- path: "src/api/[resource]/route.ts"
|
|
66
|
+
min_lines: 20
|
|
67
|
+
must_contain: ["export async function POST", "export async function GET"]
|
|
68
|
+
key_links:
|
|
69
|
+
- from: "src/api/[resource]/route.ts"
|
|
70
|
+
to: "prisma schema"
|
|
71
|
+
pattern: "prisma.[resource]"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### UI Component
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
truths:
|
|
78
|
+
- "Component renders without errors"
|
|
79
|
+
- "User interaction produces expected result"
|
|
80
|
+
- "Responsive at mobile/tablet/desktop"
|
|
81
|
+
artifacts:
|
|
82
|
+
- path: "src/components/[Component].tsx"
|
|
83
|
+
min_lines: 15
|
|
84
|
+
must_contain: ["export", "return"]
|
|
85
|
+
key_links:
|
|
86
|
+
- from: "src/components/[Component].tsx"
|
|
87
|
+
to: "src/app/[page]/page.tsx"
|
|
88
|
+
pattern: "import.*[Component]"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Database Schema
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
truths:
|
|
95
|
+
- "Migration runs without errors"
|
|
96
|
+
- "CRUD operations work on new tables"
|
|
97
|
+
artifacts:
|
|
98
|
+
- path: "prisma/schema.prisma"
|
|
99
|
+
must_contain: ["model [ModelName]"]
|
|
100
|
+
- path: "prisma/migrations/"
|
|
101
|
+
must_exist: true
|
|
102
|
+
key_links:
|
|
103
|
+
- from: "prisma/schema.prisma"
|
|
104
|
+
to: "src/api/"
|
|
105
|
+
pattern: "prisma.[modelName]"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## WARRIOR Quality Gates (Dominion Flow Addition)
|
|
111
|
+
|
|
112
|
+
After goal-backward verification, run quality gates:
|
|
113
|
+
|
|
114
|
+
### Code Quality Gate
|
|
115
|
+
```bash
|
|
116
|
+
npm run lint # Zero new warnings
|
|
117
|
+
npm run typecheck # Zero type errors
|
|
118
|
+
npm run build # Clean build
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Security Gate (for auth/data plans)
|
|
122
|
+
```bash
|
|
123
|
+
# Check for common vulnerabilities
|
|
124
|
+
grep -rn "eval(\|innerHTML\|dangerouslySetInnerHTML" src/ --include="*.ts" --include="*.tsx"
|
|
125
|
+
# Check for hardcoded secrets
|
|
126
|
+
grep -rn "password\|secret\|api_key" src/ --include="*.ts" | grep -v "test\|mock\|example"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Test Gate
|
|
130
|
+
```bash
|
|
131
|
+
npm test # All tests pass
|
|
132
|
+
npm test -- --coverage # Coverage meets threshold
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Performance Gate (for critical-path plans)
|
|
136
|
+
```bash
|
|
137
|
+
npm run build # Check bundle size
|
|
138
|
+
# Lighthouse audit for web apps
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Verification Report Format
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
## Verification Report: Phase XX
|
|
147
|
+
|
|
148
|
+
### Goal Achievement
|
|
149
|
+
- [ ] Truth 1: [PASS/FAIL] - [evidence]
|
|
150
|
+
- [ ] Truth 2: [PASS/FAIL] - [evidence]
|
|
151
|
+
|
|
152
|
+
### Artifact Check
|
|
153
|
+
- [ ] File 1: [EXISTS/MISSING] - [line count] lines
|
|
154
|
+
- [ ] File 2: [EXISTS/MISSING] - [line count] lines
|
|
155
|
+
|
|
156
|
+
### Wiring Check
|
|
157
|
+
- [ ] Link 1: [CONNECTED/BROKEN] - [pattern found/not found]
|
|
158
|
+
|
|
159
|
+
### WARRIOR Quality Gates
|
|
160
|
+
- [ ] Build: [PASS/FAIL]
|
|
161
|
+
- [ ] Lint: [PASS/FAIL] - [warning count]
|
|
162
|
+
- [ ] Tests: [PASS/FAIL] - [X/Y passing]
|
|
163
|
+
- [ ] Security: [PASS/FAIL/SKIPPED]
|
|
164
|
+
|
|
165
|
+
### Verdict: [PASS / CONDITIONAL PASS / FAIL]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Common Failure Patterns
|
|
171
|
+
|
|
172
|
+
| Pattern | Cause | Fix |
|
|
173
|
+
|---------|-------|-----|
|
|
174
|
+
| Truth passes but artifact is stub | Hardcoded response | Check file substance |
|
|
175
|
+
| Artifact exists but truth fails | Code not wired | Check key_links |
|
|
176
|
+
| Tests pass but truth fails | Tests too narrow | Add integration test |
|
|
177
|
+
| Build passes but truth fails | Runtime error | Check server logs |
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Anti-Patterns
|
|
182
|
+
|
|
183
|
+
- **Checking task completion, not goal achievement** - "All tasks done" != "Feature works"
|
|
184
|
+
- **Only checking artifacts exist** - File can exist but be empty/stub
|
|
185
|
+
- **Skipping wiring verification** - Components exist but aren't connected
|
|
186
|
+
- **Trusting tests alone** - Tests can be too narrow or test wrong thing
|
|
187
|
+
- **Manual-only verification** - Automate everything possible, checkpoint for visual only
|