contextdevkit 1.8.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/CHANGELOG.md +592 -0
- package/LICENSE +21 -0
- package/README.md +401 -0
- package/docs/AGENT-PACKAGE-FORMAT.md +140 -0
- package/docs/ARCHITECTURE.md +258 -0
- package/docs/CHANGELOG.md +559 -0
- package/docs/CUSTOMIZING.md +211 -0
- package/docs/LEVELS.md +151 -0
- package/docs/ROADMAP.md +385 -0
- package/docs/SQUAD-PIPELINE-FORMAT.md +258 -0
- package/docs/SQUADS/agent-forge.md +65 -0
- package/docs/SQUADS/design-team.md +161 -0
- package/docs/token-economy-plan.md +135 -0
- package/install.mjs +273 -0
- package/instrucoes.md +274 -0
- package/package.json +46 -0
- package/templates/CLAUDE.md.tpl +133 -0
- package/templates/claude/agents/_TEMPLATE.md +52 -0
- package/templates/claude/agents/accessibility.md +36 -0
- package/templates/claude/agents/agent-architect.md +37 -0
- package/templates/claude/agents/architect.md +39 -0
- package/templates/claude/agents/code-reviewer.md +43 -0
- package/templates/claude/agents/code-security.md +59 -0
- package/templates/claude/agents/context-keeper.md +40 -0
- package/templates/claude/agents/devops.md +40 -0
- package/templates/claude/agents/eval-designer.md +40 -0
- package/templates/claude/agents/forge-orchestrator.md +42 -0
- package/templates/claude/agents/governance-officer.md +45 -0
- package/templates/claude/agents/growth.md +92 -0
- package/templates/claude/agents/infra-security.md +53 -0
- package/templates/claude/agents/landing-architect.md +154 -0
- package/templates/claude/agents/model-router.md +34 -0
- package/templates/claude/agents/packager.md +38 -0
- package/templates/claude/agents/privacy-lgpd.md +64 -0
- package/templates/claude/agents/product-owner.md +51 -0
- package/templates/claude/agents/prompt-engineer.md +33 -0
- package/templates/claude/agents/qa-e2e.md +52 -0
- package/templates/claude/agents/qa-fuzzer.md +24 -0
- package/templates/claude/agents/qa-integration.md +21 -0
- package/templates/claude/agents/qa-orchestrator.md +40 -0
- package/templates/claude/agents/qa-perf.md +40 -0
- package/templates/claude/agents/qa-unit.md +39 -0
- package/templates/claude/agents/rag-designer.md +54 -0
- package/templates/claude/agents/retention.md +85 -0
- package/templates/claude/agents/security.md +48 -0
- package/templates/claude/agents/seo-specialist.md +106 -0
- package/templates/claude/agents/test-engineer.md +48 -0
- package/templates/claude/agents/tool-designer.md +32 -0
- package/templates/claude/agents/ui-designer.md +37 -0
- package/templates/claude/agents/ux-designer.md +38 -0
- package/templates/claude/commands/README.md +95 -0
- package/templates/claude/commands/advise.md +80 -0
- package/templates/claude/commands/audit/analyze-code-ia-practices.md +75 -0
- package/templates/claude/commands/audit/audit.md +35 -0
- package/templates/claude/commands/audit/contract-check.md +21 -0
- package/templates/claude/commands/audit/deep-analysis.md +48 -0
- package/templates/claude/commands/audit/deps-audit.md +49 -0
- package/templates/claude/commands/audit/security-setup.md +35 -0
- package/templates/claude/commands/audit/seo-audit.md +63 -0
- package/templates/claude/commands/audit/tech-debt-sweep.md +35 -0
- package/templates/claude/commands/bug-hunt.md +42 -0
- package/templates/claude/commands/claude-md.md +36 -0
- package/templates/claude/commands/close-version.md +25 -0
- package/templates/claude/commands/context-refresh.md +19 -0
- package/templates/claude/commands/context-stats.md +15 -0
- package/templates/claude/commands/dashboard.md +66 -0
- package/templates/claude/commands/distill-apply.md +19 -0
- package/templates/claude/commands/distill-sessions.md +26 -0
- package/templates/claude/commands/fleet.md +47 -0
- package/templates/claude/commands/forge/forge-audit.md +16 -0
- package/templates/claude/commands/forge/forge-budget.md +16 -0
- package/templates/claude/commands/forge/forge-deprecate.md +16 -0
- package/templates/claude/commands/forge/forge-doctor.md +17 -0
- package/templates/claude/commands/forge/forge-eval.md +16 -0
- package/templates/claude/commands/forge/forge-fallback-test.md +17 -0
- package/templates/claude/commands/forge/forge-killswitch.md +17 -0
- package/templates/claude/commands/forge/forge-list.md +17 -0
- package/templates/claude/commands/forge/forge-new.md +41 -0
- package/templates/claude/commands/forge/forge-policy.md +16 -0
- package/templates/claude/commands/forge/forge-redteam.md +17 -0
- package/templates/claude/commands/forge/forge-refresh-matrix.md +20 -0
- package/templates/claude/commands/forge/forge-route.md +17 -0
- package/templates/claude/commands/forge/forge-show.md +16 -0
- package/templates/claude/commands/landing-page.md +71 -0
- package/templates/claude/commands/log-session.md +59 -0
- package/templates/claude/commands/media-gen.md +93 -0
- package/templates/claude/commands/new-adr.md +30 -0
- package/templates/claude/commands/pipeline/dev-start.md +64 -0
- package/templates/claude/commands/pipeline/pipeline.md +36 -0
- package/templates/claude/commands/pipeline/resume.md +70 -0
- package/templates/claude/commands/pipeline/retro.md +34 -0
- package/templates/claude/commands/pipeline/runs.md +63 -0
- package/templates/claude/commands/pipeline/ship.md +54 -0
- package/templates/claude/commands/pipeline/workflow.md +85 -0
- package/templates/claude/commands/playbook.md +27 -0
- package/templates/claude/commands/predictions-review.md +28 -0
- package/templates/claude/commands/qa/qa-signoff.md +24 -0
- package/templates/claude/commands/qa/scaffold-tests.md +27 -0
- package/templates/claude/commands/qa/test-plan.md +26 -0
- package/templates/claude/commands/qa/visual-test.md +42 -0
- package/templates/claude/commands/roadmap.md +48 -0
- package/templates/claude/commands/setup/aidevtool-from0.md +104 -0
- package/templates/claude/commands/setup/context-config.md +25 -0
- package/templates/claude/commands/setup/context-doctor.md +21 -0
- package/templates/claude/commands/setup/context-level.md +17 -0
- package/templates/claude/commands/setup/setupcontextdevkit.md +121 -0
- package/templates/claude/commands/simulate-impact.md +32 -0
- package/templates/claude/commands/squad.md +44 -0
- package/templates/claude/commands/state.md +21 -0
- package/templates/claude/commands/token-report.md +29 -0
- package/templates/claude/commands/tune-agents.md +35 -0
- package/templates/claude/commands/vcs/claim.md +18 -0
- package/templates/claude/commands/vcs/git.md +83 -0
- package/templates/claude/commands/vcs/release.md +15 -0
- package/templates/claude/commands/vcs/worktree-new.md +18 -0
- package/templates/claude/commands/watch.md +47 -0
- package/templates/contextkit/.env.example +36 -0
- package/templates/contextkit/CLAUDE.child.md.tpl +38 -0
- package/templates/contextkit/README.md +74 -0
- package/templates/contextkit/behaviors-examples.md +183 -0
- package/templates/contextkit/behaviors.md +116 -0
- package/templates/contextkit/best-practices.md +323 -0
- package/templates/contextkit/config.json +66 -0
- package/templates/contextkit/detectors/README.md +45 -0
- package/templates/contextkit/detectors/example-detector.mjs.example +25 -0
- package/templates/contextkit/instrucoes.md +114 -0
- package/templates/contextkit/memory/GLOSSARY.md +13 -0
- package/templates/contextkit/memory/SESSIONS.md +9 -0
- package/templates/contextkit/memory/WORKSPACE.md +7 -0
- package/templates/contextkit/memory/business-rules/_TEMPLATE.md +33 -0
- package/templates/contextkit/memory/decisions/0000-record-architecture-decisions.md +34 -0
- package/templates/contextkit/memory/decisions/_TEMPLATE.md +25 -0
- package/templates/contextkit/memory/predictions/.gitkeep +0 -0
- package/templates/contextkit/memory/roadmap.md +28 -0
- package/templates/contextkit/memory/sessions/.gitkeep +0 -0
- package/templates/contextkit/memory/workflows/.gitkeep +0 -0
- package/templates/contextkit/pipeline/backlog/.gitkeep +0 -0
- package/templates/contextkit/pipeline/conclusion/.gitkeep +0 -0
- package/templates/contextkit/pipeline/devpipeline.md +9 -0
- package/templates/contextkit/pipeline/testing/.gitkeep +0 -0
- package/templates/contextkit/pipeline/working/.gitkeep +0 -0
- package/templates/contextkit/review-protocol.md +214 -0
- package/templates/contextkit/runtime/config/defaults.mjs +215 -0
- package/templates/contextkit/runtime/config/levels.mjs +42 -0
- package/templates/contextkit/runtime/config/load.mjs +105 -0
- package/templates/contextkit/runtime/config/paths.mjs +92 -0
- package/templates/contextkit/runtime/config/presets.mjs +47 -0
- package/templates/contextkit/runtime/config/schema.mjs +88 -0
- package/templates/contextkit/runtime/config/settings-compose.mjs +55 -0
- package/templates/contextkit/runtime/git-hooks/commit-msg.mjs +55 -0
- package/templates/contextkit/runtime/git-hooks/pre-commit.mjs +47 -0
- package/templates/contextkit/runtime/git-hooks/pre-push.mjs +102 -0
- package/templates/contextkit/runtime/hooks/boot-context-readers.mjs +111 -0
- package/templates/contextkit/runtime/hooks/boot-signals.mjs +135 -0
- package/templates/contextkit/runtime/hooks/check-registration.mjs +228 -0
- package/templates/contextkit/runtime/hooks/concurrency-guard.mjs +110 -0
- package/templates/contextkit/runtime/hooks/ledger.mjs +231 -0
- package/templates/contextkit/runtime/hooks/md-extract.mjs +65 -0
- package/templates/contextkit/runtime/hooks/path-classification.mjs +62 -0
- package/templates/contextkit/runtime/hooks/safe-io.mjs +84 -0
- package/templates/contextkit/runtime/hooks/session-digest-core.mjs +85 -0
- package/templates/contextkit/runtime/hooks/session-start.mjs +248 -0
- package/templates/contextkit/runtime/hooks/simulate-gate.mjs +108 -0
- package/templates/contextkit/runtime/hooks/track-edits.mjs +154 -0
- package/templates/contextkit/runtime/providers/media/_adapter.mjs +120 -0
- package/templates/contextkit/runtime/providers/media/nano-banana.mjs +110 -0
- package/templates/contextkit/runtime/providers/media/veo.mjs +162 -0
- package/templates/contextkit/runtime/providers/review/_adapter.mjs +71 -0
- package/templates/contextkit/runtime/providers/review/detect.mjs +115 -0
- package/templates/contextkit/runtime/providers/review/gh.mjs +103 -0
- package/templates/contextkit/runtime/state/state-io.mjs +172 -0
- package/templates/contextkit/runtime/statusline.mjs +51 -0
- package/templates/contextkit/squads/README.md +115 -0
- package/templates/contextkit/squads/_BRIEFING.md.tpl +27 -0
- package/templates/contextkit/squads/agent-forge/README.md +69 -0
- package/templates/contextkit/squads/agent-forge/ROADMAP.md +108 -0
- package/templates/contextkit/squads/agent-forge/best-practices.md +89 -0
- package/templates/contextkit/squads/agent-forge/cli/forge-admin.mjs +132 -0
- package/templates/contextkit/squads/agent-forge/cli/forge-eval-cli.mjs +163 -0
- package/templates/contextkit/squads/agent-forge/cli/forge-new.mjs +97 -0
- package/templates/contextkit/squads/agent-forge/cli/forge-ops.mjs +177 -0
- package/templates/contextkit/squads/agent-forge/lib/architect.mjs +112 -0
- package/templates/contextkit/squads/agent-forge/lib/eval-designer.mjs +133 -0
- package/templates/contextkit/squads/agent-forge/lib/eval-runner.mjs +167 -0
- package/templates/contextkit/squads/agent-forge/lib/governance-officer.mjs +178 -0
- package/templates/contextkit/squads/agent-forge/lib/package-ops.mjs +101 -0
- package/templates/contextkit/squads/agent-forge/lib/packager.mjs +219 -0
- package/templates/contextkit/squads/agent-forge/lib/prompt-gen.mjs +122 -0
- package/templates/contextkit/squads/agent-forge/lib/rag-designer.mjs +102 -0
- package/templates/contextkit/squads/agent-forge/lib/router.mjs +165 -0
- package/templates/contextkit/squads/agent-forge/lib/tool-gen.mjs +113 -0
- package/templates/contextkit/squads/agent-forge/lib/yaml.mjs +47 -0
- package/templates/contextkit/squads/agent-forge/pipeline.yaml +65 -0
- package/templates/contextkit/squads/agent-forge/router/capability-matrix.json +112 -0
- package/templates/contextkit/squads/agent-forge/router/decision-rules.json +120 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/.agentforgerc +12 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/CHANGELOG.md +13 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/LICENSE +5 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/README.md +39 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/go/README.md +10 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/go/agent.go +14 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/go/go.mod +3 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/node/README.md +11 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/node/index.js +53 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/node/package.json +9 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/python/README.md +10 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/python/agent.py +16 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/python/pyproject.toml +10 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/golden.jsonl +1 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/red-team.jsonl +3 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/rubric.yaml +14 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/run-eval.md +17 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/thresholds.yaml +18 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/examples/basic.node.md +17 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/examples/with-fallback.node.md +24 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/examples/with-rag.python.md +20 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/audit.schema.json +23 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/compliance.policy.yaml +43 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/cost.policy.yaml +36 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/fallback-chain.yaml +16 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/quality.policy.yaml +43 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/manifest.yaml +91 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.anthropic.md +19 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.canonical.md +25 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.deepseek.md +21 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.google.md +19 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.ollama.md +21 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.openai.md +20 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/config.yaml +17 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/index/.gitkeep +3 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/ingestion/chunker.config.yaml +6 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/ingestion/sources.yaml +8 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/retrieval/query-template.md +16 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/retrieval/rerank.config.yaml +6 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/anthropic.tools.json +11 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/deepseek.tools.json +14 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/google.tools.json +11 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/ollama.tools.json +14 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/openai.tools.json +14 -0
- package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/schemas.canonical.json +25 -0
- package/templates/contextkit/starters/tanstack/README.md +86 -0
- package/templates/contextkit/starters/tanstack/index.html +12 -0
- package/templates/contextkit/starters/tanstack/package.json +25 -0
- package/templates/contextkit/starters/tanstack/src/main.tsx +40 -0
- package/templates/contextkit/starters/tanstack/src/router.tsx +12 -0
- package/templates/contextkit/starters/tanstack/src/routes/__root.tsx +10 -0
- package/templates/contextkit/starters/tanstack/src/routes/index.tsx +17 -0
- package/templates/contextkit/starters/tanstack/tsconfig.json +19 -0
- package/templates/contextkit/starters/tanstack/vite.config.ts +10 -0
- package/templates/contextkit/tools/scripts/adr-digest-core.mjs +42 -0
- package/templates/contextkit/tools/scripts/adr-digest.mjs +78 -0
- package/templates/contextkit/tools/scripts/agent-tuning.mjs +74 -0
- package/templates/contextkit/tools/scripts/aiso-audit.mjs +174 -0
- package/templates/contextkit/tools/scripts/audit-shared.mjs +129 -0
- package/templates/contextkit/tools/scripts/claim.mjs +133 -0
- package/templates/contextkit/tools/scripts/claude-md.mjs +123 -0
- package/templates/contextkit/tools/scripts/clean-drive.mjs +78 -0
- package/templates/contextkit/tools/scripts/context-config.mjs +111 -0
- package/templates/contextkit/tools/scripts/context-level.mjs +98 -0
- package/templates/contextkit/tools/scripts/context-pack.mjs +120 -0
- package/templates/contextkit/tools/scripts/contract-scan.mjs +186 -0
- package/templates/contextkit/tools/scripts/dashboard-data.mjs +198 -0
- package/templates/contextkit/tools/scripts/dashboard-html.mjs +215 -0
- package/templates/contextkit/tools/scripts/dashboard-server.mjs +129 -0
- package/templates/contextkit/tools/scripts/dashboard.mjs +107 -0
- package/templates/contextkit/tools/scripts/deep-analysis.mjs +62 -0
- package/templates/contextkit/tools/scripts/deps-audit.mjs +201 -0
- package/templates/contextkit/tools/scripts/detect-stack.mjs +164 -0
- package/templates/contextkit/tools/scripts/distill-detect.mjs +90 -0
- package/templates/contextkit/tools/scripts/doctor.mjs +165 -0
- package/templates/contextkit/tools/scripts/fleet.mjs +170 -0
- package/templates/contextkit/tools/scripts/generate-context.mjs +142 -0
- package/templates/contextkit/tools/scripts/gh-alerts.mjs +117 -0
- package/templates/contextkit/tools/scripts/git.mjs +97 -0
- package/templates/contextkit/tools/scripts/home.mjs +106 -0
- package/templates/contextkit/tools/scripts/mark-simulation.mjs +78 -0
- package/templates/contextkit/tools/scripts/media-gen.mjs +154 -0
- package/templates/contextkit/tools/scripts/pipeline-board.mjs +74 -0
- package/templates/contextkit/tools/scripts/pipeline-prioritize.mjs +68 -0
- package/templates/contextkit/tools/scripts/pipeline-session.mjs +99 -0
- package/templates/contextkit/tools/scripts/pipeline-validate.mjs +136 -0
- package/templates/contextkit/tools/scripts/pipeline.mjs +302 -0
- package/templates/contextkit/tools/scripts/playbook.mjs +123 -0
- package/templates/contextkit/tools/scripts/predictions-review.mjs +113 -0
- package/templates/contextkit/tools/scripts/release.mjs +60 -0
- package/templates/contextkit/tools/scripts/resume.mjs +114 -0
- package/templates/contextkit/tools/scripts/roadmap.mjs +86 -0
- package/templates/contextkit/tools/scripts/runs.mjs +116 -0
- package/templates/contextkit/tools/scripts/seo-audit.mjs +150 -0
- package/templates/contextkit/tools/scripts/session-digest.mjs +89 -0
- package/templates/contextkit/tools/scripts/session-reindex.mjs +91 -0
- package/templates/contextkit/tools/scripts/setup-complete.mjs +69 -0
- package/templates/contextkit/tools/scripts/squad-meta.mjs +23 -0
- package/templates/contextkit/tools/scripts/squad-pipeline-condition.mjs +192 -0
- package/templates/contextkit/tools/scripts/squad-pipeline.mjs +301 -0
- package/templates/contextkit/tools/scripts/squad.mjs +80 -0
- package/templates/contextkit/tools/scripts/stats.mjs +138 -0
- package/templates/contextkit/tools/scripts/sync-check.mjs +235 -0
- package/templates/contextkit/tools/scripts/tech-debt-detectors.mjs +76 -0
- package/templates/contextkit/tools/scripts/tech-debt-scan.mjs +164 -0
- package/templates/contextkit/tools/scripts/token-report.mjs +153 -0
- package/templates/contextkit/tools/scripts/visual-test.mjs +132 -0
- package/templates/contextkit/tools/scripts/watch.mjs +106 -0
- package/templates/contextkit/tools/scripts/workflow.mjs +136 -0
- package/templates/contextkit/tools/scripts/workspace-sync.mjs +220 -0
- package/templates/contextkit/tools/scripts/worktree-new.mjs +50 -0
- package/templates/contextkit/workflows/L1-static-loading.md +59 -0
- package/templates/contextkit/workflows/L2-session-ledger.md +86 -0
- package/templates/contextkit/workflows/L3-multi-session.md +80 -0
- package/templates/contextkit/workflows/L4-squads.md +68 -0
- package/templates/contextkit/workflows/L5-proactive.md +88 -0
- package/templates/contextkit/workflows/README.md +47 -0
- package/templates/contextkit/workflows/playbooks/distillation-cycle.md +74 -0
- package/templates/contextkit/workflows/playbooks/landing-page.md +197 -0
- package/templates/contextkit/workflows/playbooks/security-batch.md +68 -0
- package/templates/contextkit/workflows/playbooks/seo-aiso.md +288 -0
- package/templates/contextkit/workflows/playbooks/simulate-impact.md +83 -0
- package/templates/contextkit/workflows/playbooks/tanstack.md +164 -0
- package/templates/contextkit/workflows/playbooks/tech-debt-sweep.md +77 -0
- package/templates/docs/CHANGELOG.md.tpl +11 -0
- package/templates/gitattributes +3 -0
- package/templates/github/ISSUE_TEMPLATE/bug_report.md +30 -0
- package/templates/github/ISSUE_TEMPLATE/feature_request.md +22 -0
- package/templates/github/PULL_REQUEST_TEMPLATE.md +27 -0
- package/templates/github/dependabot.yml +27 -0
- package/templates/github/workflows/quality.yml +36 -0
- package/templates/github/workflows/security.yml +54 -0
- package/tools/install/cli.mjs +62 -0
- package/tools/install/fs.mjs +56 -0
- package/tools/install/git.mjs +114 -0
- package/tools/install/project.mjs +51 -0
- package/tools/install/uninstall.mjs +54 -0
- package/tools/integration-test-compozy.mjs +88 -0
- package/tools/integration-test-guards.mjs +269 -0
- package/tools/integration-test-tooling-agent-forge.mjs +189 -0
- package/tools/integration-test-tooling-pipeline.mjs +164 -0
- package/tools/integration-test-tooling.mjs +172 -0
- package/tools/integration-test.mjs +228 -0
- package/tools/it-helpers.mjs +60 -0
- package/tools/selfcheck-agent-forge-ops.mjs +107 -0
- package/tools/selfcheck-agent-forge.mjs +304 -0
- package/tools/selfcheck-config.mjs +80 -0
- package/tools/selfcheck-runtime.mjs +135 -0
- package/tools/selfcheck-source.mjs +326 -0
- package/tools/selfcheck.mjs +268 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Dependency & supply-chain audit (security-team) โ lockfile, pinning, CVEs โ backlog.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ๐ Deps Audit (security-team)
|
|
6
|
+
|
|
7
|
+
Run the **security-team's** dependency / supply-chain check, then feed the backlog.
|
|
8
|
+
|
|
9
|
+
1. **Audit** (writes findings for ingestion):
|
|
10
|
+
```
|
|
11
|
+
node contextkit/tools/scripts/deps-audit.mjs --write
|
|
12
|
+
```
|
|
13
|
+
Detects: missing lockfile (non-reproducible installs), unbounded version
|
|
14
|
+
ranges, **license-policy** violations (deny-list / allow-list from
|
|
15
|
+
`contextkit/config.json` โ `deps.licenses`), **lockfile drift** (a declared dep
|
|
16
|
+
missing from the lockfile), and โ when the toolchain is present โ
|
|
17
|
+
`npm`/`pnpm`/`yarn audit` CVEs (severity-mapped criticalโ5 โฆ infoโ1).
|
|
18
|
+
|
|
19
|
+
Generate a CycloneDX **SBOM** (provenance):
|
|
20
|
+
```
|
|
21
|
+
node contextkit/tools/scripts/deps-audit.mjs --sbom # โ contextkit/memory/sbom.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
2. **Feed the DevPipeline backlog** โ each issue becomes an auto-prioritized task:
|
|
25
|
+
```
|
|
26
|
+
node contextkit/tools/scripts/pipeline.mjs ingest contextkit/memory/deps-findings.json --type chore
|
|
27
|
+
```
|
|
28
|
+
Idempotent (re-runs don't duplicate). Priorities are **always editable**
|
|
29
|
+
(`pipeline.mjs prioritize <id> <P>` or `/pipeline`).
|
|
30
|
+
|
|
31
|
+
3. **Interpret with judgment** (delegate to the `security` agent): which advisories
|
|
32
|
+
are actually reachable/exploitable in THIS app vs transitive noise? Recommend the
|
|
33
|
+
fix (upgrade ยท pin ยท replace ยท accept-with-reason). On a Critical/High, the
|
|
34
|
+
security-team can block the release.
|
|
35
|
+
|
|
36
|
+
4. **Report**: counts by severity + the top items + what was ingested.
|
|
37
|
+
|
|
38
|
+
5. **GitHub-native (optional, loop-closer)** โ if the repo is on GitHub, pull its
|
|
39
|
+
**Dependabot + code-scanning alerts** into the same backlog (needs the `gh` CLI,
|
|
40
|
+
authenticated):
|
|
41
|
+
```
|
|
42
|
+
node contextkit/tools/scripts/gh-alerts.mjs --write
|
|
43
|
+
node contextkit/tools/scripts/pipeline.mjs ingest contextkit/memory/gh-alerts-findings.json --type chore
|
|
44
|
+
```
|
|
45
|
+
Set up the scaffolding (`.github/dependabot.yml` + the security workflow) with
|
|
46
|
+
`/security-setup`.
|
|
47
|
+
|
|
48
|
+
Stack note: Node is audited deterministically. For Python (`requirements.txt` /
|
|
49
|
+
`pyproject.toml`) the command flags that `pip-audit` / `safety` should run.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scaffold GitHub-native security (Dependabot + CodeQL + dependency-review) and sync alerts into the backlog (security-team).
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ๐ Security Setup (security-team)
|
|
6
|
+
|
|
7
|
+
Make GitHub's security features first-class: keep deps patched, scan code, and turn
|
|
8
|
+
GitHub's own alerts into owned backlog tasks. Idempotent โ safe to re-run.
|
|
9
|
+
|
|
10
|
+
1. **Confirm the scaffolding** (the installer drops these write-if-missing; create if absent):
|
|
11
|
+
- `.github/dependabot.yml` โ version updates per ecosystem.
|
|
12
|
+
- `.github/workflows/security.yml` โ `dependency-review` (PRs) + `/deps-audit` + CodeQL,
|
|
13
|
+
all **advisory** by default.
|
|
14
|
+
|
|
15
|
+
2. **Tune to THIS stack** โ detect the ecosystems in the repo (npm / pip / gomod / cargo /
|
|
16
|
+
maven / ...) and enable the matching `dependabot.yml` blocks; set the CodeQL `language`
|
|
17
|
+
matrix to the repo's real languages, and drop jobs that don't apply. Keep it advisory โ
|
|
18
|
+
don't make it a required check until the team opts in (that's the enforcement switch).
|
|
19
|
+
|
|
20
|
+
3. **Close the loop (alerts โ backlog)** โ pull GitHub's own alerts in and prioritize them:
|
|
21
|
+
```
|
|
22
|
+
node contextkit/tools/scripts/gh-alerts.mjs --write
|
|
23
|
+
node contextkit/tools/scripts/pipeline.mjs ingest contextkit/memory/gh-alerts-findings.json --type chore
|
|
24
|
+
```
|
|
25
|
+
Needs an authenticated `gh` CLI (`gh auth login`). Degrades silently if absent โ never blocks.
|
|
26
|
+
|
|
27
|
+
4. **Triage with judgment** (delegate to the `code-security` agent): which alerts are actually
|
|
28
|
+
reachable/exploitable in THIS app vs transitive noise? Recommend the fix โ upgrade ยท pin ยท
|
|
29
|
+
replace ยท accept-with-reason. On a Critical/High, the security-team can block the release.
|
|
30
|
+
|
|
31
|
+
5. **Report**: what was scaffolded, which ecosystems/languages you enabled, and how many
|
|
32
|
+
alerts were ingested.
|
|
33
|
+
|
|
34
|
+
Pairs with `/deps-audit` (deterministic local check: lockfile, pinning, license policy, SBOM,
|
|
35
|
+
CVEs). This command adds the GitHub-native layer on top.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: SEO + AISO audit โ runs the two static analysers and summarises findings. Refuse-on-SPA for landing pages. (ADR-0025)
|
|
3
|
+
argument-hint: [--json] [--seo-only|--aiso-only]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ SEO + AISO audit
|
|
7
|
+
|
|
8
|
+
Run both static analysers against the current project and produce a
|
|
9
|
+
prioritised findings list. The kit treats two index spaces as
|
|
10
|
+
first-class concerns:
|
|
11
|
+
|
|
12
|
+
- **Classical SEO** โ Googlebot, Bingbot, structured data, Core Web
|
|
13
|
+
Vitals. Audited by `seo-audit.mjs`.
|
|
14
|
+
- **AISO** (AI Search Optimization) โ GPTBot, ClaudeBot, PerplexityBot,
|
|
15
|
+
the `llms.txt` + FAQ-schema family. Audited by `aiso-audit.mjs`.
|
|
16
|
+
|
|
17
|
+
Authority: [ADR-0025](../../contextkit/memory/decisions/0025-seo-and-aiso-posture.md) + [seo-aiso playbook](../../contextkit/workflows/playbooks/seo-aiso.md).
|
|
18
|
+
|
|
19
|
+
## What this does
|
|
20
|
+
|
|
21
|
+
1. Runs `node contextkit/tools/scripts/seo-audit.mjs` and
|
|
22
|
+
`node contextkit/tools/scripts/aiso-audit.mjs` (or only one, if
|
|
23
|
+
`--seo-only` / `--aiso-only` is passed).
|
|
24
|
+
2. Reads the findings. If `--json` was passed, prints raw JSON for CI
|
|
25
|
+
consumption.
|
|
26
|
+
3. Otherwise: groups findings by severity, lists the top 3 next-step
|
|
27
|
+
fixes ordered by *severity ร leverage* (a single fix that resolves
|
|
28
|
+
multiple findings is worth more than three isolated ones).
|
|
29
|
+
4. Refuse-on-critical: if `SPA_ENTRYPOINT` fires, this command writes a
|
|
30
|
+
clear refusal pointing at the landing-page playbook and the
|
|
31
|
+
override path (a project-local ADR).
|
|
32
|
+
|
|
33
|
+
## Refusal posture
|
|
34
|
+
|
|
35
|
+
A finding with severity `critical` (currently only `SPA_ENTRYPOINT`) is
|
|
36
|
+
an explicit refusal โ the audit exits non-zero and the
|
|
37
|
+
`seo-specialist` agent will refuse PR approval on a landing surface
|
|
38
|
+
until either:
|
|
39
|
+
|
|
40
|
+
- The framework is changed to one that ships SSR/SSG (Astro, Next
|
|
41
|
+
App Router, Nuxt, Remix, SvelteKit), OR
|
|
42
|
+
- The project ships a local ADR explicitly carving the surface out
|
|
43
|
+
("this is an internal admin tool โ no indexability needed").
|
|
44
|
+
|
|
45
|
+
## When to run
|
|
46
|
+
|
|
47
|
+
- **Before opening a PR** that touches a landing page or marketing
|
|
48
|
+
site.
|
|
49
|
+
- **On the design pass** when proposing a new public route.
|
|
50
|
+
- **In CI** โ the JSON output is gateable
|
|
51
|
+
(`node contextkit/tools/scripts/seo-audit.mjs --json > seo.json` +
|
|
52
|
+
a tiny step that `jq`s for critical severity).
|
|
53
|
+
|
|
54
|
+
## What it does NOT do
|
|
55
|
+
|
|
56
|
+
- It does not auto-rewrite HTML. Findings are the deliverable; the
|
|
57
|
+
human approves the fix (rule 8, ADR-0025).
|
|
58
|
+
- It does not run a headless-browser crawl. Static analyser only
|
|
59
|
+
(rule 1).
|
|
60
|
+
- It does not measure Core Web Vitals. Use PageSpeed Insights or
|
|
61
|
+
Lighthouse CI for that. The audit flags *patterns* that hurt
|
|
62
|
+
CWV (missing image dimensions, JS-rendered hero content) โ not the
|
|
63
|
+
measurements themselves.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Audit the codebase against the constitution โ deterministic scan + your interpretation.
|
|
3
|
+
argument-hint: [profile: full | quick]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐งน Tech Debt Sweep
|
|
7
|
+
|
|
8
|
+
Run the **deterministic scanner** first, then interpret. Profile: **$ARGUMENTS**
|
|
9
|
+
(default `full`; `quick` = red zone only).
|
|
10
|
+
|
|
11
|
+
1. Run the scanner and write the board:
|
|
12
|
+
```
|
|
13
|
+
node contextkit/tools/scripts/tech-debt-scan.mjs --write # full
|
|
14
|
+
node contextkit/tools/scripts/tech-debt-scan.mjs --write --quick # red zone only
|
|
15
|
+
```
|
|
16
|
+
It checks: file length vs `l5.lineBudget`, SRP "And/Or/E" names, TODO/FIXME
|
|
17
|
+
markers, and React state-loops โ and writes `contextkit/memory/tech-debt-board.md`.
|
|
18
|
+
|
|
19
|
+
2. **Interpret** the board with judgment the regex can't: which findings are real
|
|
20
|
+
debt vs acceptable cohesion? Which oversized file genuinely hides multiple
|
|
21
|
+
responsibilities? Add any smells the scanner can't see (leaky abstractions,
|
|
22
|
+
duplicated logic, missing error handling) โ referencing `CLAUDE.md`.
|
|
23
|
+
|
|
24
|
+
3. **Feed the DevPipeline backlog** โ every finding becomes a tracked task:
|
|
25
|
+
```
|
|
26
|
+
node contextkit/tools/scripts/pipeline.mjs ingest contextkit/memory/tech-debt-findings.json --type chore
|
|
27
|
+
```
|
|
28
|
+
One backlog task per finding, **auto-prioritized from severity** (REDโP1,
|
|
29
|
+
yellowโP2, lowโP3), **idempotent** (re-running never duplicates).
|
|
30
|
+
|
|
31
|
+
4. **Report + hand off.** Surface the **top 5** with the one-line fix each โ the
|
|
32
|
+
board `contextkit/memory/tech-debt-board.md` is the full report. Do NOT fix here.
|
|
33
|
+
Tell the user the items are in the backlog and the priorities are
|
|
34
|
+
**always editable**: `node contextkit/tools/scripts/pipeline.mjs prioritize <id> <P0-P3>`
|
|
35
|
+
or `/pipeline`. Offer to open a focused `/dev-start` on the worst one.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Investigator mode โ find root cause before writing any new feature code.
|
|
3
|
+
argument-hint: <bug description / symptom>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ Mode: Bug Hunt
|
|
7
|
+
|
|
8
|
+
Symptom under investigation:
|
|
9
|
+
|
|
10
|
+
> **$ARGUMENTS**
|
|
11
|
+
|
|
12
|
+
## Posture (strict until root cause is confirmed)
|
|
13
|
+
|
|
14
|
+
1. **Do NOT write feature code or speculative fixes yet.** First understand the failure.
|
|
15
|
+
|
|
16
|
+
2. **Gather evidence**: ask the user for (or locate yourself) the exact error message, stack trace,
|
|
17
|
+
logs, failing input, and reproduction steps. State what you have and what is missing.
|
|
18
|
+
|
|
19
|
+
3. **Map the flow**: trace the code path from entry point to the failure site. Reference files as
|
|
20
|
+
`path:line`. Note every place state is transformed.
|
|
21
|
+
|
|
22
|
+
4. **Rank hypotheses** (most โ least likely) with the evidence for each. Be explicit about what
|
|
23
|
+
would confirm or eliminate each one.
|
|
24
|
+
|
|
25
|
+
5. **Propose the cheapest decisive experiment** to confirm the top hypothesis (a log line, a unit
|
|
26
|
+
test, a one-line probe). Run it (or ask the user to) before committing to a fix.
|
|
27
|
+
|
|
28
|
+
6. **Only after root cause is confirmed**: propose the minimal fix, get approval, then implement.
|
|
29
|
+
Add a regression test if the stack supports it.
|
|
30
|
+
|
|
31
|
+
7. **Report + backlog.** Write a short root-cause report (symptom โ root cause โ fix โ
|
|
32
|
+
regression test). Record the bug โ and any *related* issues you surfaced โ in the
|
|
33
|
+
DevPipeline, point by point:
|
|
34
|
+
```
|
|
35
|
+
node contextkit/tools/scripts/pipeline.mjs add --type bug --priority <P0-P3> \
|
|
36
|
+
--source "bug:<area>" --title "<symptom>"
|
|
37
|
+
```
|
|
38
|
+
Auto-priority: data-loss / security / broken build โ P0, broken core path โ P1,
|
|
39
|
+
degraded โ P2, cosmetic โ P3. If you fixed it this session, `pipeline.mjs move
|
|
40
|
+
<id> conclusion`. Priorities are **always editable** (`prioritize <id> <P>` / `/pipeline`).
|
|
41
|
+
|
|
42
|
+
Resist the urge to "just try something." A confirmed root cause beats three plausible guesses.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ensure every app/module has its own scoped CLAUDE.md, then fill each with real local rules.
|
|
3
|
+
argument-hint: [find | scaffold]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ Modular CLAUDE.md
|
|
7
|
+
|
|
8
|
+
Like a well-run monorepo (root `CLAUDE.md` + `apps/api/CLAUDE.md` +
|
|
9
|
+
`apps/web/CLAUDE.md` โฆ), each app / independent module should carry its **own**
|
|
10
|
+
scoped `CLAUDE.md`. Claude Code loads the closest one, so local rules live next to
|
|
11
|
+
the code โ clearer, more accurate guidance per area.
|
|
12
|
+
|
|
13
|
+
1. **Detect** module roots:
|
|
14
|
+
```
|
|
15
|
+
node contextkit/tools/scripts/claude-md.mjs find
|
|
16
|
+
```
|
|
17
|
+
It finds split dirs (`backend/`, `frontend/`, `api/`, `web/`, `mobile/`, โฆ) and
|
|
18
|
+
monorepo group children (`apps/*`, `packages/*`, `modules/*`, `services/*`) that
|
|
19
|
+
look independently buildable, and shows which lack a `CLAUDE.md`.
|
|
20
|
+
|
|
21
|
+
2. **Scaffold** the missing ones (stubs, won't overwrite):
|
|
22
|
+
```
|
|
23
|
+
node contextkit/tools/scripts/claude-md.mjs scaffold
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. **Fill each one with real, local content** (this is the important part โ don't
|
|
27
|
+
leave the TODOs). For every scoped `CLAUDE.md`, read that module and write:
|
|
28
|
+
- what it is + its single responsibility (backend/frontend/lib/service);
|
|
29
|
+
- its local stack/tooling;
|
|
30
|
+
- **local conventions** that differ from the root (folder layout, where logic
|
|
31
|
+
goes, the public surface to keep stable);
|
|
32
|
+
- boundaries (depends on / consumed by).
|
|
33
|
+
Keep it lean and inheriting the root constitution โ don't duplicate it.
|
|
34
|
+
|
|
35
|
+
Run on `$ARGUMENTS` (default: do `find`, then offer `scaffold` + fill). For a
|
|
36
|
+
single-package project with no sub-modules, the root `CLAUDE.md` is enough โ say so.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Close the current version in the CHANGELOG ([Unreleased] โ [X.Y.Z]) and tag it.
|
|
3
|
+
argument-hint: <version e.g. 0.2.0>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Close version **$ARGUMENTS** in `docs/CHANGELOG.md`.
|
|
7
|
+
|
|
8
|
+
1. Read `docs/CHANGELOG.md`. Confirm `[Unreleased]` has content. If empty, stop and tell the user
|
|
9
|
+
there is nothing to release.
|
|
10
|
+
|
|
11
|
+
2. Rename the `## [Unreleased]` heading to `## [$ARGUMENTS] - <today YYYY-MM-DD>` and insert a fresh
|
|
12
|
+
empty `## [Unreleased]` block above it (with placeholder "Add your changes here.").
|
|
13
|
+
|
|
14
|
+
3. Summarize to the user what is being released.
|
|
15
|
+
|
|
16
|
+
4. Offer (do NOT run without confirmation) the tag + release commands:
|
|
17
|
+
```
|
|
18
|
+
git add docs/CHANGELOG.md
|
|
19
|
+
git commit -m "chore(release): v$ARGUMENTS"
|
|
20
|
+
git tag v$ARGUMENTS
|
|
21
|
+
```
|
|
22
|
+
And, if a GitHub remote exists and `gh` is available, offer `gh release create v$ARGUMENTS`.
|
|
23
|
+
|
|
24
|
+
If ContextDevKit is at Level 5 and a `qa` gate marker is configured beyond T0, surface any failing
|
|
25
|
+
quality signals before closing.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Regenerate the dynamic full-project snapshot (.context-snapshot.md).
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> โ ๏ธ **Deprecated (1.0):** prefer **/audit** (or the auto boot context). This
|
|
6
|
+
> still regenerates the on-demand snapshot.
|
|
7
|
+
|
|
8
|
+
Regenerate the on-demand project snapshot:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
node contextkit/tools/scripts/generate-context.mjs
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This writes `.context-snapshot.md` (gitignored) containing the folder tree, detected stack, latest
|
|
15
|
+
session, CHANGELOG `[Unreleased]`, and a glossary excerpt.
|
|
16
|
+
|
|
17
|
+
Use it before a large refactor (so you can see the whole project at once), or to paste into another
|
|
18
|
+
AI that lacks the boot hook. After running, read `.context-snapshot.md` and give the user a 3-line
|
|
19
|
+
summary of what it captured.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show platform telemetry โ sessions, drift rate, ADRs, agents, weekly cadence.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Show how healthy the ContextDevKit practice is on this project:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
node contextkit/tools/scripts/stats.mjs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Present the output to the user and add a one-line read: is the **drift rate**
|
|
12
|
+
trending down (good โ sessions are being registered)? Is the cadence steady? Are
|
|
13
|
+
ADRs being written for big decisions? Suggest a concrete habit if a metric looks
|
|
14
|
+
off (e.g. high drift โ remember `/log-session`; zero ADRs on a big change โ
|
|
15
|
+
`/new-adr`).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Visual dashboard โ pipeline lanes + ADRs + sessions + roadmap + CHANGELOG. Snapshot HTML by default; live SSE-driven view with --watch.
|
|
3
|
+
argument-hint: [--watch] [--port=N] [--out=PATH]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ Dashboard
|
|
7
|
+
|
|
8
|
+
A single-file HTML view of the project's current state. Pipeline lanes
|
|
9
|
+
(backlog / working / testing / concluded), the ADR catalogue, recent
|
|
10
|
+
sessions, the roadmap, and the `[Unreleased]` CHANGELOG โ all rendered
|
|
11
|
+
from the existing files. Zero deps; pure `node:` stdlib.
|
|
12
|
+
|
|
13
|
+
## Two modes โ one command
|
|
14
|
+
|
|
15
|
+
### Snapshot (default)
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
node contextkit/tools/scripts/dashboard.mjs # writes ./dashboard.html
|
|
19
|
+
node contextkit/tools/scripts/dashboard.mjs --out=tmp/state.html
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Writes a self-contained HTML file and exits. Inline CSS + JS, no external
|
|
23
|
+
assets โ opens by double-click, works offline, survives without the kit
|
|
24
|
+
installed. Use this for share-by-email or commit-to-PR-preview.
|
|
25
|
+
|
|
26
|
+
### Live (`--watch`)
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
node contextkit/tools/scripts/dashboard.mjs --watch # serves http://127.0.0.1:4242
|
|
30
|
+
node contextkit/tools/scripts/dashboard.mjs --watch --port=8080
|
|
31
|
+
CONTEXTDEVKIT_DASHBOARD_PORT=5555 node contextkit/tools/scripts/dashboard.mjs --watch
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Spawns a tiny `node:http` server bound to **127.0.0.1 only** (no network
|
|
35
|
+
access). The page subscribes to `/events` via Server-Sent Events; an
|
|
36
|
+
`fs.watch` on `contextkit/` (200 ms debounced) triggers a rebuild and pushes
|
|
37
|
+
the new data object. The client patches the DOM in place โ no full
|
|
38
|
+
reload. Ctrl+C to stop.
|
|
39
|
+
|
|
40
|
+
## What it shows
|
|
41
|
+
|
|
42
|
+
- **Counts strip** โ totals per lane.
|
|
43
|
+
- **Pipeline (4-column kanban)** โ every ticket as a card with id, type
|
|
44
|
+
badge, priority badge, SLA, source. Sorted by id within each lane.
|
|
45
|
+
- **Recent ADRs** โ the 12 newest, status colour-coded.
|
|
46
|
+
- **Recent sessions** โ the 10 newest, with branch.
|
|
47
|
+
- **`[Unreleased]` CHANGELOG** โ collapsible.
|
|
48
|
+
- **Roadmap** โ collapsible, only if `contextkit/memory/roadmap.md` exists.
|
|
49
|
+
|
|
50
|
+
## What it does NOT do
|
|
51
|
+
|
|
52
|
+
- **No edit-in-place.** Read-only by design.
|
|
53
|
+
- **No remote access.** 127.0.0.1 only โ no `0.0.0.0`, no auth, no TLS.
|
|
54
|
+
- **No multi-project.** Use `/fleet` for the portfolio view.
|
|
55
|
+
- **No JS framework.** Inline vanilla JS in the page; no React, no Vite,
|
|
56
|
+
no `node_modules` to install.
|
|
57
|
+
- **No persistent state.** Every render re-reads the files.
|
|
58
|
+
|
|
59
|
+
## When to use it
|
|
60
|
+
|
|
61
|
+
- **During a session** โ `--watch` in a second pane, edits in the editor,
|
|
62
|
+
the board updates as you move tickets between lanes.
|
|
63
|
+
- **End of session** โ snapshot to attach to a `/log-session` summary or
|
|
64
|
+
a PR description.
|
|
65
|
+
- **Reviewing someone else's progress** โ open the snapshot file they
|
|
66
|
+
committed (no install required).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: L5 โ apply a reviewed .distillation-proposal.md to CLAUDE.md and record an ADR for the cycle.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ๐งฌ Distill apply
|
|
6
|
+
|
|
7
|
+
Materialize the proposal produced by `/distill-sessions`.
|
|
8
|
+
|
|
9
|
+
1. Read `.distillation-proposal.md`. If it is missing, stop and tell the user to
|
|
10
|
+
run `/distill-sessions` first.
|
|
11
|
+
2. Show the user the exact `CLAUDE.md` edits you are about to make and get
|
|
12
|
+
confirmation. Respect the constitution โ keep `CLAUDE.md` lean.
|
|
13
|
+
3. Apply the edits to `CLAUDE.md`.
|
|
14
|
+
4. Create an ADR (`/new-adr`-style) recording the distillation cycle: which
|
|
15
|
+
sessions informed it and what changed in the constitution, so the *why* is
|
|
16
|
+
captured. ADRs are immutable once accepted.
|
|
17
|
+
5. Delete `.distillation-proposal.md` (it is consumed).
|
|
18
|
+
6. Stage `CLAUDE.md` + the new ADR together so the decision and its rationale
|
|
19
|
+
land in the **same commit**. Then run `/log-session`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: L5 โ analyze recent sessions and propose refinements to CLAUDE.md (writes a proposal, applies nothing).
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ๐งฌ Distill sessions (propose)
|
|
6
|
+
|
|
7
|
+
Analyze the recent session history and propose improvements to `CLAUDE.md` โ but
|
|
8
|
+
**apply nothing**. This is the review step; `/distill-apply` materializes it.
|
|
9
|
+
|
|
10
|
+
1. Get a **compact digest** of the last N sessions instead of reading the raw
|
|
11
|
+
logs [ADR-0027]: `node contextkit/tools/scripts/session-digest.mjs --last N`
|
|
12
|
+
(N from `contextkit/config.json` โ `l5.distill.observeWindow`, default 10),
|
|
13
|
+
newest first. Reason over the digests; open a full file in
|
|
14
|
+
`contextkit/memory/sessions/` only when a digest flags a pattern you must
|
|
15
|
+
inspect verbatim.
|
|
16
|
+
2. Look for **recurring signals**: corrections the user gave repeatedly, rules
|
|
17
|
+
re-explained across sessions, conventions that emerged but aren't written
|
|
18
|
+
down, friction that a CLAUDE.md rule would prevent, and decisions that should
|
|
19
|
+
be promoted to an ADR.
|
|
20
|
+
3. Draft a concrete diff to `CLAUDE.md` (and note any ADRs worth creating).
|
|
21
|
+
Prefer small, high-signal additions over bloat โ CLAUDE.md must stay short.
|
|
22
|
+
4. Write the proposal to `.distillation-proposal.md` (gitignored) with: the
|
|
23
|
+
evidence (which sessions, what pattern), the proposed CLAUDE.md edits as a
|
|
24
|
+
clear before/after, and any suggested ADRs.
|
|
25
|
+
5. Summarize to the user and tell them to review it, then run `/distill-apply` to
|
|
26
|
+
commit the change. Do not edit `CLAUDE.md` in this command.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fleet mode โ one control plane over many ContextDevKit repos (portfolio stats, cross-repo audit, CLAUDE.md rule-drift).
|
|
3
|
+
argument-hint: [list | add <path> | remove <path> | stats | audit | propagate <rule-file>]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ฐ๏ธ Fleet (control plane over many repos)
|
|
7
|
+
|
|
8
|
+
Operate on a **portfolio** of ContextDevKit repos at once. The registry lives outside
|
|
9
|
+
any repo โ `~/.contextdevkit/fleet.json` (override `CONTEXT_FLEET_FILE`). Helper:
|
|
10
|
+
`contextkit/tools/scripts/fleet.mjs`.
|
|
11
|
+
|
|
12
|
+
Act on **$ARGUMENTS**:
|
|
13
|
+
|
|
14
|
+
## list / add / remove
|
|
15
|
+
```
|
|
16
|
+
node contextkit/tools/scripts/fleet.mjs add <path-to-repo>
|
|
17
|
+
node contextkit/tools/scripts/fleet.mjs list
|
|
18
|
+
```
|
|
19
|
+
Register the repos you want the fleet to cover (absolute paths are stored).
|
|
20
|
+
|
|
21
|
+
## stats โ portfolio health
|
|
22
|
+
```
|
|
23
|
+
node contextkit/tools/scripts/fleet.mjs stats # or --json
|
|
24
|
+
```
|
|
25
|
+
Runs each repo's `stats.mjs` and aggregates: level, registered sessions, ADRs,
|
|
26
|
+
agents, drift rate per repo + totals. Call out the repos that look unhealthy
|
|
27
|
+
(high drift, no recent sessions, stuck at a low level).
|
|
28
|
+
|
|
29
|
+
## audit โ findings across the portfolio
|
|
30
|
+
```
|
|
31
|
+
node contextkit/tools/scripts/fleet.mjs audit # or --json
|
|
32
|
+
```
|
|
33
|
+
Runs each repo's `deep-analysis.mjs` and aggregates finding counts. Surface the
|
|
34
|
+
repos carrying the most debt/risk; suggest where to run `/deep-analysis` or
|
|
35
|
+
`/deps-audit` next.
|
|
36
|
+
|
|
37
|
+
## propagate โ CLAUDE.md rule drift (detect-only)
|
|
38
|
+
```
|
|
39
|
+
node contextkit/tools/scripts/fleet.mjs propagate <rule-file>
|
|
40
|
+
```
|
|
41
|
+
Reports which repos' `CLAUDE.md` **lack** a given rule block. Fleet **does not
|
|
42
|
+
auto-edit** โ for each MISSING repo, add the rule with judgment (it may need
|
|
43
|
+
adapting per stack), ideally via that repo's own session + PR.
|
|
44
|
+
|
|
45
|
+
## Report
|
|
46
|
+
Summarize the portfolio: totals, the 1โ3 repos needing attention, and the
|
|
47
|
+
concrete next action per repo. Keep it advisory โ the fleet informs, you decide.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tally the audit log for a forged Agent Package โ call counts by outcome, fallback rate, cost summary. Read-only. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ audit
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-ops.mjs audit $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Reads `audit/<agent>.jsonl` (the runtime adapter writes it per
|
|
11
|
+
`governance/compliance.policy.yaml.audit.destination`) and reports totals.
|
|
12
|
+
|
|
13
|
+
## Interpret
|
|
14
|
+
- Many `refused` โ review the prompt; the agent is over-refusing.
|
|
15
|
+
- High `fallbacks` โ the primary provider is unstable; consider `/forge-route` to re-evaluate.
|
|
16
|
+
- Cost drift vs `forge-budget` โ flag and recommend `/forge-policy` review.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Aggregate monthly target + hard-cap across every forged Agent Package โ the consolidated cost view. Read-only. (agent-forge squad)
|
|
3
|
+
argument-hint: [--root <dir>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ budget
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-ops.mjs budget $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Sums `spec.cost.monthly_budget_usd` across every package and surfaces the
|
|
11
|
+
per-agent breakdown. The hard cap = target ร 1.5 per the governance default.
|
|
12
|
+
|
|
13
|
+
## Surface to the dev
|
|
14
|
+
- If the aggregate hard cap exceeds the project's monthly LLM budget, this is
|
|
15
|
+
the time to surface it โ recommend lowering `cost.target_usd_per_call` on the
|
|
16
|
+
agents driving the budget or moving sub-tasks to `cheap_path`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Stamp `metadata.deprecated_at` into a forged Agent Package's manifest and recommend an ADR for the reason. Atomic write; dry-run by default. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--write]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ deprecate
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-admin.mjs deprecate $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Marks the version as deprecated without deleting it. Clients can still
|
|
11
|
+
consume the package; the marker tells them to migrate to the successor.
|
|
12
|
+
|
|
13
|
+
## After
|
|
14
|
+
1. Recommend `/new-adr "deprecate <agent>@<version>"` with the migration path.
|
|
15
|
+
2. If a successor exists, link it: `metadata.superseded_by: <agent>@<new>`.
|
|
16
|
+
3. Add a CHANGELOG entry in the package's own `CHANGELOG.md`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Integrity check across every forged Agent Package โ required files present, no {{TOKEN}} placeholders left in governance YAMLs. Read-only; exits non-zero on any problem. (agent-forge squad)
|
|
3
|
+
argument-hint: [--root <dir>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ doctor
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-ops.mjs doctor $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Walks every package, asserts the 11 expected files exist, and verifies the 3
|
|
11
|
+
governance policies are *populated* (no `{{TOKEN}}` placeholders). Exits 1 if
|
|
12
|
+
anything is wrong.
|
|
13
|
+
|
|
14
|
+
## When issues appear
|
|
15
|
+
- Missing files โ re-run `/forge-new` for the agent, or restore from git.
|
|
16
|
+
- Placeholder tokens in governance โ the package was hand-edited or shipped
|
|
17
|
+
before Fase 3 โ re-forge it or run `/forge-policy` to see what's missing.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the eval gate (golden + red-team) for one forged Agent Package against its thresholds. Default provider is a deterministic mock for CI; --provider chaos exercises an upstream-503. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--provider mock|chaos] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ eval
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-eval-cli.mjs eval $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
This is the Fase 3 gate, re-runnable on demand. Exits 1 on any threshold
|
|
11
|
+
breach so it can chain into a CI step.
|
|
12
|
+
|
|
13
|
+
## When the verdict is FAIL
|
|
14
|
+
- Surface every failure reason verbatim.
|
|
15
|
+
- Do NOT recommend a `--write` or deploy until the dev fixes the underlying issue.
|
|
16
|
+
- A red-team `pii_leak` failure when `pii_present: true` is non-negotiable โ escalate.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Chaos-test the fallback path for one forged Agent Package by simulating a primary 503 on the first call. Verifies the eval scaffold survives upstream failures. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ fallback test
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-eval-cli.mjs fallback-test $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
The chaos provider raises a 503 once, then behaves normally. The runner
|
|
11
|
+
demonstrates that the eval scaffold tolerates the failure. The actual
|
|
12
|
+
fallback-chain wiring lives in the client's runtime adapter โ Fase 5 will
|
|
13
|
+
exercise it end-to-end with the real adapter.
|
|
14
|
+
|
|
15
|
+
## After
|
|
16
|
+
- If the test reports a fall-back, surface the new primary model. Compare with
|
|
17
|
+
`governance/fallback-chain.yaml.chain[0]` โ they should match.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Toggle quality.policy.yaml's `kill_switch.enabled` (on|off) for one forged Agent Package. Atomic write; dry-run by default. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] <on|off> [--write]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ kill switch
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-admin.mjs killswitch $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
When `on`, the runtime adapter refuses every call until manually reset. Use
|
|
11
|
+
this DURING an incident, not as a planned change.
|
|
12
|
+
|
|
13
|
+
## Refuse conditions
|
|
14
|
+
- The dev wants to permanently disable the kill switch for "ergonomics".
|
|
15
|
+
Refuse โ the kill switch is the agent's last line of defense (ADR-0012 ยง6).
|
|
16
|
+
- A request to switch on without recording an incident note. Recommend
|
|
17
|
+
`/log-session` after toggling.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List every forged Agent Package under agent-packages/ (or --root <dir>) with version + routed primary model + eval-stamp status. Read-only. (agent-forge squad)
|
|
3
|
+
argument-hint: [--root <dir>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ ๏ธ Mode: agent-forge โ list packages
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-ops.mjs list $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Read-only. Walks the registry, doesn't need the `yaml` dep for discovery โ but
|
|
11
|
+
`primary model` + `eval-stamp` columns require it (ADR-0013). If `yaml` is
|
|
12
|
+
missing, the listing still shows names + versions; suggest `npm i yaml` for
|
|
13
|
+
the rest.
|
|
14
|
+
|
|
15
|
+
## Post-output
|
|
16
|
+
- Flag any package whose `eval-stamp` shows `โ ๏ธ unevaluated` and recommend `/forge-eval <agent>`.
|
|
17
|
+
- If two versions of the same agent are listed, recommend `/forge-deprecate <agent>@<old>`.
|