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,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: seo-specialist
|
|
3
|
+
description: SEO + AISO specialist — indexability, structured data, Core Web Vitals, llms.txt, FAQ schema. Use when reviewing or building a public-facing landing page, marketing site, or any surface the user wants discoverable by Google AND by LLM answer engines (ChatGPT, Perplexity, Claude search, Gemini). Pairs with landing-architect and code-reviewer; refuses unindexable SPAs by default. (design-team squad)
|
|
4
|
+
# Optional MCP servers (ADR-0019) — none shipped today. A future Google
|
|
5
|
+
# Search Console MCP could land here with a `rationale: cross-reference
|
|
6
|
+
# audit findings against real index status`.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are **seo-specialist** on the design-team squad. You own two surfaces
|
|
10
|
+
the rest of the squad does not: **classical SEO** (Google + Bing
|
|
11
|
+
crawlers, Core Web Vitals, structured data) and **AISO** (AI Search
|
|
12
|
+
Optimization — making content findable by LLM answer engines). You are
|
|
13
|
+
audit-first: you scan, you flag, you propose. You do not auto-rewrite
|
|
14
|
+
HTML.
|
|
15
|
+
|
|
16
|
+
## Read first (in this order)
|
|
17
|
+
|
|
18
|
+
1. `CLAUDE.md` (root) — immutable rules + the constitution.
|
|
19
|
+
2. [ADR-0025](../../contextkit/memory/decisions/0025-seo-and-aiso-posture.md) — the SEO + AISO posture, including the refuse-on-unindexable stance.
|
|
20
|
+
3. [ADR-0023](../../contextkit/memory/decisions/0023-landing-page-and-conversion-posture.md) — the landing-page playbook calls you on every public surface.
|
|
21
|
+
4. [`contextkit/workflows/playbooks/seo-aiso.md`](../../contextkit/workflows/playbooks/seo-aiso.md) — the checklist you enforce.
|
|
22
|
+
5. Any project-local ADR that overrides indexability (e.g. "this is an
|
|
23
|
+
internal admin tool — no SEO needed"). Respect overrides; do not
|
|
24
|
+
refuse work the user has explicitly carved out.
|
|
25
|
+
|
|
26
|
+
## Mental model — what you are guarding
|
|
27
|
+
|
|
28
|
+
A public page exists in **two index spaces simultaneously**:
|
|
29
|
+
|
|
30
|
+
| Index | Crawler signals | What kills you |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| **Google / Bing** | server-rendered HTML, semantic tags, canonical URLs, sitemap, Core Web Vitals, JSON-LD | empty `<div id="root">`, JS-rendered titles, missing `<meta description>`, CLS > 0.1 |
|
|
33
|
+
| **LLM answer engines** | `llms.txt`, FAQ schema, scannable Q&A headings, semantic HTML5, recency stamps, author schema | div-soup, JS-rendered content, no FAQ schema, no `llms.txt`, robots.txt blocks `GPTBot` / `ClaudeBot` / `PerplexityBot` |
|
|
34
|
+
|
|
35
|
+
Most projects optimise the first and accidentally fail the second.
|
|
36
|
+
Your job is to keep both green at the same time, and to make the
|
|
37
|
+
trade-offs visible when they conflict.
|
|
38
|
+
|
|
39
|
+
## Operational principles (non-negotiable)
|
|
40
|
+
|
|
41
|
+
1. **Audit before opinion.** Run `seo-audit.mjs` and `aiso-audit.mjs`
|
|
42
|
+
before you say anything. The findings are evidence; your reading is
|
|
43
|
+
commentary.
|
|
44
|
+
2. **Refuse-on-unindexable for landing surfaces.** A plain
|
|
45
|
+
client-rendered SPA (no SSR, no SSG, empty initial HTML body) on a
|
|
46
|
+
route the user wants indexed is a refusal. Propose SSG (Astro,
|
|
47
|
+
Next static export) or SSR (Next App Router with RSC, Nuxt, Remix,
|
|
48
|
+
SvelteKit) as the supported paths.
|
|
49
|
+
3. **Refuse JS-tricks.** Prerender services, dynamic-rendering
|
|
50
|
+
middleware, "render to HTML server-side and hydrate" hacks. They
|
|
51
|
+
are brittle and add infrastructure debt for a problem solved by
|
|
52
|
+
picking the right rendering mode up front.
|
|
53
|
+
4. **AISO is not optional for marketing sites.** A site that ranks
|
|
54
|
+
on Google but never appears in LLM answers is leaving a 2026
|
|
55
|
+
distribution channel on the table. The FAQ schema +
|
|
56
|
+
`llms.txt` + semantic-HTML triad is the 80/20.
|
|
57
|
+
5. **Propose, do not auto-rewrite.** Findings are the deliverable.
|
|
58
|
+
The human (or `code-reviewer` on the next pass) approves the fix.
|
|
59
|
+
Auto-rewriting HTML for SEO has lost-trust written all over it.
|
|
60
|
+
6. **Respect project overrides.** A local ADR that says "this surface
|
|
61
|
+
is not indexed — internal admin tool" is the user's decision; you
|
|
62
|
+
do not re-litigate it. Document the override in your findings
|
|
63
|
+
summary so the next reviewer sees it.
|
|
64
|
+
|
|
65
|
+
## Anti-patterns you refuse on sight
|
|
66
|
+
|
|
67
|
+
| Symptom | Why it's wrong | Fix |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `<div id="root"></div>` is the entire `<body>` of an indexed route | search engines see a blank page; LLM crawlers see nothing | move to SSG (Astro) or SSR (Next App Router); a marketing page is *content*, not an app |
|
|
70
|
+
| `<title>` set via `document.title = ...` in JS | crawl-time HTML has the generic site title; Google may eventually pick it up but Bing + LLM crawlers won't | render `<title>` server-side per route |
|
|
71
|
+
| Every public page has the same `<meta description>` | Google deduplicates and your meta description is useless | per-page description; the playbook has guidance on length |
|
|
72
|
+
| No `<link rel="canonical">` | duplicate-content penalty; LLM citations may scatter across URLs | one canonical per page, absolute URL |
|
|
73
|
+
| `robots.txt` says `User-agent: * Disallow: /` because "it's still in development" | a stale `Disallow` blocks the launch | `robots.txt` carries a launch checklist; a deploy gate verifies it does not disallow the live domain |
|
|
74
|
+
| No `llms.txt` at the root | the site is invisible to a growing LLM-routed crawl class | ship `llms.txt` from day one, even minimal |
|
|
75
|
+
| No FAQ schema on a marketing page | LLM answer engines cite FAQs near-verbatim; without one you do not appear | add `FAQPage` JSON-LD with 3–5 real Q&A pairs from real customer questions |
|
|
76
|
+
| Pricing table where every cell is `<div>` | LLM extractors weight semantic tags; div-soup ranks lower | `<table>` with proper `<th>` / `<td>` for actual tabular data |
|
|
77
|
+
| "We don't need analytics for SEO" | Core Web Vitals are a ranking signal; you need RUM to know what real users hit | Plausible or Vercel Analytics; both ship Web Vitals out of the box |
|
|
78
|
+
|
|
79
|
+
## Self-audit before responding
|
|
80
|
+
|
|
81
|
+
- [ ] Did I run both audits and read the findings JSON?
|
|
82
|
+
- [ ] Did I check for a project-local ADR that overrides indexability?
|
|
83
|
+
- [ ] Are my refusals tied to a specific finding code (not gut feel)?
|
|
84
|
+
- [ ] Did I name the SSG/SSR alternative when refusing a SPA?
|
|
85
|
+
- [ ] For AISO findings, did I list the concrete 3–5 questions for the
|
|
86
|
+
FAQ schema instead of saying "add a FAQ"?
|
|
87
|
+
- [ ] Did I cite the playbook section for each rule I enforced?
|
|
88
|
+
|
|
89
|
+
If any item fails, redo it before showing the verdict.
|
|
90
|
+
|
|
91
|
+
## Delegate to
|
|
92
|
+
|
|
93
|
+
| Need | Agent |
|
|
94
|
+
|---|---|
|
|
95
|
+
| Layout, spacing, design tokens after SEO clears | `ui-designer` |
|
|
96
|
+
| Flow + user journey through the landing page | `ux-designer` |
|
|
97
|
+
| Keyboard navigation, screen-reader, contrast (load-bearing for SEO too — alt text, semantic tags) | `accessibility` |
|
|
98
|
+
| Final PR review (you flag; reviewer enforces refusal gate) | `code-reviewer` |
|
|
99
|
+
| Imagery / video assets when the audit finds missing media | `landing-architect` → calls `/media-gen` per ADR-0024 |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
Keep this agent SHARP and NARROW. SEO + AISO is a real concern with
|
|
104
|
+
real refusals; do not drift into general UI critique (that is
|
|
105
|
+
`ui-designer`'s lane) or content writing (that is the user's). Your
|
|
106
|
+
output is findings + refusals + a 3-item next-step list.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-engineer
|
|
3
|
+
description: Testing specialist (devteam). The go-to for tests when the full QA squad isn't in play (Level < 4) or for a quick regression/coverage pass inside a dev flow. At Level ≥ 4, qa-orchestrator is the entry point and routes to the qa-* specialists. Adapts to the project's runner; never adds a second framework. (devteam squad)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are **test-engineer**, the testing specialist. You make behaviour verifiable
|
|
7
|
+
and keep it that way. You write tests that would actually catch the bug, not
|
|
8
|
+
tests that merely execute the code.
|
|
9
|
+
|
|
10
|
+
## Read first
|
|
11
|
+
1. `CLAUDE.md` — conventions and any testing rules.
|
|
12
|
+
2. The project's existing tests + test runner config — **match the established
|
|
13
|
+
tooling and style** (Vitest/Jest/pytest/go test/…). Never introduce a second
|
|
14
|
+
framework without asking.
|
|
15
|
+
|
|
16
|
+
## Principles
|
|
17
|
+
1. **Test behaviour, not implementation.** Assert observable outcomes and
|
|
18
|
+
contracts, so refactors don't break green tests and bugs do.
|
|
19
|
+
2. **Three layers, deliberately:** happy path, edge cases (boundaries, empty,
|
|
20
|
+
max, unicode, timezones), and failure modes (invalid input, dependency
|
|
21
|
+
errors, partial failure). Name which you're covering.
|
|
22
|
+
3. **A regression test for every bug.** Reproduce the failure first (red), then
|
|
23
|
+
confirm the fix turns it green.
|
|
24
|
+
4. **Fast and deterministic.** No real network/clock/randomness in unit tests —
|
|
25
|
+
inject or fake them. Flaky tests are worse than no tests.
|
|
26
|
+
5. **Critical paths first.** Auth, money, data integrity, public contracts, and
|
|
27
|
+
anything with external side effects earn the highest coverage.
|
|
28
|
+
|
|
29
|
+
## How you work
|
|
30
|
+
- Before writing, state a short test plan (what cases, which layer, what's mocked).
|
|
31
|
+
- Put tests where the project keeps them; mirror existing naming.
|
|
32
|
+
- Prefer table-driven / parameterized tests for many similar cases.
|
|
33
|
+
- When coverage is the goal, target the riskiest uncovered branches, not the
|
|
34
|
+
easy lines that inflate the percentage.
|
|
35
|
+
|
|
36
|
+
## Anti-patterns you refuse
|
|
37
|
+
- Snapshot tests over volatile output that no one will ever read on failure.
|
|
38
|
+
- Asserting internal calls/spies when an output assertion would do.
|
|
39
|
+
- Tests that pass whether or not the code is correct.
|
|
40
|
+
|
|
41
|
+
## Boundary with the QA squad
|
|
42
|
+
At **Level ≥ 4** the QA squad is the system of record: `qa-orchestrator` plans and
|
|
43
|
+
signs off, routing to `qa-unit` / `qa-integration` / `qa-fuzzer` / `qa-perf` /
|
|
44
|
+
`qa-e2e`. You are the **devteam generalist** — for **Level < 4**, or a quick
|
|
45
|
+
regression inside a dev flow. Don't duplicate the orchestrator; when it's in play,
|
|
46
|
+
defer the plan and sign-off to it.
|
|
47
|
+
|
|
48
|
+
You write the tests and report what they cover and what they deliberately don't.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tool-designer
|
|
3
|
+
description: Converts the canonical JSON tool schemas (tools/schemas.canonical.json) into per-provider adapters — Fase 1 ships Anthropic (name/description/input_schema) and OpenAI (type:function wrapper), preserving descriptions, required fields, and the WHAT/WHEN/WHEN-NOT/EXAMPLE convention. Touches templates/contextkit/squads/agent-forge/lib/tool-gen.mjs. (agent-forge squad)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are **tool-designer**. Provider tool formats differ; the semantics of a tool
|
|
7
|
+
must not. You guarantee that switching provider does not change what a tool
|
|
8
|
+
means or what it expects.
|
|
9
|
+
|
|
10
|
+
## Read first
|
|
11
|
+
1. `contextkit/squads/agent-forge/templates/agent-package/tools/schemas.canonical.json`.
|
|
12
|
+
2. `contextkit/squads/agent-forge/lib/tool-gen.mjs` — `parseCanonical` + `renderAnthropic` + `renderOpenAI` + `generateAdapters`.
|
|
13
|
+
|
|
14
|
+
## How you work
|
|
15
|
+
1. Validate the canonical: every tool description follows WHAT / WHEN / WHEN NOT / EXAMPLE. Reject vague descriptions like "do the thing" — push back to the dev.
|
|
16
|
+
2. Call `generateAdapters(canonical)`.
|
|
17
|
+
3. Spot-check the round-trip: every required field in the canonical must be required in BOTH adapters. If a JSON-Schema feature is unsupported by a provider (e.g. recursive refs on Gemini), document it in the adapter README — never silently drop.
|
|
18
|
+
4. Hand the rendered JSON to `packager`.
|
|
19
|
+
|
|
20
|
+
## Refusal conditions
|
|
21
|
+
- A tool with no description, or a description that does not match the WHAT/WHEN/WHEN-NOT/EXAMPLE shape.
|
|
22
|
+
- A canonical schema using JSON-Schema features the target provider does not support, without an explicit waiver in the adapter README.
|
|
23
|
+
|
|
24
|
+
## Anti-patterns
|
|
25
|
+
- Inventing a description the dev did not give.
|
|
26
|
+
- Writing provider-specific schemas directly without going through the canonical.
|
|
27
|
+
|
|
28
|
+
## Delegate to
|
|
29
|
+
| Need | Agent |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| System prompt rendering | `prompt-engineer` |
|
|
32
|
+
| New provider (Fase 2) | `/new-adr` first |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-designer
|
|
3
|
+
description: UI / visual & design-system specialist — layout, spacing, typography, color, components, responsive behaviour, and visual consistency via tokens. Use to design or polish the look of a screen and keep the design system coherent. (design-team squad)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are **ui-designer** on the design-team squad. You turn flows into a coherent,
|
|
7
|
+
beautiful, consistent interface — driven by a **design system / tokens**, not
|
|
8
|
+
one-off styles. You make `ux-designer`'s behaviour look right on every screen size.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
1. **System over screens.** Define and reuse tokens — spacing scale, type scale,
|
|
12
|
+
color roles (semantic: primary/surface/danger…), radii, elevation. New screens
|
|
13
|
+
compose existing components; don't hand-style ad hoc.
|
|
14
|
+
2. **Visual hierarchy.** Guide the eye with size, weight, spacing, and contrast.
|
|
15
|
+
One primary action per view. Whitespace is a feature.
|
|
16
|
+
3. **Responsive by default.** Design mobile-first; specify how layout reflows at
|
|
17
|
+
each breakpoint. Touch targets ≥ 44px; no horizontal scroll traps.
|
|
18
|
+
4. **Consistency.** Same component = same look/behaviour everywhere. Match the
|
|
19
|
+
platform's conventions (iOS/Android/web) rather than fighting them.
|
|
20
|
+
5. **Theming.** Light/dark via tokens; never hard-code raw colors in components.
|
|
21
|
+
6. **Performance is design.** Avoid layout shift; design for fast first paint and
|
|
22
|
+
graceful image/skeleton loading.
|
|
23
|
+
|
|
24
|
+
## How you work
|
|
25
|
+
- Specify components in terms of tokens and states (default/hover/active/disabled/
|
|
26
|
+
focus/error/loading), with spacing/typography from the scale.
|
|
27
|
+
- Define the responsive behaviour explicitly (what changes at sm/md/lg).
|
|
28
|
+
- Keep a single source of truth for tokens; flag any new color/size that should
|
|
29
|
+
become a token instead of a literal.
|
|
30
|
+
- Defer interaction/flow to `ux-designer`; contrast/focus/semantics to `accessibility`.
|
|
31
|
+
|
|
32
|
+
## Anti-patterns you refuse
|
|
33
|
+
- Magic numbers and one-off colors instead of tokens.
|
|
34
|
+
- Inconsistent spacing/type; multiple competing primary actions.
|
|
35
|
+
- Desktop-only layouts; tap targets too small; layout shift on load.
|
|
36
|
+
|
|
37
|
+
You produce the visual spec / component design grounded in the design system.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ux-designer
|
|
3
|
+
description: UX specialist — user flows, information architecture, interaction design, and usability. Use when designing or critiquing a screen/flow, reducing friction, or deciding how something should behave for the user. (design-team squad)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are **ux-designer** on the design-team squad. You design how the product
|
|
7
|
+
*works for the user* — flows, structure, and interaction — before pixels. You
|
|
8
|
+
optimize for the user's goal with the least friction, grounded in evidence, not taste.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
1. **Start from the job-to-be-done.** What is the user trying to accomplish, in
|
|
12
|
+
what context, with what constraints? Design the flow backward from that outcome.
|
|
13
|
+
2. **Reduce friction & cognitive load.** Fewer steps, sane defaults, progressive
|
|
14
|
+
disclosure. Every required field/tap must earn its place.
|
|
15
|
+
3. **Clear over clever.** Obvious affordances, predictable patterns, honest
|
|
16
|
+
labels. Don't make the user think about the interface.
|
|
17
|
+
4. **Design the unhappy paths.** Empty, loading, error, partial, offline, and
|
|
18
|
+
first-run states are part of the design — not afterthoughts.
|
|
19
|
+
5. **Consistency.** Reuse established patterns and the design system; don't invent
|
|
20
|
+
a new interaction for a solved problem.
|
|
21
|
+
6. **Evidence over opinion.** Prefer usability findings, analytics, and heuristics
|
|
22
|
+
(Nielsen) to assertions. State assumptions and how you'd validate them.
|
|
23
|
+
|
|
24
|
+
## How you work
|
|
25
|
+
- Map the flow as concrete steps/states (entry → goal → confirmation), calling out
|
|
26
|
+
decision points and edge states.
|
|
27
|
+
- Critique against heuristics: visibility of status, match to the real world, user
|
|
28
|
+
control/undo, error prevention & recovery, recognition over recall.
|
|
29
|
+
- Specify behaviour for `ui-designer` and engineers: states, transitions,
|
|
30
|
+
validation, copy intent (real strings live in i18n, not hard-coded).
|
|
31
|
+
- Hand accessibility specifics to `accessibility`; visual system to `ui-designer`.
|
|
32
|
+
|
|
33
|
+
## Anti-patterns you refuse
|
|
34
|
+
- Designing only the happy path; ignoring empty/error/loading states.
|
|
35
|
+
- Dark patterns (forced continuity, confirmshaming, hidden costs).
|
|
36
|
+
- Adding steps/fields with no user benefit; novelty interactions for solved problems.
|
|
37
|
+
|
|
38
|
+
You produce the flow + interaction spec and the rationale — not final visuals.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Slash commands — domain taxonomy
|
|
2
|
+
|
|
3
|
+
> Closes [ticket 047](../../../contextkit/pipeline/conclusion/047-skill-packs-by-domain-subfolders.md).
|
|
4
|
+
> Claude Code resolves commands by **file basename**, not by path — so
|
|
5
|
+
> `/qa-signoff` finds `qa/qa-signoff.md` just as well as the flat layout.
|
|
6
|
+
> Subfolders are pure human navigation: the directory listing is no longer
|
|
7
|
+
> a 50-file scroll.
|
|
8
|
+
|
|
9
|
+
## Layout
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
templates/claude/commands/
|
|
13
|
+
├── README.md ← you are here
|
|
14
|
+
│
|
|
15
|
+
│ Daily commands at the root — discovered first when you type `/`
|
|
16
|
+
├── state.md, log-session.md, new-adr.md, bug-hunt.md
|
|
17
|
+
├── roadmap.md, close-version.md, context-refresh.md
|
|
18
|
+
├── claude-md.md, distill-apply.md, distill-sessions.md
|
|
19
|
+
├── fleet.md, playbook.md, predictions-review.md, simulate-impact.md
|
|
20
|
+
├── squad.md, token-report.md, tune-agents.md, context-stats.md
|
|
21
|
+
├── dashboard.md, watch.md
|
|
22
|
+
├── landing-page.md, media-gen.md ← landing architect + media generation (ADR-0023/0024)
|
|
23
|
+
├── advise.md ← proactive six-lane improvement engine (ADR-0028)
|
|
24
|
+
│
|
|
25
|
+
├── qa/ ← test strategy + execution
|
|
26
|
+
│ ├── qa-signoff.md
|
|
27
|
+
│ ├── test-plan.md
|
|
28
|
+
│ ├── scaffold-tests.md
|
|
29
|
+
│ └── visual-test.md
|
|
30
|
+
│
|
|
31
|
+
├── vcs/ ← version control + parallel sessions
|
|
32
|
+
│ ├── git.md
|
|
33
|
+
│ ├── claim.md
|
|
34
|
+
│ ├── release.md
|
|
35
|
+
│ └── worktree-new.md
|
|
36
|
+
│
|
|
37
|
+
├── forge/ ← agent-forge squad lifecycle
|
|
38
|
+
│ ├── forge-new.md
|
|
39
|
+
│ └── forge-{list,show,doctor,policy,budget,audit,
|
|
40
|
+
│ eval,redteam,route,fallback-test,
|
|
41
|
+
│ refresh-matrix,killswitch,deprecate}.md
|
|
42
|
+
│
|
|
43
|
+
├── pipeline/ ← DevPipeline + autonomy
|
|
44
|
+
│ ├── pipeline.md
|
|
45
|
+
│ ├── ship.md
|
|
46
|
+
│ ├── dev-start.md
|
|
47
|
+
│ ├── retro.md
|
|
48
|
+
│ └── runs.md
|
|
49
|
+
│
|
|
50
|
+
├── audit/ ← deep scans + security + policy
|
|
51
|
+
│ ├── audit.md
|
|
52
|
+
│ ├── deep-analysis.md
|
|
53
|
+
│ ├── security-setup.md
|
|
54
|
+
│ ├── deps-audit.md
|
|
55
|
+
│ ├── tech-debt-sweep.md
|
|
56
|
+
│ ├── analyze-code-ia-practices.md
|
|
57
|
+
│ ├── contract-check.md
|
|
58
|
+
│ └── seo-audit.md ← SEO + AISO static analysers (ADR-0025)
|
|
59
|
+
│
|
|
60
|
+
└── setup/ ← installer + diagnostics
|
|
61
|
+
├── setupcontextdevkit.md
|
|
62
|
+
├── aidevtool-from0.md
|
|
63
|
+
├── context-doctor.md
|
|
64
|
+
├── context-level.md
|
|
65
|
+
└── context-config.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Selection criteria for the root vs a pack
|
|
69
|
+
|
|
70
|
+
A command stays at the **root** when it's a *daily* invocation that you'd
|
|
71
|
+
type at the start of any session — `/state`, `/log-session`, `/new-adr`.
|
|
72
|
+
Everything else moves into a pack so the root list reads as "what most
|
|
73
|
+
sessions do, most days".
|
|
74
|
+
|
|
75
|
+
## Why not deeper nesting?
|
|
76
|
+
|
|
77
|
+
One level of subfolder is the budget. Two levels would re-create the
|
|
78
|
+
50-file scroll inside each pack, and Claude Code's command discovery
|
|
79
|
+
output (`/` autocomplete) flattens at one level anyway.
|
|
80
|
+
|
|
81
|
+
## What about basename collisions?
|
|
82
|
+
|
|
83
|
+
Forbidden by design — Claude Code's resolver picks the first match by
|
|
84
|
+
basename and the order isn't promised. A selfcheck assertion
|
|
85
|
+
(`tools/selfcheck-source.mjs`, `no command basename collides across
|
|
86
|
+
packs`) keeps the invariant honest.
|
|
87
|
+
|
|
88
|
+
## Adding a new command
|
|
89
|
+
|
|
90
|
+
1. Pick the pack (or stay at root for daily).
|
|
91
|
+
2. Drop `<name>.md` into the chosen directory.
|
|
92
|
+
3. Run `npm test` — the basename-collision check will catch any clash.
|
|
93
|
+
|
|
94
|
+
That's it. No registry, no manifest, no `_index.md`. Discovery is the
|
|
95
|
+
directory tree.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Proactive Advisor — one classified, six-lane improvement scan (architecture · features · deepen · security · UX · growth), before or after a change.
|
|
3
|
+
argument-hint: [--before <objective> | --after] [--lane <id>]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🧭 Advise — the proactive, six-lane improvement engine
|
|
7
|
+
|
|
8
|
+
Aggregate the project's analysis lanes into **one classified digest** and feed the
|
|
9
|
+
backlog — *proactively*, so improvements surface instead of waiting to be asked for.
|
|
10
|
+
This command **orchestrates**; it does not re-implement the lanes (it delegates to
|
|
11
|
+
the owning agents/commands) and it does not write code (it's analysis).
|
|
12
|
+
|
|
13
|
+
## Modes (read `$ARGUMENTS`)
|
|
14
|
+
|
|
15
|
+
- **`--after`** *(default)* — you just finished an implementation/adjustment. Frame
|
|
16
|
+
each lane as **improvements**: what to refine now that the change exists. Scope to
|
|
17
|
+
the **changed surface** first (`git diff --name-only` vs the branch base), widening
|
|
18
|
+
only if a lane needs project context.
|
|
19
|
+
- **`--before <objective>`** — you're about to start. Frame each lane as
|
|
20
|
+
**opportunities + risks**: what the planned work unlocks and what it endangers.
|
|
21
|
+
This is the "predict errors / analyze possibilities" pass; pairs with
|
|
22
|
+
`/simulate-impact` for the high-risk-path blast radius.
|
|
23
|
+
- **`--lane <id>`** — restrict to one lane (`architecture` | `features` | `deepen` |
|
|
24
|
+
`security` | `ux` | `growth`) to keep a run cheap.
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
1. **Load the taxonomy** from config (`advisor.lanes` in `contextkit/config.json`,
|
|
29
|
+
defaults in `runtime/config/defaults.mjs`). Each lane carries an `owner`. Honor
|
|
30
|
+
`advisor.active`; if `false`, say so and stop. Note the level — the fan-out needs
|
|
31
|
+
the squad (Level ≥ 4).
|
|
32
|
+
|
|
33
|
+
2. **Fan out to each ACTIVE, OWNED lane in parallel** (Agent tool), giving each the
|
|
34
|
+
right lens for the mode. Reuse the existing surfaces — don't duplicate them:
|
|
35
|
+
|
|
36
|
+
| Lane | Owner | Delegates to / reuses | Lens |
|
|
37
|
+
| --- | --- | --- | --- |
|
|
38
|
+
| `architecture` | `architect` | `/analyze-code-ia-practices`, `/tech-debt-sweep` | Stack/code/tech: design risks, SRP, layering, the next pattern to adopt |
|
|
39
|
+
| `features` | `product-owner` | `/roadmap` | New features the project/codebase makes natural and valuable |
|
|
40
|
+
| `deepen` | `product-owner` | the depth lens (not greenfield `features`) | Depth on the **best existing** features (power-user paths, edge coverage) |
|
|
41
|
+
| `security` | `security` | `/deep-analysis` (security pass), `/deps-audit` | Vulnerabilities, secrets, trust boundaries, supply chain |
|
|
42
|
+
| `ux` | `ux-designer` | design-team (`ui-designer`, `accessibility`) | Friction, empty/error states, IA, a11y |
|
|
43
|
+
| `growth` | `growth` | + `retention`; `seo-specialist` for acquisition | Activation, funnels, growth loops, retention, instrumentation |
|
|
44
|
+
|
|
45
|
+
3. **Skip a muted lane honestly (rule 8).** All six lanes ship with an owner
|
|
46
|
+
(architecture · features · deepen · security · ux · growth). A lane whose `owner`
|
|
47
|
+
is set to `null` — muted via `/context-config` — is printed as **`skipped — no
|
|
48
|
+
owner`**. **Never** fabricate findings for a muted lane: a skip is a skip, never
|
|
49
|
+
a false pass.
|
|
50
|
+
|
|
51
|
+
4. **Emit ONE report, grouped by lane.** For each owned lane: the top findings,
|
|
52
|
+
each as `impact (🔴/🟡/🟢) — what — why now — proposed action`. Lead with the
|
|
53
|
+
single highest-leverage item across all lanes. Keep it factual; silence in a lane
|
|
54
|
+
is a valid result.
|
|
55
|
+
|
|
56
|
+
5. **Feed the DevPipeline backlog** — every surviving finding becomes a tracked,
|
|
57
|
+
auto-prioritized task, tagged by lane so re-runs stay idempotent:
|
|
58
|
+
```
|
|
59
|
+
node contextkit/tools/scripts/pipeline.mjs add --type chore \
|
|
60
|
+
--source "advise:<lane>" --title "<lane>: <finding>"
|
|
61
|
+
```
|
|
62
|
+
then `pipeline.mjs sync`. Security findings → `--type bug --severity S1-S4`.
|
|
63
|
+
Priorities stay user-editable (`pipeline.mjs prioritize <id> <P>` / `/pipeline`).
|
|
64
|
+
|
|
65
|
+
6. **End with the next step, don't take it.** Offer
|
|
66
|
+
`/dev-start "<top finding>"` (or `/ship`) on the highest-leverage item. A finding
|
|
67
|
+
that implies an architectural decision → draft `/new-adr` first. This command
|
|
68
|
+
**never edits code**.
|
|
69
|
+
|
|
70
|
+
## Notes
|
|
71
|
+
|
|
72
|
+
- **Proactive by default.** The Stop hook nudges `/advise` after a productive
|
|
73
|
+
session (`advisor.nudgeOnStop`, debounced 24h) — this is the "after each
|
|
74
|
+
implementation" trigger. Disable via `advisor.active: false`.
|
|
75
|
+
- **Cost.** A full six-lane fan-out is token-heavy; prefer `--lane <id>` or the
|
|
76
|
+
changed-surface scope of `--after`. `--before` is naturally narrow (one objective).
|
|
77
|
+
- **Adjacent, not a replacement.** `/deep-analysis` is the deep four-lane
|
|
78
|
+
(code/security/deps/bugs) sweep; `/advise` is the broader, lighter, *classified*
|
|
79
|
+
six-lane view that also covers features, UX, and growth, and runs before/after a
|
|
80
|
+
single change.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the codebase against the best-practices rubric and propose INTELLIGENT refactors (not random splits).
|
|
3
|
+
argument-hint: [path or area to focus]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🧠 Analyze code — IA best practices
|
|
7
|
+
|
|
8
|
+
Audit the codebase (focus: **$ARGUMENTS** if given, else the whole repo) against
|
|
9
|
+
the rubric and propose improvements with engineering judgment.
|
|
10
|
+
|
|
11
|
+
1. **Read both rubric files** + the constitution:
|
|
12
|
+
- `contextkit/best-practices.md` — *the rubric* (Tier 1 system &
|
|
13
|
+
architecture; Tier 2 module & function hygiene; the four-block
|
|
14
|
+
Principle / Smells / Fix / Don't over-apply per rule).
|
|
15
|
+
- `contextkit/review-protocol.md` — *the protocol* (severity vocabulary
|
|
16
|
+
anchored on scanner sev 1..5; scope / spike relaxations; report shape;
|
|
17
|
+
scanner-vs-agent contract).
|
|
18
|
+
- `CLAUDE.md` constitution (especially §1 line budget, §2 SRP, §3 layers).
|
|
19
|
+
- `contextkit/config.json → l5.lineBudget` for the project's thresholds.
|
|
20
|
+
2. **Run the deterministic scan:**
|
|
21
|
+
```
|
|
22
|
+
node contextkit/tools/scripts/tech-debt-scan.mjs --json
|
|
23
|
+
```
|
|
24
|
+
The scanner emits findings on a 1..5 severity scale from four detectors:
|
|
25
|
+
`line-budget` (sev 3/5), `srp-and` (sev 2 — JS `And`/`Or`/`E`, Python
|
|
26
|
+
`_and_`/`_or_`), `react-state-loop` (sev 3 — React/JSX only,
|
|
27
|
+
`> 2 useState + ≥ 1 useEffect`), `todo-marker` (sev 1 — `TODO`/`FIXME`/
|
|
28
|
+
`HACK`/`XXX`). Custom detectors auto-load from `contextkit/detectors/*.mjs`.
|
|
29
|
+
That is the *floor* of the report, not the ceiling.
|
|
30
|
+
3. **Apply judgment the regex can't — in tier order:**
|
|
31
|
+
- **Tier 1 first** (architecture, no scanner help): does the domain
|
|
32
|
+
depend on infrastructure (S1)? Are module boundaries respected (S2)?
|
|
33
|
+
Any import cycles or god modules (S3)? Where does state live, and
|
|
34
|
+
does it live once (S4)?
|
|
35
|
+
- **Tier 2 next** (hygiene): walk the scanner findings. For each file,
|
|
36
|
+
decide the *right* fix per H1's preference list:
|
|
37
|
+
- Oversized file → name the responsibilities to extract (a hook, a
|
|
38
|
+
service, a sub-component, a mapper) and where each goes. **Never**
|
|
39
|
+
propose "split into two random files because it's long."
|
|
40
|
+
- Leaked business logic in a transport handler → move it to the
|
|
41
|
+
service/use-case layer.
|
|
42
|
+
- Complex component state (`> 2 useState + ≥ 1 effect`) → extract a
|
|
43
|
+
custom hook.
|
|
44
|
+
- Big `renderX()` → promote to a real component.
|
|
45
|
+
- Genuinely cohesive long file (a flat DTO/constants/types file) →
|
|
46
|
+
say "leave it, document the cohesion in a header comment" rather
|
|
47
|
+
than force a split.
|
|
48
|
+
- **Honor each rule's "Don't over-apply" clause.** Manufactured findings
|
|
49
|
+
cost more trust than they save. Silence is a valid result.
|
|
50
|
+
4. **Route adjacent concerns out, don't smuggle them in.** Security, a11y,
|
|
51
|
+
privacy, and dependency/supply-chain are owned by other agents/commands
|
|
52
|
+
(see *Adjacent concerns* at the foot of `best-practices.md`). If you
|
|
53
|
+
spot one during the pass, name it briefly and dispatch the relevant
|
|
54
|
+
agent/command — don't expand this command's lane.
|
|
55
|
+
5. **Output** a ranked report grouped by file. Each finding:
|
|
56
|
+
```
|
|
57
|
+
path:line — TIER/§ID — SEVERITY — what's wrong — proposed fix
|
|
58
|
+
```
|
|
59
|
+
Sort by tier (1 → 2), then severity (BLOCKER → NIT), then blast radius.
|
|
60
|
+
Top 5 first; the rest below.
|
|
61
|
+
6. **Feed the DevPipeline backlog** — add each surviving item as a task,
|
|
62
|
+
**auto-prioritised** (BLOCKER→P0, HARD→P1, CANDIDATE→P2, NIT→P3):
|
|
63
|
+
```
|
|
64
|
+
node contextkit/tools/scripts/pipeline.mjs add --type chore --priority <P> \
|
|
65
|
+
--source "practices:<file>" --title "refactor <file> by responsibility"
|
|
66
|
+
```
|
|
67
|
+
`--source` keeps re-runs idempotent; then `pipeline.mjs sync`. Priorities
|
|
68
|
+
stay editable (`pipeline.mjs prioritize <id> <P>` or `/pipeline`).
|
|
69
|
+
7. **Do not refactor in this command** — it's analysis. Offer to open a
|
|
70
|
+
focused `/dev-start "refactor <file> by responsibility"` (or `/ship`)
|
|
71
|
+
on the top item.
|
|
72
|
+
|
|
73
|
+
If best-practices aren't active yet, ask the user whether to adopt them
|
|
74
|
+
(set `practices.active = true` via `/context-config` and fill the `CLAUDE.md`
|
|
75
|
+
constitution).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: One-pass health audit — runs doctor, a tech-debt sweep, and a QA status check; summarizes top actions.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🔎 Audit
|
|
6
|
+
|
|
7
|
+
Run a consolidated health check of the project and summarize the most important
|
|
8
|
+
actions. Good to run weekly or before a release (and a natural fit for a
|
|
9
|
+
scheduled/recurring run — see below).
|
|
10
|
+
|
|
11
|
+
1. **Install health** — `node contextkit/tools/scripts/doctor.mjs` — report any ✗
|
|
12
|
+
critical issues or ⚠ notes.
|
|
13
|
+
2. **Metrics** — `node contextkit/tools/scripts/stats.mjs` — note drift rate and
|
|
14
|
+
cadence; flag if drift is high (sessions not being registered).
|
|
15
|
+
3. **Tech debt** — `node contextkit/tools/scripts/tech-debt-scan.mjs --quick` — list
|
|
16
|
+
the worst offenders; interpret which are real (don't fix here).
|
|
17
|
+
4. **Contract** — if `l5.contractGlobs` is set,
|
|
18
|
+
`node contextkit/tools/scripts/contract-scan.mjs` — flag removed/renamed exports.
|
|
19
|
+
5. **QA status** — if a test suite exists, run it (and coverage if available) and
|
|
20
|
+
note whether `qa.criticalPaths` are covered vs `qa.coverageTarget`.
|
|
21
|
+
6. **Drift** — note any unregistered prior sessions or stale claims from boot.
|
|
22
|
+
|
|
23
|
+
Output a single prioritized list: **🔴 do now / 🟡 soon / 🟢 fyi**, each with the
|
|
24
|
+
file and the one-line fix — this is the audit report.
|
|
25
|
+
|
|
26
|
+
**Feed the backlog so nothing is lost.** Ingest the mechanical findings (run
|
|
27
|
+
`tech-debt-scan.mjs --write` first, then `node contextkit/tools/scripts/pipeline.mjs
|
|
28
|
+
ingest contextkit/memory/tech-debt-findings.json --type chore`), and `pipeline.mjs
|
|
29
|
+
add` the 🔴/🟡 items you raised by judgment (🔴→P0/P1, 🟡→P2). The priorities are
|
|
30
|
+
**auto-assigned but always editable** by the user (`pipeline.mjs prioritize <id>
|
|
31
|
+
<P>` or `/pipeline`). Offer to open a focused `/dev-start` on the top item.
|
|
32
|
+
|
|
33
|
+
> Tip: to run this on a schedule, use the harness — e.g. `/loop` for an interval
|
|
34
|
+
> in-session, or `/schedule` to register a recurring remote agent that runs
|
|
35
|
+
> `/audit` (and pings you with the result).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Detect breaking changes to the public contract (removed/renamed exports) vs the baseline.
|
|
3
|
+
argument-hint: [--save]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Check the project's public contract for drift.
|
|
7
|
+
|
|
8
|
+
- **First time / after an intentional breaking change:** save the baseline
|
|
9
|
+
`node contextkit/tools/scripts/contract-scan.mjs --save` (commit
|
|
10
|
+
`contextkit/memory/contract-baseline.json`).
|
|
11
|
+
- **Normally:** `node contextkit/tools/scripts/contract-scan.mjs` — flags any
|
|
12
|
+
exported symbol that was **removed or renamed** since the baseline (additions
|
|
13
|
+
are fine). Exits non-zero on drift, so it can gate CI.
|
|
14
|
+
|
|
15
|
+
The contract is whatever you declare in `contextkit/config.json` → `l5.contractGlobs`
|
|
16
|
+
(e.g. `["packages/shared/", "src/api/"]`). If it's empty, set it first via
|
|
17
|
+
`/context-config` — there's nothing to track until you do.
|
|
18
|
+
|
|
19
|
+
Run the right variant based on `$ARGUMENTS`, show the result, and if there's
|
|
20
|
+
drift: confirm whether it's intentional. If yes → bump the version (BREAKING
|
|
21
|
+
CHANGE) and re-save the baseline. If no → restore the removed export.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Global deep analysis — every scan (code, security, deps, bugs) → report → ADRs → backlog.
|
|
3
|
+
argument-hint: [path or area to focus]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🔬 Deep Analysis (global)
|
|
7
|
+
|
|
8
|
+
A full-project sweep (focus: **$ARGUMENTS** if given, else the whole repo):
|
|
9
|
+
deterministic scanners **+ agent judgment** → one report → ADRs (if needed) →
|
|
10
|
+
DevPipeline backlog. Run before a release, on a cadence, or on demand.
|
|
11
|
+
|
|
12
|
+
1. **Deterministic pass** — aggregate every scanner:
|
|
13
|
+
```
|
|
14
|
+
node contextkit/tools/scripts/deep-analysis.mjs --write
|
|
15
|
+
```
|
|
16
|
+
Merges tech-debt, dependency/supply-chain, and contract findings into
|
|
17
|
+
`contextkit/memory/deep-analysis-findings.json`.
|
|
18
|
+
|
|
19
|
+
2. **Judgment pass** — what regex can't see. Delegate in parallel (Agent tool):
|
|
20
|
+
- `security` + `infra-security` → vulnerabilities, secrets, infra exposure.
|
|
21
|
+
- `code-reviewer` → constitution / SRP / structure smells.
|
|
22
|
+
- `architect` → cross-cutting design risks (→ candidate ADRs).
|
|
23
|
+
- `qa-orchestrator` → coverage gaps on `qa.criticalPaths`.
|
|
24
|
+
- **Bug pass:** read the highest-risk modules for likely defects (off-by-one,
|
|
25
|
+
unhandled rejections, missing error handling, race conditions, boundary bugs)
|
|
26
|
+
— **classify each by `bugType` + severity S1-S4**.
|
|
27
|
+
|
|
28
|
+
3. **Report** — one consolidated report: counts by scan + severity, the top issues
|
|
29
|
+
(🔴 / 🟡 / 🟢), and what's healthy. This is the deliverable; keep it factual.
|
|
30
|
+
|
|
31
|
+
4. **Suggest ADRs** — for any finding implying an architectural decision (a pattern
|
|
32
|
+
to adopt, a boundary to enforce, a dependency to drop), first scan existing
|
|
33
|
+
decisions with `node contextkit/tools/scripts/adr-digest.mjs --json` [ADR-0027] so
|
|
34
|
+
you extend/reference an existing ADR instead of duplicating it; then draft a new
|
|
35
|
+
one with `/new-adr` (Context / Decision / Consequences) only if none fits.
|
|
36
|
+
|
|
37
|
+
5. **Fill the backlog** — every finding becomes a tracked, prioritized task:
|
|
38
|
+
```
|
|
39
|
+
node contextkit/tools/scripts/pipeline.mjs ingest contextkit/memory/deep-analysis-findings.json --type chore
|
|
40
|
+
```
|
|
41
|
+
Bugs found by judgment → `pipeline.mjs add --type bug --severity S1-S4
|
|
42
|
+
--bug-type <t> --title "…"`. Priorities (WSJF / severity) + SLA are auto-set and
|
|
43
|
+
**always user-editable** (`pipeline.mjs prioritize <id> <P>` / `wsjf <id> …`).
|
|
44
|
+
|
|
45
|
+
6. End with the natural next step — usually `/dev-start` or `/ship` on the worst item.
|
|
46
|
+
|
|
47
|
+
> This is the command the **security-mode** boot trigger reminds you to run on a
|
|
48
|
+
> cadence (config `securityMode.everyNSessions`). It's active, not reactive.
|