@accelerationguy/accel 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.md +19 -0
- package/LICENSE +33 -0
- package/README.md +275 -0
- package/bin/install.js +661 -0
- package/docs/getting-started.md +164 -0
- package/docs/module-guide.md +139 -0
- package/modules/drive/LICENSE +21 -0
- package/modules/drive/PAUL-VS-GSD.md +171 -0
- package/modules/drive/README.md +555 -0
- package/modules/drive/assets/terminal.svg +67 -0
- package/modules/drive/bin/install.js +210 -0
- package/modules/drive/integration.js +76 -0
- package/modules/drive/package.json +38 -0
- package/modules/drive/src/commands/add-phase.md +36 -0
- package/modules/drive/src/commands/apply.md +83 -0
- package/modules/drive/src/commands/assumptions.md +37 -0
- package/modules/drive/src/commands/audit.md +57 -0
- package/modules/drive/src/commands/complete-milestone.md +36 -0
- package/modules/drive/src/commands/config.md +175 -0
- package/modules/drive/src/commands/consider-issues.md +41 -0
- package/modules/drive/src/commands/discover.md +48 -0
- package/modules/drive/src/commands/discuss-milestone.md +33 -0
- package/modules/drive/src/commands/discuss.md +34 -0
- package/modules/drive/src/commands/flows.md +73 -0
- package/modules/drive/src/commands/handoff.md +201 -0
- package/modules/drive/src/commands/help.md +525 -0
- package/modules/drive/src/commands/init.md +54 -0
- package/modules/drive/src/commands/map-codebase.md +34 -0
- package/modules/drive/src/commands/milestone.md +34 -0
- package/modules/drive/src/commands/pause.md +44 -0
- package/modules/drive/src/commands/plan-fix.md +216 -0
- package/modules/drive/src/commands/plan.md +36 -0
- package/modules/drive/src/commands/progress.md +138 -0
- package/modules/drive/src/commands/register.md +29 -0
- package/modules/drive/src/commands/remove-phase.md +37 -0
- package/modules/drive/src/commands/research-phase.md +209 -0
- package/modules/drive/src/commands/research.md +47 -0
- package/modules/drive/src/commands/resume.md +49 -0
- package/modules/drive/src/commands/status.md +78 -0
- package/modules/drive/src/commands/unify.md +87 -0
- package/modules/drive/src/commands/verify.md +60 -0
- package/modules/drive/src/references/checkpoints.md +234 -0
- package/modules/drive/src/references/context-management.md +219 -0
- package/modules/drive/src/references/git-strategy.md +206 -0
- package/modules/drive/src/references/loop-phases.md +254 -0
- package/modules/drive/src/references/plan-format.md +263 -0
- package/modules/drive/src/references/quality-principles.md +152 -0
- package/modules/drive/src/references/research-quality-control.md +247 -0
- package/modules/drive/src/references/sonarqube-integration.md +244 -0
- package/modules/drive/src/references/specialized-workflow-integration.md +186 -0
- package/modules/drive/src/references/subagent-criteria.md +179 -0
- package/modules/drive/src/references/tdd.md +219 -0
- package/modules/drive/src/references/work-units.md +161 -0
- package/modules/drive/src/rules/commands.md +108 -0
- package/modules/drive/src/rules/references.md +107 -0
- package/modules/drive/src/rules/style.md +123 -0
- package/modules/drive/src/rules/templates.md +51 -0
- package/modules/drive/src/rules/workflows.md +133 -0
- package/modules/drive/src/templates/CONTEXT.md +88 -0
- package/modules/drive/src/templates/DEBUG.md +164 -0
- package/modules/drive/src/templates/DISCOVERY.md +148 -0
- package/modules/drive/src/templates/HANDOFF.md +77 -0
- package/modules/drive/src/templates/ISSUES.md +93 -0
- package/modules/drive/src/templates/MILESTONES.md +167 -0
- package/modules/drive/src/templates/PLAN.md +328 -0
- package/modules/drive/src/templates/PROJECT.md +219 -0
- package/modules/drive/src/templates/RESEARCH.md +130 -0
- package/modules/drive/src/templates/ROADMAP.md +328 -0
- package/modules/drive/src/templates/SPECIAL-FLOWS.md +70 -0
- package/modules/drive/src/templates/STATE.md +210 -0
- package/modules/drive/src/templates/SUMMARY.md +221 -0
- package/modules/drive/src/templates/UAT-ISSUES.md +139 -0
- package/modules/drive/src/templates/codebase/architecture.md +259 -0
- package/modules/drive/src/templates/codebase/concerns.md +329 -0
- package/modules/drive/src/templates/codebase/conventions.md +311 -0
- package/modules/drive/src/templates/codebase/integrations.md +284 -0
- package/modules/drive/src/templates/codebase/stack.md +190 -0
- package/modules/drive/src/templates/codebase/structure.md +287 -0
- package/modules/drive/src/templates/codebase/testing.md +484 -0
- package/modules/drive/src/templates/config.md +181 -0
- package/modules/drive/src/templates/milestone-archive.md +236 -0
- package/modules/drive/src/templates/milestone-context.md +190 -0
- package/modules/drive/src/templates/paul-json.md +147 -0
- package/modules/drive/src/vector-config/PAUL +26 -0
- package/modules/drive/src/vector-config/PAUL.manifest +11 -0
- package/modules/drive/src/workflows/apply-phase.md +393 -0
- package/modules/drive/src/workflows/audit-plan.md +344 -0
- package/modules/drive/src/workflows/complete-milestone.md +479 -0
- package/modules/drive/src/workflows/configure-special-flows.md +283 -0
- package/modules/drive/src/workflows/consider-issues.md +172 -0
- package/modules/drive/src/workflows/create-milestone.md +268 -0
- package/modules/drive/src/workflows/debug.md +292 -0
- package/modules/drive/src/workflows/discovery.md +187 -0
- package/modules/drive/src/workflows/discuss-milestone.md +245 -0
- package/modules/drive/src/workflows/discuss-phase.md +231 -0
- package/modules/drive/src/workflows/init-project.md +698 -0
- package/modules/drive/src/workflows/map-codebase.md +459 -0
- package/modules/drive/src/workflows/pause-work.md +259 -0
- package/modules/drive/src/workflows/phase-assumptions.md +181 -0
- package/modules/drive/src/workflows/plan-phase.md +385 -0
- package/modules/drive/src/workflows/quality-gate.md +263 -0
- package/modules/drive/src/workflows/register-manifest.md +107 -0
- package/modules/drive/src/workflows/research.md +241 -0
- package/modules/drive/src/workflows/resume-project.md +200 -0
- package/modules/drive/src/workflows/roadmap-management.md +334 -0
- package/modules/drive/src/workflows/transition-phase.md +368 -0
- package/modules/drive/src/workflows/unify-phase.md +290 -0
- package/modules/drive/src/workflows/verify-work.md +241 -0
- package/modules/forge/README.md +281 -0
- package/modules/forge/bin/install.js +200 -0
- package/modules/forge/package.json +32 -0
- package/modules/forge/skillsmith/rules/checklists-rules.md +42 -0
- package/modules/forge/skillsmith/rules/context-rules.md +43 -0
- package/modules/forge/skillsmith/rules/entry-point-rules.md +44 -0
- package/modules/forge/skillsmith/rules/frameworks-rules.md +43 -0
- package/modules/forge/skillsmith/rules/tasks-rules.md +52 -0
- package/modules/forge/skillsmith/rules/templates-rules.md +43 -0
- package/modules/forge/skillsmith/skillsmith.md +82 -0
- package/modules/forge/skillsmith/tasks/audit.md +277 -0
- package/modules/forge/skillsmith/tasks/discover.md +145 -0
- package/modules/forge/skillsmith/tasks/distill.md +276 -0
- package/modules/forge/skillsmith/tasks/scaffold.md +349 -0
- package/modules/forge/specs/checklists.md +193 -0
- package/modules/forge/specs/context.md +223 -0
- package/modules/forge/specs/entry-point.md +320 -0
- package/modules/forge/specs/frameworks.md +228 -0
- package/modules/forge/specs/rules.md +245 -0
- package/modules/forge/specs/tasks.md +344 -0
- package/modules/forge/specs/templates.md +335 -0
- package/modules/forge/terminal.svg +70 -0
- package/modules/ignition/README.md +245 -0
- package/modules/ignition/bin/install.js +184 -0
- package/modules/ignition/checklists/planning-quality.md +55 -0
- package/modules/ignition/data/application/config.md +21 -0
- package/modules/ignition/data/application/guide.md +51 -0
- package/modules/ignition/data/application/skill-loadout.md +11 -0
- package/modules/ignition/data/campaign/config.md +18 -0
- package/modules/ignition/data/campaign/guide.md +36 -0
- package/modules/ignition/data/campaign/skill-loadout.md +10 -0
- package/modules/ignition/data/client/config.md +18 -0
- package/modules/ignition/data/client/guide.md +36 -0
- package/modules/ignition/data/client/skill-loadout.md +11 -0
- package/modules/ignition/data/utility/config.md +18 -0
- package/modules/ignition/data/utility/guide.md +31 -0
- package/modules/ignition/data/utility/skill-loadout.md +8 -0
- package/modules/ignition/data/workflow/config.md +19 -0
- package/modules/ignition/data/workflow/guide.md +41 -0
- package/modules/ignition/data/workflow/skill-loadout.md +10 -0
- package/modules/ignition/integration.js +54 -0
- package/modules/ignition/package.json +35 -0
- package/modules/ignition/seed.md +81 -0
- package/modules/ignition/tasks/add-type.md +164 -0
- package/modules/ignition/tasks/graduate.md +182 -0
- package/modules/ignition/tasks/ideate.md +221 -0
- package/modules/ignition/tasks/launch.md +137 -0
- package/modules/ignition/tasks/status.md +71 -0
- package/modules/ignition/templates/planning-application.md +193 -0
- package/modules/ignition/templates/planning-campaign.md +138 -0
- package/modules/ignition/templates/planning-client.md +149 -0
- package/modules/ignition/templates/planning-utility.md +112 -0
- package/modules/ignition/templates/planning-workflow.md +125 -0
- package/modules/ignition/terminal.svg +74 -0
- package/modules/mission-control/CONTEXT-CONTINUITY-SPEC.md +293 -0
- package/modules/mission-control/CONTEXT-ENGINEERING-GUIDE.md +282 -0
- package/modules/mission-control/README.md +91 -0
- package/modules/mission-control/assets/terminal.svg +80 -0
- package/modules/mission-control/examples/entities.example.json +133 -0
- package/modules/mission-control/examples/projects.example.json +318 -0
- package/modules/mission-control/examples/state.example.json +183 -0
- package/modules/mission-control/examples/vector.example.json +245 -0
- package/modules/mission-control/mission-control/checklists/install-verification.md +46 -0
- package/modules/mission-control/mission-control/frameworks/framework-registry.md +83 -0
- package/modules/mission-control/mission-control/mission-control.md +83 -0
- package/modules/mission-control/mission-control/tasks/insights.md +73 -0
- package/modules/mission-control/mission-control/tasks/install.md +194 -0
- package/modules/mission-control/mission-control/tasks/status.md +125 -0
- package/modules/mission-control/schemas/entities.schema.json +89 -0
- package/modules/mission-control/schemas/projects.schema.json +221 -0
- package/modules/mission-control/schemas/state.schema.json +108 -0
- package/modules/mission-control/schemas/vector.schema.json +200 -0
- package/modules/momentum/README.md +678 -0
- package/modules/momentum/bin/install.js +563 -0
- package/modules/momentum/integration.js +131 -0
- package/modules/momentum/package.json +42 -0
- package/modules/momentum/schemas/entities.schema.json +89 -0
- package/modules/momentum/schemas/projects.schema.json +221 -0
- package/modules/momentum/schemas/state.schema.json +108 -0
- package/modules/momentum/src/commands/audit-claude-md.md +31 -0
- package/modules/momentum/src/commands/audit.md +33 -0
- package/modules/momentum/src/commands/groom.md +35 -0
- package/modules/momentum/src/commands/history.md +27 -0
- package/modules/momentum/src/commands/pulse.md +33 -0
- package/modules/momentum/src/commands/scaffold.md +33 -0
- package/modules/momentum/src/commands/status.md +28 -0
- package/modules/momentum/src/commands/surface-convert.md +35 -0
- package/modules/momentum/src/commands/surface-create.md +34 -0
- package/modules/momentum/src/commands/surface-list.md +27 -0
- package/modules/momentum/src/commands/vector-hygiene.md +33 -0
- package/modules/momentum/src/framework/context/momentum-principles.md +71 -0
- package/modules/momentum/src/framework/frameworks/audit-strategies.md +53 -0
- package/modules/momentum/src/framework/frameworks/satellite-registration.md +44 -0
- package/modules/momentum/src/framework/tasks/audit-claude-md.md +68 -0
- package/modules/momentum/src/framework/tasks/audit.md +64 -0
- package/modules/momentum/src/framework/tasks/groom.md +164 -0
- package/modules/momentum/src/framework/tasks/history.md +34 -0
- package/modules/momentum/src/framework/tasks/pulse.md +83 -0
- package/modules/momentum/src/framework/tasks/scaffold.md +202 -0
- package/modules/momentum/src/framework/tasks/status.md +35 -0
- package/modules/momentum/src/framework/tasks/surface-convert.md +143 -0
- package/modules/momentum/src/framework/tasks/surface-create.md +184 -0
- package/modules/momentum/src/framework/tasks/surface-list.md +42 -0
- package/modules/momentum/src/framework/tasks/vector-hygiene.md +160 -0
- package/modules/momentum/src/framework/templates/workspace-json.md +96 -0
- package/modules/momentum/src/hooks/_template.py +129 -0
- package/modules/momentum/src/hooks/active-hook.py +178 -0
- package/modules/momentum/src/hooks/backlog-hook.py +115 -0
- package/modules/momentum/src/hooks/mission-control-insights.py +169 -0
- package/modules/momentum/src/hooks/momentum-pulse-check.py +351 -0
- package/modules/momentum/src/hooks/operator.py +53 -0
- package/modules/momentum/src/hooks/psmm-injector.py +67 -0
- package/modules/momentum/src/hooks/satellite-detection.py +248 -0
- package/modules/momentum/src/packages/momentum-mcp/index.js +119 -0
- package/modules/momentum/src/packages/momentum-mcp/package.json +10 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/entities.js +226 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/operator.js +106 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/projects.js +322 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/psmm.js +206 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/state.js +199 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/surfaces.js +404 -0
- package/modules/momentum/src/skill/momentum.md +111 -0
- package/modules/momentum/src/tasks/groom.md +164 -0
- package/modules/momentum/src/templates/operator.json +66 -0
- package/modules/momentum/src/templates/workspace.json +111 -0
- package/modules/momentum/terminal.svg +77 -0
- package/modules/radar/README.md +1552 -0
- package/modules/radar/commands/audit.md +233 -0
- package/modules/radar/commands/guardrails.md +194 -0
- package/modules/radar/commands/init.md +207 -0
- package/modules/radar/commands/playbook.md +176 -0
- package/modules/radar/commands/remediate.md +156 -0
- package/modules/radar/commands/report.md +172 -0
- package/modules/radar/commands/resume.md +176 -0
- package/modules/radar/commands/status.md +148 -0
- package/modules/radar/commands/transform.md +205 -0
- package/modules/radar/commands/validate.md +177 -0
- package/modules/radar/docs/ARCHITECTURE.md +336 -0
- package/modules/radar/docs/GETTING-STARTED.md +287 -0
- package/modules/radar/docs/standards/agents.md +197 -0
- package/modules/radar/docs/standards/commands.md +250 -0
- package/modules/radar/docs/standards/domains.md +191 -0
- package/modules/radar/docs/standards/personas.md +211 -0
- package/modules/radar/docs/standards/rules.md +218 -0
- package/modules/radar/docs/standards/runtime.md +445 -0
- package/modules/radar/docs/standards/schemas.md +269 -0
- package/modules/radar/docs/standards/tools.md +273 -0
- package/modules/radar/docs/standards/workflows.md +254 -0
- package/modules/radar/docs/terminal.svg +72 -0
- package/modules/radar/docs/validation/convention-compliance-report.md +183 -0
- package/modules/radar/docs/validation/cross-reference-report.md +195 -0
- package/modules/radar/docs/validation/validation-summary.md +118 -0
- package/modules/radar/docs/validation/version-manifest.yaml +363 -0
- package/modules/radar/install.sh +711 -0
- package/modules/radar/integration.js +53 -0
- package/modules/radar/src/core/agents/architect.md +25 -0
- package/modules/radar/src/core/agents/compliance-officer.md +25 -0
- package/modules/radar/src/core/agents/data-engineer.md +25 -0
- package/modules/radar/src/core/agents/devils-advocate.md +22 -0
- package/modules/radar/src/core/agents/performance-engineer.md +25 -0
- package/modules/radar/src/core/agents/principal-engineer.md +23 -0
- package/modules/radar/src/core/agents/reality-gap-analyst.md +22 -0
- package/modules/radar/src/core/agents/security-engineer.md +25 -0
- package/modules/radar/src/core/agents/senior-app-engineer.md +25 -0
- package/modules/radar/src/core/agents/sre.md +25 -0
- package/modules/radar/src/core/agents/staff-engineer.md +23 -0
- package/modules/radar/src/core/agents/test-engineer.md +25 -0
- package/modules/radar/src/core/personas/architect.md +111 -0
- package/modules/radar/src/core/personas/compliance-officer.md +104 -0
- package/modules/radar/src/core/personas/data-engineer.md +113 -0
- package/modules/radar/src/core/personas/devils-advocate.md +105 -0
- package/modules/radar/src/core/personas/performance-engineer.md +119 -0
- package/modules/radar/src/core/personas/principal-engineer.md +119 -0
- package/modules/radar/src/core/personas/reality-gap-analyst.md +111 -0
- package/modules/radar/src/core/personas/security-engineer.md +108 -0
- package/modules/radar/src/core/personas/senior-app-engineer.md +111 -0
- package/modules/radar/src/core/personas/sre.md +117 -0
- package/modules/radar/src/core/personas/staff-engineer.md +109 -0
- package/modules/radar/src/core/personas/test-engineer.md +109 -0
- package/modules/radar/src/core/workflows/disagreement-resolution.md +183 -0
- package/modules/radar/src/core/workflows/phase-0-context.md +148 -0
- package/modules/radar/src/core/workflows/phase-1-reconnaissance.md +169 -0
- package/modules/radar/src/core/workflows/phase-2-domain-audits.md +190 -0
- package/modules/radar/src/core/workflows/phase-3-cross-domain.md +177 -0
- package/modules/radar/src/core/workflows/phase-4-adversarial-review.md +165 -0
- package/modules/radar/src/core/workflows/phase-5-report.md +189 -0
- package/modules/radar/src/core/workflows/phase-checkpoint.md +222 -0
- package/modules/radar/src/core/workflows/session-handoff.md +152 -0
- package/modules/radar/src/domains/00-context.md +201 -0
- package/modules/radar/src/domains/01-architecture.md +248 -0
- package/modules/radar/src/domains/02-data.md +224 -0
- package/modules/radar/src/domains/03-correctness.md +230 -0
- package/modules/radar/src/domains/04-security.md +274 -0
- package/modules/radar/src/domains/05-compliance.md +228 -0
- package/modules/radar/src/domains/06-testing.md +228 -0
- package/modules/radar/src/domains/07-reliability.md +246 -0
- package/modules/radar/src/domains/08-performance.md +247 -0
- package/modules/radar/src/domains/09-maintainability.md +271 -0
- package/modules/radar/src/domains/10-operability.md +250 -0
- package/modules/radar/src/domains/11-change-risk.md +246 -0
- package/modules/radar/src/domains/12-team-risk.md +221 -0
- package/modules/radar/src/domains/13-risk-synthesis.md +202 -0
- package/modules/radar/src/rules/agent-boundaries.md +78 -0
- package/modules/radar/src/rules/disagreement-protocol.md +76 -0
- package/modules/radar/src/rules/epistemic-hygiene.md +78 -0
- package/modules/radar/src/schemas/confidence.md +185 -0
- package/modules/radar/src/schemas/disagreement.md +238 -0
- package/modules/radar/src/schemas/finding.md +287 -0
- package/modules/radar/src/schemas/report-section.md +150 -0
- package/modules/radar/src/schemas/signal.md +108 -0
- package/modules/radar/src/tools/checkov.md +463 -0
- package/modules/radar/src/tools/git-history.md +581 -0
- package/modules/radar/src/tools/gitleaks.md +447 -0
- package/modules/radar/src/tools/grype.md +611 -0
- package/modules/radar/src/tools/semgrep.md +378 -0
- package/modules/radar/src/tools/sonarqube.md +550 -0
- package/modules/radar/src/tools/syft.md +539 -0
- package/modules/radar/src/tools/trivy.md +439 -0
- package/modules/radar/src/transform/agents/change-risk-modeler.md +24 -0
- package/modules/radar/src/transform/agents/execution-validator.md +24 -0
- package/modules/radar/src/transform/agents/guardrail-generator.md +24 -0
- package/modules/radar/src/transform/agents/pedagogy-agent.md +24 -0
- package/modules/radar/src/transform/agents/remediation-architect.md +24 -0
- package/modules/radar/src/transform/personas/change-risk-modeler.md +95 -0
- package/modules/radar/src/transform/personas/execution-validator.md +95 -0
- package/modules/radar/src/transform/personas/guardrail-generator.md +103 -0
- package/modules/radar/src/transform/personas/pedagogy-agent.md +105 -0
- package/modules/radar/src/transform/personas/remediation-architect.md +95 -0
- package/modules/radar/src/transform/rules/change-risk-rules.md +87 -0
- package/modules/radar/src/transform/rules/safety-governance.md +87 -0
- package/modules/radar/src/transform/schemas/change-risk.md +139 -0
- package/modules/radar/src/transform/schemas/intervention-level.md +207 -0
- package/modules/radar/src/transform/schemas/playbook.md +205 -0
- package/modules/radar/src/transform/schemas/verification-plan.md +134 -0
- package/modules/radar/src/transform/workflows/phase-6-remediation.md +148 -0
- package/modules/radar/src/transform/workflows/phase-7-risk-validation.md +161 -0
- package/modules/radar/src/transform/workflows/phase-8-execution-planning.md +159 -0
- package/modules/radar/src/transform/workflows/transform-safety.md +158 -0
- package/modules/vector/.vector-template/sessions/.gitkeep +0 -0
- package/modules/vector/.vector-template/vector.json +72 -0
- package/modules/vector/AUDIT-CLAUDEMD.md +154 -0
- package/modules/vector/INSTALL.md +185 -0
- package/modules/vector/LICENSE +21 -0
- package/modules/vector/README.md +409 -0
- package/modules/vector/VECTOR-BLOCK.md +57 -0
- package/modules/vector/assets/terminal.svg +68 -0
- package/modules/vector/bin/install.js +455 -0
- package/modules/vector/bin/migrate-v1-to-v2.sh +492 -0
- package/modules/vector/commands/help.md +46 -0
- package/modules/vector/hooks/vector-hook.py +775 -0
- package/modules/vector/mcp/index.js +118 -0
- package/modules/vector/mcp/package.json +10 -0
- package/modules/vector/mcp/tools/decisions.js +269 -0
- package/modules/vector/mcp/tools/domains.js +361 -0
- package/modules/vector/mcp/tools/staging.js +252 -0
- package/modules/vector/mcp/tools/vector-json.js +647 -0
- package/modules/vector/package.json +38 -0
- package/modules/vector/schemas/vector.schema.json +237 -0
- package/package.json +39 -0
- package/shared/branding/branding.js +70 -0
- package/shared/config/defaults.json +59 -0
- package/shared/events/README.md +175 -0
- package/shared/events/event-bus.js +134 -0
- package/shared/events/event_bus.py +255 -0
- package/shared/events/integrations.js +161 -0
- package/shared/events/schemas/audit-complete.schema.json +21 -0
- package/shared/events/schemas/phase-progress.schema.json +23 -0
- package/shared/events/schemas/plan-created.schema.json +21 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Manages the transfer of context between agent sessions — persisting findings, disagreements, and state after each session completes, and assembling the input context for the next session to begin.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<phase_context>
|
|
6
|
+
Phase: Utility — invoked at every session boundary across all Radar Core phases (0-5)
|
|
7
|
+
Prior phase output: Varies by phase — each agent session produces findings, disagreements, and updated state
|
|
8
|
+
Agents invoked: None directly — this workflow is invoked BY phase orchestration workflows after each agent session completes
|
|
9
|
+
Output: Validated session artifacts in .radar/, updated .radar/STATE.md, assembled context bundle for next session
|
|
10
|
+
</phase_context>
|
|
11
|
+
|
|
12
|
+
<required_input>
|
|
13
|
+
@.radar/STATE.md
|
|
14
|
+
@.radar/MANIFEST.md
|
|
15
|
+
@~/.claude/radar/schemas/finding.md
|
|
16
|
+
@~/.claude/radar/schemas/disagreement.md
|
|
17
|
+
@~/.claude/radar/schemas/confidence.md
|
|
18
|
+
@~/.claude/radar/schemas/signal.md
|
|
19
|
+
@~/.claude/radar/core/agents/{agent-id}.md (the agent that just completed)
|
|
20
|
+
</required_input>
|
|
21
|
+
|
|
22
|
+
<process>
|
|
23
|
+
|
|
24
|
+
<step name="capture_session_output" priority="first">
|
|
25
|
+
1. Identify the agent that just completed its session from .radar/STATE.md current_agent field.
|
|
26
|
+
2. Collect all output artifacts from the completed session:
|
|
27
|
+
a. Finding files — structured per src/schemas/finding.md
|
|
28
|
+
b. Disagreement records — structured per src/schemas/disagreement.md
|
|
29
|
+
c. Any partial report sections (Phase 5 only) — per src/schemas/report-section.md
|
|
30
|
+
3. Assign unique IDs to any findings or disagreements that lack them:
|
|
31
|
+
- Findings: F-{DD}-{NNN} where DD is the domain number and NNN is sequential
|
|
32
|
+
- Disagreements: D-{NNN} where NNN is sequential across the audit
|
|
33
|
+
4. Tag each artifact with session metadata:
|
|
34
|
+
- agent_id: which agent produced it
|
|
35
|
+
- phase: which Radar phase this was produced in
|
|
36
|
+
- timestamp: session completion time
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
<step name="validate_against_schemas" priority="blocking">
|
|
40
|
+
1. For each finding produced:
|
|
41
|
+
a. Validate all 7 epistemic layers are present per src/schemas/finding.md
|
|
42
|
+
b. Validate confidence vector has all 4 dimensions per src/schemas/confidence.md
|
|
43
|
+
c. Verify severity rating is justified by evidence (not asserted without support)
|
|
44
|
+
d. Check that domain_id matches one of the producing agent's declared domains
|
|
45
|
+
2. For each disagreement record:
|
|
46
|
+
a. Validate structure per src/schemas/disagreement.md
|
|
47
|
+
b. Verify both positions reference valid finding IDs
|
|
48
|
+
c. Verify root_cause_taxonomy uses valid categories
|
|
49
|
+
3. Record validation results:
|
|
50
|
+
- VALID: artifact passes all checks
|
|
51
|
+
- INVALID: artifact fails — log specific field-level errors
|
|
52
|
+
4. For INVALID artifacts:
|
|
53
|
+
a. If the originating session is still available: return to agent with errors for correction
|
|
54
|
+
b. If the originating session has ended: flag as "unvalidated" in .radar/STATE.md and mark for manual review
|
|
55
|
+
c. Do not write invalid artifacts to the canonical .radar/ directory
|
|
56
|
+
</step>
|
|
57
|
+
|
|
58
|
+
<step name="persist_to_radar_directory" priority="blocking">
|
|
59
|
+
1. Write validated findings to .radar/findings/{agent-id}.md:
|
|
60
|
+
- One file per agent containing all findings from that session
|
|
61
|
+
- Append to existing file if agent has run in multiple phases
|
|
62
|
+
- Preserve finding IDs for cross-reference stability
|
|
63
|
+
2. Write disagreement records to .radar/disagreements/{disagreement-id}.md:
|
|
64
|
+
- One file per disagreement for independent tracking
|
|
65
|
+
3. Update .radar/signals/ if the session produced normalized signal data (Phase 1 only):
|
|
66
|
+
- One file per tool: .radar/signals/{tool-id}.md
|
|
67
|
+
4. Verify all writes completed:
|
|
68
|
+
- Confirm file existence
|
|
69
|
+
- Confirm file is non-empty
|
|
70
|
+
- Confirm no write errors
|
|
71
|
+
</step>
|
|
72
|
+
|
|
73
|
+
<step name="update_state" priority="blocking">
|
|
74
|
+
1. Update .radar/STATE.md with:
|
|
75
|
+
a. Session completion record:
|
|
76
|
+
- agent_id, phase, timestamp, status (complete/partial/failed)
|
|
77
|
+
b. Artifact counts:
|
|
78
|
+
- findings_produced: N
|
|
79
|
+
- findings_validated: N
|
|
80
|
+
- findings_invalid: N
|
|
81
|
+
- disagreements_produced: N
|
|
82
|
+
c. Phase progress:
|
|
83
|
+
- agents_completed: N of M for current phase
|
|
84
|
+
- agents_remaining: list of agent IDs not yet run in this phase
|
|
85
|
+
d. Next session:
|
|
86
|
+
- next_agent_id (or "phase_complete" if all agents in phase have run)
|
|
87
|
+
2. If all agents in the current phase have completed:
|
|
88
|
+
a. Mark phase as complete in .radar/STATE.md
|
|
89
|
+
b. Set phase_status to "complete"
|
|
90
|
+
c. Record phase-level metrics (total findings, total disagreements, domain coverage)
|
|
91
|
+
</step>
|
|
92
|
+
|
|
93
|
+
<step name="assemble_next_context" priority="blocking">
|
|
94
|
+
1. If next_agent_id is set (another agent runs in this phase or next phase):
|
|
95
|
+
a. Read the next agent's manifest from src/core/agents/{next-agent-id}.md
|
|
96
|
+
b. Resolve component references:
|
|
97
|
+
- Load persona from src/core/personas/{persona-id}.md
|
|
98
|
+
- Load domains from src/domains/{DD}-*.md for each domain in the manifest
|
|
99
|
+
- Load schemas from src/schemas/{schema-id}.md for each declared schema
|
|
100
|
+
- Load rules from src/rules/{rule-id}.md for each declared rule
|
|
101
|
+
c. Collect input signals:
|
|
102
|
+
- For Phase 2+ agents: load .radar/signals/{tool-id}.md for each tool in the manifest
|
|
103
|
+
- For Phase 3+ agents: load .radar/findings/ from prior phases for declared domains
|
|
104
|
+
- For Phase 4 (Devil's Advocate): load ALL .radar/findings/ and .radar/disagreements/
|
|
105
|
+
- For Phase 5 (Principal Engineer): load complete .radar/ analytical record
|
|
106
|
+
d. Include session context from the agent manifest's "Session Context" section
|
|
107
|
+
e. Include .radar/STATE.md for audit position awareness
|
|
108
|
+
2. Bundle into a context package:
|
|
109
|
+
- Ordered by priority: persona first, then rules, then domains, then signals/findings
|
|
110
|
+
- Include a context manifest listing all loaded files and their roles
|
|
111
|
+
3. Verify context fits within session budget:
|
|
112
|
+
- Estimate token count of assembled context
|
|
113
|
+
- If exceeding budget: prioritize by agent manifest's declared dependencies
|
|
114
|
+
- Log any context that was trimmed due to budget constraints
|
|
115
|
+
</step>
|
|
116
|
+
|
|
117
|
+
<step name="handle_interrupted_session" priority="optional">
|
|
118
|
+
1. If a session ended without producing complete output:
|
|
119
|
+
a. Check for partial artifacts (incomplete findings, draft disagreements)
|
|
120
|
+
b. If partial artifacts exist:
|
|
121
|
+
- Validate whatever is complete
|
|
122
|
+
- Mark incomplete fields in .radar/STATE.md
|
|
123
|
+
- Flag session as "interrupted" with resume point
|
|
124
|
+
c. If no artifacts exist:
|
|
125
|
+
- Mark session as "failed" in .radar/STATE.md
|
|
126
|
+
- Do not block phase progression — record the gap
|
|
127
|
+
2. To resume an interrupted session:
|
|
128
|
+
a. Reload the same context bundle that was prepared for the original session
|
|
129
|
+
b. Include .radar/STATE.md showing the interruption point
|
|
130
|
+
c. Include any partial artifacts that were saved
|
|
131
|
+
d. Set resume_from field so the agent knows where to continue
|
|
132
|
+
</step>
|
|
133
|
+
|
|
134
|
+
</process>
|
|
135
|
+
|
|
136
|
+
<output>
|
|
137
|
+
Artifacts created or updated per invocation:
|
|
138
|
+
- .radar/findings/{agent-id}.md — Validated finding set from completed session
|
|
139
|
+
- .radar/disagreements/{disagreement-id}.md — Disagreement records (if any)
|
|
140
|
+
- .radar/signals/{tool-id}.md — Normalized signals (Phase 1 sessions only)
|
|
141
|
+
- .radar/STATE.md — Updated with session completion, metrics, and next agent
|
|
142
|
+
- Context bundle — Assembled input for the next agent session (in-memory, not persisted as a file)
|
|
143
|
+
</output>
|
|
144
|
+
|
|
145
|
+
<error_handling>
|
|
146
|
+
- **Session timeout (no output):** Mark session as "failed" in .radar/STATE.md. Record which agent and phase. Allow phase to continue with remaining agents but log coverage gap. Do not retry automatically — present to user for decision.
|
|
147
|
+
- **Partial output (some findings valid, some invalid):** Accept valid findings. Quarantine invalid findings in .radar/quarantine/{agent-id}-{timestamp}.md with validation errors. Update STATE.md with partial completion status. Allow phase to continue.
|
|
148
|
+
- **Schema validation failure (all output invalid):** Do not persist any artifacts. Mark session as "validation-failed" in STATE.md. Return full error report to user. Agent must re-run with corrected output before phase can complete.
|
|
149
|
+
- **State file corruption (.radar/STATE.md unreadable):** Halt workflow. Attempt reconstruction from .radar/findings/ and .radar/disagreements/ file timestamps. Present reconstructed state to user for confirmation before proceeding.
|
|
150
|
+
- **Context budget exceeded (next session too large):** Log which components were trimmed. Prioritize: persona > rules > primary domain > signals > prior findings > secondary domains. Never trim persona or rules — these are non-negotiable. If persona + rules alone exceed budget, the audit configuration must be revised.
|
|
151
|
+
- **Write failure (disk/permission error):** Halt immediately. Do not proceed to next session. Present error with full path and permission details. Session artifacts exist only in memory until successfully written.
|
|
152
|
+
</error_handling>
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: domain-00
|
|
3
|
+
number: "00"
|
|
4
|
+
name: Context & Intent
|
|
5
|
+
owner_agents: [principal-engineer]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Covers the foundational understanding of what the system is, why it exists, who uses it, and under what constraints it operates. Context & Intent must come first in every audit — without establishing what the system is supposed to do, every other domain is partially blind. Findings in architecture, security, or performance have no severity anchor without knowing the system's business criticality, deployment model, and operational expectations.
|
|
11
|
+
|
|
12
|
+
Scope: system purpose, stakeholder expectations, deployment context, architectural intent, regulatory environment, data sensitivity classification, and operational constraints. Does NOT cover implementation details — those belong to domains 01-12. Does NOT produce technical findings — it produces the lens through which all other findings are interpreted.
|
|
13
|
+
|
|
14
|
+
## Audit Questions
|
|
15
|
+
|
|
16
|
+
- What problem is this system solving, and for whom?
|
|
17
|
+
- Who are the primary users, and what are their expectations for reliability and performance?
|
|
18
|
+
- What is the business criticality of this system (revenue-generating, cost-saving, compliance-required, internal tooling)?
|
|
19
|
+
- What is the deployment model (cloud, on-premise, hybrid, edge)?
|
|
20
|
+
- What regulatory or compliance requirements apply (GDPR, HIPAA, SOC 2, PCI-DSS, none)?
|
|
21
|
+
- What are the expected load patterns (steady, bursty, seasonal, event-driven)?
|
|
22
|
+
- What data does the system handle, and what is its sensitivity classification?
|
|
23
|
+
- What are the known integration points with external systems?
|
|
24
|
+
- What is explicitly out of scope for this system?
|
|
25
|
+
- Are there documented architectural decisions, and do they reflect current reality?
|
|
26
|
+
- What is the team size and composition maintaining this system?
|
|
27
|
+
- What are the known constraints (budget, timeline, team expertise, legacy dependencies)?
|
|
28
|
+
|
|
29
|
+
## Failure Patterns
|
|
30
|
+
|
|
31
|
+
### Missing System Context
|
|
32
|
+
|
|
33
|
+
- **Description:** No documentation exists describing what the system does, why it exists, or who it serves. Engineers must reverse-engineer purpose from code.
|
|
34
|
+
- **Indicators:**
|
|
35
|
+
- No README or README contains only setup instructions without purpose statement
|
|
36
|
+
- No architecture decision records (ADRs) or design documents
|
|
37
|
+
- Onboarding requires synchronous knowledge transfer from specific individuals
|
|
38
|
+
- Git history is the only source of "why" information
|
|
39
|
+
- **Severity Tendency:** high
|
|
40
|
+
|
|
41
|
+
### Intent-Implementation Drift
|
|
42
|
+
|
|
43
|
+
- **Description:** The system's actual behavior has diverged significantly from its documented or originally intended purpose, creating a gap between what stakeholders believe the system does and what it actually does.
|
|
44
|
+
- **Indicators:**
|
|
45
|
+
- Documentation describes features or behaviors that no longer exist
|
|
46
|
+
- Significant code paths that serve no current business purpose
|
|
47
|
+
- Stakeholders describe the system differently than the code implements
|
|
48
|
+
- Feature flags or configuration permanently set to non-default values
|
|
49
|
+
- **Severity Tendency:** high
|
|
50
|
+
|
|
51
|
+
### Undocumented Assumptions
|
|
52
|
+
|
|
53
|
+
- **Description:** Critical assumptions about the operating environment, data characteristics, or user behavior are embedded in code without explicit documentation, creating hidden failure modes when assumptions are violated.
|
|
54
|
+
- **Indicators:**
|
|
55
|
+
- Hardcoded values without explanatory comments (magic numbers, URLs, thresholds)
|
|
56
|
+
- Environment-specific behavior without configuration abstraction
|
|
57
|
+
- Error handling that assumes specific input shapes without validation
|
|
58
|
+
- Code comments like "this should never happen" or "temporary fix"
|
|
59
|
+
- **Severity Tendency:** medium
|
|
60
|
+
|
|
61
|
+
### Missing Threat Model
|
|
62
|
+
|
|
63
|
+
- **Description:** No documented analysis of what could go wrong, who might attack the system, or what the consequences of various failure modes would be.
|
|
64
|
+
- **Indicators:**
|
|
65
|
+
- No threat modeling artifacts (STRIDE, attack trees, data flow diagrams)
|
|
66
|
+
- Security controls implemented reactively rather than by design
|
|
67
|
+
- No classification of data sensitivity levels
|
|
68
|
+
- No documented trust boundaries between components
|
|
69
|
+
- **Severity Tendency:** high
|
|
70
|
+
|
|
71
|
+
### Stakeholder Blindness
|
|
72
|
+
|
|
73
|
+
- **Description:** The system's design does not account for all relevant stakeholders, leading to misaligned priorities and missing requirements.
|
|
74
|
+
- **Indicators:**
|
|
75
|
+
- No documented stakeholder map or user personas
|
|
76
|
+
- Operations team not consulted during design (missing observability, deployment concerns)
|
|
77
|
+
- Compliance requirements discovered late in development
|
|
78
|
+
- End-user feedback loop absent from development process
|
|
79
|
+
- **Severity Tendency:** medium
|
|
80
|
+
|
|
81
|
+
### Scope Creep Without Context Update
|
|
82
|
+
|
|
83
|
+
- **Description:** The system has grown beyond its original scope, but the contextual documentation, constraints, and architectural boundaries have not been updated to reflect the expanded responsibilities.
|
|
84
|
+
- **Indicators:**
|
|
85
|
+
- System handles concerns far outside its original domain
|
|
86
|
+
- Multiple teams depend on the system for different, sometimes conflicting purposes
|
|
87
|
+
- No clear boundary between "core" functionality and "accreted" functionality
|
|
88
|
+
- Resource allocation still reflects original, smaller scope
|
|
89
|
+
- **Severity Tendency:** medium
|
|
90
|
+
|
|
91
|
+
## Best Practice Patterns
|
|
92
|
+
|
|
93
|
+
### System Context Documentation
|
|
94
|
+
|
|
95
|
+
- **Replaces Failure Pattern:** Missing System Context
|
|
96
|
+
- **Abstract Pattern:** Every system should have a living document that describes its purpose, stakeholders, constraints, and operational context — maintained as a first-class artifact alongside code.
|
|
97
|
+
- **Framework Mappings:**
|
|
98
|
+
- Arc42: Section 1 (Introduction and Goals) + Section 3 (Context and Scope)
|
|
99
|
+
- C4 Model: System Context Diagram as the entry point for all architectural understanding
|
|
100
|
+
- ADR (Architecture Decision Records): Lightweight decision logs capturing "why" alongside "what"
|
|
101
|
+
- **Language Patterns:**
|
|
102
|
+
- Any: `README.md` with structured sections (Purpose, Users, Deployment, Constraints, Non-Goals)
|
|
103
|
+
- Any: `docs/architecture/` directory with ADRs using the Nygard format (Title, Status, Context, Decision, Consequences)
|
|
104
|
+
|
|
105
|
+
### Living Architecture Decision Records
|
|
106
|
+
|
|
107
|
+
- **Replaces Failure Pattern:** Intent-Implementation Drift
|
|
108
|
+
- **Abstract Pattern:** Architectural decisions are recorded when made and updated when the system evolves, creating a traceable chain from intent to implementation that surfaces drift early.
|
|
109
|
+
- **Framework Mappings:**
|
|
110
|
+
- MADR (Markdown ADR): Structured decision records with status tracking (proposed, accepted, deprecated, superseded)
|
|
111
|
+
- Log4brains: ADR tooling that integrates decision records into CI/CD and makes them searchable
|
|
112
|
+
- Lightweight ADR: Simple markdown files in `docs/decisions/` with sequential numbering
|
|
113
|
+
- **Language Patterns:**
|
|
114
|
+
- Any: ADR files with explicit "Status" field that gets updated when decisions change
|
|
115
|
+
- Any: Git commit messages that reference ADR numbers when implementing decisions
|
|
116
|
+
|
|
117
|
+
### Explicit Assumption Register
|
|
118
|
+
|
|
119
|
+
- **Replaces Failure Pattern:** Undocumented Assumptions
|
|
120
|
+
- **Abstract Pattern:** Assumptions about the operating environment, data characteristics, and user behavior are captured in an explicit register — each assumption has an owner, a validation method, and a consequence-if-violated statement.
|
|
121
|
+
- **Framework Mappings:**
|
|
122
|
+
- TOGAF: Architecture Requirements Specification includes explicit assumption documentation
|
|
123
|
+
- Risk Management (ISO 31000): Assumptions as risk inputs with monitoring criteria
|
|
124
|
+
- Lean Architecture: Validated assumptions through hypothesis testing
|
|
125
|
+
- **Language Patterns:**
|
|
126
|
+
- Any: `ASSUMPTIONS.md` or structured section in architecture docs listing each assumption with validation criteria
|
|
127
|
+
- Any: Code comments using a structured format: `// ASSUMPTION: [statement] | VALIDATED BY: [method] | IF WRONG: [consequence]`
|
|
128
|
+
|
|
129
|
+
### Threat Model as Code
|
|
130
|
+
|
|
131
|
+
- **Replaces Failure Pattern:** Missing Threat Model
|
|
132
|
+
- **Abstract Pattern:** Threat modeling is treated as an ongoing, version-controlled activity that evolves with the system, not a one-time exercise.
|
|
133
|
+
- **Framework Mappings:**
|
|
134
|
+
- STRIDE: Systematic threat categorization (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege)
|
|
135
|
+
- OWASP Threat Dragon: Visual threat modeling tool that produces version-controllable output
|
|
136
|
+
- pytm (Python Threat Modeling): Threat models defined as code, producing data flow diagrams and threat lists
|
|
137
|
+
- **Language Patterns:**
|
|
138
|
+
- Python: `pytm` library for defining system components and data flows as code
|
|
139
|
+
- Any: YAML/JSON threat model definitions stored alongside architecture docs
|
|
140
|
+
|
|
141
|
+
### Stakeholder Map
|
|
142
|
+
|
|
143
|
+
- **Replaces Failure Pattern:** Stakeholder Blindness
|
|
144
|
+
- **Abstract Pattern:** All stakeholders (users, operators, maintainers, compliance, business owners) are explicitly identified with their needs, communication channels, and influence on system design.
|
|
145
|
+
- **Framework Mappings:**
|
|
146
|
+
- Impact Mapping: Goal → Actors → Impacts → Deliverables tree connecting stakeholders to system features
|
|
147
|
+
- Wardley Mapping: Value chain positioning that reveals stakeholder dependencies
|
|
148
|
+
- User Story Mapping: Backbone → Walking Skeleton approach that ensures all user types are represented
|
|
149
|
+
- **Language Patterns:**
|
|
150
|
+
- Any: `STAKEHOLDERS.md` with categorized stakeholder list (primary users, secondary users, operators, business owners)
|
|
151
|
+
- Any: User persona documents with specific needs, access patterns, and quality expectations
|
|
152
|
+
|
|
153
|
+
### Scope Governance
|
|
154
|
+
|
|
155
|
+
- **Replaces Failure Pattern:** Scope Creep Without Context Update
|
|
156
|
+
- **Abstract Pattern:** System scope is explicitly defined and bounded, with a formal process for expanding scope that requires updating context documentation, resource allocation, and architectural boundaries.
|
|
157
|
+
- **Framework Mappings:**
|
|
158
|
+
- DDD (Domain-Driven Design): Bounded Contexts with explicit context maps showing relationships between domains
|
|
159
|
+
- Team Topologies: Stream-aligned teams with clear ownership boundaries that prevent uncontrolled scope expansion
|
|
160
|
+
- TOGAF: Architecture governance including change management for scope modifications
|
|
161
|
+
- **Language Patterns:**
|
|
162
|
+
- Any: `SCOPE.md` or scope section in architecture docs with explicit "In Scope" and "Out of Scope" lists
|
|
163
|
+
- Any: Module boundary enforcement through package visibility, dependency rules, or architectural fitness functions
|
|
164
|
+
|
|
165
|
+
## Red Flags
|
|
166
|
+
|
|
167
|
+
- No README, or README contains only "how to install" without "what this is"
|
|
168
|
+
- No architecture documentation of any kind
|
|
169
|
+
- Onboarding requires specific people ("ask Sarah, she knows how it works")
|
|
170
|
+
- No ADRs and no design documents
|
|
171
|
+
- Comments in code that say "I don't know why this is here" or "legacy — don't touch"
|
|
172
|
+
- System handles data types not mentioned in any documentation
|
|
173
|
+
- Multiple conflicting descriptions of the system's purpose from different team members
|
|
174
|
+
- No deployment documentation or runbooks
|
|
175
|
+
- Configuration values that no one can explain the origin of
|
|
176
|
+
- Missing or outdated dependency on external systems not documented anywhere
|
|
177
|
+
|
|
178
|
+
## Tool Affinities
|
|
179
|
+
|
|
180
|
+
| Tool ID | Signal Type | Relevance |
|
|
181
|
+
|---------|-------------|-----------|
|
|
182
|
+
| git-history | Commit patterns, authorship concentration, and change frequency reveal implicit intent and knowledge distribution | contextual |
|
|
183
|
+
| sonarqube | Complexity metrics and code smell density hint at areas where intent may be misaligned with implementation | contextual |
|
|
184
|
+
|
|
185
|
+
## Standards & Frameworks
|
|
186
|
+
|
|
187
|
+
- ISO 25010 — Software product quality model (defines quality characteristics that context establishes priorities for)
|
|
188
|
+
- TOGAF — Enterprise architecture framework with structured context documentation requirements
|
|
189
|
+
- C4 Model — Hierarchical architecture diagramming (System Context as the outermost view)
|
|
190
|
+
- Arc42 — Architecture documentation template with explicit context and scope sections
|
|
191
|
+
- ISO 31000 — Risk management framework (assumptions as risk inputs)
|
|
192
|
+
|
|
193
|
+
## Metrics
|
|
194
|
+
|
|
195
|
+
| Metric | What It Measures | Healthy Range |
|
|
196
|
+
|--------|-----------------|---------------|
|
|
197
|
+
| README completeness score | Presence of purpose, users, deployment, constraints, and non-goals sections | 5/5 sections present |
|
|
198
|
+
| ADR count | Number of architecture decision records | ≥1 per major architectural choice |
|
|
199
|
+
| Documentation freshness | Time since last update to architecture/context docs | <6 months |
|
|
200
|
+
| Stakeholder coverage | Number of identified stakeholder types with documented needs | ≥3 stakeholder types |
|
|
201
|
+
| Assumption register size | Number of explicitly documented assumptions | ≥5 for non-trivial systems |
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: domain-01
|
|
3
|
+
number: "01"
|
|
4
|
+
name: Architecture & System Design
|
|
5
|
+
owner_agents: [architect]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Covers structural patterns, module boundaries, dependency direction, coupling, cohesion, layering, and whether the architecture can support the system's actual requirements. Architecture determines how easy bugs are to introduce, how expensive changes are, and whether scale is possible without rewrites. A well-designed architecture makes the right things easy and the wrong things hard; a poorly designed one does the opposite.
|
|
11
|
+
|
|
12
|
+
Scope: module responsibilities and boundaries, dependency graphs, layering consistency, coupling and cohesion metrics, API surface design, extensibility points, and adherence to stated architectural patterns. Does NOT cover data model design (domain 02), security boundaries (domain 04), or deployment architecture (domain 10).
|
|
13
|
+
|
|
14
|
+
## Audit Questions
|
|
15
|
+
|
|
16
|
+
- Is there a stated architectural pattern (layered, hexagonal, microservices, modular monolith), and does the code follow it?
|
|
17
|
+
- Are module boundaries clearly defined and enforced, or do modules reach into each other's internals?
|
|
18
|
+
- Does dependency direction follow a consistent rule (e.g., inward toward domain, downward through layers)?
|
|
19
|
+
- Are there circular dependencies between modules or packages?
|
|
20
|
+
- Are there "god modules" — modules that know about everything and are imported everywhere?
|
|
21
|
+
- Is domain logic separated from infrastructure concerns (database, HTTP, messaging)?
|
|
22
|
+
- Are API surfaces (internal and external) well-defined with clear contracts?
|
|
23
|
+
- Is there evidence of the "wrong abstraction" — shared code that is harder to understand than duplication would be?
|
|
24
|
+
- Are extensibility points (plugins, hooks, event systems) intentional or accidental?
|
|
25
|
+
- What is the ratio of concrete to abstract dependencies?
|
|
26
|
+
- Are there modules that change together but are structurally separate (hidden coupling)?
|
|
27
|
+
- Is the system's decomposition aligned with its domain boundaries?
|
|
28
|
+
- How deep is the dependency tree, and are there concerning chains?
|
|
29
|
+
|
|
30
|
+
## Failure Patterns
|
|
31
|
+
|
|
32
|
+
### Big Ball of Mud
|
|
33
|
+
|
|
34
|
+
- **Description:** The system lacks discernible architecture. Modules, layers, and boundaries are absent or unenforced, resulting in code where everything depends on everything.
|
|
35
|
+
- **Indicators:**
|
|
36
|
+
- No clear directory structure reflecting architectural intent
|
|
37
|
+
- Import graphs show dense, bidirectional connections between most modules
|
|
38
|
+
- Any change requires touching files across many directories
|
|
39
|
+
- No team member can draw the system's architecture from memory
|
|
40
|
+
- **Severity Tendency:** critical
|
|
41
|
+
|
|
42
|
+
### Leaky Abstractions
|
|
43
|
+
|
|
44
|
+
- **Description:** Module boundaries exist in name but not in practice. Internal implementation details leak through interfaces, creating hidden coupling between components.
|
|
45
|
+
- **Indicators:**
|
|
46
|
+
- Callers make assumptions about implementation details (database schemas, internal state, ordering)
|
|
47
|
+
- Interface changes propagate transitively through multiple layers
|
|
48
|
+
- "Convenience" methods that bypass the intended API surface
|
|
49
|
+
- Error types from lower layers surface unchanged through upper layers
|
|
50
|
+
- **Severity Tendency:** high
|
|
51
|
+
|
|
52
|
+
### Circular Dependencies
|
|
53
|
+
|
|
54
|
+
- **Description:** Two or more modules depend on each other, creating cycles in the dependency graph that prevent independent testing, deployment, and reasoning about each module.
|
|
55
|
+
- **Indicators:**
|
|
56
|
+
- Import analysis reveals cycles (A imports B, B imports A)
|
|
57
|
+
- Build order is fragile or requires special configuration
|
|
58
|
+
- Extracting a module requires bringing its "dependencies" along
|
|
59
|
+
- Initialization order bugs (module A needs B initialized first, but B needs A)
|
|
60
|
+
- **Severity Tendency:** high
|
|
61
|
+
|
|
62
|
+
### God Objects / God Modules
|
|
63
|
+
|
|
64
|
+
- **Description:** A single class, module, or package has accumulated responsibility for too many concerns, becoming a central point of coupling that everything depends on.
|
|
65
|
+
- **Indicators:**
|
|
66
|
+
- One module with significantly more lines of code than any other
|
|
67
|
+
- A single file or class imported by >50% of other modules
|
|
68
|
+
- Module name is generic ("utils", "helpers", "common", "core", "shared")
|
|
69
|
+
- Changes to this module have high blast radius
|
|
70
|
+
- **Severity Tendency:** high
|
|
71
|
+
|
|
72
|
+
### Layer Violations
|
|
73
|
+
|
|
74
|
+
- **Description:** The system has an intended layering (e.g., presentation → business → data), but code routinely bypasses layers, creating shortcuts that undermine the architecture's guarantees.
|
|
75
|
+
- **Indicators:**
|
|
76
|
+
- UI/controller code directly accessing database queries
|
|
77
|
+
- Business logic importing HTTP request/response types
|
|
78
|
+
- Data access layer containing business rules
|
|
79
|
+
- Configuration or environment variables read deep inside business logic
|
|
80
|
+
- **Severity Tendency:** medium
|
|
81
|
+
|
|
82
|
+
### Distributed Monolith
|
|
83
|
+
|
|
84
|
+
- **Description:** The system is deployed as multiple services but exhibits the coupling characteristics of a monolith — services cannot be deployed, tested, or reasoned about independently.
|
|
85
|
+
- **Indicators:**
|
|
86
|
+
- Services share a database or schema
|
|
87
|
+
- Deploying one service requires coordinated deployment of others
|
|
88
|
+
- Shared libraries contain business logic, not just utilities
|
|
89
|
+
- Synchronous call chains span 3+ services for common operations
|
|
90
|
+
- **Severity Tendency:** high
|
|
91
|
+
|
|
92
|
+
### Wrong Abstraction Level
|
|
93
|
+
|
|
94
|
+
- **Description:** Code has been prematurely or incorrectly abstracted — shared modules, base classes, or generic frameworks that make the code harder to understand than simple duplication would.
|
|
95
|
+
- **Indicators:**
|
|
96
|
+
- Abstract base classes with only one concrete implementation
|
|
97
|
+
- Generic frameworks used for a single use case
|
|
98
|
+
- Utility functions with boolean parameters that switch between unrelated behaviors
|
|
99
|
+
- Code that requires understanding the abstraction layer to understand any concrete use case
|
|
100
|
+
- **Severity Tendency:** medium
|
|
101
|
+
|
|
102
|
+
### Feature Envy
|
|
103
|
+
|
|
104
|
+
- **Description:** Modules or classes that primarily operate on another module's data rather than their own, indicating misplaced responsibility and a domain modeling failure.
|
|
105
|
+
- **Indicators:**
|
|
106
|
+
- Methods that take an object and call multiple getters/accessors on it
|
|
107
|
+
- Modules that import data structures from another module more than their own
|
|
108
|
+
- Transformation logic located far from the data it transforms
|
|
109
|
+
- "Manager" or "Service" classes that orchestrate another module's internal operations
|
|
110
|
+
- **Severity Tendency:** medium
|
|
111
|
+
|
|
112
|
+
## Best Practice Patterns
|
|
113
|
+
|
|
114
|
+
### Clean Architecture / Hexagonal Architecture
|
|
115
|
+
|
|
116
|
+
- **Replaces Failure Pattern:** Big Ball of Mud
|
|
117
|
+
- **Abstract Pattern:** Structure the system with a clear dependency direction — outer layers depend on inner layers, never the reverse. Domain logic sits at the center with no dependencies on infrastructure. All external concerns (database, HTTP, messaging) are behind interfaces defined by the domain.
|
|
118
|
+
- **Framework Mappings:**
|
|
119
|
+
- Spring Boot: Domain layer as plain POJOs, repository interfaces defined in domain, implementations in infrastructure module
|
|
120
|
+
- NestJS: Modules with clear imports, domain services with no framework decorators, repository pattern for data access
|
|
121
|
+
- Laravel: Domain directory separate from app/, repository interfaces in domain, Eloquent implementations in infrastructure
|
|
122
|
+
- **Language Patterns:**
|
|
123
|
+
- Java/Kotlin: Package-by-feature with domain packages having zero framework imports
|
|
124
|
+
- TypeScript: Barrel exports per module, no cross-module deep imports, dependency injection for infrastructure
|
|
125
|
+
|
|
126
|
+
### Interface Segregation
|
|
127
|
+
|
|
128
|
+
- **Replaces Failure Pattern:** Leaky Abstractions
|
|
129
|
+
- **Abstract Pattern:** Expose narrow, purpose-specific interfaces rather than broad, implementation-revealing ones. Each consumer should depend only on the methods it uses, not the entire capability of the provider.
|
|
130
|
+
- **Framework Mappings:**
|
|
131
|
+
- Go: Small interfaces defined at the consumer site, not the provider (io.Reader, io.Writer as exemplars)
|
|
132
|
+
- Spring Boot: Separate query and command interfaces for repositories (CQRS-lite)
|
|
133
|
+
- Express/NestJS: Route-specific DTOs rather than exposing domain entities directly
|
|
134
|
+
- **Language Patterns:**
|
|
135
|
+
- TypeScript: Interface per use case (`UserReader`, `UserWriter`) rather than one fat `UserRepository`
|
|
136
|
+
- Python: Protocol classes (PEP 544) for structural typing, ABC for small capability interfaces
|
|
137
|
+
|
|
138
|
+
### Acyclic Dependencies Principle
|
|
139
|
+
|
|
140
|
+
- **Replaces Failure Pattern:** Circular Dependencies
|
|
141
|
+
- **Abstract Pattern:** The dependency graph between modules must be a directed acyclic graph (DAG). Break cycles through dependency inversion — introduce an interface owned by the higher-level module that the lower-level module implements.
|
|
142
|
+
- **Framework Mappings:**
|
|
143
|
+
- Spring Boot: Event-driven communication between modules via ApplicationEventPublisher to break synchronous cycles
|
|
144
|
+
- NestJS: forwardRef() as a temporary fix, but proper solution is extracting shared interfaces into a separate module
|
|
145
|
+
- Django: Signal system for decoupled module communication
|
|
146
|
+
- **Language Patterns:**
|
|
147
|
+
- Java: Dependency inversion with interfaces — module A defines the interface, module B implements it
|
|
148
|
+
- TypeScript: Shared types/interfaces package that both modules depend on, breaking the direct cycle
|
|
149
|
+
|
|
150
|
+
### Module Cohesion
|
|
151
|
+
|
|
152
|
+
- **Replaces Failure Pattern:** God Objects / God Modules
|
|
153
|
+
- **Abstract Pattern:** Each module should have a single, well-defined responsibility. If a module's name requires "and" to describe, it should be split. Utility grab-bags should be decomposed into purpose-specific modules.
|
|
154
|
+
- **Framework Mappings:**
|
|
155
|
+
- DDD: Aggregate roots as natural module boundaries — each aggregate is a cohesion unit
|
|
156
|
+
- Spring Boot: One @Service per bounded context operation, packages named by domain concept
|
|
157
|
+
- Rails: Concerns and service objects to extract responsibilities from fat models/controllers
|
|
158
|
+
- **Language Patterns:**
|
|
159
|
+
- Any: Replace `utils/` with purpose-named modules (`formatting`, `validation`, `date-helpers`)
|
|
160
|
+
- Go: Package per domain concept with short, focused packages preferred over large "everything" packages
|
|
161
|
+
|
|
162
|
+
### Strict Layering
|
|
163
|
+
|
|
164
|
+
- **Replaces Failure Pattern:** Layer Violations
|
|
165
|
+
- **Abstract Pattern:** Each layer may only depend on the layer immediately below it. Skip-layer access is forbidden. Layer boundaries are enforced through module visibility, dependency rules, or architectural fitness functions.
|
|
166
|
+
- **Framework Mappings:**
|
|
167
|
+
- Spring Boot: ArchUnit tests enforcing layer dependencies (controller → service → repository, never controller → repository)
|
|
168
|
+
- .NET: Project references enforcing layer separation (API project references Domain, not Infrastructure)
|
|
169
|
+
- NestJS: Module imports enforcing dependency direction with strict mode
|
|
170
|
+
- **Language Patterns:**
|
|
171
|
+
- Java: Package-private visibility for implementation classes, public only for interfaces
|
|
172
|
+
- TypeScript: `index.ts` barrel exports controlling module surface, eslint-plugin-import rules preventing deep imports
|
|
173
|
+
|
|
174
|
+
### Service Autonomy
|
|
175
|
+
|
|
176
|
+
- **Replaces Failure Pattern:** Distributed Monolith
|
|
177
|
+
- **Abstract Pattern:** Each service owns its data, can be deployed independently, and communicates through well-defined asynchronous contracts. Shared databases are replaced with API contracts or event-driven integration.
|
|
178
|
+
- **Framework Mappings:**
|
|
179
|
+
- Kafka/RabbitMQ: Event-driven integration replacing synchronous call chains
|
|
180
|
+
- gRPC: Strongly-typed service contracts with independent schema evolution
|
|
181
|
+
- API Gateway: Centralized routing with independent service deployments behind it
|
|
182
|
+
- **Language Patterns:**
|
|
183
|
+
- Any: Database-per-service with API or event-based data sharing
|
|
184
|
+
- Any: Consumer-driven contract tests (Pact) to validate integration without coupling
|
|
185
|
+
|
|
186
|
+
### Justified Abstraction
|
|
187
|
+
|
|
188
|
+
- **Replaces Failure Pattern:** Wrong Abstraction Level
|
|
189
|
+
- **Abstract Pattern:** Prefer duplication over the wrong abstraction. Introduce abstractions only when three or more concrete cases exist and the shared pattern is stable and well-understood. Every abstraction should earn its keep.
|
|
190
|
+
- **Framework Mappings:**
|
|
191
|
+
- Rule of Three: Wait for three instances before extracting a shared abstraction
|
|
192
|
+
- Martin Fowler's Refactoring: Extract only when duplication is proven harmful, not merely present
|
|
193
|
+
- Sandi Metz: "Prefer duplication over the wrong abstraction" — wrong abstractions are more expensive than duplicated code
|
|
194
|
+
- **Language Patterns:**
|
|
195
|
+
- Any: Inline implementation for single-use patterns; extract only after multiple proven uses
|
|
196
|
+
- Any: Composition over inheritance — small, focused functions combined rather than class hierarchies
|
|
197
|
+
|
|
198
|
+
### Responsibility Alignment
|
|
199
|
+
|
|
200
|
+
- **Replaces Failure Pattern:** Feature Envy
|
|
201
|
+
- **Abstract Pattern:** Operations should live with the data they operate on. If a function primarily uses another module's data, it belongs in that module. Domain modeling should align code boundaries with data ownership.
|
|
202
|
+
- **Framework Mappings:**
|
|
203
|
+
- DDD: Rich domain models where behavior lives with the entity it operates on
|
|
204
|
+
- Tell, Don't Ask: Objects expose behavior (tell), not data for external computation (ask)
|
|
205
|
+
- CQRS: Separate read/write models to avoid cross-module data access for queries
|
|
206
|
+
- **Language Patterns:**
|
|
207
|
+
- Java/Kotlin: Methods on the domain object itself rather than in external "service" classes
|
|
208
|
+
- Python: Instance methods for operations on instance data; module-level functions for operations on module's data types
|
|
209
|
+
|
|
210
|
+
## Red Flags
|
|
211
|
+
|
|
212
|
+
- Directory named `utils/`, `helpers/`, `common/`, or `misc/` with >500 lines
|
|
213
|
+
- A single file imported by more than half the codebase
|
|
214
|
+
- Import statements that reach 3+ levels deep into another module's directory structure
|
|
215
|
+
- Module names that require "and" to describe their purpose
|
|
216
|
+
- Business logic in controller/handler files
|
|
217
|
+
- Database queries in UI component files
|
|
218
|
+
- Circular import warnings from build tools
|
|
219
|
+
- "Shared" library containing business logic, not just utilities
|
|
220
|
+
- God class with >1000 lines and >20 methods
|
|
221
|
+
- Service-to-service calls requiring synchronized deployments
|
|
222
|
+
|
|
223
|
+
## Tool Affinities
|
|
224
|
+
|
|
225
|
+
| Tool ID | Signal Type | Relevance |
|
|
226
|
+
|---------|-------------|-----------|
|
|
227
|
+
| sonarqube | Cyclomatic complexity, cognitive complexity, coupling between modules, duplication density | primary |
|
|
228
|
+
| semgrep | Custom rules to detect layer violations, forbidden imports, architectural pattern violations | supporting |
|
|
229
|
+
| git-history | Change coupling analysis — files that always change together reveal hidden architectural dependencies | supporting |
|
|
230
|
+
|
|
231
|
+
## Standards & Frameworks
|
|
232
|
+
|
|
233
|
+
- SOLID Principles — Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
|
|
234
|
+
- Clean Architecture (Robert C. Martin) — Dependency rule, entity/use-case/interface-adapter/framework layers
|
|
235
|
+
- Hexagonal Architecture (Alistair Cockburn) — Ports and adapters separating domain from infrastructure
|
|
236
|
+
- Domain-Driven Design (Eric Evans) — Bounded contexts, aggregates, ubiquitous language
|
|
237
|
+
- Package Principles (Robert C. Martin) — Reuse-Release, Common-Closure, Common-Reuse, Acyclic Dependencies, Stable Dependencies, Stable Abstractions
|
|
238
|
+
|
|
239
|
+
## Metrics
|
|
240
|
+
|
|
241
|
+
| Metric | What It Measures | Healthy Range |
|
|
242
|
+
|--------|-----------------|---------------|
|
|
243
|
+
| Coupling between modules | Number of inter-module dependencies relative to total modules | <0.3 (normalized, lower is better) |
|
|
244
|
+
| Average cyclomatic complexity | Average decision complexity per function | <10 per function |
|
|
245
|
+
| Dependency depth | Longest chain in the module dependency graph | <5 levels |
|
|
246
|
+
| File size distribution (P90) | 90th percentile file size in lines of code | <400 lines |
|
|
247
|
+
| Circular dependency count | Number of cycles in the module dependency graph | 0 |
|
|
248
|
+
| Afferent/efferent coupling ratio | Balance between incoming and outgoing dependencies per module | Varies — instability index (Ce/(Ca+Ce)) should be 0 or 1, not middle |
|