@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,118 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Vector MCP — Consolidated Tool Server
|
|
4
|
+
* Context Augmentation & Reinforcement Layer
|
|
5
|
+
*
|
|
6
|
+
* Consolidates: DRL-engine + decision-logger + Staging + vector-json (v2)
|
|
7
|
+
* 4 tool groups, all optional, activated by Vector rules.
|
|
8
|
+
*
|
|
9
|
+
* When installed to .vector/vector-mcp/, workspace path resolves to parent of .vector/
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
13
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
14
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
15
|
+
import path from 'path';
|
|
16
|
+
import { fileURLToPath } from 'url';
|
|
17
|
+
|
|
18
|
+
// Tool group imports
|
|
19
|
+
import { TOOLS as domainTools, handleTool as handleDomain } from './tools/domains.js';
|
|
20
|
+
import { TOOLS as decisionTools, handleTool as handleDecision } from './tools/decisions.js';
|
|
21
|
+
import { TOOLS as stagingTools, handleTool as handleStaging } from './tools/staging.js';
|
|
22
|
+
import { TOOLS as vectorJsonTools, handleTool as handleVectorJson } from './tools/vector-json.js';
|
|
23
|
+
|
|
24
|
+
// ============================================================
|
|
25
|
+
// CONFIGURATION
|
|
26
|
+
// ============================================================
|
|
27
|
+
|
|
28
|
+
// Resolve workspace from this file's location:
|
|
29
|
+
// Installed at .vector/vector-mcp/index.js → workspace is ../..
|
|
30
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
31
|
+
const WORKSPACE_PATH = path.resolve(__dirname, '../..');
|
|
32
|
+
|
|
33
|
+
function debugLog(...args) {
|
|
34
|
+
console.error('[Vector]', new Date().toISOString(), ...args);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ============================================================
|
|
38
|
+
// TOOL REGISTRY
|
|
39
|
+
// ============================================================
|
|
40
|
+
|
|
41
|
+
const ALL_TOOLS = [...domainTools, ...decisionTools, ...stagingTools, ...vectorJsonTools];
|
|
42
|
+
|
|
43
|
+
// Build handler lookup: tool name → handler function
|
|
44
|
+
const TOOL_HANDLERS = {};
|
|
45
|
+
for (const tool of domainTools) TOOL_HANDLERS[tool.name] = handleDomain;
|
|
46
|
+
for (const tool of decisionTools) TOOL_HANDLERS[tool.name] = handleDecision;
|
|
47
|
+
for (const tool of stagingTools) TOOL_HANDLERS[tool.name] = handleStaging;
|
|
48
|
+
for (const tool of vectorJsonTools) TOOL_HANDLERS[tool.name] = handleVectorJson;
|
|
49
|
+
|
|
50
|
+
// ============================================================
|
|
51
|
+
// MCP SERVER
|
|
52
|
+
// ============================================================
|
|
53
|
+
|
|
54
|
+
const server = new Server({
|
|
55
|
+
name: "vector-mcp",
|
|
56
|
+
version: "2.0.0",
|
|
57
|
+
}, {
|
|
58
|
+
capabilities: {
|
|
59
|
+
tools: {},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
debugLog('Vector MCP Server initialized');
|
|
64
|
+
debugLog('Workspace:', WORKSPACE_PATH);
|
|
65
|
+
debugLog('Tool groups: domains (%d), decisions (%d), staging (%d), vector-json (%d)',
|
|
66
|
+
domainTools.length, decisionTools.length, stagingTools.length, vectorJsonTools.length);
|
|
67
|
+
debugLog('Total tools:', ALL_TOOLS.length);
|
|
68
|
+
|
|
69
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
70
|
+
debugLog('List tools request');
|
|
71
|
+
return { tools: ALL_TOOLS };
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
75
|
+
const { name, arguments: args } = request.params;
|
|
76
|
+
debugLog('Call tool:', name);
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
const handler = TOOL_HANDLERS[name];
|
|
80
|
+
if (!handler) {
|
|
81
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const result = await handler(name, args || {}, WORKSPACE_PATH);
|
|
85
|
+
|
|
86
|
+
if (result === null) {
|
|
87
|
+
throw new Error(`Tool ${name} returned null — handler mismatch`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
92
|
+
isError: false,
|
|
93
|
+
};
|
|
94
|
+
} catch (error) {
|
|
95
|
+
debugLog('Error:', error.message);
|
|
96
|
+
return {
|
|
97
|
+
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
98
|
+
isError: true,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// ============================================================
|
|
104
|
+
// RUN
|
|
105
|
+
// ============================================================
|
|
106
|
+
|
|
107
|
+
async function runServer() {
|
|
108
|
+
const transport = new StdioServerTransport();
|
|
109
|
+
await server.connect(transport);
|
|
110
|
+
console.error("Vector MCP Server running on stdio");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
await runServer();
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.error("Fatal error:", error);
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Decisions — Per-domain decision logging/recall tools
|
|
3
|
+
* Reads/writes .vector/decisions/{domain}.json files
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { readFileSync, writeFileSync, existsSync, readdirSync } from 'fs';
|
|
7
|
+
import { join } from 'path';
|
|
8
|
+
|
|
9
|
+
function debugLog(...args) {
|
|
10
|
+
console.error('[Vector:decisions]', new Date().toISOString(), ...args);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getDecisionsDir(workspacePath) {
|
|
14
|
+
return join(workspacePath, '.vector', 'decisions');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getDomainFilePath(workspacePath, domain) {
|
|
18
|
+
return join(getDecisionsDir(workspacePath), `${domain.toLowerCase()}.json`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function readDomainDecisions(workspacePath, domain) {
|
|
22
|
+
const filepath = getDomainFilePath(workspacePath, domain);
|
|
23
|
+
if (!existsSync(filepath)) {
|
|
24
|
+
return { domain: domain.toLowerCase(), decisions: [], archived: [] };
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(readFileSync(filepath, 'utf-8'));
|
|
28
|
+
} catch (error) {
|
|
29
|
+
debugLog('Error reading domain decisions:', error.message);
|
|
30
|
+
return { domain: domain.toLowerCase(), decisions: [], archived: [] };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function writeDomainDecisions(workspacePath, domain, data) {
|
|
35
|
+
const filepath = getDomainFilePath(workspacePath, domain);
|
|
36
|
+
writeFileSync(filepath, JSON.stringify(data, null, 2), 'utf-8');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function listAllDomainFiles(workspacePath) {
|
|
40
|
+
const dir = getDecisionsDir(workspacePath);
|
|
41
|
+
if (!existsSync(dir)) return [];
|
|
42
|
+
return readdirSync(dir)
|
|
43
|
+
.filter(f => f.endsWith('.json'))
|
|
44
|
+
.map(f => f.replace('.json', ''));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function nextDecisionId(domain, decisions) {
|
|
48
|
+
const prefix = `${domain.toLowerCase()}-`;
|
|
49
|
+
const nums = decisions
|
|
50
|
+
.map(d => {
|
|
51
|
+
const m = d.id.match(new RegExp(`^${prefix}(\\d+)$`));
|
|
52
|
+
return m ? parseInt(m[1], 10) : 0;
|
|
53
|
+
})
|
|
54
|
+
.filter(n => n > 0);
|
|
55
|
+
const max = nums.length > 0 ? Math.max(...nums) : 0;
|
|
56
|
+
return `${prefix}${String(max + 1).padStart(3, '0')}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ============================================================
|
|
60
|
+
// TOOL DEFINITIONS
|
|
61
|
+
// ============================================================
|
|
62
|
+
|
|
63
|
+
export const TOOLS = [
|
|
64
|
+
{
|
|
65
|
+
name: "vector_log_decision",
|
|
66
|
+
description: "Log a decision to a Vector domain. Auto-creates domain file if new.",
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
domain: { type: "string", description: "Domain name (e.g., 'casegate', 'development', 'global')" },
|
|
71
|
+
decision: { type: "string", description: "The decision made" },
|
|
72
|
+
rationale: { type: "string", description: "Why this decision was made" },
|
|
73
|
+
recall: { type: "string", description: "Comma-separated keywords for when to recall this decision" }
|
|
74
|
+
},
|
|
75
|
+
required: ["domain", "decision", "rationale", "recall"]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "vector_list_decision_domains",
|
|
80
|
+
description: "List all decision domain files with counts.",
|
|
81
|
+
inputSchema: { type: "object", properties: {} }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "vector_get_decisions",
|
|
85
|
+
description: "Get all decisions for a domain.",
|
|
86
|
+
inputSchema: {
|
|
87
|
+
type: "object",
|
|
88
|
+
properties: {
|
|
89
|
+
domain: { type: "string", description: "Domain name (e.g., 'casegate', 'development')" }
|
|
90
|
+
},
|
|
91
|
+
required: ["domain"]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "vector_search_decisions",
|
|
96
|
+
description: "Search decisions by keyword across all domain files.",
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
keyword: { type: "string", description: "Keyword to search for" }
|
|
101
|
+
},
|
|
102
|
+
required: ["keyword"]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "vector_archive_decision",
|
|
107
|
+
description: "Move a decision to the archived array in its domain file.",
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
id: { type: "string", description: "Decision ID (e.g., 'casegate-003')" }
|
|
112
|
+
},
|
|
113
|
+
required: ["id"]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
// ============================================================
|
|
119
|
+
// TOOL HANDLERS
|
|
120
|
+
// ============================================================
|
|
121
|
+
|
|
122
|
+
export async function handleTool(name, args, workspacePath) {
|
|
123
|
+
switch (name) {
|
|
124
|
+
case "vector_log_decision": return logDecision(args, workspacePath);
|
|
125
|
+
case "vector_list_decision_domains": return listDecisionDomains(workspacePath);
|
|
126
|
+
case "vector_get_decisions": return getDecisions(args, workspacePath);
|
|
127
|
+
case "vector_search_decisions": return searchDecisions(args, workspacePath);
|
|
128
|
+
case "vector_archive_decision": return archiveDecision(args, workspacePath);
|
|
129
|
+
default: return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function logDecision(args, workspacePath) {
|
|
134
|
+
const { domain, decision, rationale, recall } = args;
|
|
135
|
+
const domainLower = domain.toLowerCase();
|
|
136
|
+
debugLog('Logging decision to domain:', domainLower);
|
|
137
|
+
|
|
138
|
+
const data = readDomainDecisions(workspacePath, domainLower);
|
|
139
|
+
const id = nextDecisionId(domainLower, data.decisions);
|
|
140
|
+
const date = new Date().toISOString().split('T')[0];
|
|
141
|
+
const recallList = recall.split(',').map(k => k.trim()).filter(Boolean);
|
|
142
|
+
|
|
143
|
+
const entry = {
|
|
144
|
+
id,
|
|
145
|
+
decision,
|
|
146
|
+
rationale,
|
|
147
|
+
date,
|
|
148
|
+
source: "manual",
|
|
149
|
+
recall: recallList
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
data.decisions.push(entry);
|
|
153
|
+
data.domain = domainLower;
|
|
154
|
+
if (!data.archived) data.archived = [];
|
|
155
|
+
writeDomainDecisions(workspacePath, domainLower, data);
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
success: true,
|
|
159
|
+
id,
|
|
160
|
+
domain: domainLower,
|
|
161
|
+
message: `Logged: ${id} to ${domainLower}`
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function listDecisionDomains(workspacePath) {
|
|
166
|
+
debugLog('Listing decision domains');
|
|
167
|
+
const domainNames = listAllDomainFiles(workspacePath);
|
|
168
|
+
const domains = [];
|
|
169
|
+
|
|
170
|
+
for (const name of domainNames) {
|
|
171
|
+
const data = readDomainDecisions(workspacePath, name);
|
|
172
|
+
domains.push({
|
|
173
|
+
domain: name,
|
|
174
|
+
active_count: data.decisions.length,
|
|
175
|
+
archived_count: (data.archived || []).length
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const totalActive = domains.reduce((sum, d) => sum + d.active_count, 0);
|
|
180
|
+
const totalArchived = domains.reduce((sum, d) => sum + d.archived_count, 0);
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
success: true,
|
|
184
|
+
domain_count: domains.length,
|
|
185
|
+
total_active: totalActive,
|
|
186
|
+
total_archived: totalArchived,
|
|
187
|
+
domains
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async function getDecisions(args, workspacePath) {
|
|
192
|
+
const { domain } = args;
|
|
193
|
+
const domainLower = domain.toLowerCase();
|
|
194
|
+
debugLog('Getting decisions for:', domainLower);
|
|
195
|
+
|
|
196
|
+
const filepath = getDomainFilePath(workspacePath, domainLower);
|
|
197
|
+
if (!existsSync(filepath)) {
|
|
198
|
+
return { error: `No decisions file for domain: ${domainLower}` };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const data = readDomainDecisions(workspacePath, domainLower);
|
|
202
|
+
|
|
203
|
+
return {
|
|
204
|
+
domain: domainLower,
|
|
205
|
+
count: data.decisions.length,
|
|
206
|
+
archived_count: (data.archived || []).length,
|
|
207
|
+
decisions: data.decisions,
|
|
208
|
+
archived: data.archived || []
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
async function searchDecisions(args, workspacePath) {
|
|
213
|
+
const { keyword } = args;
|
|
214
|
+
debugLog('Searching for:', keyword);
|
|
215
|
+
|
|
216
|
+
const lowerKeyword = keyword.toLowerCase();
|
|
217
|
+
const domainNames = listAllDomainFiles(workspacePath);
|
|
218
|
+
const results = [];
|
|
219
|
+
|
|
220
|
+
for (const name of domainNames) {
|
|
221
|
+
const data = readDomainDecisions(workspacePath, name);
|
|
222
|
+
for (const d of data.decisions) {
|
|
223
|
+
const searchText = [
|
|
224
|
+
d.decision,
|
|
225
|
+
d.rationale,
|
|
226
|
+
...(d.recall || [])
|
|
227
|
+
].join(' ').toLowerCase();
|
|
228
|
+
|
|
229
|
+
if (searchText.includes(lowerKeyword)) {
|
|
230
|
+
results.push({ ...d, domain: name });
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return { keyword, count: results.length, decisions: results };
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
async function archiveDecision(args, workspacePath) {
|
|
239
|
+
const { id } = args;
|
|
240
|
+
debugLog('Archiving:', id);
|
|
241
|
+
|
|
242
|
+
// Extract domain from ID (e.g., 'casegate-003' -> 'casegate')
|
|
243
|
+
const dashIdx = id.lastIndexOf('-');
|
|
244
|
+
if (dashIdx === -1) {
|
|
245
|
+
return { error: `Invalid decision ID format: ${id}. Expected: {domain}-{number}` };
|
|
246
|
+
}
|
|
247
|
+
const domainLower = id.slice(0, dashIdx);
|
|
248
|
+
|
|
249
|
+
const filepath = getDomainFilePath(workspacePath, domainLower);
|
|
250
|
+
if (!existsSync(filepath)) {
|
|
251
|
+
return { error: `No decisions file for domain: ${domainLower}` };
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const data = readDomainDecisions(workspacePath, domainLower);
|
|
255
|
+
const idx = data.decisions.findIndex(d => d.id === id);
|
|
256
|
+
|
|
257
|
+
if (idx === -1) {
|
|
258
|
+
return { error: `Decision not found: ${id}` };
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const decision = data.decisions.splice(idx, 1)[0];
|
|
262
|
+
decision.archived_date = new Date().toISOString().split('T')[0];
|
|
263
|
+
|
|
264
|
+
if (!data.archived) data.archived = [];
|
|
265
|
+
data.archived.push(decision);
|
|
266
|
+
writeDomainDecisions(workspacePath, domainLower, data);
|
|
267
|
+
|
|
268
|
+
return { success: true, message: `Archived: ${id}` };
|
|
269
|
+
}
|