@zigrivers/scaffold 2.1.1 → 2.28.1
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/README.md +272 -59
- package/dist/project/frontmatter.d.ts.map +1 -1
- package/dist/project/frontmatter.js +4 -0
- package/dist/project/frontmatter.js.map +1 -1
- package/knowledge/core/adr-craft.md +53 -0
- package/knowledge/core/ai-memory-management.md +246 -0
- package/knowledge/core/api-design.md +4 -0
- package/knowledge/core/claude-md-patterns.md +254 -0
- package/knowledge/core/coding-conventions.md +246 -0
- package/knowledge/core/database-design.md +4 -0
- package/knowledge/core/design-system-tokens.md +465 -0
- package/knowledge/core/dev-environment.md +223 -0
- package/knowledge/core/domain-modeling.md +4 -0
- package/knowledge/core/eval-craft.md +1008 -0
- package/knowledge/core/multi-model-review-dispatch.md +250 -0
- package/knowledge/core/operations-runbook.md +37 -226
- package/knowledge/core/project-structure-patterns.md +231 -0
- package/knowledge/core/review-step-template.md +247 -0
- package/knowledge/core/{security-review.md → security-best-practices.md} +5 -1
- package/knowledge/core/task-decomposition.md +57 -34
- package/knowledge/core/task-tracking.md +225 -0
- package/knowledge/core/tech-stack-selection.md +214 -0
- package/knowledge/core/testing-strategy.md +63 -70
- package/knowledge/core/user-stories.md +69 -60
- package/knowledge/core/user-story-innovation.md +57 -0
- package/knowledge/core/ux-specification.md +5 -148
- package/knowledge/finalization/apply-fixes-and-freeze.md +165 -14
- package/knowledge/product/prd-craft.md +55 -34
- package/knowledge/review/review-adr.md +32 -0
- package/knowledge/review/{review-api-contracts.md → review-api-design.md} +34 -1
- package/knowledge/review/{review-database-schema.md → review-database-design.md} +27 -1
- package/knowledge/review/review-domain-modeling.md +33 -0
- package/knowledge/review/review-implementation-tasks.md +50 -0
- package/knowledge/review/review-operations.md +55 -0
- package/knowledge/review/review-prd.md +33 -0
- package/knowledge/review/review-security.md +53 -0
- package/knowledge/review/review-system-architecture.md +28 -0
- package/knowledge/review/review-testing-strategy.md +51 -0
- package/knowledge/review/review-user-stories.md +54 -0
- package/knowledge/review/{review-ux-spec.md → review-ux-specification.md} +37 -1
- package/methodology/custom-defaults.yml +32 -3
- package/methodology/deep.yml +32 -3
- package/methodology/mvp.yml +32 -3
- package/package.json +2 -1
- package/pipeline/architecture/review-architecture.md +18 -6
- package/pipeline/architecture/system-architecture.md +14 -2
- package/pipeline/consolidation/claude-md-optimization.md +73 -0
- package/pipeline/consolidation/workflow-audit.md +73 -0
- package/pipeline/decisions/adrs.md +14 -2
- package/pipeline/decisions/review-adrs.md +18 -5
- package/pipeline/environment/ai-memory-setup.md +70 -0
- package/pipeline/environment/automated-pr-review.md +70 -0
- package/pipeline/environment/design-system.md +73 -0
- package/pipeline/environment/dev-env-setup.md +65 -0
- package/pipeline/environment/git-workflow.md +71 -0
- package/pipeline/finalization/apply-fixes-and-freeze.md +1 -1
- package/pipeline/finalization/developer-onboarding-guide.md +1 -1
- package/pipeline/finalization/implementation-playbook.md +3 -3
- package/pipeline/foundation/beads.md +68 -0
- package/pipeline/foundation/coding-standards.md +68 -0
- package/pipeline/foundation/project-structure.md +69 -0
- package/pipeline/foundation/tdd.md +60 -0
- package/pipeline/foundation/tech-stack.md +74 -0
- package/pipeline/integration/add-e2e-testing.md +65 -0
- package/pipeline/modeling/domain-modeling.md +14 -2
- package/pipeline/modeling/review-domain-modeling.md +18 -5
- package/pipeline/parity/platform-parity-review.md +70 -0
- package/pipeline/planning/implementation-plan-review.md +56 -0
- package/pipeline/planning/{implementation-tasks.md → implementation-plan.md} +29 -9
- package/pipeline/pre/create-prd.md +13 -4
- package/pipeline/pre/innovate-prd.md +37 -8
- package/pipeline/pre/innovate-user-stories.md +38 -7
- package/pipeline/pre/review-prd.md +18 -6
- package/pipeline/pre/review-user-stories.md +23 -6
- package/pipeline/pre/user-stories.md +12 -2
- package/pipeline/quality/create-evals.md +102 -0
- package/pipeline/quality/operations.md +38 -13
- package/pipeline/quality/review-operations.md +17 -5
- package/pipeline/quality/review-security.md +17 -5
- package/pipeline/quality/review-testing.md +20 -8
- package/pipeline/quality/security.md +25 -3
- package/pipeline/quality/story-tests.md +73 -0
- package/pipeline/specification/api-contracts.md +17 -2
- package/pipeline/specification/database-schema.md +17 -2
- package/pipeline/specification/review-api.md +18 -6
- package/pipeline/specification/review-database.md +18 -6
- package/pipeline/specification/review-ux.md +19 -7
- package/pipeline/specification/ux-spec.md +29 -10
- package/pipeline/validation/critical-path-walkthrough.md +34 -7
- package/pipeline/validation/cross-phase-consistency.md +34 -7
- package/pipeline/validation/decision-completeness.md +34 -7
- package/pipeline/validation/dependency-graph-validation.md +34 -7
- package/pipeline/validation/implementability-dry-run.md +34 -7
- package/pipeline/validation/scope-creep-check.md +34 -7
- package/pipeline/validation/traceability-matrix.md +34 -7
- package/skills/multi-model-dispatch/SKILL.md +326 -0
- package/skills/scaffold-pipeline/SKILL.md +195 -0
- package/skills/scaffold-runner/SKILL.md +465 -0
- package/pipeline/planning/review-tasks.md +0 -38
- package/pipeline/quality/testing-strategy.md +0 -42
package/methodology/deep.yml
CHANGED
|
@@ -4,32 +4,60 @@ description: Comprehensive documentation for complex systems — full analysis a
|
|
|
4
4
|
default_depth: 5
|
|
5
5
|
|
|
6
6
|
steps:
|
|
7
|
+
# Phase 1 — Product Definition (pre)
|
|
7
8
|
create-prd: { enabled: true }
|
|
8
9
|
review-prd: { enabled: true }
|
|
9
10
|
innovate-prd: { enabled: true, conditional: "if-needed" }
|
|
10
11
|
user-stories: { enabled: true }
|
|
11
12
|
review-user-stories: { enabled: true }
|
|
12
13
|
innovate-user-stories: { enabled: true, conditional: "if-needed" }
|
|
14
|
+
# Phase 2 — Project Foundation (foundation)
|
|
15
|
+
beads: { enabled: true, conditional: "if-needed" }
|
|
16
|
+
tech-stack: { enabled: true }
|
|
17
|
+
coding-standards: { enabled: true }
|
|
18
|
+
tdd: { enabled: true }
|
|
19
|
+
project-structure: { enabled: true }
|
|
20
|
+
# Phase 3 — Development Environment (environment)
|
|
21
|
+
dev-env-setup: { enabled: true }
|
|
22
|
+
design-system: { enabled: true, conditional: "if-needed" }
|
|
23
|
+
git-workflow: { enabled: true }
|
|
24
|
+
automated-pr-review: { enabled: true, conditional: "if-needed" }
|
|
25
|
+
ai-memory-setup: { enabled: true }
|
|
26
|
+
# Phase 4 — Testing Integration (integration)
|
|
27
|
+
add-e2e-testing: { enabled: true, conditional: "if-needed" }
|
|
28
|
+
# Phase 5 — Domain Modeling (modeling)
|
|
13
29
|
domain-modeling: { enabled: true }
|
|
14
30
|
review-domain-modeling: { enabled: true }
|
|
31
|
+
# Phase 6 — Architecture Decisions (decisions)
|
|
15
32
|
adrs: { enabled: true }
|
|
16
33
|
review-adrs: { enabled: true }
|
|
34
|
+
# Phase 7 — System Architecture (architecture)
|
|
17
35
|
system-architecture: { enabled: true }
|
|
18
36
|
review-architecture: { enabled: true }
|
|
37
|
+
# Phase 8 — Specifications (specification)
|
|
19
38
|
database-schema: { enabled: true, conditional: "if-needed" }
|
|
20
39
|
review-database: { enabled: true, conditional: "if-needed" }
|
|
21
40
|
api-contracts: { enabled: true, conditional: "if-needed" }
|
|
22
41
|
review-api: { enabled: true, conditional: "if-needed" }
|
|
23
42
|
ux-spec: { enabled: true, conditional: "if-needed" }
|
|
24
43
|
review-ux: { enabled: true, conditional: "if-needed" }
|
|
25
|
-
|
|
44
|
+
# Phase 9 — Quality Gates (quality)
|
|
26
45
|
review-testing: { enabled: true }
|
|
46
|
+
story-tests: { enabled: true }
|
|
47
|
+
create-evals: { enabled: true }
|
|
27
48
|
operations: { enabled: true }
|
|
28
49
|
review-operations: { enabled: true }
|
|
29
50
|
security: { enabled: true }
|
|
30
51
|
review-security: { enabled: true }
|
|
31
|
-
|
|
32
|
-
review
|
|
52
|
+
# Phase 10 — Platform Parity (parity)
|
|
53
|
+
platform-parity-review: { enabled: true, conditional: "if-needed" }
|
|
54
|
+
# Phase 11 — Consolidation (consolidation)
|
|
55
|
+
claude-md-optimization: { enabled: true }
|
|
56
|
+
workflow-audit: { enabled: true }
|
|
57
|
+
# Phase 12 — Planning (planning)
|
|
58
|
+
implementation-plan: { enabled: true }
|
|
59
|
+
implementation-plan-review: { enabled: true }
|
|
60
|
+
# Phase 13 — Validation (validation)
|
|
33
61
|
cross-phase-consistency: { enabled: true }
|
|
34
62
|
traceability-matrix: { enabled: true }
|
|
35
63
|
decision-completeness: { enabled: true }
|
|
@@ -37,6 +65,7 @@ steps:
|
|
|
37
65
|
implementability-dry-run: { enabled: true }
|
|
38
66
|
dependency-graph-validation: { enabled: true }
|
|
39
67
|
scope-creep-check: { enabled: true }
|
|
68
|
+
# Phase 14 — Finalization (finalization)
|
|
40
69
|
apply-fixes-and-freeze: { enabled: true }
|
|
41
70
|
developer-onboarding-guide: { enabled: true }
|
|
42
71
|
implementation-playbook: { enabled: true }
|
package/methodology/mvp.yml
CHANGED
|
@@ -4,32 +4,60 @@ description: Get to code fast with minimal ceremony
|
|
|
4
4
|
default_depth: 1
|
|
5
5
|
|
|
6
6
|
steps:
|
|
7
|
+
# Phase 1 — Product Definition (pre)
|
|
7
8
|
create-prd: { enabled: true }
|
|
8
9
|
review-prd: { enabled: true }
|
|
9
10
|
innovate-prd: { enabled: false }
|
|
10
11
|
user-stories: { enabled: true }
|
|
11
12
|
review-user-stories: { enabled: true }
|
|
12
13
|
innovate-user-stories: { enabled: false }
|
|
14
|
+
# Phase 2 — Project Foundation (foundation)
|
|
15
|
+
beads: { enabled: false }
|
|
16
|
+
tech-stack: { enabled: true }
|
|
17
|
+
coding-standards: { enabled: true }
|
|
18
|
+
tdd: { enabled: true }
|
|
19
|
+
project-structure: { enabled: true }
|
|
20
|
+
# Phase 3 — Development Environment (environment)
|
|
21
|
+
dev-env-setup: { enabled: true }
|
|
22
|
+
design-system: { enabled: false }
|
|
23
|
+
git-workflow: { enabled: false }
|
|
24
|
+
automated-pr-review: { enabled: false }
|
|
25
|
+
ai-memory-setup: { enabled: false }
|
|
26
|
+
# Phase 4 — Testing Integration (integration)
|
|
27
|
+
add-e2e-testing: { enabled: false }
|
|
28
|
+
# Phase 5 — Domain Modeling (modeling)
|
|
13
29
|
domain-modeling: { enabled: false }
|
|
14
30
|
review-domain-modeling: { enabled: false }
|
|
31
|
+
# Phase 6 — Architecture Decisions (decisions)
|
|
15
32
|
adrs: { enabled: false }
|
|
16
33
|
review-adrs: { enabled: false }
|
|
34
|
+
# Phase 7 — System Architecture (architecture)
|
|
17
35
|
system-architecture: { enabled: false }
|
|
18
36
|
review-architecture: { enabled: false }
|
|
37
|
+
# Phase 8 — Specifications (specification)
|
|
19
38
|
database-schema: { enabled: false }
|
|
20
39
|
review-database: { enabled: false }
|
|
21
40
|
api-contracts: { enabled: false }
|
|
22
41
|
review-api: { enabled: false }
|
|
23
42
|
ux-spec: { enabled: false }
|
|
24
43
|
review-ux: { enabled: false }
|
|
25
|
-
|
|
44
|
+
# Phase 9 — Quality Gates (quality)
|
|
26
45
|
review-testing: { enabled: false }
|
|
46
|
+
story-tests: { enabled: false }
|
|
47
|
+
create-evals: { enabled: false }
|
|
27
48
|
operations: { enabled: false }
|
|
28
49
|
review-operations: { enabled: false }
|
|
29
50
|
security: { enabled: false }
|
|
30
51
|
review-security: { enabled: false }
|
|
31
|
-
|
|
32
|
-
review
|
|
52
|
+
# Phase 10 — Platform Parity (parity)
|
|
53
|
+
platform-parity-review: { enabled: false }
|
|
54
|
+
# Phase 11 — Consolidation (consolidation)
|
|
55
|
+
claude-md-optimization: { enabled: false }
|
|
56
|
+
workflow-audit: { enabled: false }
|
|
57
|
+
# Phase 12 — Planning (planning)
|
|
58
|
+
implementation-plan: { enabled: true }
|
|
59
|
+
implementation-plan-review: { enabled: false }
|
|
60
|
+
# Phase 13 — Validation (validation)
|
|
33
61
|
cross-phase-consistency: { enabled: false }
|
|
34
62
|
traceability-matrix: { enabled: false }
|
|
35
63
|
decision-completeness: { enabled: false }
|
|
@@ -37,6 +65,7 @@ steps:
|
|
|
37
65
|
implementability-dry-run: { enabled: false }
|
|
38
66
|
dependency-graph-validation: { enabled: false }
|
|
39
67
|
scope-creep-check: { enabled: false }
|
|
68
|
+
# Phase 14 — Finalization (finalization)
|
|
40
69
|
apply-fixes-and-freeze: { enabled: false }
|
|
41
70
|
developer-onboarding-guide: { enabled: false }
|
|
42
71
|
implementation-playbook: { enabled: true }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zigrivers/scaffold",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.1",
|
|
4
4
|
"description": "AI-powered software project scaffolding pipeline",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"pipeline/",
|
|
27
27
|
"knowledge/",
|
|
28
28
|
"methodology/",
|
|
29
|
+
"skills/",
|
|
29
30
|
"README.md",
|
|
30
31
|
"LICENSE"
|
|
31
32
|
],
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
name: review-architecture
|
|
3
3
|
description: Review system architecture for completeness and downstream readiness
|
|
4
4
|
phase: "architecture"
|
|
5
|
-
order:
|
|
5
|
+
order: 720
|
|
6
6
|
dependencies: [system-architecture]
|
|
7
|
-
outputs: [docs/reviews/review-architecture.md]
|
|
7
|
+
outputs: [docs/reviews/review-architecture.md, docs/reviews/architecture/review-summary.md, docs/reviews/architecture/codex-review.json, docs/reviews/architecture/gemini-review.json]
|
|
8
8
|
conditional: null
|
|
9
9
|
knowledge-base: [review-methodology, review-system-architecture]
|
|
10
10
|
---
|
|
@@ -15,15 +15,21 @@ failure modes: domain coverage gaps, ADR constraint violations, data flow
|
|
|
15
15
|
orphans, module structure issues, state inconsistencies, diagram/prose drift,
|
|
16
16
|
and downstream readiness.
|
|
17
17
|
|
|
18
|
+
At depth 4+, dispatches to external AI models (Codex, Gemini) for
|
|
19
|
+
independent review validation.
|
|
20
|
+
|
|
18
21
|
## Inputs
|
|
19
22
|
- docs/system-architecture.md (required) — architecture to review
|
|
20
23
|
- docs/domain-models/ (required) — for coverage checking
|
|
21
24
|
- docs/adrs/ (required) — for constraint compliance
|
|
22
|
-
- docs/
|
|
25
|
+
- docs/plan.md (required) — for requirement tracing
|
|
23
26
|
|
|
24
27
|
## Expected Outputs
|
|
25
28
|
- docs/reviews/review-architecture.md — findings and resolution log
|
|
26
29
|
- docs/system-architecture.md — updated with fixes
|
|
30
|
+
- docs/reviews/architecture/review-summary.md (depth 4+) — multi-model review synthesis
|
|
31
|
+
- docs/reviews/architecture/codex-review.json (depth 4+, if available) — raw Codex findings
|
|
32
|
+
- docs/reviews/architecture/gemini-review.json (depth 4+, if available) — raw Gemini findings
|
|
27
33
|
|
|
28
34
|
## Quality Criteria
|
|
29
35
|
- All architecture-specific review passes executed
|
|
@@ -32,13 +38,19 @@ and downstream readiness.
|
|
|
32
38
|
- Data flow completeness verified (no orphaned components)
|
|
33
39
|
- Module structure validated for practical concerns
|
|
34
40
|
- Downstream readiness confirmed (specification, quality, and planning steps can proceed)
|
|
41
|
+
- (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
|
|
35
42
|
|
|
36
43
|
## Methodology Scaling
|
|
37
44
|
- **deep**: All 10 review passes (coverage, constraints, data flows, module
|
|
38
45
|
structure, state consistency, diagram integrity, extension points,
|
|
39
|
-
invariants, downstream readiness, internal consistency).
|
|
46
|
+
invariants, downstream readiness, internal consistency). Multi-model
|
|
47
|
+
review dispatched to Codex and Gemini if available, with graceful fallback
|
|
48
|
+
to Claude-only enhanced review.
|
|
40
49
|
- **mvp**: Domain coverage and ADR compliance checks only.
|
|
41
|
-
- **custom:depth(1-5)**:
|
|
50
|
+
- **custom:depth(1-5)**: Depth 1-3: scale number of passes with depth.
|
|
51
|
+
Depth 4: all passes + one external model (if CLI available). Depth 5:
|
|
52
|
+
all passes + multi-model with reconciliation.
|
|
42
53
|
|
|
43
54
|
## Mode Detection
|
|
44
|
-
Re-review mode if previous review exists.
|
|
55
|
+
Re-review mode if previous review exists. If multi-model review artifacts exist
|
|
56
|
+
under docs/reviews/architecture/, preserve prior findings still valid.
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: system-architecture
|
|
3
3
|
description: Design and document system architecture
|
|
4
4
|
phase: "architecture"
|
|
5
|
-
order:
|
|
5
|
+
order: 710
|
|
6
6
|
dependencies: [review-adrs]
|
|
7
7
|
outputs: [docs/system-architecture.md]
|
|
8
|
+
reads: [create-prd]
|
|
8
9
|
conditional: null
|
|
9
10
|
knowledge-base: [system-architecture]
|
|
10
11
|
---
|
|
@@ -17,7 +18,7 @@ organization. Project directory structure and module organization are defined he
|
|
|
17
18
|
## Inputs
|
|
18
19
|
- docs/domain-models/ (required) — domain models from modeling phase
|
|
19
20
|
- docs/adrs/ (required) — architecture decisions from decisions phase
|
|
20
|
-
- docs/
|
|
21
|
+
- docs/plan.md (required) — requirements driving architecture
|
|
21
22
|
|
|
22
23
|
## Expected Outputs
|
|
23
24
|
- docs/system-architecture.md — architecture document with component design,
|
|
@@ -43,3 +44,14 @@ organization. Project directory structure and module organization are defined he
|
|
|
43
44
|
If outputs already exist, operate in update mode: read existing content, diff
|
|
44
45
|
against current project state and new ADRs, propose targeted updates rather
|
|
45
46
|
than regenerating.
|
|
47
|
+
|
|
48
|
+
## Update Mode Specifics
|
|
49
|
+
- **Detect prior artifact**: docs/system-architecture.md exists
|
|
50
|
+
- **Preserve**: component structure, data flow diagrams, module organization,
|
|
51
|
+
extension points, deployment topology decisions
|
|
52
|
+
- **Triggers for update**: new ADRs introduced (technology or pattern changes),
|
|
53
|
+
domain models added new bounded contexts, PRD requirements changed system
|
|
54
|
+
boundaries, implementation revealed architectural gaps
|
|
55
|
+
- **Conflict resolution**: if a new ADR contradicts the current architecture,
|
|
56
|
+
update the affected components and data flows while preserving unaffected
|
|
57
|
+
sections; flag breaking changes for user review
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-md-optimization
|
|
3
|
+
description: Consolidate and optimize CLAUDE.md for maximum signal density
|
|
4
|
+
phase: "consolidation"
|
|
5
|
+
order: 1110
|
|
6
|
+
dependencies: [git-workflow]
|
|
7
|
+
outputs: [CLAUDE.md]
|
|
8
|
+
conditional: null
|
|
9
|
+
knowledge-base: [claude-md-patterns]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
Review all project documentation and consolidate CLAUDE.md into the definitive,
|
|
14
|
+
optimized reference for AI agents. Eliminate redundancy from incremental additions
|
|
15
|
+
by multiple setup prompts, fix inconsistencies in terminology and commands, fill
|
|
16
|
+
gaps in workflow coverage, and front-load the most critical information for agent
|
|
17
|
+
scannability.
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
- CLAUDE.md (required) — current state with incremental additions
|
|
21
|
+
- docs/plan.md (required) — PRD for context
|
|
22
|
+
- docs/tech-stack.md (required) — technology choices
|
|
23
|
+
- docs/coding-standards.md (required) — code conventions
|
|
24
|
+
- docs/tdd-standards.md (required) — testing approach
|
|
25
|
+
- docs/git-workflow.md (required) — branching and PR workflow
|
|
26
|
+
- docs/project-structure.md (required) — file placement rules
|
|
27
|
+
- docs/user-stories.md (optional) — feature context
|
|
28
|
+
|
|
29
|
+
## Expected Outputs
|
|
30
|
+
- CLAUDE.md — restructured and consolidated with Core Principles, Git Workflow,
|
|
31
|
+
Workflow (session start through next task), Parallel Sessions, Quick Reference
|
|
32
|
+
(structure, Key Commands, doc lookup), Rules (git, code, coordination, error
|
|
33
|
+
recovery), Browser/E2E Testing, Self-Improvement, Autonomous Behavior
|
|
34
|
+
|
|
35
|
+
## Quality Criteria
|
|
36
|
+
- No duplicated instructions within CLAUDE.md
|
|
37
|
+
- No verbatim repetition of content from other docs (reference instead)
|
|
38
|
+
- Consistent terminology throughout (task vs. ticket, etc.)
|
|
39
|
+
- Key Commands table matches actual Makefile/package.json commands
|
|
40
|
+
- Critical patterns are prominent (TDD, never push to main, keep working,
|
|
41
|
+
verify before commit, worktrees for parallel). If Beads: every commit needs task ID.
|
|
42
|
+
- An agent can skim CLAUDE.md in 30 seconds and get the critical points
|
|
43
|
+
- Workflow scenarios cover error cases (test failures, merge conflicts, CI failures,
|
|
44
|
+
crashed sessions, blocked tasks)
|
|
45
|
+
- Tracking comment added: <!-- scaffold:claude-md-optimization v1 YYYY-MM-DD -->
|
|
46
|
+
|
|
47
|
+
## Methodology Scaling
|
|
48
|
+
- **deep**: Full four-phase analysis (redundancy, consistency, gap, priority audits)
|
|
49
|
+
with detailed changelog. Comprehensive error recovery section. All nine critical
|
|
50
|
+
patterns verified present and prominent.
|
|
51
|
+
- **mvp**: Quick pass to remove obvious duplicates and ensure workflow section is
|
|
52
|
+
complete. Fix any command inconsistencies. Skip detailed audit.
|
|
53
|
+
- **custom:depth(1-5)**: Depth 1-2: dedup + workflow check. Depth 3: add
|
|
54
|
+
consistency pass. Depth 4: add gap analysis. Depth 5: full four-phase audit.
|
|
55
|
+
|
|
56
|
+
## Mode Detection
|
|
57
|
+
Always operates in update mode (CLAUDE.md always exists by this point). Check
|
|
58
|
+
for tracking comment `<!-- scaffold:claude-md-optimization v1 YYYY-MM-DD -->`
|
|
59
|
+
to detect prior optimization. If present, compare current CLAUDE.md against
|
|
60
|
+
the prior version date to identify sections added or changed since last
|
|
61
|
+
optimization. Preserve manually-added sections (user customizations not from
|
|
62
|
+
setup prompts). Only consolidate sections that originated from setup prompts —
|
|
63
|
+
do not restructure user-authored content. Do not add new workflow steps or
|
|
64
|
+
rules — only consolidate and clarify what already exists.
|
|
65
|
+
|
|
66
|
+
## Update Mode Specifics
|
|
67
|
+
- **Detect prior artifact**: tracking comment in CLAUDE.md with version and date
|
|
68
|
+
- **Preserve**: manually-added sections, user-customized rules, project-specific
|
|
69
|
+
command aliases, any content not traceable to a pipeline setup prompt
|
|
70
|
+
- **Triggers for update**: new setup prompts have appended sections since last
|
|
71
|
+
optimization, terminology inconsistencies introduced by incremental additions
|
|
72
|
+
- **Conflict resolution**: if a user-customized section conflicts with a setup
|
|
73
|
+
prompt's output, keep the user version and flag the conflict in a comment
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-audit
|
|
3
|
+
description: Verify workflow consistency across all documentation files
|
|
4
|
+
phase: "consolidation"
|
|
5
|
+
order: 1120
|
|
6
|
+
dependencies: [claude-md-optimization]
|
|
7
|
+
outputs: [CLAUDE.md, docs/git-workflow.md]
|
|
8
|
+
conditional: null
|
|
9
|
+
knowledge-base: [cross-phase-consistency]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
Cross-reference all documentation to ensure the canonical feature workflow is
|
|
14
|
+
consistently documented. Check every document that touches workflow (CLAUDE.md,
|
|
15
|
+
git-workflow.md, coding-standards.md, dev-setup.md, operations-runbook.md,
|
|
16
|
+
Makefile/package.json) for contradictions, stale references, missing steps, and
|
|
17
|
+
inconsistent command formats. Fix all issues found.
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
- CLAUDE.md (required) — primary workflow document to audit
|
|
21
|
+
- docs/git-workflow.md (required) — git workflow to verify alignment
|
|
22
|
+
- docs/coding-standards.md (required) — commit format to verify
|
|
23
|
+
- docs/dev-setup.md (required) — commands to verify match Key Commands
|
|
24
|
+
- Makefile or package.json (required) — actual commands to match against
|
|
25
|
+
- .github/ (optional) — PR templates and CI workflows to verify
|
|
26
|
+
- docs/operations-runbook.md (optional) — deployment pipeline to verify doesn't contradict CI or dev-setup
|
|
27
|
+
- tasks/lessons.md (optional) — verify it exists and is referenced
|
|
28
|
+
|
|
29
|
+
## Expected Outputs
|
|
30
|
+
- CLAUDE.md — corrected workflow section with all 9 steps + step 4.5
|
|
31
|
+
- docs/git-workflow.md — any contradictions fixed
|
|
32
|
+
- docs/coding-standards.md — commit format aligned
|
|
33
|
+
- Makefile/package.json — missing targets added (if needed)
|
|
34
|
+
- tasks/lessons.md — created if missing
|
|
35
|
+
|
|
36
|
+
## Quality Criteria
|
|
37
|
+
- CLAUDE.md contains complete workflow (9 steps + AI review step 4.5)
|
|
38
|
+
- Commit format is consistent everywhere (If Beads: [BD-<id>] type(scope): description. Without Beads: type(scope): description)
|
|
39
|
+
- Branch naming is consistent everywhere (If Beads: bd-<task-id>/<short-desc>. Without Beads: <type>/<short-desc>)
|
|
40
|
+
- PR workflow includes all 8 sub-steps with --delete-branch flag
|
|
41
|
+
- If Beads: task closure uses bd close (not bd update --status completed)
|
|
42
|
+
- Key Commands table matches actual Makefile/package.json commands
|
|
43
|
+
- Worktree cleanup between tasks documented (cannot checkout main)
|
|
44
|
+
- Agent crash recovery documented
|
|
45
|
+
- No document contradicts the canonical workflow
|
|
46
|
+
- Tracking comment added: <!-- scaffold:workflow-audit v1 YYYY-MM-DD -->
|
|
47
|
+
|
|
48
|
+
## Methodology Scaling
|
|
49
|
+
- **deep**: Full six-phase audit (inventory, completeness check with all
|
|
50
|
+
sub-checklists, consistency check, gap analysis, recommendations, execution).
|
|
51
|
+
Every workflow step verified in every document.
|
|
52
|
+
- **mvp**: Quick consistency check of commit format, branch naming, and PR
|
|
53
|
+
workflow across CLAUDE.md and git-workflow.md. Fix obvious contradictions.
|
|
54
|
+
- **custom:depth(1-5)**: Depth 1-2: CLAUDE.md workflow check only. Depth 3: add
|
|
55
|
+
cross-doc consistency. Depth 4: add gap analysis. Depth 5: full six-phase audit.
|
|
56
|
+
|
|
57
|
+
## Mode Detection
|
|
58
|
+
Always operates in update mode (all documents exist by this point). Check for
|
|
59
|
+
tracking comment `<!-- scaffold:workflow-audit v1 YYYY-MM-DD -->` to detect
|
|
60
|
+
prior audit. If present, focus on changes since that date — new docs added,
|
|
61
|
+
existing docs modified, Makefile targets changed. The canonical workflow is
|
|
62
|
+
the source of truth — documents align to it, not vice versa. Preserve any
|
|
63
|
+
manually-added workflow steps or custom CI configurations.
|
|
64
|
+
|
|
65
|
+
## Update Mode Specifics
|
|
66
|
+
- **Detect prior artifact**: tracking comment in CLAUDE.md with audit version
|
|
67
|
+
and date
|
|
68
|
+
- **Preserve**: custom CI jobs, user-added workflow steps, project-specific
|
|
69
|
+
branch protection rules, custom PR template fields
|
|
70
|
+
- **Triggers for update**: new setup prompts modified workflow docs, Makefile
|
|
71
|
+
targets added or renamed, git-workflow.md updated with new steps
|
|
72
|
+
- **Conflict resolution**: if two docs disagree on workflow, the canonical
|
|
73
|
+
workflow in CLAUDE.md wins; update the conflicting doc to match
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: adrs
|
|
3
3
|
description: Document architecture decisions as ADRs
|
|
4
4
|
phase: "decisions"
|
|
5
|
-
order:
|
|
5
|
+
order: 610
|
|
6
6
|
dependencies: [review-domain-modeling]
|
|
7
7
|
outputs: [docs/adrs/]
|
|
8
|
+
reads: [create-prd, domain-modeling]
|
|
8
9
|
conditional: null
|
|
9
10
|
knowledge-base: [adr-craft]
|
|
10
11
|
---
|
|
@@ -17,7 +18,7 @@ ADR category — tech stack decisions are documented here.
|
|
|
17
18
|
|
|
18
19
|
## Inputs
|
|
19
20
|
- docs/domain-models/ (required) — domain structure driving architecture choices
|
|
20
|
-
- docs/
|
|
21
|
+
- docs/plan.md (required) — requirements and constraints
|
|
21
22
|
|
|
22
23
|
## Expected Outputs
|
|
23
24
|
- docs/adrs/ — one ADR file per decision (ADR-NNN-title.md format)
|
|
@@ -43,3 +44,14 @@ ADR category — tech stack decisions are documented here.
|
|
|
43
44
|
If docs/adrs/ exists, operate in update mode: review existing ADRs against
|
|
44
45
|
current domain models and requirements. Add new ADRs for undocumented decisions.
|
|
45
46
|
Supersede ADRs whose context has changed.
|
|
47
|
+
|
|
48
|
+
## Update Mode Specifics
|
|
49
|
+
- **Detect prior artifact**: docs/adrs/ directory exists with ADR files
|
|
50
|
+
- **Preserve**: existing ADR numbers and titles, accepted decisions and their
|
|
51
|
+
rationale, supersession chain integrity, index.md decision log
|
|
52
|
+
- **Triggers for update**: domain models changed (new architectural decisions
|
|
53
|
+
needed), requirements changed (existing decisions may need revisiting),
|
|
54
|
+
implementation revealed unforeseen trade-offs
|
|
55
|
+
- **Conflict resolution**: never modify an accepted ADR — instead create a new
|
|
56
|
+
ADR that supersedes it, linking back to the original with explanation of
|
|
57
|
+
what changed
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
name: review-adrs
|
|
3
3
|
description: Review ADRs for completeness, consistency, and decision quality
|
|
4
4
|
phase: "decisions"
|
|
5
|
-
order:
|
|
5
|
+
order: 620
|
|
6
6
|
dependencies: [adrs]
|
|
7
|
-
outputs: [docs/reviews/review-adrs.md]
|
|
7
|
+
outputs: [docs/reviews/review-adrs.md, docs/reviews/adrs/review-summary.md, docs/reviews/adrs/codex-review.json, docs/reviews/adrs/gemini-review.json]
|
|
8
8
|
conditional: null
|
|
9
9
|
knowledge-base: [review-methodology, review-adr]
|
|
10
10
|
---
|
|
@@ -14,14 +14,20 @@ Multi-pass review of ADRs targeting ADR-specific failure modes: contradictory
|
|
|
14
14
|
decisions, missing rationale, implied-but-unrecorded decisions, and unresolved
|
|
15
15
|
trade-offs.
|
|
16
16
|
|
|
17
|
+
At depth 4+, dispatches to external AI models (Codex, Gemini) for
|
|
18
|
+
independent review validation.
|
|
19
|
+
|
|
17
20
|
## Inputs
|
|
18
21
|
- docs/adrs/ (required) — ADRs to review
|
|
19
22
|
- docs/domain-models/ (required) — for coverage checking
|
|
20
|
-
- docs/
|
|
23
|
+
- docs/plan.md (required) — for requirement tracing
|
|
21
24
|
|
|
22
25
|
## Expected Outputs
|
|
23
26
|
- docs/reviews/review-adrs.md — findings and resolution log
|
|
24
27
|
- docs/adrs/ — updated with fixes
|
|
28
|
+
- docs/reviews/adrs/review-summary.md (depth 4+) — multi-model review synthesis
|
|
29
|
+
- docs/reviews/adrs/codex-review.json (depth 4+, if available) — raw Codex findings
|
|
30
|
+
- docs/reviews/adrs/gemini-review.json (depth 4+, if available) — raw Gemini findings
|
|
25
31
|
|
|
26
32
|
## Quality Criteria
|
|
27
33
|
- All ADR-specific review passes executed
|
|
@@ -29,11 +35,18 @@ trade-offs.
|
|
|
29
35
|
- Missing decisions identified and documented
|
|
30
36
|
- Contradictions resolved
|
|
31
37
|
- Downstream readiness confirmed (architecture phase can proceed)
|
|
38
|
+
- (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
|
|
32
39
|
|
|
33
40
|
## Methodology Scaling
|
|
34
|
-
- **deep**: All review passes. Full findings report. Fixes applied and
|
|
41
|
+
- **deep**: All review passes. Full findings report. Fixes applied and
|
|
42
|
+
re-validated. Multi-model review dispatched to Codex and Gemini if available,
|
|
43
|
+
with graceful fallback to Claude-only enhanced review.
|
|
35
44
|
- **mvp**: Quick consistency check for contradictions only.
|
|
36
|
-
- **custom:depth(1-5)**:
|
|
45
|
+
- **custom:depth(1-5)**: Depth 1-3: scale number of review passes with depth.
|
|
46
|
+
Depth 4: full review + one external model (if CLI available). Depth 5:
|
|
47
|
+
full review + multi-model with reconciliation.
|
|
37
48
|
|
|
38
49
|
## Mode Detection
|
|
39
50
|
Re-review mode if previous review exists. Check which findings were addressed.
|
|
51
|
+
If multi-model review artifacts exist under docs/reviews/adrs/, preserve prior
|
|
52
|
+
findings still valid.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-memory-setup
|
|
3
|
+
description: Configure AI memory and context management with modular rules, optional MCP memory server, lifecycle hooks, and external context integration
|
|
4
|
+
phase: "environment"
|
|
5
|
+
order: 350
|
|
6
|
+
dependencies: [git-workflow]
|
|
7
|
+
outputs: [.claude/rules/, docs/ai-memory-setup.md]
|
|
8
|
+
reads: [coding-standards, tech-stack]
|
|
9
|
+
conditional: null
|
|
10
|
+
knowledge-base: [ai-memory-management]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
Set up a tiered AI memory stack that improves agent effectiveness across sessions.
|
|
15
|
+
Tier 1 (modular rules) extracts conventions from existing project docs into
|
|
16
|
+
path-scoped `.claude/rules/` files, keeping CLAUDE.md lean. Tier 2 (persistent
|
|
17
|
+
memory) configures an MCP memory server and lifecycle hooks for cross-session
|
|
18
|
+
decision capture. Tier 3 (external context) adds library documentation servers
|
|
19
|
+
to prevent API hallucination. Users choose which tiers to enable.
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
- docs/coding-standards.md (required) — source for code convention rules
|
|
23
|
+
- docs/tech-stack.md (required) — source for technology-specific rules
|
|
24
|
+
- docs/git-workflow.md (required) — source for workflow rules
|
|
25
|
+
- CLAUDE.md (required) — will be optimized after rules extraction
|
|
26
|
+
- package.json or equivalent (optional) — dependency list for Tier 3 assessment
|
|
27
|
+
|
|
28
|
+
## Expected Outputs
|
|
29
|
+
- .claude/rules/ directory with path-scoped rule files extracted from project docs
|
|
30
|
+
- docs/ai-memory-setup.md — documentation of configured memory stack
|
|
31
|
+
- CLAUDE.md updated with pointer pattern (references rules instead of inline content)
|
|
32
|
+
- (Tier 2) .claude/settings.json with MCP memory server and hook configuration
|
|
33
|
+
- (Tier 2) docs/decisions/ directory for structured decision logging
|
|
34
|
+
- (Tier 3) .claude/settings.json with external context MCP server
|
|
35
|
+
|
|
36
|
+
## Quality Criteria
|
|
37
|
+
- .claude/rules/ files use valid YAML frontmatter with description and globs fields
|
|
38
|
+
- Each rule file targets a specific concern (no catch-all files)
|
|
39
|
+
- Total rule content stays under 500 lines across all files
|
|
40
|
+
- CLAUDE.md references rules via pointer pattern, stays under 200 lines
|
|
41
|
+
- Rules accurately reflect the conventions in source documents (no drift)
|
|
42
|
+
- (Tier 2) MCP memory server responds to basic queries
|
|
43
|
+
- (Tier 2) At least PreCompact hook is configured and functional
|
|
44
|
+
- (Tier 3) Library doc server returns results for project dependencies
|
|
45
|
+
|
|
46
|
+
## Methodology Scaling
|
|
47
|
+
- **deep**: All three tiers offered. Tier 1 generates comprehensive rules from
|
|
48
|
+
all project docs. Tier 2 recommends hmem or Claude-Mem for thorough capture.
|
|
49
|
+
Tier 3 configured with appropriate library doc server.
|
|
50
|
+
- **mvp**: Tier 1 only (modular rules). Quick extraction of essential conventions
|
|
51
|
+
into 2-3 rule files. Skip Tier 2 and 3. Minimal CLAUDE.md optimization.
|
|
52
|
+
- **custom:depth(1-5)**: Depth 1-2: Tier 1 basics (2-3 rule files). Depth 3:
|
|
53
|
+
full Tier 1 + offer Tier 2. Depth 4-5: all tiers with comprehensive setup.
|
|
54
|
+
|
|
55
|
+
## Mode Detection
|
|
56
|
+
Update mode if .claude/rules/ directory exists. In update mode: preserve existing
|
|
57
|
+
rule files and their customizations, add missing rules for new conventions,
|
|
58
|
+
update rules where source docs have changed. Never delete user-customized rules.
|
|
59
|
+
If MCP server already configured, verify and update rather than replace.
|
|
60
|
+
|
|
61
|
+
## Update Mode Specifics
|
|
62
|
+
- **Detect prior artifact**: .claude/rules/ directory exists with rule files
|
|
63
|
+
- **Preserve**: existing rule files and their YAML frontmatter, user-customized
|
|
64
|
+
rules, MCP server configurations, hook settings, CLAUDE.md pointer patterns
|
|
65
|
+
- **Triggers for update**: source docs changed (coding-standards.md, tech-stack.md,
|
|
66
|
+
git-workflow.md), new conventions added that need rule extraction, new
|
|
67
|
+
dependencies added that need Tier 3 doc servers
|
|
68
|
+
- **Conflict resolution**: if a source doc changed a convention, update the
|
|
69
|
+
corresponding rule file but preserve any user-added rules in that file;
|
|
70
|
+
never exceed 500-line total rule budget without consolidating
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: automated-pr-review
|
|
3
|
+
description: Agent-driven automated PR review with external reviewers (Codex Cloud, Gemini Code Assist, or custom)
|
|
4
|
+
phase: "environment"
|
|
5
|
+
order: 340
|
|
6
|
+
dependencies: [git-workflow]
|
|
7
|
+
outputs: [AGENTS.md, docs/review-standards.md]
|
|
8
|
+
conditional: "if-needed"
|
|
9
|
+
knowledge-base: [review-methodology]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
Configure an agent-driven automated PR review system using local CLI reviewers
|
|
14
|
+
(Codex, Gemini — runs both when available for dual-model quality) or external
|
|
15
|
+
GitHub App reviewers. Zero GitHub Actions workflows. The agent manages the
|
|
16
|
+
entire review-fix loop locally.
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
- docs/coding-standards.md (required) — review criteria reference
|
|
20
|
+
- docs/tdd-standards.md (required) — test coverage expectations
|
|
21
|
+
- docs/git-workflow.md (required) — PR workflow to integrate with
|
|
22
|
+
- CLAUDE.md (required) — workflow sections to update
|
|
23
|
+
|
|
24
|
+
## Expected Outputs
|
|
25
|
+
- AGENTS.md — Reviewer instructions with project-specific rules
|
|
26
|
+
- docs/review-standards.md — severity definitions (P0-P3) and review criteria
|
|
27
|
+
- scripts/cli-pr-review.sh (local CLI mode) — dual-model review with reconciliation
|
|
28
|
+
- scripts/await-pr-review.sh (external bot mode) — polling script with JSON output
|
|
29
|
+
- docs/git-workflow.md updated with review loop integration
|
|
30
|
+
- CLAUDE.md updated with agent-driven review workflow
|
|
31
|
+
|
|
32
|
+
## Quality Criteria
|
|
33
|
+
- External reviewer configured and verified (AGENTS.md created)
|
|
34
|
+
- Review standards document matches project coding conventions
|
|
35
|
+
- Await script handles all exit conditions (approved, findings, cap, skip, timeout)
|
|
36
|
+
- CLAUDE.md workflow documents the agent-driven loop
|
|
37
|
+
- No GitHub Actions workflows created (zero Actions minutes)
|
|
38
|
+
- No ANTHROPIC_API_KEY secret required
|
|
39
|
+
- Legacy GitHub Actions workflows detected and cleanup offered
|
|
40
|
+
|
|
41
|
+
## Methodology Scaling
|
|
42
|
+
- **deep**: Full setup with local CLI review (dual-model when both available),
|
|
43
|
+
review-standards.md, AGENTS.md, and comprehensive CLAUDE.md workflow.
|
|
44
|
+
Falls back to external bot review if no CLIs available.
|
|
45
|
+
- **mvp**: Step is disabled. Local self-review from git-workflow suffices.
|
|
46
|
+
- **custom:depth(1-5)**: Depth 1-2: disabled. Depth 3: basic review-standards.md
|
|
47
|
+
+ single-CLI review. Depth 4: add dual-model review. Depth 5: full suite
|
|
48
|
+
with all options and legacy cleanup.
|
|
49
|
+
|
|
50
|
+
## Conditional Evaluation
|
|
51
|
+
Enable when: project uses GitHub for version control, team size > 1 or CI/CD is
|
|
52
|
+
configured, or git-workflow.md establishes a PR-based workflow. Skip when: solo
|
|
53
|
+
developer with no CI, depth < 3, or project uses a non-GitHub VCS host.
|
|
54
|
+
|
|
55
|
+
## Mode Detection
|
|
56
|
+
Update mode if AGENTS.md exists. In update mode: preserve custom review rules,
|
|
57
|
+
reviewer bot name, and round cap settings. Detect legacy GitHub Actions
|
|
58
|
+
workflows (code-review-trigger.yml, code-review-handler.yml) and offer removal.
|
|
59
|
+
|
|
60
|
+
## Update Mode Specifics
|
|
61
|
+
- **Detect prior artifact**: AGENTS.md exists
|
|
62
|
+
- **Preserve**: custom review rules, reviewer bot configuration, round cap
|
|
63
|
+
settings, severity definitions in docs/review-standards.md, CLI review
|
|
64
|
+
script customizations
|
|
65
|
+
- **Triggers for update**: coding-standards.md changed (new review criteria),
|
|
66
|
+
tdd-standards.md changed (coverage expectations), new external reviewer
|
|
67
|
+
CLI became available, git-workflow.md changed PR workflow steps
|
|
68
|
+
- **Conflict resolution**: if review criteria changed in coding-standards.md,
|
|
69
|
+
update AGENTS.md review rules to match; if both CLI reviewers are now
|
|
70
|
+
available, offer to enable dual-model review
|