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,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge a new portable Agent Package — interviews the dev (architect), routes to a provider (router), renders per-provider files (prompt-engineer + tool-designer), and packages the APF v1 under agent-packages/<name>@<semver>/. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent-name>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ Mode: agent-forge — new package
|
|
7
|
+
|
|
8
|
+
You just entered the `agent-forge` flow. The objective: forge a portable Agent
|
|
9
|
+
Package for **$ARGUMENTS** (or for the name the developer gives during the interview).
|
|
10
|
+
|
|
11
|
+
## Posture for this session
|
|
12
|
+
|
|
13
|
+
1. **Engage the squad in order** — do NOT skip stages:
|
|
14
|
+
- `forge-orchestrator` runs the pipeline.
|
|
15
|
+
- `agent-architect` interviews → `agent_name` + `role_one_line` + the rest of `INTERVIEW_QUESTIONS`.
|
|
16
|
+
- `model-router` selects provider/model + rationale.
|
|
17
|
+
- `prompt-engineer` + `tool-designer` render the per-provider files.
|
|
18
|
+
- `packager` assembles + stamps provenance.
|
|
19
|
+
|
|
20
|
+
2. **Refuse to skip the interview.** Defaults are safe, not informed.
|
|
21
|
+
|
|
22
|
+
3. **Verify before writing** — show the dev:
|
|
23
|
+
- The Agent Blueprint (YAML).
|
|
24
|
+
- The Provider Selection rationale (verbatim from the router).
|
|
25
|
+
- The package target path: `agent-packages/<agent-name>@0.1.0/`.
|
|
26
|
+
|
|
27
|
+
4. **Run the CLI when the dev approves**: `node contextkit/squads/agent-forge/cli/forge-new.mjs --blueprint <path>`. The CLI requires the optional `yaml` dep (ADR-0013) — if absent, suggest `npm i yaml`.
|
|
28
|
+
|
|
29
|
+
5. **At the end**: confirm the APF passes its self-check (manifest parses; provider adapters import; canonical → variant round-trips). Eval gates land in Fase 3.
|
|
30
|
+
|
|
31
|
+
## Why this mode exists
|
|
32
|
+
|
|
33
|
+
`/forge-new` is the front door to agent-forge. It enforces the pipeline order,
|
|
34
|
+
blocks "just use defaults" shortcuts, and guarantees every Agent Package ships
|
|
35
|
+
with provenance + rationale.
|
|
36
|
+
|
|
37
|
+
## Out of scope here
|
|
38
|
+
|
|
39
|
+
- The Fase 3 eval gate (golden + red-team) + governance pillar enforcement + kill-switch wiring.
|
|
40
|
+
- The Fases 2+ providers (Gemini / DeepSeek / Ollama / vLLM).
|
|
41
|
+
- The Fase 4 maintenance commands (`/forge-refresh-matrix`, `/forge-route`, `/forge-budget`, `/forge-policy`, …).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Print the resolved cost / compliance / quality policies + fallback chain for one forged Agent Package. Read-only. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ Mode: agent-forge — policy
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-ops.mjs policy $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Requires the optional `yaml` dep (ADR-0013). Reads the 4 governance YAMLs and
|
|
11
|
+
prints the live values (not the templates).
|
|
12
|
+
|
|
13
|
+
## Use this when
|
|
14
|
+
- The dev asks "what's this agent's monthly cap?" → look at `cost.budgets`.
|
|
15
|
+
- A residency review needs the `denied_providers` list → `compliance.data_residency`.
|
|
16
|
+
- Confirming the eval gate thresholds before a release → `quality.eval_gates.pre_release`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run red-team only (prompt injection / jailbreak / PII leak) for one forged Agent Package. Useful between releases without re-paying for a full golden run. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--provider mock|chaos] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ Mode: agent-forge — red-team
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-eval-cli.mjs redteam $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Exercises the red-team subset of the eval. Exits 1 on any block-rate failure.
|
|
11
|
+
|
|
12
|
+
## When a leak appears
|
|
13
|
+
- `pii_leak` failure with `pii_present: true` → **stop the release**. Tighten
|
|
14
|
+
the system prompt (redaction rules) or move to `pre_call_redaction` strategy
|
|
15
|
+
in `compliance.policy.yaml`.
|
|
16
|
+
- `prompt_injection` failure → re-check that the system prompt has affirmative
|
|
17
|
+
rules + that tool definitions don't echo unsanitized input.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Bump router/capability-matrix.json's `updated` date and report the model count. Dry-run by default; pass --write to apply. Real price/model changes require an ADR. (agent-forge squad)
|
|
3
|
+
argument-hint: [--write] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ Mode: agent-forge — refresh capability matrix
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-admin.mjs refresh-matrix $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
This command only stamps the `updated` field — adding/removing models or
|
|
11
|
+
changing prices is intentionally out of scope (ADR-0012 §6: matrix-freshness
|
|
12
|
+
is ADR-gated). The selfcheck `checkCapabilityMatrix` will fail if a regression
|
|
13
|
+
is committed.
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
1. Review the providers' current price/model pages.
|
|
17
|
+
2. Open `/new-adr "capability-matrix bump 2026-Qx"` describing the diff.
|
|
18
|
+
3. Hand-edit `router/capability-matrix.json` per the ADR.
|
|
19
|
+
4. Run this command with `--write` to stamp the date.
|
|
20
|
+
5. `/forge-route <agent>` for each forged agent to see who would benefit.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Re-execute the model-router against the current capability-matrix + decision-rules for one Agent Package and DIFF vs the live manifest. Read-only — no manifest is touched. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ Mode: agent-forge — re-route
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-eval-cli.mjs route $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Surfaces "would the router pick the same primary now?" — useful after
|
|
11
|
+
`/forge-refresh-matrix` or after a new ADR adds a model.
|
|
12
|
+
|
|
13
|
+
## When the diff shows a change
|
|
14
|
+
- Propose `/new-adr` to record the proposed model swap + the reason.
|
|
15
|
+
- Then re-forge the agent with `/forge-new` (semver bump per the manifest
|
|
16
|
+
CHANGELOG: model swap within same family = patch, family change = minor).
|
|
17
|
+
- Do NOT hand-edit `manifest.yaml` — the next forge will overwrite it.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Display the manifest, provenance, and last eval timestamp for one forged Agent Package. Read-only. (agent-forge squad)
|
|
3
|
+
argument-hint: <agent>[@<version>] [--json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ Mode: agent-forge — show package
|
|
7
|
+
|
|
8
|
+
Run `node contextkit/squads/agent-forge/cli/forge-ops.mjs show $ARGUMENTS`.
|
|
9
|
+
|
|
10
|
+
Requires the optional `yaml` dep (ADR-0013) to parse `manifest.yaml`. If absent,
|
|
11
|
+
suggest `npm i yaml`.
|
|
12
|
+
|
|
13
|
+
## What to surface
|
|
14
|
+
- The routed `primary` and `fallback` (with the cross-provider check).
|
|
15
|
+
- `eval_passed_at` — if `NEVER`, refuse to recommend deployment until `/forge-eval` passes.
|
|
16
|
+
- `blueprint_hash` — must match across forge runs to prove provenance.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Landing-page architect — opinionated, anti-cookie-cutter, fold rules, package recs, indexable-by-default. (ADR-0023)
|
|
3
|
+
argument-hint: <feature or scope, e.g. "marketing site for new pricing">
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🎯 Landing page (anti-cookie-cutter)
|
|
7
|
+
|
|
8
|
+
Drive a landing-page or marketing-site design pass from a strategic
|
|
9
|
+
brief. The session reads two artefacts on every invocation and refuses
|
|
10
|
+
the cookie-cutter pattern by default:
|
|
11
|
+
|
|
12
|
+
- [Landing-page playbook](../../contextkit/workflows/playbooks/landing-page.md) — fold rules, anti-Lovable refusals, package recommendations (dated), performance budget.
|
|
13
|
+
- [SEO + AISO playbook](../../contextkit/workflows/playbooks/seo-aiso.md) — indexability gate; refuse-on-SPA.
|
|
14
|
+
|
|
15
|
+
Authority: [ADR-0023](../../contextkit/memory/decisions/0023-landing-page-and-conversion-posture.md).
|
|
16
|
+
|
|
17
|
+
## Posture for this session
|
|
18
|
+
|
|
19
|
+
Act as **landing-architect**. Read the brief in **$ARGUMENTS** and:
|
|
20
|
+
|
|
21
|
+
1. **State the indexability decision FIRST.** Pick SSG (Astro
|
|
22
|
+
recommended), SSR (Next App Router / Nuxt / Remix / SvelteKit), or
|
|
23
|
+
carve out a non-indexable surface with a project ADR. Plain Vite +
|
|
24
|
+
React for a public landing page is a refusal — propose Astro.
|
|
25
|
+
2. **Pick the fold count from the rule table.** State min / ideal /
|
|
26
|
+
max for the brief's situation. Justify the pick (utility tool →
|
|
27
|
+
3 folds; SaaS pricing page → 5–7; high-ticket B2B → up to 9).
|
|
28
|
+
3. **Sketch each fold as a one-liner.** One message, one action, one
|
|
29
|
+
proof per fold. No "while we're here" sections.
|
|
30
|
+
4. **Refuse the cookie-cutter explicitly.** Walk the playbook's
|
|
31
|
+
anti-Lovable table and name the substitute the design will use
|
|
32
|
+
(editorial hero, in-context testimonial, decision-tree pricing,
|
|
33
|
+
inline FAQ).
|
|
34
|
+
5. **Choose packages from the rec table.** State the framework,
|
|
35
|
+
styling tokens, animation library, typography pair, icon set,
|
|
36
|
+
forms, analytics, experimentation, imagery source. Refuse the
|
|
37
|
+
defaults the playbook calls out (`Inter`, Heroicons, GA4,
|
|
38
|
+
Material UI).
|
|
39
|
+
6. **Defer to the squad:**
|
|
40
|
+
- `seo-specialist` for the AISO checklist + FAQ schema before any
|
|
41
|
+
visual work lands;
|
|
42
|
+
- `ui-designer` for tokens + layout once the structure is set;
|
|
43
|
+
- `ux-designer` for the user flow through the page;
|
|
44
|
+
- `accessibility` for WCAG AA before merge;
|
|
45
|
+
- `/media-gen` for hero imagery + video instead of stock photos.
|
|
46
|
+
7. **Performance budget commitment.** State the LCP / INP / CLS / JS
|
|
47
|
+
payload target up front — they are conversion levers, not
|
|
48
|
+
afterthoughts.
|
|
49
|
+
|
|
50
|
+
## Output shape
|
|
51
|
+
|
|
52
|
+
- **Indexability decision** (SSG / SSR / carve-out) + framework pick
|
|
53
|
+
with one-line rationale.
|
|
54
|
+
- **Fold map** — `N folds`, each as `<fold-name> · <message> · <action>
|
|
55
|
+
· <proof>`.
|
|
56
|
+
- **Anti-Lovable map** — which playbook smells the design refuses
|
|
57
|
+
and what the substitute is for each.
|
|
58
|
+
- **Stack** — package picks with one-line rationale per category.
|
|
59
|
+
- **Performance budget** — LCP, INP, CLS, JS payload targets.
|
|
60
|
+
- **Next-step delegations** — which agent owns the next pass and
|
|
61
|
+
what input they need.
|
|
62
|
+
|
|
63
|
+
## What this does NOT do
|
|
64
|
+
|
|
65
|
+
- It does **not** write the code in this session. It produces the
|
|
66
|
+
*plan* the next session (or the next agent) implements.
|
|
67
|
+
- It does **not** invent a domain (rule 9 + ADR-0017's five-constraint
|
|
68
|
+
inheritance). The user owns the product story; this command shapes
|
|
69
|
+
the structure.
|
|
70
|
+
- It does **not** override a project-local ADR that carves out
|
|
71
|
+
indexability. Read those first.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Register the current session (creates a session file + updates CHANGELOG). Use at the end.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Register the current work session. Steps:
|
|
6
|
+
|
|
7
|
+
1. **Find the next session number.** List `contextkit/memory/sessions/`. Each file is
|
|
8
|
+
`<YYYY-MM-DD>-<NN>-<slug>.md`. The next `NN` = highest existing + 1 (zero-padded, min 2 digits).
|
|
9
|
+
If the folder is empty, start at `01`.
|
|
10
|
+
|
|
11
|
+
2. **Create the session file** `contextkit/memory/sessions/<today>-<NN>-<slug>.md` where `<slug>`
|
|
12
|
+
is a short kebab-case description (lowercase `a-z0-9._-` only). Use this structure:
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# <Human-readable title>
|
|
16
|
+
|
|
17
|
+
- **Date**: <YYYY-MM-DD>
|
|
18
|
+
- **Session number**: <NN>
|
|
19
|
+
- **Branch**: `<git branch>`
|
|
20
|
+
|
|
21
|
+
## Request
|
|
22
|
+
<what the user asked for>
|
|
23
|
+
|
|
24
|
+
## Done
|
|
25
|
+
<what was implemented/decided — files, key changes>
|
|
26
|
+
|
|
27
|
+
## Decisions
|
|
28
|
+
<any architectural choices; link ADRs as [ADR-NNNN](../decisions/NNNN-...md)>
|
|
29
|
+
|
|
30
|
+
## Final state
|
|
31
|
+
<what works, what is pending, the natural next step>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Derive "Done" from the actual edits this session (check the ledger at
|
|
35
|
+
`.claude/.sessions/` if useful) — be factual, do not inflate.
|
|
36
|
+
|
|
37
|
+
3. **Update `docs/CHANGELOG.md`** — add bullet(s) under `## [Unreleased]` describing user-facing
|
|
38
|
+
or structural changes (Keep a Changelog style: Added / Changed / Fixed / Removed).
|
|
39
|
+
|
|
40
|
+
4. **Regenerate the index**: run `node contextkit/tools/scripts/session-reindex.mjs`.
|
|
41
|
+
|
|
42
|
+
5. **Close the predicted-vs-actual loop** (if this session ran `/simulate-impact`): run
|
|
43
|
+
`node contextkit/tools/scripts/predictions-review.mjs` — it fills the *Actual* section of each
|
|
44
|
+
prediction file from the ledger (paths actually changed vs predicted). No-op if there were
|
|
45
|
+
no simulations.
|
|
46
|
+
|
|
47
|
+
6. **Scan for rule-like phrases** (ticket 043 — *proposal-only*, never auto-applies). After the
|
|
48
|
+
session file is written, run:
|
|
49
|
+
```
|
|
50
|
+
node contextkit/tools/scripts/distill-detect.mjs contextkit/memory/sessions/<the-file-you-just-wrote>.md
|
|
51
|
+
```
|
|
52
|
+
If the detector surfaces candidates ("we decided X" / "from now on Y" / "always Z" / "convention:" /
|
|
53
|
+
"lesson learned"), pass the line through to the user verbatim. **Do not** invoke
|
|
54
|
+
`/distill-sessions` yourself — the user runs it (or doesn't). Silent on neutral sessions.
|
|
55
|
+
|
|
56
|
+
7. Confirm to the user: session number, file path, and CHANGELOG lines added.
|
|
57
|
+
|
|
58
|
+
Editing `contextkit/memory/SESSIONS.md` (via reindex) and `docs/CHANGELOG.md` marks the session as
|
|
59
|
+
registered, which silences the Stop drift nudge.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate images (Nano Banana) or video (Veo) via Google AI Studio. Refuses cleanly without credentials. (ADR-0024)
|
|
3
|
+
argument-hint: <image|video> --prompt "..." --out PATH [options]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🎬 Media generation (Veo + Nano Banana)
|
|
7
|
+
|
|
8
|
+
Generate images or video on demand via the kit's media-provider
|
|
9
|
+
adapters. Two providers ship, both targeting Google AI Studio:
|
|
10
|
+
|
|
11
|
+
- **Nano Banana** — image (Imagen 3). `~$0.04 / image` (dated
|
|
12
|
+
2026-06-02; verify at https://ai.google.dev/pricing).
|
|
13
|
+
- **Veo** — video. `~$0.50 / second`; typical 8 s clip `~$4.00`.
|
|
14
|
+
|
|
15
|
+
Authority: [ADR-0024](../../contextkit/memory/decisions/0024-media-generation-veo-nano-banana.md).
|
|
16
|
+
|
|
17
|
+
## Setup (one time)
|
|
18
|
+
|
|
19
|
+
1. Get a key at https://aistudio.google.com/apikey
|
|
20
|
+
2. Copy `contextkit/.env.example` to `contextkit/.env`, paste the key into
|
|
21
|
+
`GOOGLE_AI_API_KEY=`.
|
|
22
|
+
3. (Optional) set `CONTEXTDEVKIT_MEDIA_MAX_USD=5.00` for a per-process
|
|
23
|
+
cost cap — the adapter refuses the next call that would exceed it.
|
|
24
|
+
4. Run via Node's built-in env-file loader (Node 20.6+):
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
node --env-file=contextkit/.env contextkit/tools/scripts/media-gen.mjs <kind> ...
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
### Image
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
node --env-file=contextkit/.env contextkit/tools/scripts/media-gen.mjs image \
|
|
36
|
+
--prompt "editorial product hero, asymmetric grid, single bold cyan accent" \
|
|
37
|
+
--out public/hero.png \
|
|
38
|
+
--aspect-ratio 16:9
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Video
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
node --env-file=contextkit/.env contextkit/tools/scripts/media-gen.mjs video \
|
|
45
|
+
--prompt "macro slow-motion of a single drop of ink hitting paper" \
|
|
46
|
+
--out public/hero.mp4 \
|
|
47
|
+
--duration 8 \
|
|
48
|
+
--aspect-ratio 16:9
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Dry-run (no API call, no charge)
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
node contextkit/tools/scripts/media-gen.mjs image --prompt "..." --out path.png --dry-run
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Prints what would be sent, including whether the required env vars are
|
|
58
|
+
present. Useful for sanity-checking a prompt or confirming the cost
|
|
59
|
+
cap is configured before the first paid call.
|
|
60
|
+
|
|
61
|
+
## Behaviour
|
|
62
|
+
|
|
63
|
+
- **Refuse-on-missing-creds (rule 8).** Without `GOOGLE_AI_API_KEY`
|
|
64
|
+
set, the script exits with `NO_CREDENTIALS` pointing at
|
|
65
|
+
`contextkit/.env.example`. Never silently substitutes a placeholder.
|
|
66
|
+
- **Refuse-on-content-policy.** Google's API rejects some prompts;
|
|
67
|
+
the script exits with `CONTENT_POLICY`. Refine the prompt and
|
|
68
|
+
retry.
|
|
69
|
+
- **Cost-cap guard.** When `CONTEXTDEVKIT_MEDIA_MAX_USD` is set, the
|
|
70
|
+
adapters keep a per-process running total and refuse the next call
|
|
71
|
+
that would push it over the cap.
|
|
72
|
+
- **Atomic file write.** The output file is written with the parent
|
|
73
|
+
directory created on demand (`mkdir -p`-style).
|
|
74
|
+
|
|
75
|
+
## What this does NOT do
|
|
76
|
+
|
|
77
|
+
- **No cache.** Re-running the same prompt re-charges the API.
|
|
78
|
+
Content-addressed cache is a follow-up (ticket 056).
|
|
79
|
+
- **No third provider.** Runway, Luma, Midjourney are not in scope.
|
|
80
|
+
Rule 9 — next consumer justifies the next adapter.
|
|
81
|
+
- **No automatic invocation.** This command never runs by itself.
|
|
82
|
+
Each call is explicit and the user accepts the cost.
|
|
83
|
+
- **No Vertex AI / OAuth flow.** Single-key API only. ADR-0024 spells
|
|
84
|
+
out why (rule 1 — token refresh breaks zero-dep).
|
|
85
|
+
|
|
86
|
+
## When to use it
|
|
87
|
+
|
|
88
|
+
- Hero imagery on a landing page when stock photos would read as
|
|
89
|
+
generic (most landing pages on the playbook's anti-Lovable list).
|
|
90
|
+
- Domain-specific renders for a marketing site (illustrate the
|
|
91
|
+
actual product, not "person at laptop").
|
|
92
|
+
- Demo footage when a real recording would be slower to produce
|
|
93
|
+
than to generate.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a new ADR (Architecture Decision Record). Use BEFORE implementing a big decision.
|
|
3
|
+
argument-hint: <ADR title>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Create a new Architecture Decision Record for: **$ARGUMENTS**
|
|
7
|
+
|
|
8
|
+
0. **Check for an existing decision first** [ADR-0027]: run
|
|
9
|
+
`node contextkit/tools/scripts/adr-digest.mjs --search "<key terms from the title>"`.
|
|
10
|
+
If an ADR already covers this, extend or supersede it rather than create a duplicate.
|
|
11
|
+
|
|
12
|
+
1. Find the next ADR number: list `contextkit/memory/decisions/`, take the highest `NNNN` + 1
|
|
13
|
+
(zero-padded to 4 digits). The `0000` meta-ADR and `_TEMPLATE.md` do not count as the latest
|
|
14
|
+
numbered decision beyond their own number.
|
|
15
|
+
|
|
16
|
+
2. Copy the structure from `contextkit/memory/decisions/_TEMPLATE.md` into a new file
|
|
17
|
+
`contextkit/memory/decisions/<NNNN>-<kebab-slug>.md`.
|
|
18
|
+
|
|
19
|
+
3. Fill in:
|
|
20
|
+
- **Status**: `Proposed` (the user accepts it later).
|
|
21
|
+
- **Context**: the forces at play — why a decision is needed now.
|
|
22
|
+
- **Decision**: what we will do, stated plainly.
|
|
23
|
+
- **Consequences**: trade-offs, what becomes easier/harder, follow-ups.
|
|
24
|
+
- If this supersedes an earlier ADR, note `Supersedes ADR-XXXX` and update the old one's status
|
|
25
|
+
to `Superseded by ADR-<NNNN>`.
|
|
26
|
+
|
|
27
|
+
4. Show the user the draft and ask for confirmation before marking it `Accepted`.
|
|
28
|
+
|
|
29
|
+
ADRs are immutable once `Accepted` — to change a decision, write a new ADR that supersedes it.
|
|
30
|
+
Never delete or rewrite an accepted ADR.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start a focused session on one objective — locks scope, blocks opportunistic refactors.
|
|
3
|
+
argument-hint: <session objective>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🎯 Mode: Focused Dev
|
|
7
|
+
|
|
8
|
+
You just entered **dev-start** mode with the objective:
|
|
9
|
+
|
|
10
|
+
> **$ARGUMENTS**
|
|
11
|
+
|
|
12
|
+
## Posture for this session (until told otherwise)
|
|
13
|
+
|
|
14
|
+
1. **Sync preflight — look at GitHub *before* coding** [ADR-0026]. Run:
|
|
15
|
+
```
|
|
16
|
+
node contextkit/tools/scripts/sync-check.mjs preflight
|
|
17
|
+
```
|
|
18
|
+
It reports ahead/behind, recent **in-flight branches**, and **open PRs with
|
|
19
|
+
their CI/review status** (flagging any *awaiting status*). If an open PR or a
|
|
20
|
+
recent branch overlaps this objective, **surface it and confirm with the user
|
|
21
|
+
before duplicating work** — coordinate or `/claim` first. `gh` missing/unauthed
|
|
22
|
+
degrades to the git-only view; it never blocks. Behind upstream? `git pull`
|
|
23
|
+
before editing.
|
|
24
|
+
|
|
25
|
+
2. **Read the current state first** — run `node contextkit/tools/scripts/context-pack.mjs`
|
|
26
|
+
[ADR-0027]: **one** bounded bundle (latest-session digest + `[Unreleased]` +
|
|
27
|
+
immutable rules + open backlog + recent ADRs) in a single call instead of
|
|
28
|
+
opening each file. Open a full source only if the pack flags something to inspect.
|
|
29
|
+
|
|
30
|
+
3. **Define IN-SCOPE / OUT-OF-SCOPE explicitly** from the objective. Show the user:
|
|
31
|
+
```
|
|
32
|
+
✅ IN-SCOPE: <what we will touch>
|
|
33
|
+
❌ OUT-OF-SCOPE: <what we will NOT touch, even if tempting>
|
|
34
|
+
```
|
|
35
|
+
Ask for confirmation before proceeding if there is ambiguity.
|
|
36
|
+
|
|
37
|
+
4. **Scope lock during the session**:
|
|
38
|
+
- Do NOT suggest refactors in files outside IN-SCOPE.
|
|
39
|
+
- Do NOT "while we're here" rename/reorganize adjacent code.
|
|
40
|
+
- Do NOT add new dependencies without asking.
|
|
41
|
+
- If you spot a problem out of scope, **note it** and mention it at the END
|
|
42
|
+
("for next session: X, Y, Z") — do not act on it now.
|
|
43
|
+
|
|
44
|
+
5. **Break the objective into 3–7 concrete tasks** and track them with TodoWrite.
|
|
45
|
+
|
|
46
|
+
6. **Per-task scratch (optional)**: if you accumulate ephemeral notes while a
|
|
47
|
+
ticket is in `contextkit/pipeline/testing/`, drop them in a sibling file named
|
|
48
|
+
`NNN-*.scratch.md` next to the ticket. The pipeline's `.gitignore` excludes
|
|
49
|
+
`*.scratch.md` — scratches are local-only. At conclude time, summarise the
|
|
50
|
+
useful parts into the ticket body and let the scratch be discarded.
|
|
51
|
+
|
|
52
|
+
7. **Before opening a PR — re-check sync** [ADR-0026]. Run
|
|
53
|
+
`node contextkit/tools/scripts/sync-check.mjs prepr` (or just use `/git pr`, which
|
|
54
|
+
runs it): it re-confirms you are not behind `main` and that **no open PR
|
|
55
|
+
already exists for this branch** before you create one. Don't duplicate a PR;
|
|
56
|
+
push to update the existing one.
|
|
57
|
+
|
|
58
|
+
8. **At the end**: offer `/log-session` (or `/new-adr` if an architectural decision was made).
|
|
59
|
+
|
|
60
|
+
## Why this mode exists
|
|
61
|
+
|
|
62
|
+
Sessions without a defined focus tend to become giant refactors that mix intentional change with
|
|
63
|
+
incidental cleanup — impossible to review, and the changelog becomes a patchwork. Scope-locking
|
|
64
|
+
fixes that at the root.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: The DevPipeline manager — production board for bugs, increments, chores and roadmap tasks (backlog → testing → done).
|
|
3
|
+
argument-hint: [show | add | move <id> <stage> | from-roadmap]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🛠️ DevPipeline
|
|
7
|
+
|
|
8
|
+
The execution control panel — **distinct from the product roadmap**. The roadmap
|
|
9
|
+
(`contextkit/memory/roadmap.md`) is the product/business plan (the *what/why*). The
|
|
10
|
+
DevPipeline is *how work actually flows*: bugs, increments, chores, and roadmap
|
|
11
|
+
items broken into tasks, each with priority + SLA, moving through three stages:
|
|
12
|
+
`backlog → testing → conclusion`. Tasks are files under `contextkit/pipeline/<stage>/`;
|
|
13
|
+
`devpipeline.md` is the generated dashboard.
|
|
14
|
+
|
|
15
|
+
Act as the **manager** of this board based on **$ARGUMENTS**:
|
|
16
|
+
|
|
17
|
+
- **show** (default) — `node contextkit/tools/scripts/pipeline.mjs sync` then read
|
|
18
|
+
`contextkit/pipeline/devpipeline.md`; summarize what's in flight, what's next by
|
|
19
|
+
priority, and any SLA at risk. Recommend the single next task to pull.
|
|
20
|
+
- **add** — create a task:
|
|
21
|
+
```
|
|
22
|
+
node contextkit/tools/scripts/pipeline.mjs add --type <bug|feature|increment|chore> \
|
|
23
|
+
--priority <P0-P3> --title "..." [--sla YYYY-MM-DD] [--roadmap P2.3]
|
|
24
|
+
```
|
|
25
|
+
Then open the new file in `contextkit/pipeline/backlog/` and fill the context +
|
|
26
|
+
acceptance criteria.
|
|
27
|
+
- **move** — `node contextkit/tools/scripts/pipeline.mjs move <id> <backlog|testing|conclusion>`
|
|
28
|
+
as work progresses (testing when you start; conclusion when accepted). For a
|
|
29
|
+
concluded task, add a short outcome report to its file.
|
|
30
|
+
- **from-roadmap** — read `contextkit/memory/roadmap.md`, pick the next milestone,
|
|
31
|
+
and break it into a few concrete backlog tasks (`--roadmap <P-ID>` cross-ref).
|
|
32
|
+
Keep the non-duplication rule: roadmap = product capabilities; pipeline = the
|
|
33
|
+
tasks/bugs/increments to deliver and maintain them.
|
|
34
|
+
|
|
35
|
+
Always run `sync` after changes so `devpipeline.md` reflects reality. Treat P0/SLA
|
|
36
|
+
items as the priority. This board is the "boss" that keeps execution honest.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Re-bind the current Claude Code session to a previously-unregistered ledger so the in-flight narrative can be finished and properly /log-session'd. (ticket 046)
|
|
3
|
+
allowed-tools: Bash(node:*)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The boot context flags drift when a session ended without
|
|
7
|
+
`/log-session` — important files were modified but the session never
|
|
8
|
+
registered. Today the only options are to (a) start fresh and orphan
|
|
9
|
+
the drift, or (b) piece together what happened from `git status` and
|
|
10
|
+
the per-session ledger. `/resume` is the third option: continue the
|
|
11
|
+
**same** session.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- Boot context shows "Session `<sid>` ended without `/log-session`"
|
|
16
|
+
- You know which session was yours
|
|
17
|
+
- The files modified by that session are still on disk
|
|
18
|
+
- You want to finish what you started and `/log-session` it as one
|
|
19
|
+
continuous session, not as two disconnected ones
|
|
20
|
+
|
|
21
|
+
## How
|
|
22
|
+
|
|
23
|
+
List the unregistered candidates:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
node contextkit/tools/scripts/resume.mjs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Resume to a specific session id (full or a unique prefix is enough):
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
node contextkit/tools/scripts/resume.mjs <session-id>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
After re-bind: subsequent track-edits append to the resumed session's
|
|
36
|
+
ledger; claims (if any) are re-asserted under the same id; `/log-session`
|
|
37
|
+
will register the resumed session normally.
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
3 unregistered session(s) — candidates for /resume:
|
|
43
|
+
|
|
44
|
+
b77d8b21-60a · 17 edit(s) · started 6h ago · 2 claim(s)
|
|
45
|
+
d48bdf9c-ab2 · 8 edit(s) · started 4h ago
|
|
46
|
+
04b759ee-ef9 · 12 edit(s) · started 2h ago
|
|
47
|
+
|
|
48
|
+
Resume with: node contextkit/tools/scripts/resume.mjs <session-id>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Refusal modes
|
|
52
|
+
|
|
53
|
+
Per rule 8 (refuse, don't assume):
|
|
54
|
+
|
|
55
|
+
| Situation | Exit | Message |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| target id not present in `.claude/.sessions/` | 1 | "session not found among unregistered drift candidates" |
|
|
58
|
+
| target id is already registered | 1 | "already registered — nothing to resume" |
|
|
59
|
+
| target's path claims overlap an active session | 1 | "cannot resume: path(s) claimed by another active session" |
|
|
60
|
+
|
|
61
|
+
No silent invention. No partial resume.
|
|
62
|
+
|
|
63
|
+
## What `/resume` does NOT do
|
|
64
|
+
|
|
65
|
+
- It does **not** alter the historical ledger — only the `.last-touched`
|
|
66
|
+
pointer (which session is "current").
|
|
67
|
+
- It does **not** re-create files that were deleted by the previous
|
|
68
|
+
session. That's git's job, not ours.
|
|
69
|
+
- It does **not** auto-`/log-session`. Resume + finish + log are
|
|
70
|
+
three deliberate steps.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: L6 — learning loop. Turn recurring drift/debt/patterns from recent work into concrete governance (rules + ADRs).
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🔁 Retro (learning loop)
|
|
6
|
+
|
|
7
|
+
Look back at recent work and convert repeated friction into durable improvements
|
|
8
|
+
to how this project is built. Output proposals — apply only with the user's OK.
|
|
9
|
+
|
|
10
|
+
1. **Gather signal:**
|
|
11
|
+
- `node contextkit/tools/scripts/stats.mjs --json` (drift rate, cadence).
|
|
12
|
+
- `node contextkit/tools/scripts/tech-debt-scan.mjs --json` (recurring smells).
|
|
13
|
+
- The last ~10 sessions as a **compact digest** [ADR-0027]:
|
|
14
|
+
`node contextkit/tools/scripts/session-digest.mjs --last 10` (corrections the
|
|
15
|
+
user repeated, conventions that emerged, decisions made informally) — open a
|
|
16
|
+
full log only when a digest flags something to inspect.
|
|
17
|
+
- `git log` since the last few sessions (what actually changed).
|
|
18
|
+
|
|
19
|
+
2. **Find patterns**, not one-offs: the same correction 3×, a debt category that
|
|
20
|
+
keeps growing, a rule that's implied but unwritten, a decision never recorded.
|
|
21
|
+
|
|
22
|
+
3. **Propose concrete governance:**
|
|
23
|
+
- **CLAUDE.md edits** — a new immutable rule or convention (keep it lean).
|
|
24
|
+
This overlaps with `/distill-sessions`; reuse it for the CLAUDE.md diff.
|
|
25
|
+
- **New ADRs** — for decisions that were made but never written down.
|
|
26
|
+
- **Config tweaks** — e.g. add a path to `l5.highRiskPaths` or
|
|
27
|
+
`qa.criticalPaths` that keeps breaking.
|
|
28
|
+
- **Habit nudges** — e.g. "drift rate 40% → register sessions".
|
|
29
|
+
|
|
30
|
+
4. Present the proposals ranked by impact. On approval, apply via `/distill-apply`
|
|
31
|
+
(CLAUDE.md + ADR in one commit) and `/context-config` (config), then `/log-session`.
|
|
32
|
+
|
|
33
|
+
The point: the platform should get *smarter about this project* over time, not
|
|
34
|
+
just enforce static rules.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List recent task transitions + pipeline runs from the state.json substrate (ADR-0015 Part C). Read-only, token-light.
|
|
3
|
+
allowed-tools: Bash(node:*)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Lists the **last N in-flight items** — DevPipeline tasks and squad pipeline
|
|
7
|
+
runs — by reading `contextkit/pipeline/<id>/state.json`. Read-only; never
|
|
8
|
+
mutates state.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- "What was I working on yesterday?" — recent task transitions
|
|
13
|
+
- "Did the forge pipeline succeed?" — last few pipeline runs
|
|
14
|
+
- A quick activity log when `contextkit/memory/SESSIONS.md` is too coarse
|
|
15
|
+
|
|
16
|
+
## How
|
|
17
|
+
|
|
18
|
+
Run the script:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
node contextkit/tools/scripts/runs.mjs
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Flags (combine freely):
|
|
25
|
+
|
|
26
|
+
| Flag | Effect |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `--kind task` | only DevPipeline tasks |
|
|
29
|
+
| `--kind pipeline-run` | only squad pipeline executions |
|
|
30
|
+
| `--limit N` | override the default cap (20) |
|
|
31
|
+
| `--all` | no cap |
|
|
32
|
+
| `--json` | machine-readable output |
|
|
33
|
+
|
|
34
|
+
## Output shape
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
📋 tasks
|
|
38
|
+
────────────────────────────────────────────
|
|
39
|
+
🔵 039 [working ] · reiTavares · feat/foo · started 12m ago
|
|
40
|
+
✅ 038 [done ] · reiTavares · main · ended 2h ago (35m 12s)
|
|
41
|
+
|
|
42
|
+
🤖 pipeline runs
|
|
43
|
+
────────────────────────────────────────────
|
|
44
|
+
✅ agent-forge-001 [done ] 8/8 steps (eval-gate×1) · ended 1h ago (4m 22s)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The status badges mirror the DevPipeline board:
|
|
48
|
+
`📋` backlog · `🔵` working · `🟡` testing · `✅` done · `🔄` running ·
|
|
49
|
+
`⏸` blocked-on-checkpoint · `❌` failed.
|
|
50
|
+
|
|
51
|
+
## What you can do next
|
|
52
|
+
|
|
53
|
+
- `/pipeline start <id>` / `/pipeline stop <id>` for task transitions
|
|
54
|
+
- `/context-stats` for aggregate telemetry (Forge Stats reads the same substrate)
|
|
55
|
+
- `/runs --json` to feed another tool
|
|
56
|
+
|
|
57
|
+
## Refusal
|
|
58
|
+
|
|
59
|
+
When no state files exist yet, the command prints a single line:
|
|
60
|
+
|
|
61
|
+
> No runs yet. Start a task with `/pipeline start <id>` or run a squad pipeline.
|
|
62
|
+
|
|
63
|
+
— and exits 0. This is intentional: a quiet project is not an error.
|