@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,74 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 740 480" width="740" height="480">
|
|
2
|
+
<!-- Window shadow -->
|
|
3
|
+
<rect x="4" y="8" width="736" height="472" rx="12" fill="rgba(0,0,0,0.4)"/>
|
|
4
|
+
|
|
5
|
+
<!-- Window background -->
|
|
6
|
+
<rect width="736" height="472" rx="12" fill="#13131f"/>
|
|
7
|
+
|
|
8
|
+
<!-- Title bar -->
|
|
9
|
+
<rect width="736" height="40" rx="12" fill="#1e1e30"/>
|
|
10
|
+
<rect y="28" width="736" height="12" fill="#1e1e30"/>
|
|
11
|
+
|
|
12
|
+
<!-- Traffic lights -->
|
|
13
|
+
<circle cx="24" cy="20" r="7" fill="#ff5f57"/>
|
|
14
|
+
<circle cx="48" cy="20" r="7" fill="#febc2e"/>
|
|
15
|
+
<circle cx="72" cy="20" r="7" fill="#28c840"/>
|
|
16
|
+
|
|
17
|
+
<!-- Terminal label -->
|
|
18
|
+
<text x="368" y="25" text-anchor="middle" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="12" fill="#4a4a6a">Terminal</text>
|
|
19
|
+
|
|
20
|
+
<!-- Prompt line -->
|
|
21
|
+
<text x="24" y="68" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
22
|
+
<tspan fill="#4a4a6a">~ $ </tspan><tspan fill="#c0c0d8">/ignition</tspan>
|
|
23
|
+
</text>
|
|
24
|
+
|
|
25
|
+
<!-- Ignition logo - green -->
|
|
26
|
+
<text x="24" y="96" fill="#4dde80" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13" xml:space="preserve"> ███████╗███████╗███████╗██████╗ </text>
|
|
27
|
+
<text x="24" y="113" fill="#4dde80" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13" xml:space="preserve"> ██╔════╝██╔════╝██╔════╝██╔══██╗</text>
|
|
28
|
+
<text x="24" y="130" fill="#3dd870" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13" xml:space="preserve"> ███████╗█████╗ █████╗ ██║ ██║</text>
|
|
29
|
+
<text x="24" y="147" fill="#3dd870" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13" xml:space="preserve"> ╚════██║██╔══╝ ██╔══╝ ██║ ██║</text>
|
|
30
|
+
<text x="24" y="164" fill="#28a745" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13" xml:space="preserve"> ███████║███████╗███████╗██████╔╝</text>
|
|
31
|
+
<text x="24" y="181" fill="#28a745" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13" xml:space="preserve"> ╚══════╝╚══════╝╚══════╝╚═════╝ </text>
|
|
32
|
+
|
|
33
|
+
<!-- Name + version -->
|
|
34
|
+
<text x="24" y="207" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
35
|
+
<tspan fill="#4dde80" font-weight="bold">Ignition</tspan><tspan fill="#4a4a6a"> v0.1.0</tspan>
|
|
36
|
+
</text>
|
|
37
|
+
<text x="24" y="224" fill="#7b8cde" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">Structured Evaluation & Engineering Design</text>
|
|
38
|
+
|
|
39
|
+
<!-- Divider -->
|
|
40
|
+
<line x1="24" y1="238" x2="712" y2="238" stroke="#1e1e30" stroke-width="1.5"/>
|
|
41
|
+
|
|
42
|
+
<!-- Greeting -->
|
|
43
|
+
<text x="24" y="258" fill="#4dde80" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">Ignition loaded.</text>
|
|
44
|
+
|
|
45
|
+
<!-- Commands -->
|
|
46
|
+
<text x="24" y="283" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
47
|
+
<tspan fill="#c0c0d8"> -</tspan><tspan fill="#4dde80"> Ideate</tspan>
|
|
48
|
+
<tspan fill="#4a4a6a"> — Shape a new project idea (default)</tspan>
|
|
49
|
+
</text>
|
|
50
|
+
<text x="24" y="300" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
51
|
+
<tspan fill="#c0c0d8"> -</tspan><tspan fill="#4dde80"> Graduate</tspan>
|
|
52
|
+
<tspan fill="#4a4a6a"> — Move to apps/ with git repo</tspan>
|
|
53
|
+
</text>
|
|
54
|
+
<text x="24" y="317" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
55
|
+
<tspan fill="#c0c0d8"> -</tspan><tspan fill="#4dde80"> Launch</tspan>
|
|
56
|
+
<tspan fill="#4a4a6a"> — Graduate + initialize Drive</tspan>
|
|
57
|
+
</text>
|
|
58
|
+
<text x="24" y="334" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
59
|
+
<tspan fill="#c0c0d8"> -</tspan><tspan fill="#4dde80"> Status</tspan>
|
|
60
|
+
<tspan fill="#4a4a6a"> — See projects in the pipeline</tspan>
|
|
61
|
+
</text>
|
|
62
|
+
<text x="24" y="351" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
63
|
+
<tspan fill="#c0c0d8"> -</tspan><tspan fill="#4dde80"> Add Type</tspan>
|
|
64
|
+
<tspan fill="#4a4a6a"> — Create a custom project type</tspan>
|
|
65
|
+
</text>
|
|
66
|
+
|
|
67
|
+
<!-- Prompt -->
|
|
68
|
+
<text x="24" y="383" fill="#c0c0d8" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">What are you building?</text>
|
|
69
|
+
|
|
70
|
+
<!-- Cursor -->
|
|
71
|
+
<text x="24" y="420" font-family="'SF Mono','Fira Code','Courier New',monospace" font-size="13">
|
|
72
|
+
<tspan fill="#4a4a6a">~ $ </tspan><tspan fill="#4dde80">▊</tspan>
|
|
73
|
+
</text>
|
|
74
|
+
</svg>
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# Context Continuity Protocol — Spec & Planning Doc
|
|
2
|
+
|
|
3
|
+
A mid-session context refresh system for 1M token Claude Code sessions. Maintains output quality across the full window by synthesizing context at threshold checkpoints, re-injecting critical behavioral rules, and forcing PSMM hygiene — without interrupting the session flow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The Problem
|
|
8
|
+
|
|
9
|
+
### Quality Degradation in Long Sessions
|
|
10
|
+
|
|
11
|
+
Claude Code sessions with 1M token windows experience measurable quality degradation around the 200-250k token mark. This manifests as:
|
|
12
|
+
|
|
13
|
+
- Drift from established behavioral patterns (CLAUDE.md rules ignored)
|
|
14
|
+
- Forgetting earlier decisions made in the same session
|
|
15
|
+
- Losing the "why" behind current work
|
|
16
|
+
- Repeating mistakes that were already corrected
|
|
17
|
+
- Defaulting to generic behavior instead of personalized patterns
|
|
18
|
+
|
|
19
|
+
### Why This Happens: Attention and Recency
|
|
20
|
+
|
|
21
|
+
The context window is not a flat memory. Attention distributes unevenly:
|
|
22
|
+
|
|
23
|
+
**High attention zones:**
|
|
24
|
+
- System prompt (very beginning of context) — initial CLAUDE.md, system instructions
|
|
25
|
+
- Most recent content (last ~50k tokens) — recent tool results, recent prompts/responses, recent system-reminder injections
|
|
26
|
+
|
|
27
|
+
**Low attention zone ("the middle"):**
|
|
28
|
+
- Everything between the system prompt and recent content
|
|
29
|
+
- By 200k tokens, the system prompt content is buried under 200k tokens of conversation
|
|
30
|
+
- Decisions, corrections, and context from prompts 1-20 are in the middle by prompt 40
|
|
31
|
+
|
|
32
|
+
**Key mechanism: Recency creates signal strength.** Content that was recently read (via Read tool), recently injected (via hook), or recently written (in the current response) has stronger influence than content from 100k tokens ago — even if the older content is more important.
|
|
33
|
+
|
|
34
|
+
**Re-injection does NOT create noise.** Injecting the same content again at a later position in the window creates recency, not duplication. The original copy fades in attention; the new copy replaces it functionally. This is reinforcement, not redundancy.
|
|
35
|
+
|
|
36
|
+
### Why 200k Token Sessions Worked Well
|
|
37
|
+
|
|
38
|
+
The previous 200k token session limit was accidentally a feature:
|
|
39
|
+
|
|
40
|
+
- Forced session handoffs and fresh starts
|
|
41
|
+
- Every new session put CLAUDE.md at the top of a clean window
|
|
42
|
+
- Behavioral rules were always at full attention strength
|
|
43
|
+
- No middle-of-context drift was possible — the session ended before it could happen
|
|
44
|
+
- Users who maintained continuity across 200k sessions got the best output consistently
|
|
45
|
+
|
|
46
|
+
The 1M window removed this forcing function without replacing it. Sessions now drift past the quality cliff without any mechanism to recover.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## The Solution: Context Continuity Protocol
|
|
51
|
+
|
|
52
|
+
### Overview
|
|
53
|
+
|
|
54
|
+
At a configurable token threshold (default: 200k tokens used), a hook fires that triggers a structured mid-session context refresh. This is NOT a compaction (which discards context). It's a synthesis — extracting signal from the accumulated context while that context still exists in the window.
|
|
55
|
+
|
|
56
|
+
### Trigger Conditions
|
|
57
|
+
|
|
58
|
+
| Condition | Action |
|
|
59
|
+
|-----------|--------|
|
|
60
|
+
| Window size < 500k (e.g., 200k window) | Exit silently — handoffs and resumes handle short windows |
|
|
61
|
+
| Window size >= 500k AND tokens used >= 200k | Fire context continuity protocol |
|
|
62
|
+
| Already fired this session | Track via session file — fire again at next 200k increment (400k, 600k, 800k) |
|
|
63
|
+
|
|
64
|
+
**Only for 1M+ token windows.** For 200k windows, handoffs and session resumes are the right pattern. This protocol exists because 1M windows need a continuity mechanism that 200k windows got for free from their size constraint.
|
|
65
|
+
|
|
66
|
+
### Sequence
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
1. Hook detects threshold crossed (200k tokens used)
|
|
70
|
+
2. Hook injects <context-continuity-trigger> signal
|
|
71
|
+
3. Claude generates Session Continuity Document (SCD)
|
|
72
|
+
4. Claude immediately Reads the SCD back
|
|
73
|
+
5. During Read, Claude checks for inconsistencies
|
|
74
|
+
6. If inconsistencies found: update SCD, re-Read
|
|
75
|
+
7. If gaps exist: explicitly state them, ask operator to fill in
|
|
76
|
+
8. Hook re-injects full CLAUDE.md
|
|
77
|
+
9. PSMM checkpoint: review and log any missed entries
|
|
78
|
+
10. Resume work with refreshed context
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Component 1: The Hook
|
|
84
|
+
|
|
85
|
+
### `context-continuity-hook.py`
|
|
86
|
+
|
|
87
|
+
**Trigger:** UserPromptSubmit
|
|
88
|
+
**Input:** Context percentage from `input_data.context.tokensUsed` and `tokensRemaining`
|
|
89
|
+
**Logic:**
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
WINDOW_THRESHOLD = 500000 # Only fire for windows >= 500k
|
|
93
|
+
CONTINUITY_INTERVAL = 200000 # Fire every 200k tokens used
|
|
94
|
+
SESSION_TRACKER_KEY = "continuity_checkpoints" # Track in session file
|
|
95
|
+
|
|
96
|
+
# Calculate tokens used
|
|
97
|
+
tokens_used = total - remaining
|
|
98
|
+
|
|
99
|
+
# Skip if window is too small
|
|
100
|
+
if total < WINDOW_THRESHOLD:
|
|
101
|
+
sys.exit(0)
|
|
102
|
+
|
|
103
|
+
# Check if we've crossed a new 200k boundary
|
|
104
|
+
checkpoint_number = tokens_used // CONTINUITY_INTERVAL # 0, 1, 2, 3, 4...
|
|
105
|
+
if checkpoint_number < 1:
|
|
106
|
+
sys.exit(0) # Haven't hit 200k yet
|
|
107
|
+
|
|
108
|
+
# Check session file for last completed checkpoint
|
|
109
|
+
last_checkpoint = session.get(SESSION_TRACKER_KEY, 0)
|
|
110
|
+
if checkpoint_number <= last_checkpoint:
|
|
111
|
+
sys.exit(0) # Already handled this checkpoint
|
|
112
|
+
|
|
113
|
+
# Fire the trigger
|
|
114
|
+
# Update session tracker after output
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Output:** Two injections:
|
|
118
|
+
1. `<context-continuity-trigger>` — instructions for generating the SCD
|
|
119
|
+
2. Full CLAUDE.md content re-injection
|
|
120
|
+
|
|
121
|
+
### CLAUDE.md Re-injection
|
|
122
|
+
|
|
123
|
+
The full CLAUDE.md is re-injected as-is. No trimming, no summarizing. If the CLAUDE.md is too large for this, the CLAUDE.md needs auditing — not this protocol.
|
|
124
|
+
|
|
125
|
+
The re-injection puts CLAUDE.md content at the most recent system-reminder position — high attention, maximum behavioral influence. This is the single most impactful part of the protocol for maintaining behavioral consistency.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Component 2: The Session Continuity Document (SCD)
|
|
130
|
+
|
|
131
|
+
### What It Is
|
|
132
|
+
|
|
133
|
+
A structured document written by Claude at the 200k checkpoint that synthesizes the session into focused, actionable context. This is NOT a transcript or log. It's a distillation — the signal extracted from 200k tokens of noise (tool outputs, verbose responses, exploratory conversation, dead ends).
|
|
134
|
+
|
|
135
|
+
### Why Writing + Reading Matters
|
|
136
|
+
|
|
137
|
+
**Writing** forces Claude to synthesize. The act of generating the document requires reviewing accumulated context and making judgments about what matters. This is valuable but not sufficient.
|
|
138
|
+
|
|
139
|
+
**Reading it back** is the critical step. A Read tool result arrives as fresh content in a high-attention position. Without the Read-back, the SCD is just something Claude wrote — with it, it's something Claude is actively processing as input. The difference in attention weight is significant.
|
|
140
|
+
|
|
141
|
+
**The Read also enables self-correction.** During the Read-back, Claude can spot inconsistencies between what it wrote and what it actually knows from context. If a decision was summarized incorrectly or a correction was missed, the Read-back is when Claude catches and fixes it.
|
|
142
|
+
|
|
143
|
+
### SCD Template
|
|
144
|
+
|
|
145
|
+
The prompt instructions in the `<context-continuity-trigger>` must produce this exact structure:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# Session Continuity Document
|
|
149
|
+
**Generated at:** [timestamp]
|
|
150
|
+
**Checkpoint:** [1st, 2nd, 3rd, 4th] (at ~[200k, 400k, 600k, 800k] tokens)
|
|
151
|
+
**Session ID:** [uuid]
|
|
152
|
+
|
|
153
|
+
## Session Intent
|
|
154
|
+
[One paragraph: what did we set out to do this session? What was the opening
|
|
155
|
+
context? Has the intent shifted since session start?]
|
|
156
|
+
|
|
157
|
+
## Trajectory
|
|
158
|
+
[Chronological key moments — not everything, just the pivots and milestones.
|
|
159
|
+
Format: timestamp-ish → what happened → why it mattered]
|
|
160
|
+
|
|
161
|
+
## Decisions Made
|
|
162
|
+
[Every decision made this session. Format: decision → rationale → still valid?
|
|
163
|
+
If uncertain about any decision, flag it with ⚠️ for operator confirmation.]
|
|
164
|
+
|
|
165
|
+
## Corrections Received
|
|
166
|
+
[Every time the operator corrected an approach, assumption, or behavior.
|
|
167
|
+
These are the highest-signal items — they represent calibration.]
|
|
168
|
+
|
|
169
|
+
## Active Constraints
|
|
170
|
+
[Rules, mandates, or patterns the operator established during this session.
|
|
171
|
+
Example: "parallel build mandate — never modify live files"]
|
|
172
|
+
|
|
173
|
+
## Current State
|
|
174
|
+
[What's done, what's in progress, what's next. Precise — file paths,
|
|
175
|
+
line numbers, specific status.]
|
|
176
|
+
|
|
177
|
+
## Open Questions / Gaps
|
|
178
|
+
[Anything uncertain, fuzzy, or assumed. Be honest — if you don't remember
|
|
179
|
+
something clearly, say so. The operator can fill gaps and WILL happily do
|
|
180
|
+
so if it means the next 200k tokens are top quality instead of degraded.]
|
|
181
|
+
|
|
182
|
+
## PSMM Review
|
|
183
|
+
[Review: were there DECISION/CORRECTION/INSIGHT/COMMITMENT moments that
|
|
184
|
+
should have been logged but weren't? List them. Log them now via
|
|
185
|
+
vector_psmm_log or direct psmm.json edit.]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### SCD Prompting Requirements
|
|
189
|
+
|
|
190
|
+
The instructions delivered by the hook must be explicit about:
|
|
191
|
+
|
|
192
|
+
1. **Honesty over completeness.** If Claude doesn't remember something clearly, it must say "I'm uncertain about X — operator should confirm." Fabricating details is worse than admitting gaps, because fabricated details become load-bearing context after the Read-back and will actively mislead the rest of the session.
|
|
193
|
+
|
|
194
|
+
2. **Corrections are highest priority.** Operator corrections represent calibration — moments where Claude's default behavior was wrong and was fixed. These MUST be captured accurately because they're the most likely things to drift in long sessions.
|
|
195
|
+
|
|
196
|
+
3. **Chronological trajectory matters.** Not just "here's where we are" but "here's how we got here." The path preserves the *why* behind decisions. Without trajectory, Claude loses the reasoning and may revisit or contradict earlier work.
|
|
197
|
+
|
|
198
|
+
4. **The Read-back is for verification, not just recall.** During Read-back, Claude should actively check: "Does this match what I know? Did I get any decision wrong? Did I miss a correction?" If inconsistencies are found, update the document immediately and re-Read.
|
|
199
|
+
|
|
200
|
+
5. **Gaps invite operator participation.** Explicitly listing gaps gives the operator a chance to fill in details that are fuzzy at this point. The operator is present and willing to help — they want the next 200k tokens to be high quality. Flagging gaps is not weakness, it's collaboration.
|
|
201
|
+
|
|
202
|
+
6. **Max output efficiency, not winging it.** This document needs Claude to think as hard as possible on the first draft. Analyze the full context window. Be precise about file paths, decision rationale, correction details. A sloppy first draft that gets Read back becomes sloppy load-bearing context.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Component 3: PSMM Checkpoint
|
|
207
|
+
|
|
208
|
+
### Integrated into the SCD
|
|
209
|
+
|
|
210
|
+
The PSMM review is the last section of the SCD. At the 200k checkpoint, Claude reviews the session for unlogged meta moments:
|
|
211
|
+
|
|
212
|
+
- **DECISION**: Any architectural or design decisions that weren't logged
|
|
213
|
+
- **CORRECTION**: Any operator corrections to behavior or approach
|
|
214
|
+
- **INSIGHT**: Any realizations about how systems work or should work
|
|
215
|
+
- **COMMITMENT**: Any commitments made to the operator
|
|
216
|
+
|
|
217
|
+
After identifying unlogged entries, Claude logs them immediately via `vector_psmm_log` or direct `psmm.json` edit. This prevents the "I got too busy executing to log" problem that was identified during the Mission Control Phase 4 session.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Component 4: Checkpoint Cadence
|
|
222
|
+
|
|
223
|
+
### Multi-checkpoint Sessions
|
|
224
|
+
|
|
225
|
+
For 1M token sessions, the protocol fires at every 200k increment:
|
|
226
|
+
|
|
227
|
+
| Checkpoint | Tokens Used | What Happens |
|
|
228
|
+
|-----------|-------------|-------------|
|
|
229
|
+
| 1st | ~200k | Full SCD + CLAUDE.md re-inject + PSMM review |
|
|
230
|
+
| 2nd | ~400k | Updated SCD (references 1st) + CLAUDE.md re-inject + PSMM review |
|
|
231
|
+
| 3rd | ~600k | Updated SCD (references 1st + 2nd) + CLAUDE.md re-inject + PSMM review |
|
|
232
|
+
| 4th | ~800k | Updated SCD + CLAUDE.md re-inject + strong recommendation to wrap up or handoff |
|
|
233
|
+
|
|
234
|
+
Each subsequent SCD references prior ones. The 2nd checkpoint document says "At 200k we established X, since then we've done Y, and now Z." Layered continuity — each document builds on the last.
|
|
235
|
+
|
|
236
|
+
At the 4th checkpoint (800k), the protocol should strongly recommend wrapping up or creating a handoff. The last 200k of a 1M window is the lowest-quality zone and the most likely to produce errors.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Implementation Plan
|
|
241
|
+
|
|
242
|
+
### Files to Create
|
|
243
|
+
|
|
244
|
+
| File | Purpose |
|
|
245
|
+
|------|---------|
|
|
246
|
+
| `.accel/momentum/hooks/context-continuity.py` | Hook — detects threshold, injects trigger + CLAUDE.md |
|
|
247
|
+
| `.vector/vector.json` (add GLOBAL rule) | Rule instructing Claude how to respond to the trigger |
|
|
248
|
+
| SCD template | Reference for the document structure (embedded in hook output) |
|
|
249
|
+
|
|
250
|
+
### Settings Integration
|
|
251
|
+
|
|
252
|
+
Add to `~/.claude/settings.json` UserPromptSubmit hooks. The hook needs:
|
|
253
|
+
- Access to context token data from `input_data`
|
|
254
|
+
- Access to session tracking (via `.vector/sessions/` or `.accel/momentum/data/`)
|
|
255
|
+
- Ability to read and inject CLAUDE.md content
|
|
256
|
+
|
|
257
|
+
### Configuration
|
|
258
|
+
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"context_continuity": {
|
|
262
|
+
"enabled": true,
|
|
263
|
+
"window_minimum": 500000,
|
|
264
|
+
"interval": 200000,
|
|
265
|
+
"claudemd_reinject": true,
|
|
266
|
+
"psmm_checkpoint": true,
|
|
267
|
+
"scd_path": ".accel/momentum/data/session-continuity/",
|
|
268
|
+
"max_checkpoints": 4
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Open Questions
|
|
276
|
+
|
|
277
|
+
1. **SCD storage location.** Should SCDs live in `.accel/momentum/data/session-continuity/{session-id}-checkpoint-{N}.md`? Or in a temp location that gets cleaned up? They're session-specific and potentially useful for post-session review, but could accumulate.
|
|
278
|
+
|
|
279
|
+
2. **Operator interruption.** Should the protocol pause for operator confirmation before generating the SCD? ("Context refresh checkpoint — ready to generate continuity document?") Or should it fire automatically? Automatic is lower-friction but the operator might be mid-thought.
|
|
280
|
+
|
|
281
|
+
3. **SCD token cost.** The SCD itself will be ~1-2k tokens to write + ~1-2k tokens in the Read-back + ~500 tokens for CLAUDE.md re-injection + PSMM logging. Total: ~4-5k tokens per checkpoint. Over 4 checkpoints: ~20k tokens. 2% of 1M window for continuity insurance. Worth it, but should be measured.
|
|
282
|
+
|
|
283
|
+
4. **Interaction with context compaction.** If Claude Code's automatic compaction fires before the 200k threshold, the hook might not see accurate token counts. Need to understand how compaction affects the `tokensUsed` / `tokensRemaining` values in hook input data.
|
|
284
|
+
|
|
285
|
+
5. **Multi-session continuity.** If a session with a checkpoint 1 SCD gets `--continue`'d into a new session, should the new session's first checkpoint reference the prior session's SCD? This could bridge session boundaries.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Why This Matters
|
|
290
|
+
|
|
291
|
+
The 1M token window is a capability that currently degrades into a liability past 200k tokens. Most users don't know their output quality is dropping — they just notice "Claude seems dumber" in long sessions and restart. The Context Continuity Protocol turns the full 1M window into usable, high-quality context by applying the same hygiene that 200k sessions enforced by constraint.
|
|
292
|
+
|
|
293
|
+
This is context engineering at the infrastructure level — not prompt tricks, not workarounds, but a system that maintains the quality contract between the AI and the operator across the full session lifecycle.
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Context Engineering Guide — Vector + Mission Control Ecosystem
|
|
2
|
+
|
|
3
|
+
Hard-won insights from building and tuning a context reinforcement layer for Claude Code across 40+ prompt sessions, measured with real token data and honest compliance reporting.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Framework Token Cost
|
|
8
|
+
|
|
9
|
+
| Signal | Per-prompt tokens | Notes |
|
|
10
|
+
|--------|------------------|-------|
|
|
11
|
+
| `<vector-rules>` full injection | ~2,000 | 15 rules + 5 decisions + devmode + available domains |
|
|
12
|
+
| `<vector-status>` dedup signal | ~72 | Fires ~80% of prompts |
|
|
13
|
+
| `<active-awareness>` | ~600 | 12 items with status/blocked/deadline |
|
|
14
|
+
| `<backlog-awareness>` | ~400 | 9 items with review_by |
|
|
15
|
+
| `<base-pulse>` | ~50 | Drift score + stale areas |
|
|
16
|
+
| `<decisions>` summary | ~80 | Domain counts, not full text |
|
|
17
|
+
| `<calendar>` | ~100 | Today's events |
|
|
18
|
+
| `<current-time>` | ~50 | Timestamp |
|
|
19
|
+
| `<machine>` | ~30 | Workstation context |
|
|
20
|
+
| `📊 Context` | ~15 | Token usage % |
|
|
21
|
+
| **Total (full inject)** | **~3,400** | 0.34% of 1M window |
|
|
22
|
+
| **Total (dedup prompt)** | **~1,400** | 0.14% of 1M window |
|
|
23
|
+
|
|
24
|
+
**Over a 30-prompt session:** ~50,000 tokens total injection. 5% of 1M window.
|
|
25
|
+
|
|
26
|
+
**Verdict:** Very low overhead, very high upside. The entire framework costs less than a single large file read.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## DEVMODE — What It Is and Why It Matters
|
|
31
|
+
|
|
32
|
+
DEVMODE is a compact debug section appended to every response. It serves one purpose: **show the user which parts of their context ecosystem shaped the AI's understanding and response.**
|
|
33
|
+
|
|
34
|
+
**Why it exists:**
|
|
35
|
+
- The user can't see what the AI received or how it processed context signals
|
|
36
|
+
- Without visibility, tuning Vector rules is guesswork
|
|
37
|
+
- DEVMODE closes the feedback loop between context engineering and observed AI behavior
|
|
38
|
+
|
|
39
|
+
**What it reports:**
|
|
40
|
+
- Which Vector domains injected this prompt (or dedup status)
|
|
41
|
+
- Total rules/decisions received vs. how many actually influenced the response
|
|
42
|
+
- Which context signals (pulse, active, backlog, calendar, etc.) shaped behavior
|
|
43
|
+
- Tools used and gaps identified
|
|
44
|
+
|
|
45
|
+
**What it costs:** ~450 tokens on full injection, ~0 on dedup prompts (instruction is in prior context). Across a session: ~3,700 tokens total. 0.37% of 1M window.
|
|
46
|
+
|
|
47
|
+
**Format — keep it under 8 lines:**
|
|
48
|
+
```
|
|
49
|
+
🔧 Vector DEVMODE
|
|
50
|
+
Vector: [injected domains + rule count, or 'dedup (prompt N)']
|
|
51
|
+
Rules: [total] | applied: [count + citations, or 0]
|
|
52
|
+
Decisions: [total] | applied: [count, or 0]
|
|
53
|
+
Signals: [tags received]
|
|
54
|
+
Applied: [which signals shaped response, or 'none']
|
|
55
|
+
Tools: [tools used, or 'none']
|
|
56
|
+
Gaps: [one-line, or 'none']
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Vector Domain Best Practices
|
|
62
|
+
|
|
63
|
+
### Rule Count Sweet Spot
|
|
64
|
+
|
|
65
|
+
| Domain type | Max rules | Why |
|
|
66
|
+
|-------------|----------|-----|
|
|
67
|
+
| GLOBAL (always-on) | 9 | Fires every prompt. Each rule competes for attention. After ~9, later rules get diminished compliance. |
|
|
68
|
+
| Workflow domains (DEVELOPMENT, PROJECTS, BACKLOG) | 7-9 | Broader scope but still focused. Benefits from contextual loading. |
|
|
69
|
+
| Project domains (CASEGATE, HUNTER-EXOTICS) | 3-5 | Narrow context. Mostly decisions, few rules needed. |
|
|
70
|
+
|
|
71
|
+
**9 is the cutoff.** Not 10, not 12, not 15. If a domain has more than 9 rules, split it or move lower-priority rules to a more specific domain where they fire contextually.
|
|
72
|
+
|
|
73
|
+
**Front-load important rules.** Rules 0-4 get the strongest compliance. Put your highest-value, most-violated rules first. The tail end of any rule list gets progressively less attention.
|
|
74
|
+
|
|
75
|
+
### Writing Effective Rules
|
|
76
|
+
|
|
77
|
+
**Brief. Explicit. One sentence.**
|
|
78
|
+
|
|
79
|
+
| Pattern | Example | Compliance |
|
|
80
|
+
|---------|---------|------------|
|
|
81
|
+
| Short + absolute | "NEVER create browser alert dialogs — use modals" | Near-perfect |
|
|
82
|
+
| Short + specific trigger | "Before CSS changes, verify element classes in markup first" | High |
|
|
83
|
+
| Medium + conditional | "When drift score is 15+, recommend grooming" | Good |
|
|
84
|
+
| Long + judgment-dependent | "When a significant meta moment occurs, log it via PSMM..." | Inconsistent |
|
|
85
|
+
|
|
86
|
+
**Rules that work:**
|
|
87
|
+
- One clear action
|
|
88
|
+
- Obvious trigger (when does this apply?)
|
|
89
|
+
- No judgment calls (what counts as "significant"?)
|
|
90
|
+
- Strong language for critical rules (NEVER, ALWAYS, NON-NEGOTIABLE)
|
|
91
|
+
|
|
92
|
+
**Rules that drift:**
|
|
93
|
+
- Multiple conditions in one rule
|
|
94
|
+
- Require the AI to assess "significance" or "relevance"
|
|
95
|
+
- Paragraph-length explanations baked into the rule text
|
|
96
|
+
- Vague triggers ("when appropriate", "if needed")
|
|
97
|
+
|
|
98
|
+
**Fix for complex rules:** Write the rule as one line, reference a spec file for details.
|
|
99
|
+
|
|
100
|
+
Bad:
|
|
101
|
+
```
|
|
102
|
+
PSMM keeps session context hot. When a significant meta moment occurs
|
|
103
|
+
(design decision, user correction, context shift, key insight, commitment
|
|
104
|
+
made), use vector_psmm_log(session_id, type, text) where type is
|
|
105
|
+
DECISION|CORRECTION|SHIFT|INSIGHT|COMMITMENT. If vector_psmm_log is not
|
|
106
|
+
available, fall back to editing psmm.json directly...
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Good:
|
|
110
|
+
```
|
|
111
|
+
Log significant meta moments via vector_psmm_log — see PSMM spec for types and criteria
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### The Anti-Pattern Hack (Near-Perfect Adherence)
|
|
115
|
+
|
|
116
|
+
**Negative framing with absolute language gets near-perfect compliance.**
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
NEVER create browser alert dialogs — ALWAYS use modals
|
|
120
|
+
NEVER use framer-motion — ALWAYS use motion package
|
|
121
|
+
NEVER use CSS linear-gradient for dark backgrounds
|
|
122
|
+
NEVER mark tasks complete without validation
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Why this works: The wrong action is unambiguous. There's no judgment call. The AI can check its own output against the rule with zero interpretation. It's a binary — did I do the forbidden thing or not?
|
|
126
|
+
|
|
127
|
+
**Compare to positive framing:**
|
|
128
|
+
```
|
|
129
|
+
Use modals for user notifications (compliance: good, not perfect)
|
|
130
|
+
Prefer motion package over framer-motion (compliance: moderate — "prefer" leaves room)
|
|
131
|
+
Consider using solid backgrounds instead of gradients (compliance: weak — "consider" is ignorable)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**The pattern:** `NEVER [wrong action] — ALWAYS [right action]`
|
|
135
|
+
|
|
136
|
+
If you can frame a rule as "never do X," it will be followed more reliably than "always do Y." Prohibition is clearer than prescription.
|
|
137
|
+
|
|
138
|
+
### Recall Phrase Best Practices
|
|
139
|
+
|
|
140
|
+
**Use natural phrases, not single keywords.**
|
|
141
|
+
|
|
142
|
+
Bad:
|
|
143
|
+
```
|
|
144
|
+
DEVELOPMENT_RECALL=code,build,fix,create
|
|
145
|
+
```
|
|
146
|
+
These fire on almost everything. "Fix" matches "fix this bug" but also "fix the strategy doc." Single keywords create false positives.
|
|
147
|
+
|
|
148
|
+
Good:
|
|
149
|
+
```
|
|
150
|
+
DEVELOPMENT_RECALL=write code for,fix this bug,implement this feature,build this component,refactor this,programming task
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Write phrases the user would actually say.** Not technical triggers, not file names — natural language as spoken.
|
|
154
|
+
|
|
155
|
+
**Multi-word phrases prevent false positives.** "check skool" won't false-fire on "check the schedule." "fix this bug" won't false-fire on "fix the strategy."
|
|
156
|
+
|
|
157
|
+
**If two domains could match the same phrase, make one more specific.** CONTENT and SKOOL could both match "skool" — so CONTENT excludes it: `CONTENT_EXCLUDE=content backlog,post backlog`
|
|
158
|
+
|
|
159
|
+
### Context Dedup Tuning
|
|
160
|
+
|
|
161
|
+
**Force full re-injection every 5 prompts** (not 10). At 10, rules drift ~30k tokens back in context. At 5, they stay within ~15k tokens — better reinforcement with negligible cost (~400 extra tokens per session).
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
FORCE_EMIT_EVERY_N = 5
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The dedup system only suppresses when the context signature (bracket + devmode + loaded domains) is unchanged. Any domain change triggers immediate full injection regardless of the interval.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Key Insight: Contextual Loading > Always-On Bloat
|
|
172
|
+
|
|
173
|
+
A rule that fires **only when relevant** hits harder than one that's **always there.** GLOBAL rules become background noise over time. Domain-matched rules arrive at the moment of action.
|
|
174
|
+
|
|
175
|
+
If a rule only matters during coding, put it in DEVELOPMENT. If it only matters when managing projects, put it in PROJECTS. Reserve GLOBAL for truly universal behaviors that must apply to every single prompt regardless of context.
|
|
176
|
+
|
|
177
|
+
**The test:** "Does this rule need to influence my response when the user asks about their calendar?" If no, it's not GLOBAL.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## The Optimal Vector Setup — Target Token Budget
|
|
182
|
+
|
|
183
|
+
### The Problem
|
|
184
|
+
|
|
185
|
+
The current framework token cost table shows raw per-prompt numbers, but doesn't answer: **what's the ideal setup that maximizes impact per token?** We need a target mean token usage for a 20-prompt session that represents the best-engineered Vector configuration.
|
|
186
|
+
|
|
187
|
+
### Variables to Optimize
|
|
188
|
+
|
|
189
|
+
| Variable | Current | Target | Why |
|
|
190
|
+
|----------|---------|--------|-----|
|
|
191
|
+
| GLOBAL rules | 15 | 9 | Past 9, later rules get diminished compliance |
|
|
192
|
+
| GLOBAL rule length | Mixed (1-5 lines) | 1 line each | Short + absolute = highest compliance |
|
|
193
|
+
| Dedup interval | 5 prompts | 5 prompts | Good balance — rules stay within ~15k tokens |
|
|
194
|
+
| Domains per prompt (avg) | 1 (GLOBAL only) | 1.5 (GLOBAL + 1 matched ~50% of time) | Contextual rules fire when relevant |
|
|
195
|
+
| Rules per matched domain | 8-13 | 7-9 | Stay under threshold |
|
|
196
|
+
| Decisions injected | 5 (GLOBAL only) | 3-5 per loaded domain | Decisions add context without rule noise |
|
|
197
|
+
| DEVMODE instruction | ~450 tokens | ~350 tokens | Can trim further |
|
|
198
|
+
|
|
199
|
+
### Modeling the Ideal 20-Prompt Session
|
|
200
|
+
|
|
201
|
+
**Assumptions for "optimized" setup:**
|
|
202
|
+
- GLOBAL trimmed to 9 rules (~400 tokens of rules)
|
|
203
|
+
- DEVMODE instruction trimmed (~350 tokens)
|
|
204
|
+
- 5 GLOBAL decisions (~250 tokens)
|
|
205
|
+
- Available domains list (~400 tokens)
|
|
206
|
+
- Full Vector injection total: ~1,500 tokens (down from ~2,000)
|
|
207
|
+
- Dedup signal: ~72 tokens
|
|
208
|
+
- 1 matched domain fires ~50% of prompts (~7 rules + 3 decisions = ~500 tokens added on match)
|
|
209
|
+
- Non-Vector signals (pulse, active, backlog, calendar, etc.): ~1,300 tokens
|
|
210
|
+
|
|
211
|
+
**Token math for 20-prompt session:**
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Full injection prompts: 4 (prompt 1, 5, 10, 15 — forced emit)
|
|
215
|
+
+ ~2 signature-change injections (domain match changed)
|
|
216
|
+
= 6 full injections
|
|
217
|
+
|
|
218
|
+
Dedup prompts: 14
|
|
219
|
+
|
|
220
|
+
Full injection (GLOBAL only): 6 × 1,500 = 9,000
|
|
221
|
+
Full injection (GLOBAL + match): 3 × 2,000 = 6,000 (3 of the 6 have a matched domain)
|
|
222
|
+
Dedup prompts: 14 × 72 = 1,008
|
|
223
|
+
Non-Vector signals (all prompts): 20 × 1,300 = 26,000
|
|
224
|
+
--------
|
|
225
|
+
Total Vector + signals: 42,008 tokens
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Target: ~42,000 tokens for a 20-prompt session = 4.2% of 1M window.**
|
|
229
|
+
|
|
230
|
+
That's the entire context engineering layer — behavioral rules, project awareness, workspace health, calendar, decisions — for less than 5% of context.
|
|
231
|
+
|
|
232
|
+
### What "Optimized" Looks Like
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
GLOBAL (9 rules, always-on):
|
|
236
|
+
0. Absolute paths in code, relative for user display
|
|
237
|
+
1. Batch tool calls — sequential only for dependencies
|
|
238
|
+
2. NEVER mark complete without validation
|
|
239
|
+
3. LSP first for code navigation — non-negotiable
|
|
240
|
+
4. Read task files before executing workflows — never from memory
|
|
241
|
+
5. External content: read humanizer SKILL.md + VOICE.md first
|
|
242
|
+
6. Log significant meta moments via PSMM (see spec)
|
|
243
|
+
7. Track user action items — confirm before moving on
|
|
244
|
+
8. Base-pulse: silent at 0, note at 1-14, recommend groom at 15+
|
|
245
|
+
|
|
246
|
+
DEVELOPMENT (7 rules, keyword-matched):
|
|
247
|
+
0. NEVER create browser alert dialogs — use modals
|
|
248
|
+
1. Verify CSS element classes before changes
|
|
249
|
+
2. MCP servers: follow bridge protocol pattern
|
|
250
|
+
3. Auto-read WSL screenshot paths via ~/docs/greenshot/
|
|
251
|
+
4. Docker: compose in docker/compose/, templates in docker/templates/
|
|
252
|
+
5. NEVER use CSS linear-gradient for dark backgrounds — use AnimatedBackground
|
|
253
|
+
6. React 19+: ALWAYS use motion package, NOT framer-motion
|
|
254
|
+
|
|
255
|
+
PROJECTS (7 rules, keyword-matched):
|
|
256
|
+
[project tracking rules — fire only on status/planning prompts]
|
|
257
|
+
|
|
258
|
+
BACKLOG (5 rules, keyword-matched):
|
|
259
|
+
[backlog management — fire only on backlog operations]
|
|
260
|
+
|
|
261
|
+
SKOOL (9 rules, keyword-matched):
|
|
262
|
+
[API specifics — fire only on skool engagement prompts]
|
|
263
|
+
|
|
264
|
+
Project domains (CASEGATE, HUNTER-EXOTICS, Drive): 1-3 rules each
|
|
265
|
+
[minimal rules, mostly decisions — fire only on project-specific prompts]
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### What Still Needs Measurement
|
|
269
|
+
|
|
270
|
+
This model is theoretical. To validate it, we need:
|
|
271
|
+
|
|
272
|
+
1. **Compliance tracking over sessions.** In DEVMODE, "Rules: X | applied: Y" gives us a signal-to-noise ratio. If a domain fires 7 rules and only 2 are ever applied, the other 5 are noise candidates.
|
|
273
|
+
|
|
274
|
+
2. **Domain match frequency.** How often does each domain actually fire? If DEVELOPMENT fires 80% of sessions but OBSIDIAN fires 5%, the token investment in OBSIDIAN rules is disproportionate.
|
|
275
|
+
|
|
276
|
+
3. **Rule-level hit rate.** Which specific rules get cited in "applied" most often? Those are the load-bearing rules. Which never get cited? Those are demotion candidates.
|
|
277
|
+
|
|
278
|
+
4. **Optimal dedup interval.** We moved from 10 to 5 based on reasoning. Need to measure whether compliance actually improves at 5 vs 10 vs 3.
|
|
279
|
+
|
|
280
|
+
5. **Session-level token audit.** Run a full session with DEVMODE on, export all system-reminder content, count actual tokens consumed by the framework. Compare to the theoretical model.
|
|
281
|
+
|
|
282
|
+
**This data comes from using DEVMODE honestly over multiple sessions and tracking patterns.** The guide will evolve as measurement catches up to theory.
|