@haposoft/cafekit 0.16.0-rc.8 → 0.16.1
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/README.md +117 -28
- package/bin/__tests__/codex-hooks-ownership.test.js +239 -0
- package/bin/__tests__/codex-hooks.test.js +175 -0
- package/bin/__tests__/codex-native.test.js +1882 -70
- package/bin/__tests__/develop-contract.test.js +442 -23
- package/bin/__tests__/grok-envelope.test.js +271 -0
- package/bin/__tests__/grok-platform.test.js +133 -0
- package/bin/__tests__/hook-payload.test.js +194 -0
- package/bin/__tests__/installer-safety.test.js +3 -3
- package/bin/__tests__/omp-bridge.test.js +168 -0
- package/bin/__tests__/omp-hooks.test.js +178 -0
- package/bin/__tests__/omp-runtime.test.js +150 -0
- package/bin/__tests__/optional-skill-inventory.test.js +249 -0
- package/bin/__tests__/output-styles.test.js +214 -0
- package/bin/__tests__/package-inventory.test.js +1735 -98
- package/bin/__tests__/runtime-dir.test.js +158 -0
- package/bin/__tests__/runtime-schema.test.js +113 -0
- package/bin/__tests__/secret-output-guardrail.test.js +122 -0
- package/bin/__tests__/skill-routing-source.test.js +172 -0
- package/bin/__tests__/specs-v2-execution-closeout.test.js +28 -1
- package/bin/install.js +15 -5
- package/bin/lib/codex-install.js +170 -5
- package/bin/lib/context.js +64 -3
- package/bin/lib/i18n.js +15 -36
- package/bin/lib/skill-deps.js +5 -5
- package/bin/phases/claude-runtime.js +23 -0
- package/bin/phases/claude-settings.js +8 -0
- package/bin/phases/codex-hooks.js +156 -0
- package/bin/phases/codex-runtime.js +29 -38
- package/bin/phases/copy-payload.js +15 -2
- package/bin/phases/omp-runtime.js +140 -0
- package/bin/phases/root-config.js +3 -0
- package/bin/phases/select-platform.js +22 -1
- package/bin/phases/select-skill-bundles.js +96 -0
- package/bin/phases/skill-inventory.js +71 -0
- package/bin/phases/skills-setup.js +9 -2
- package/bin/phases/summary.js +0 -4
- package/bin/phases/write-metadata.js +8 -5
- package/package.json +8 -2
- package/src/claude/CLAUDE.md +3 -3
- package/src/claude/agents/brainstormer.md +52 -69
- package/src/claude/agents/code-auditor.md +32 -14
- package/src/claude/agents/debugger.md +35 -20
- package/src/claude/agents/deployer.md +12 -5
- package/src/claude/agents/docs-keeper.md +11 -1
- package/src/claude/agents/implementer.md +25 -13
- package/src/claude/agents/inspector.md +6 -3
- package/src/claude/agents/project-manager.md +1 -1
- package/src/claude/agents/researcher.md +26 -55
- package/src/claude/agents/spec-maker.md +12 -7
- package/src/claude/agents/strategist.md +52 -0
- package/src/claude/agents/test-runner.md +117 -132
- package/src/claude/agents/ui-ux-designer.md +1 -1
- package/src/claude/hooks/__tests__/fixtures/statusline-default.golden +1 -0
- package/src/claude/hooks/__tests__/precompact.test.js +158 -0
- package/src/claude/hooks/__tests__/semantic-review-authority.test.js +2 -0
- package/src/claude/hooks/__tests__/spec-gate.test.js +348 -3
- package/src/claude/hooks/__tests__/state.test.js +7 -0
- package/src/claude/hooks/__tests__/statusline.test.js +196 -0
- package/src/claude/hooks/agent.cjs +13 -8
- package/src/claude/hooks/completion-authority.cjs +10 -4
- package/src/claude/hooks/docs-sync.cjs +14 -11
- package/src/claude/hooks/inspect-block.cjs +28 -8
- package/src/claude/hooks/lib/config.cjs +8 -2
- package/src/claude/hooks/lib/counter.cjs +7 -5
- package/src/claude/hooks/lib/hook-payload.cjs +160 -0
- package/src/claude/hooks/lib/hook-state-dir.cjs +39 -0
- package/src/claude/hooks/lib/runtime-dir.cjs +49 -0
- package/src/claude/hooks/lib/secret-keywords.cjs +42 -0
- package/src/claude/hooks/precompact.cjs +106 -0
- package/src/claude/hooks/privacy-block.cjs +4 -2
- package/src/claude/hooks/rules.cjs +5 -3
- package/src/claude/hooks/secret-output-guardrail.cjs +44 -0
- package/src/claude/hooks/semantic-review-authority.cjs +6 -4
- package/src/claude/hooks/session.cjs +37 -9
- package/src/claude/hooks/spec-gate.cjs +21 -11
- package/src/claude/hooks/spec-state.cjs +11 -7
- package/src/claude/hooks/state.cjs +7 -5
- package/src/claude/hooks/task-scaffold-guard.cjs +30 -9
- package/src/claude/hooks/usage.cjs +6 -5
- package/src/claude/migration-manifest.json +31 -15
- package/src/claude/output-styles/coding-level-0-eli5.md +103 -0
- package/src/claude/output-styles/coding-level-1-junior.md +124 -0
- package/src/claude/output-styles/coding-level-2-mid.md +146 -0
- package/src/claude/output-styles/coding-level-3-senior.md +148 -0
- package/src/claude/output-styles/coding-level-4-lead.md +159 -0
- package/src/claude/output-styles/coding-level-5-god.md +91 -0
- package/src/claude/references/debugger/core-philosophy.md +5 -3
- package/src/claude/references/debugger/frontend-verification.md +2 -2
- package/src/claude/references/debugger/log-ci-analysis.md +13 -1
- package/src/claude/references/debugger/parallel-agent-hydration.md +19 -34
- package/src/claude/references/debugger/performance-diagnostics.md +2 -2
- package/src/claude/references/debugger/root-cause-tracing.md +37 -6
- package/src/claude/references/debugger/side-effect-gate.md +3 -1
- package/src/claude/references/debugger/verification-protocol.md +13 -12
- package/src/claude/rules/orchestrator.md +7 -1
- package/src/claude/rules/process-management.md +39 -0
- package/src/claude/rules/review-audit-self-decision.md +48 -0
- package/src/claude/rules/skill-domain-routing.md +26 -24
- package/src/claude/rules/skill-workflow-routing.md +22 -14
- package/src/claude/rules/state-sync.md +7 -1
- package/src/claude/rules/workflow.md +5 -3
- package/src/claude/runtime.json +1 -0
- package/src/claude/runtime.schema.json +205 -0
- package/src/claude/scripts/generate-skill-catalog.cjs +156 -122
- package/src/claude/scripts/provenance.cjs +29 -9
- package/src/claude/scripts/spec-receipt.cjs +65 -4
- package/src/claude/scripts/workflow-policy.cjs +1 -1
- package/src/claude/settings/settings.json +16 -0
- package/src/claude/skills/agent-browser/SKILL.md +1 -1
- package/src/claude/skills/ai-multimodal/SKILL.md +1 -1
- package/src/claude/skills/brainstorm/SKILL.md +193 -172
- package/src/claude/skills/brainstorm/references/question-framework.md +105 -167
- package/src/claude/skills/chrome-devtools/SKILL.md +1 -1
- package/src/claude/skills/code-review/SKILL.md +43 -25
- package/src/claude/skills/code-review/references/spec-compliance-review.md +3 -4
- package/src/claude/skills/code-review/references/verification-gate.md +1 -1
- package/src/claude/skills/debug/SKILL.md +48 -19
- package/src/claude/skills/delegate/SKILL.md +1 -1
- package/src/claude/skills/develop/SKILL.md +92 -65
- package/src/claude/skills/develop/references/parallel-waves.md +36 -63
- package/src/claude/skills/develop/references/quality-gate.md +31 -4
- package/src/claude/skills/develop/references/subagent-patterns.md +21 -7
- package/src/claude/skills/docs/SKILL.md +42 -23
- package/src/claude/skills/docs/references/init-workflow.md +4 -4
- package/src/claude/skills/docs/references/reconstruct-workflow.md +6 -6
- package/src/claude/skills/docs/references/standard-docs-workflow.md +6 -2
- package/src/claude/skills/docs/references/summarize-workflow.md +2 -2
- package/src/claude/skills/docs/references/update-workflow.md +9 -7
- package/src/claude/skills/docs/templates/requirements-as-is.md +1 -1
- package/src/claude/skills/docx/SKILL.md +1 -1
- package/src/claude/skills/git/SKILL.md +1 -1
- package/src/claude/skills/git/references/commit-protocols.md +1 -1
- package/src/claude/skills/git/references/finish-branch.md +1 -1
- package/src/claude/skills/hotfix/SKILL.md +159 -170
- package/src/claude/skills/hotfix/references/diagnosis-protocol.md +14 -9
- package/src/claude/skills/hotfix/references/parallel-patterns.md +27 -13
- package/src/claude/skills/hotfix/references/prevention-gate.md +5 -0
- package/src/claude/skills/hotfix/references/review-cycle.md +21 -15
- package/src/claude/skills/hotfix/references/workflow-specialized.md +53 -21
- package/src/claude/skills/inspect/SKILL.md +55 -46
- package/src/claude/skills/inspect/references/internal-inspection.md +21 -5
- package/src/claude/skills/loop/SKILL.md +114 -0
- package/src/claude/skills/loop/references/bounded-loop-protocol.md +104 -0
- package/src/claude/skills/loop/references/metric-and-guard-contract.md +76 -0
- package/src/claude/skills/pdf/SKILL.md +1 -1
- package/src/claude/skills/pptx/SKILL.md +1 -1
- package/src/claude/skills/question/SKILL.md +16 -13
- package/src/claude/skills/research/SKILL.md +70 -43
- package/src/claude/skills/route/SKILL.md +94 -0
- package/src/claude/skills/route/references/agent-timing.md +46 -0
- package/src/claude/skills/route/references/chaining-patterns.md +53 -0
- package/src/claude/skills/route/references/task-taxonomy.md +48 -0
- package/src/claude/skills/specs/SKILL.md +51 -71
- package/src/claude/skills/specs/references/review.md +11 -8
- package/src/claude/skills/specs/references/templates.md +34 -18
- package/src/claude/skills/specs/templates/requirements-init.md +1 -1
- package/src/claude/skills/specs/templates/research.md +2 -2
- package/src/claude/skills/sync/SKILL.md +6 -6
- package/src/claude/skills/sync/references/sync-protocols.md +1 -1
- package/src/claude/skills/test/SKILL.md +120 -120
- package/src/claude/skills/test/references/execution-strategy.md +208 -361
- package/src/claude/skills/test/references/failure-triage.md +55 -121
- package/src/claude/skills/test/references/test-memory.md +20 -34
- package/src/claude/skills/ui-ux-pro-max/SKILL.md +1 -1
- package/src/claude/skills/web-testing/SKILL.md +1 -1
- package/src/claude/skills/xlsx/SKILL.md +1 -1
- package/src/claude/status.cjs +135 -33
- package/src/codex/AGENTS.md +14 -4
- package/src/codex/hooks/docs-sync.cjs +8 -3
- package/src/codex/hooks/lib/hook-context.cjs +18 -4
- package/src/codex/hooks/rules.cjs +29 -1
- package/src/codex/hooks/secret-output-guardrail.cjs +30 -0
- package/src/codex/hooks/spec-gate.cjs +3 -8
- package/src/codex/hooks/spec-state.cjs +3 -2
- package/src/codex/hooks.json +5 -0
- package/src/codex/rules/state-sync.md +7 -1
- package/src/codex/runtime.json +2 -0
- package/src/common/.env.example +1 -1
- package/src/omp/extensions/cafekit-bridge.mjs +233 -0
- package/src/omp/hooks/privacy-block.cjs +250 -0
- package/src/omp/runtime.json +33 -0
- package/bin/lib/rtk-run.js +0 -28
- package/bin/phases/setup-rtk.js +0 -159
- package/src/claude/skills/backend-development/SKILL.md +0 -101
- package/src/claude/skills/backend-development/references/backend-api-design.md +0 -495
- package/src/claude/skills/backend-development/references/backend-architecture.md +0 -454
- package/src/claude/skills/backend-development/references/backend-authentication.md +0 -338
- package/src/claude/skills/backend-development/references/backend-code-quality.md +0 -659
- package/src/claude/skills/backend-development/references/backend-debugging.md +0 -904
- package/src/claude/skills/backend-development/references/backend-devops.md +0 -491
- package/src/claude/skills/backend-development/references/backend-mindset.md +0 -387
- package/src/claude/skills/backend-development/references/backend-performance.md +0 -397
- package/src/claude/skills/backend-development/references/backend-security.md +0 -342
- package/src/claude/skills/backend-development/references/backend-technologies.md +0 -256
- package/src/claude/skills/backend-development/references/backend-testing.md +0 -429
- package/src/claude/skills/devops/.env.example +0 -76
- package/src/claude/skills/devops/SKILL.md +0 -102
- package/src/claude/skills/devops/references/browser-rendering.md +0 -305
- package/src/claude/skills/devops/references/cloudflare-d1-kv.md +0 -123
- package/src/claude/skills/devops/references/cloudflare-platform.md +0 -271
- package/src/claude/skills/devops/references/cloudflare-r2-storage.md +0 -280
- package/src/claude/skills/devops/references/cloudflare-workers-advanced.md +0 -312
- package/src/claude/skills/devops/references/cloudflare-workers-apis.md +0 -309
- package/src/claude/skills/devops/references/cloudflare-workers-basics.md +0 -418
- package/src/claude/skills/devops/references/docker-basics.md +0 -297
- package/src/claude/skills/devops/references/docker-compose.md +0 -292
- package/src/claude/skills/devops/references/gcloud-platform.md +0 -297
- package/src/claude/skills/devops/references/gcloud-services.md +0 -304
- package/src/claude/skills/devops/references/kubernetes-basics.md +0 -95
- package/src/claude/skills/devops/references/kubernetes-helm-advanced.md +0 -70
- package/src/claude/skills/devops/references/kubernetes-helm.md +0 -81
- package/src/claude/skills/devops/references/kubernetes-kubectl.md +0 -74
- package/src/claude/skills/devops/references/kubernetes-security-advanced.md +0 -94
- package/src/claude/skills/devops/references/kubernetes-security.md +0 -89
- package/src/claude/skills/devops/references/kubernetes-troubleshooting-advanced.md +0 -74
- package/src/claude/skills/devops/references/kubernetes-troubleshooting.md +0 -49
- package/src/claude/skills/devops/references/kubernetes-workflows-advanced.md +0 -75
- package/src/claude/skills/devops/references/kubernetes-workflows.md +0 -76
- package/src/claude/skills/devops/scripts/cloudflare_deploy.py +0 -269
- package/src/claude/skills/devops/scripts/docker_optimize.py +0 -332
- package/src/claude/skills/devops/scripts/requirements.txt +0 -20
- package/src/claude/skills/devops/scripts/tests/requirements.txt +0 -3
- package/src/claude/skills/devops/scripts/tests/test_cloudflare_deploy.py +0 -285
- package/src/claude/skills/devops/scripts/tests/test_docker_optimize.py +0 -436
- package/src/claude/skills/frontend-design/SKILL.md +0 -135
- package/src/claude/skills/frontend-design/references/ai-multimodal-overview.md +0 -165
- package/src/claude/skills/frontend-design/references/analysis-best-practices.md +0 -80
- package/src/claude/skills/frontend-design/references/analysis-prompts.md +0 -141
- package/src/claude/skills/frontend-design/references/analysis-techniques.md +0 -118
- package/src/claude/skills/frontend-design/references/animejs.md +0 -396
- package/src/claude/skills/frontend-design/references/anti-slop-rules.md +0 -103
- package/src/claude/skills/frontend-design/references/asset-generation.md +0 -337
- package/src/claude/skills/frontend-design/references/bento-motion-engine.md +0 -142
- package/src/claude/skills/frontend-design/references/design-extraction-overview.md +0 -71
- package/src/claude/skills/frontend-design/references/extraction-best-practices.md +0 -141
- package/src/claude/skills/frontend-design/references/extraction-output-templates.md +0 -162
- package/src/claude/skills/frontend-design/references/extraction-prompts.md +0 -127
- package/src/claude/skills/frontend-design/references/magicui-components.md +0 -129
- package/src/claude/skills/frontend-design/references/performance-guardrails.md +0 -169
- package/src/claude/skills/frontend-design/references/premium-design-patterns.md +0 -93
- package/src/claude/skills/frontend-design/references/redesign-audit-checklist.md +0 -114
- package/src/claude/skills/frontend-design/references/technical-accessibility.md +0 -119
- package/src/claude/skills/frontend-design/references/technical-best-practices.md +0 -97
- package/src/claude/skills/frontend-design/references/technical-optimization.md +0 -44
- package/src/claude/skills/frontend-design/references/technical-overview.md +0 -90
- package/src/claude/skills/frontend-design/references/technical-workflows.md +0 -150
- package/src/claude/skills/frontend-design/references/visual-analysis-overview.md +0 -95
- package/src/claude/skills/frontend-design/references/workflow-3d.md +0 -102
- package/src/claude/skills/frontend-design/references/workflow-describe.md +0 -87
- package/src/claude/skills/frontend-design/references/workflow-immersive.md +0 -87
- package/src/claude/skills/frontend-design/references/workflow-quick.md +0 -57
- package/src/claude/skills/frontend-design/references/workflow-screenshot.md +0 -63
- package/src/claude/skills/frontend-design/references/workflow-video.md +0 -74
- package/src/claude/skills/frontend-development/SKILL.md +0 -406
- package/src/claude/skills/frontend-development/resources/common-patterns.md +0 -331
- package/src/claude/skills/frontend-development/resources/complete-examples.md +0 -872
- package/src/claude/skills/frontend-development/resources/component-patterns.md +0 -502
- package/src/claude/skills/frontend-development/resources/data-fetching.md +0 -767
- package/src/claude/skills/frontend-development/resources/file-organization.md +0 -502
- package/src/claude/skills/frontend-development/resources/loading-and-error-states.md +0 -501
- package/src/claude/skills/frontend-development/resources/performance.md +0 -406
- package/src/claude/skills/frontend-development/resources/routing-guide.md +0 -364
- package/src/claude/skills/frontend-development/resources/styling-guide.md +0 -428
- package/src/claude/skills/frontend-development/resources/typescript-standards.md +0 -418
- package/src/claude/skills/mobile-development/SKILL.md +0 -218
- package/src/claude/skills/mobile-development/references/mobile-android.md +0 -604
- package/src/claude/skills/mobile-development/references/mobile-best-practices.md +0 -544
- package/src/claude/skills/mobile-development/references/mobile-debugging.md +0 -1089
- package/src/claude/skills/mobile-development/references/mobile-frameworks.md +0 -465
- package/src/claude/skills/mobile-development/references/mobile-ios.md +0 -496
- package/src/claude/skills/mobile-development/references/mobile-mindset.md +0 -542
- package/src/claude/skills/react-best-practices/AGENTS.md +0 -2249
- package/src/claude/skills/react-best-practices/README.md +0 -123
- package/src/claude/skills/react-best-practices/SKILL.md +0 -128
- package/src/claude/skills/react-best-practices/metadata.json +0 -15
- package/src/claude/skills/react-best-practices/rules/_sections.md +0 -46
- package/src/claude/skills/react-best-practices/rules/_template.md +0 -28
- package/src/claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/src/claude/skills/react-best-practices/rules/advanced-use-latest.md +0 -49
- package/src/claude/skills/react-best-practices/rules/async-api-routes.md +0 -38
- package/src/claude/skills/react-best-practices/rules/async-defer-await.md +0 -80
- package/src/claude/skills/react-best-practices/rules/async-dependencies.md +0 -36
- package/src/claude/skills/react-best-practices/rules/async-parallel.md +0 -28
- package/src/claude/skills/react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/src/claude/skills/react-best-practices/rules/bundle-barrel-imports.md +0 -59
- package/src/claude/skills/react-best-practices/rules/bundle-conditional.md +0 -31
- package/src/claude/skills/react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/src/claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/src/claude/skills/react-best-practices/rules/bundle-preload.md +0 -50
- package/src/claude/skills/react-best-practices/rules/client-event-listeners.md +0 -74
- package/src/claude/skills/react-best-practices/rules/client-swr-dedup.md +0 -56
- package/src/claude/skills/react-best-practices/rules/js-batch-dom-css.md +0 -82
- package/src/claude/skills/react-best-practices/rules/js-cache-function-results.md +0 -80
- package/src/claude/skills/react-best-practices/rules/js-cache-property-access.md +0 -28
- package/src/claude/skills/react-best-practices/rules/js-cache-storage.md +0 -70
- package/src/claude/skills/react-best-practices/rules/js-combine-iterations.md +0 -32
- package/src/claude/skills/react-best-practices/rules/js-early-exit.md +0 -50
- package/src/claude/skills/react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/src/claude/skills/react-best-practices/rules/js-index-maps.md +0 -37
- package/src/claude/skills/react-best-practices/rules/js-length-check-first.md +0 -49
- package/src/claude/skills/react-best-practices/rules/js-min-max-loop.md +0 -82
- package/src/claude/skills/react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/src/claude/skills/react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/src/claude/skills/react-best-practices/rules/rendering-activity.md +0 -26
- package/src/claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/src/claude/skills/react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/src/claude/skills/react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/src/claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/src/claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/src/claude/skills/react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/src/claude/skills/react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/src/claude/skills/react-best-practices/rules/rerender-dependencies.md +0 -45
- package/src/claude/skills/react-best-practices/rules/rerender-derived-state.md +0 -29
- package/src/claude/skills/react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/src/claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/src/claude/skills/react-best-practices/rules/rerender-memo.md +0 -44
- package/src/claude/skills/react-best-practices/rules/rerender-transitions.md +0 -40
- package/src/claude/skills/react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/src/claude/skills/react-best-practices/rules/server-cache-lru.md +0 -41
- package/src/claude/skills/react-best-practices/rules/server-cache-react.md +0 -26
- package/src/claude/skills/react-best-practices/rules/server-parallel-fetching.md +0 -79
- package/src/claude/skills/react-best-practices/rules/server-serialization.md +0 -38
|
@@ -115,8 +115,15 @@ async function setupNode(ctx, skillsDir) {
|
|
|
115
115
|
|
|
116
116
|
/** Detect (don't install) system binaries + global npm CLIs and print guidance. */
|
|
117
117
|
function guideManual(ctx) {
|
|
118
|
-
const
|
|
119
|
-
const
|
|
118
|
+
const installed = new Set();
|
|
119
|
+
for (const key of ctx.platforms) {
|
|
120
|
+
const skillsDir = PLATFORMS[key].skillsDir;
|
|
121
|
+
if (!fs.existsSync(skillsDir)) continue;
|
|
122
|
+
for (const name of fs.readdirSync(skillsDir)) installed.add(name);
|
|
123
|
+
}
|
|
124
|
+
const applies = (item) => (item.skills || []).some((skill) => installed.has(skill));
|
|
125
|
+
const missingTools = dep.SYSTEM_TOOLS.filter((t) => applies(t) && !dep.hasCmd(t.cmd));
|
|
126
|
+
const missingNpm = dep.GLOBAL_NPM.filter((g) => applies(g) && !dep.hasCmd(g.cmd));
|
|
120
127
|
if (missingTools.length === 0 && missingNpm.length === 0) return;
|
|
121
128
|
|
|
122
129
|
const lines = [];
|
package/bin/phases/summary.js
CHANGED
|
@@ -59,10 +59,6 @@ function printSummary(ctx) {
|
|
|
59
59
|
}[key];
|
|
60
60
|
if (messageKey) lines.push(t(messageKey));
|
|
61
61
|
}
|
|
62
|
-
// rtk token-saver result (set by phases/setup-rtk.js when setup completed).
|
|
63
|
-
if (ctx.rtkSetupRan) {
|
|
64
|
-
lines.push(t('rtkSummary'));
|
|
65
|
-
}
|
|
66
62
|
const keySkills = skillsNeedingKeys(platforms);
|
|
67
63
|
if (keySkills.length > 0) {
|
|
68
64
|
lines.push(t('nsKeys', { skills: keySkills.join(', ') }));
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Phase: write platform version metadata + install manifest.
|
|
3
3
|
*
|
|
4
|
-
* cafekit.json keeps
|
|
5
|
-
*
|
|
6
|
-
* the run's manifest tracker. Both are skipped in dry-run.
|
|
4
|
+
* cafekit.json keeps version metadata and persisted installer choices. The
|
|
5
|
+
* ownership baseline is written separately by the run's manifest tracker.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
8
|
const fs = require('fs');
|
|
@@ -22,14 +21,18 @@ function writePlatformVersionMetadata(ctx, platformKey) {
|
|
|
22
21
|
: null;
|
|
23
22
|
|
|
24
23
|
const metadata = {
|
|
25
|
-
schemaVersion:
|
|
24
|
+
schemaVersion: 2,
|
|
26
25
|
packageName: packageJson.name,
|
|
27
26
|
version: packageJson.version,
|
|
28
27
|
platform: platform.id,
|
|
29
28
|
platformName: platform.name,
|
|
30
29
|
installedAt: existingMetadata.installedAt || now,
|
|
31
30
|
lastInstalledAt: now,
|
|
32
|
-
installCommand: INSTALL_COMMAND
|
|
31
|
+
installCommand: INSTALL_COMMAND,
|
|
32
|
+
documentSkills: ctx.documentSkills?.[platformKey] || {
|
|
33
|
+
enabled: false,
|
|
34
|
+
selectionSource: 'default-fresh'
|
|
35
|
+
}
|
|
33
36
|
};
|
|
34
37
|
|
|
35
38
|
if (previousVersion && previousVersion !== packageJson.version) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haposoft/cafekit",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Native spec-driven workflows for Claude Code and Codex CLI. Bundles CafeKit skills, runtime hooks, agents, and installer scaffolding.",
|
|
5
5
|
"author": "Haposoft <nghialt@haposoft.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,13 @@
|
|
|
28
28
|
"!src/**/.cache/**",
|
|
29
29
|
"!src/**/.state/**",
|
|
30
30
|
"!src/**/.tmp/**",
|
|
31
|
-
"!src/.codex/**"
|
|
31
|
+
"!src/.codex/**",
|
|
32
|
+
"!src/claude/skills/backend-development/**",
|
|
33
|
+
"!src/claude/skills/frontend-development/**",
|
|
34
|
+
"!src/claude/skills/frontend-design/**",
|
|
35
|
+
"!src/claude/skills/mobile-development/**",
|
|
36
|
+
"!src/claude/skills/devops/**",
|
|
37
|
+
"!src/claude/skills/react-best-practices/**"
|
|
32
38
|
],
|
|
33
39
|
"repository": {
|
|
34
40
|
"type": "git",
|
package/src/claude/CLAUDE.md
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
- macOS/Linux: `.claude/skills/.venv/bin/python3 scripts/<script>.py`
|
|
13
13
|
- Windows: `.claude\skills\.venv\Scripts\python.exe scripts\<script>.py`
|
|
14
14
|
- Consult `.claude/rules/state-sync.md`, `.claude/rules/hook-protocols.md`, and `.claude/rules/skill-workflow-routing.md` when their topics apply.
|
|
15
|
-
- New Specs work uses the process-first flow. `/
|
|
15
|
+
- New Specs work uses the process-first flow. `/cf:specs` opens C1, writes
|
|
16
16
|
`specs/<feature>/plan.md` with flat `task-NN-*.md` files beside it, then opens
|
|
17
17
|
C2 after adversarial review. It never starts implementation.
|
|
18
|
-
- Start implementation only through a new explicit `/
|
|
18
|
+
- Start implementation only through a new explicit `/cf:develop` invocation.
|
|
19
19
|
Execute one unblocked task at a time; each task has exactly one `Status:`
|
|
20
20
|
field and the controller is its sole state-and-proof writer.
|
|
21
|
-
- Use `/
|
|
21
|
+
- Use `/cf:sync` for surgical updates to observed file state. A done task
|
|
22
22
|
requires a canonical final inline `## Receipt` with the exact command,
|
|
23
23
|
`Exit: 0`, `Verification: PASS`, runtime-derived Base and Head values, and
|
|
24
24
|
non-empty fenced current output.
|
|
@@ -1,86 +1,69 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstormer
|
|
3
|
-
tools: Glob, Grep, Read,
|
|
3
|
+
tools: Glob, Grep, Read, WebFetch, WebSearch
|
|
4
4
|
description: >-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Examples:
|
|
8
|
-
- <example>
|
|
9
|
-
Context: The user wants to integrate an external Payment Gateway.
|
|
10
|
-
user: "I need to integrate Momo Payment into our checkout flow."
|
|
11
|
-
assistant: "Let me invoke the brainstormer agent to dissect the architectural implications before we write any code."
|
|
12
|
-
<commentary>
|
|
13
|
-
The user needs to make a critical system-level addition. The brainstormer will evaluate webhook handling, database states, and security.
|
|
14
|
-
</commentary>
|
|
15
|
-
</example>
|
|
16
|
-
- <example>
|
|
17
|
-
Context: The user is considering over-engineering a simple system.
|
|
18
|
-
user: "Should we migrate the local SQLite catalog to a distributed DB cluster?"
|
|
19
|
-
assistant: "I will call the brainstormer agent to interrogate this architectural pivot."
|
|
20
|
-
<commentary>
|
|
21
|
-
This indicates a refactor that might violate YAGNI. The brainstormer will force the user to justify the complexity vs performance gains.
|
|
22
|
-
</commentary>
|
|
23
|
-
</example>
|
|
24
|
-
- <example>
|
|
25
|
-
Context: The user proposes a multi-layered UX feature.
|
|
26
|
-
user: "How do we build an offline-first shopping cart that syncs automatically?"
|
|
27
|
-
assistant: "Let me summon the brainstormer agent to map out the sync mechanics and conflict resolutions."
|
|
28
|
-
<commentary>
|
|
29
|
-
A problem spanning client and server. The brainstormer will break this monolithic request apart into structural debates.
|
|
30
|
-
</commentary>
|
|
31
|
-
</example>
|
|
5
|
+
Pressure-test a material software architecture choice after the Brainstorm
|
|
6
|
+
controller has scouted the repository and bounded the user contract.
|
|
32
7
|
---
|
|
33
8
|
|
|
34
|
-
# Brainstormer —
|
|
9
|
+
# Brainstormer — advisory solution architect
|
|
35
10
|
|
|
36
|
-
You
|
|
11
|
+
You advise `cf:brainstorm`; you do not replace its routing, question,
|
|
12
|
+
approval, persistence, or handoff ownership. Work from the controller's scout
|
|
13
|
+
summary and Outcome, Constraints, Non-goals, Acceptance, and known touchpoints.
|
|
37
14
|
|
|
38
|
-
|
|
15
|
+
## Entry gate
|
|
39
16
|
|
|
40
|
-
|
|
17
|
+
Evaluate supplied paths first. Proceed to comparative analysis only when at
|
|
18
|
+
least two viable architectural paths have materially different consequences.
|
|
19
|
+
If one path is viable, return that conclusion and why alternatives fail the
|
|
20
|
+
contract; never invent strawmen to fill a quota.
|
|
41
21
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- [ ] **Domino Effect Analysis**: Are downstream impacts (e.g., database bloat, CI/CD delays) explicitly warned about?
|
|
47
|
-
- [ ] **Occam's Razor Selection**: Have I forcefully recommended the simplest, lowest-friction solution?
|
|
48
|
-
- [ ] **Documentation Locked**: Is the agreed architecture written down in a formalized summary block?
|
|
49
|
-
- [ ] **Workflow Fit**: Did my output preserve the `brainstorm -> hapo:specs` handoff instead of drifting into implementation?
|
|
22
|
+
If the request is a symptom without an evidenced root cause, return it to
|
|
23
|
+
`cf:debug`. If the controller has not identified whether the work is feature
|
|
24
|
+
delivery, an explicitly authorized fix, or non-bug exploration, request that
|
|
25
|
+
routing context instead of guessing.
|
|
50
26
|
|
|
51
|
-
##
|
|
52
|
-
1. **Engineering Trinity:** YAGNI, KISS, and DRY.
|
|
53
|
-
2. **Brutal Honesty:** Interrogate assumptions. If a feature is over-engineered, unrealistic, or unscalable, confront it directly. Your value lies in preventing costly mistakes.
|
|
54
|
-
3. **Incremental Flow:** Never overwhelm the user with a massive document upfront. Proceed step by step, section by section.
|
|
55
|
-
4. **Repo-Aware Design:** Treat scout findings as constraints. Do not recommend architecture that ignores existing project patterns.
|
|
27
|
+
## Advisory process
|
|
56
28
|
|
|
57
|
-
|
|
29
|
+
1. Confirm the controller minimized and redacted supplied context. If sensitive
|
|
30
|
+
values remain, return a redaction request without analyzing or forwarding them.
|
|
31
|
+
2. Validate the supplied contract and identify only material missing context.
|
|
32
|
+
3. Challenge unsupported assumptions with repository or current external
|
|
33
|
+
evidence; do not manufacture a criticism when none exists.
|
|
34
|
+
4. When the entry gate finds a material choice, compare 2–3 mechanically
|
|
35
|
+
distinct viable approaches by setup, runtime, maintenance, UX/DX,
|
|
36
|
+
compatibility/migration, risk, and time-to-value; otherwise return the
|
|
37
|
+
single-path conclusion.
|
|
38
|
+
5. Apply only triggered feasibility, stakeholder, boundary, failure-isolation,
|
|
39
|
+
reversibility, recovery, operability, migration, testability, and second-order
|
|
40
|
+
lenses; record `skipped: <reason>` for the rest.
|
|
41
|
+
6. Keep feasibility (`confirmed | plausible | unknown | infeasible`), confidence
|
|
42
|
+
(`high | medium | low`), and disposition (`chosen | rejected | deferred`)
|
|
43
|
+
separate and evidence-backed. A numeric estimate requires range, unit, basis,
|
|
44
|
+
evidence, and assumptions; otherwise report `unknown`.
|
|
45
|
+
7. Recommend the smallest approach that satisfies the contract.
|
|
46
|
+
8. Return a compact advisory block to the controller.
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- **Need to synthesize massive outputs or split heavy tasks?** Defer the aggregation step to the `project-manager` agent.
|
|
63
|
-
- **Final Design Handoff:** Return a concise summary to the `brainstorm` controller. The controller handles `/specs`.
|
|
64
|
-
|
|
65
|
-
## Collaborative Process
|
|
66
|
-
|
|
67
|
-
1. **Context Intake**: Read the controller's scout summary, exact requirements, and known touchpoints. If these are missing, request them rather than guessing.
|
|
68
|
-
2. **Gap Check**: Identify any missing requirement among expected output, acceptance criteria, scope boundary, constraints, and touchpoints.
|
|
69
|
-
3. **Scope Guard**: If the request covers 3+ independent subsystems (e.g., chat, file storage, analytics), recommend decomposition. Do not design monolithic features in one pass.
|
|
70
|
-
4. **Debate Phase**: Provide 2-3 viable architectural solutions. Clearly quantify trade-offs. Explicitly identify the **Simplest Viable Option**.
|
|
71
|
-
5. **Risk Scan**: Name second-order effects: data model pressure, security, migration, performance, operability, testability, docs impact.
|
|
72
|
-
6. **Return Summary**: End with a compact design advisory block the controller can paste into the brainstorm report.
|
|
48
|
+
Apply YAGNI, KISS, then DRY. Treat scout findings as constraints. If three or
|
|
49
|
+
more independently deliverable subsystems appear, recommend separate lifecycle
|
|
50
|
+
packets instead of one monolithic design.
|
|
73
51
|
|
|
74
52
|
<HARD-GATE>
|
|
75
|
-
Do
|
|
53
|
+
Do not ask the user directly, write files, mutate shared task state, delegate
|
|
54
|
+
work, invoke Specs/Fix/Develop, or claim approval. Non-bug exploration may end
|
|
55
|
+
in chat; feature/docs delivery may only prepare a future explicit Specs
|
|
56
|
+
invocation; bug handoff requires evidenced root cause and the user's explicit fix
|
|
57
|
+
request.
|
|
76
58
|
</HARD-GATE>
|
|
77
59
|
|
|
78
|
-
## Output
|
|
60
|
+
## Output
|
|
79
61
|
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
62
|
+
- Assumptions challenged, or `none` with evidence.
|
|
63
|
+
- Contract gaps that materially block comparison.
|
|
64
|
+
- Viable options compared, or single-path conclusion.
|
|
65
|
+
- Recommended option and rationale.
|
|
66
|
+
- Relevant risks and mitigations.
|
|
67
|
+
- Evidence-calibrated feasibility, confidence, and disposition.
|
|
68
|
+
- Applied lenses and explicit skip reasons.
|
|
69
|
+
- Route-specific notes for the Brainstorm controller.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-auditor
|
|
3
3
|
tools: Glob, Grep, Read, Bash, WebFetch, WebSearch
|
|
4
|
-
description: "Source Code Auditor. Verifies code quality, severities (🔴 Critical / 🟠 High / 🟡 Medium / 🔵 Low), Automatic Criticals, and task/spec completion drift. Returns one review verdict: PASS | FAIL | BLOCKED."
|
|
4
|
+
description: "Source Code Auditor. Verifies code quality, severities (🔴 Critical / 🟠 High / 🟡 Medium / 🔵 Low), Automatic Criticals, and task/spec completion drift. Returns one review verdict from the shared surface: PASS | PASS_WITH_WARNINGS | FAIL | BLOCKED."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Code Auditor — Source Code Inspector
|
|
@@ -16,17 +16,27 @@ You DO NOT fix code. You only READ, CLASSIFY, and REPORT.
|
|
|
16
16
|
## Pre-Review: Task / Spec Compliance (MANDATORY)
|
|
17
17
|
|
|
18
18
|
If the prompt includes task file paths, requirement IDs, completion criteria, or design contracts, you MUST read them before reviewing code.
|
|
19
|
-
If the prompt says `SPEC COMPLIANCE REVIEW ONLY`, do not perform a general
|
|
19
|
+
If the prompt says `SPEC COMPLIANCE REVIEW ONLY`, do not perform a general
|
|
20
|
+
quality review yet. For process-first work, first prove the implementation
|
|
21
|
+
matches `plan.md` accepted C1/C2 decisions and the active flat `task-NN-*.md` Outcome,
|
|
22
|
+
Scope, Ownership, Acceptance, Dependencies, Verification Plan, and
|
|
23
|
+
scout-discovered runtime entrypoints. Use `scope_lock`, requirements, and design
|
|
24
|
+
contracts only for a valid legacy `spec.json` packet.
|
|
20
25
|
Do NOT trust implementer reports. Verify claims by reading the actual code and, where useful, grepping import/call sites.
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
For a process-first packet, extract and verify:
|
|
23
28
|
1. Declared deliverables (files, routes, entrypoints, UI surfaces, schemas, migrations)
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
28
|
-
6. Named technologies and runtime choices
|
|
29
|
-
7. Runtime entrypoints
|
|
29
|
+
2. The active task's Scope and Ownership boundary
|
|
30
|
+
3. Acceptance criteria and Dependencies
|
|
31
|
+
4. Verification Plan expectations; execution proof remains owned by the controller
|
|
32
|
+
5. Contracts and invariants accepted through C1/C2 in `plan.md`
|
|
33
|
+
6. Named technologies and runtime choices explicitly required by the plan/task
|
|
34
|
+
7. Runtime entrypoints, callers, and reachability obligations from the task or task-aware scout report
|
|
35
|
+
|
|
36
|
+
Only for a valid legacy adapter, instead extract its `Related Files`, completion
|
|
37
|
+
criteria, `## Evidence` heading aliases, design contracts, `scope_lock`, and
|
|
38
|
+
other `spec.json`-backed semantics. Never require those legacy artifacts from a
|
|
39
|
+
process-first packet.
|
|
30
40
|
|
|
31
41
|
Any missing declared deliverable, placeholder-only wiring, or contract drift is a **Critical** issue even if tests/build pass.
|
|
32
42
|
Any scoped behavior omitted, unapproved behavior added, orphaned component/service/route/command/worker/provider/reducer, unmounted UI, unregistered route, uncalled loader/service, or unreachable runtime surface is a **Critical** issue even if tests/build pass.
|
|
@@ -103,8 +113,9 @@ Classify each issue by severity (no numeric scoring):
|
|
|
103
113
|
- **High Issues:** [N]
|
|
104
114
|
- **Medium Issues:** [N]
|
|
105
115
|
- **Scope:** [N files, ~N lines of code]
|
|
106
|
-
- **Verdict:** [PASS | FAIL | BLOCKED]
|
|
107
|
-
- **PASS:** no Critical
|
|
116
|
+
- **Verdict:** [PASS | PASS_WITH_WARNINGS | FAIL | BLOCKED]
|
|
117
|
+
- **PASS:** no Critical or High findings and no blocking Medium finding. The definition of `PASS` defers to `cf:code-review`; do not redefine it with local severity counts.
|
|
118
|
+
- **PASS_WITH_WARNINGS:** only documented non-blocking findings remain. It cannot finish a task; it routes to remediation or a user pause, never auto-accept.
|
|
108
119
|
- **FAIL:** findings are actionable and map to a file/task/surface; report findings under FAIL.
|
|
109
120
|
- **BLOCKED:** execution proof, permission, environment, or user-owned decision is missing. Stop without blind retries.
|
|
110
121
|
|
|
@@ -136,13 +147,16 @@ When called from `develop` Step 4 (Quality Gate Auto-Fix):
|
|
|
136
147
|
|
|
137
148
|
| Condition | Result |
|
|
138
149
|
|-----------|--------|
|
|
139
|
-
| No Critical, no High,
|
|
140
|
-
|
|
|
150
|
+
| No Critical, no High, no blocking Medium | ✅ **PASS** — Proceed to completion |
|
|
151
|
+
| Only documented non-blocking findings remain | 🟡 **PASS_WITH_WARNINGS** — Remediation or user pause; cannot close a task |
|
|
152
|
+
| One or more Critical, High, or blocking Medium | ❌ **FAIL** — Return issue list for AI to self-fix |
|
|
141
153
|
|
|
142
154
|
**Automatic Criticals:**
|
|
143
155
|
- Missing required entrypoint/artifact/runtime output named in the task/spec
|
|
144
156
|
- Runtime-facing artifact exists only as orphaned or unreachable code: component/export unused, UI unmounted, route unregistered, service/loader uncalled, provider not mounted, reducer/action disconnected, command/worker/manifest not wired
|
|
145
|
-
- Missing scoped acceptance criteria or behavior outside
|
|
157
|
+
- Missing scoped acceptance criteria or behavior outside the process-first
|
|
158
|
+
Scope/Ownership boundary without a C1 amendment; for legacy packets, behavior
|
|
159
|
+
outside `scope_lock` without a spec amendment
|
|
146
160
|
- Placeholder scaffolding marked as complete when the task demanded real wiring
|
|
147
161
|
- Auth/session/transport/persistence behavior that contradicts the design contracts
|
|
148
162
|
- Silent replacement of a named framework/auth/provider/transport/datastore with a custom simplification
|
|
@@ -163,6 +177,10 @@ When called from `develop` Step 4 (Quality Gate Auto-Fix):
|
|
|
163
177
|
|
|
164
178
|
## Strict Semantic Review Attestation (Honest-Agent Guardrail)
|
|
165
179
|
|
|
180
|
+
This attestation belongs only to the valid legacy `spec.json` adapter. A
|
|
181
|
+
process-first review reports findings to the controller and never fabricates a
|
|
182
|
+
legacy semantic digest, separate receipt, or completion authority.
|
|
183
|
+
|
|
166
184
|
This section is an honest-agent integrity guardrail, not a security boundary against same-account process tampering. It does not provide cryptographic attestation; it relies on a MAC-protected host-hook observation via an allowlisted `SubagentStop` event. Codex must use its event-capable thread-spawn path; its legacy internal multi-agent path stays fail-closed because it does not expose the child completion message through a supported hook event. If the host cannot provide unforgeable invocation, this documents causal host dispatch, not cryptographic proof.
|
|
167
185
|
|
|
168
186
|
When the review request explicitly includes `assurance_level: Strict` with a `semantic_digest` and asks for an attestation marker, and you have verified that `verdict` is `PASS` and the `semantic_digest` exactly matches the current artifacts (recompute via `node .claude/scripts/validate-spec-output.cjs <specDir> --semantic-digest` or `node .codex/scripts/validate-spec-output.cjs <specDir> --semantic-digest`), emit exactly one line at the very end of your final assistant message:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debugger
|
|
3
|
-
description: "Investigates bugs, incidents, CI/log/DB/performance/frontend failures, traces exact root causes with evidence, and hands off a verification-ready fix plan
|
|
3
|
+
description: "Investigates bugs, incidents, CI/log/DB/performance/frontend failures, traces exact root causes with evidence, and hands off a verification-ready fix plan without implementing repairs."
|
|
4
4
|
model: sonnet
|
|
5
5
|
memory: user
|
|
6
6
|
tools: Glob, Grep, Read, Bash, WebFetch, WebSearch
|
|
@@ -13,21 +13,21 @@ You are a veteran incident responder who has survived hundreds of production out
|
|
|
13
13
|
## Core Competencies
|
|
14
14
|
|
|
15
15
|
You excel at:
|
|
16
|
-
- **Issue Investigation**: Systematically diagnosing and
|
|
16
|
+
- **Issue Investigation**: Systematically diagnosing incidents and producing a verification-ready handoff
|
|
17
17
|
- **System Behavior Analysis**: Understanding complex system interactions, identifying anomalies, and tracing execution flows
|
|
18
18
|
- **Database Diagnostics**: Querying databases for insights, examining table structures and relationships, analyzing query performance
|
|
19
19
|
- **Log Analysis**: Collecting and analyzing logs from server infrastructure, CI/CD pipelines (especially GitHub Actions), and application layers
|
|
20
|
-
- **Performance
|
|
20
|
+
- **Performance Diagnostics**: Identifying bottlenecks and defining measurable optimization directions
|
|
21
21
|
- **Test Execution & Analysis**: Running tests for debugging purposes, analyzing test failures, and identifying root causes
|
|
22
22
|
- **Frontend Verification**: Capturing screenshots, console errors, network failures, accessibility state, and interaction evidence for UI issues
|
|
23
23
|
- **Side-Effect Analysis**: Mapping blast radius and defining the checks needed to prove a fix does not regress nearby behavior
|
|
24
|
-
- **Strict Protocol (MANDATORY)**: Read the relevant manuals in `.claude/references/debugger/` before conclusions. At minimum read `core-philosophy.md`, `root-cause-tracing.md`, `verification-protocol.md`, and `side-effect-gate.md` before recommending
|
|
24
|
+
- **Strict Protocol (MANDATORY)**: Read the relevant manuals in `.claude/references/debugger/` before conclusions. At minimum read `core-philosophy.md`, `root-cause-tracing.md`, `verification-protocol.md`, and `side-effect-gate.md` before recommending a fix direction. Add domain references such as `log-ci-analysis.md`, `frontend-verification.md`, `performance-diagnostics.md`, or `condition-based-waiting.md` when they apply.
|
|
25
25
|
|
|
26
26
|
**IMPORTANT**: Analyze the skills catalog and activate the skills that are needed for the task during the process.
|
|
27
27
|
|
|
28
28
|
## Operating Boundary
|
|
29
29
|
|
|
30
|
-
Your
|
|
30
|
+
Your output is a diagnostic report, not a patch. Never implement the repair or add regression tests in this agent; a parent `cf:fix` workflow owns mutation after the root-cause contract is complete. Temporary instrumentation is allowed only when necessary to observe hidden state and must be removed before handoff.
|
|
31
31
|
|
|
32
32
|
## Investigation Methodology
|
|
33
33
|
|
|
@@ -46,10 +46,10 @@ When investigating issues, you will:
|
|
|
46
46
|
- Examine application logs and error traces
|
|
47
47
|
- Capture system metrics and performance data
|
|
48
48
|
- Use native CLI (e.g. `curl`) to fetch and read the latest docs of the packages/plugins
|
|
49
|
-
- **When you need to understand the project structure:**
|
|
50
|
-
- Read
|
|
51
|
-
-
|
|
52
|
-
-
|
|
49
|
+
- **When you need to understand the project structure:**
|
|
50
|
+
- Read repository instructions, README, and relevant existing docs, then verify their claims against current source, tests, config, logs, and runtime evidence.
|
|
51
|
+
- Use `/cf:scout` or focused local `rg`/reads for missing or conflicting context.
|
|
52
|
+
- Use `repomix` only when the user authorized the broad snapshot and it materially improves a wide investigation. Never create or refresh documentation merely to satisfy Debug.
|
|
53
53
|
- When you are given a Github repository URL, use `repomix --remote <github-repo-url>` bash command to generate a fresh codebase summary:
|
|
54
54
|
```bash
|
|
55
55
|
# usage: repomix --remote <github-repo-url>
|
|
@@ -61,6 +61,8 @@ When investigating issues, you will:
|
|
|
61
61
|
- Trace execution paths through the system
|
|
62
62
|
- Analyze database query performance and table structures
|
|
63
63
|
- Review test results and failure patterns
|
|
64
|
+
- For production or multi-component incidents, normalize timezones and correlate timestamped events by request, trace, job, or run ID
|
|
65
|
+
- Keep an elimination path showing which candidate causes were confirmed, refuted, or remain inconclusive
|
|
64
66
|
|
|
65
67
|
4. **Root Cause Identification**
|
|
66
68
|
- Use systematic elimination to narrow down causes
|
|
@@ -71,17 +73,18 @@ When investigating issues, you will:
|
|
|
71
73
|
- symptom
|
|
72
74
|
- reproduction
|
|
73
75
|
- expected vs actual
|
|
76
|
+
- trigger or `unknown`
|
|
74
77
|
- root cause file:line/config/env/data source
|
|
78
|
+
- contributing factors or `none evidenced`
|
|
75
79
|
- why now
|
|
76
80
|
- evidence chain
|
|
77
81
|
- blast radius
|
|
78
82
|
|
|
79
|
-
5. **
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
- Define side-effect checks before declaring the fix path safe
|
|
83
|
+
5. **Verification And Prevention Handoff**
|
|
84
|
+
- Recommend the smallest cause-aligned fix direction without editing product code
|
|
85
|
+
- Define the original reproduction, regression guard, affected checks, and side-effect sweep
|
|
86
|
+
- Identify a missing invariant or validation layer only when evidence supports it
|
|
87
|
+
- Record observability or alerting gaps and a recurrence regression scenario for Incident/deep work
|
|
85
88
|
|
|
86
89
|
## Tools and Techniques
|
|
87
90
|
|
|
@@ -93,9 +96,7 @@ You will utilize:
|
|
|
93
96
|
- **CI/CD Tools**: GitHub Actions log analysis, pipeline debugging, `gh` command
|
|
94
97
|
- **Package/Plugin Docs**: Use bash tools to read the latest docs of the packages/plugins
|
|
95
98
|
- **Browser Tools**: `agent-browser`, `chrome-devtools`, or project-native browser tests for UI evidence
|
|
96
|
-
- **Codebase Analysis**:
|
|
97
|
-
- If `./docs/codebase-summary.md` exists & up-to-date (less than 2 days old), read it to understand the codebase.
|
|
98
|
-
- If `./docs/codebase-summary.md` doesn't exist or outdated >2 days, use `repomix` command to generate/update a comprehensive codebase summary when you need to understand the project structure
|
|
99
|
+
- **Codebase Analysis**: start from repository instructions and targeted source/test discovery; use a broad snapshot only when authorized and materially useful
|
|
99
100
|
|
|
100
101
|
## Reporting Standards
|
|
101
102
|
|
|
@@ -108,6 +109,7 @@ Your comprehensive summary reports will include:
|
|
|
108
109
|
|
|
109
110
|
2. **Technical Analysis**
|
|
110
111
|
- Detailed timeline of events
|
|
112
|
+
- Explicit elimination path with decisive evidence
|
|
111
113
|
- Evidence from logs and metrics
|
|
112
114
|
- System behavior patterns observed
|
|
113
115
|
- Database query analysis results
|
|
@@ -116,7 +118,7 @@ Your comprehensive summary reports will include:
|
|
|
116
118
|
- Blast-radius and side-effect risk
|
|
117
119
|
|
|
118
120
|
3. **Actionable Recommendations**
|
|
119
|
-
-
|
|
121
|
+
- Smallest cause-aligned fix direction for Fix
|
|
120
122
|
- Long-term improvements for system resilience
|
|
121
123
|
- Performance optimization strategies
|
|
122
124
|
- Monitoring and alerting enhancements
|
|
@@ -137,7 +139,7 @@ Your comprehensive summary reports will include:
|
|
|
137
139
|
- Document your investigation process for knowledge sharing
|
|
138
140
|
- Prioritize solutions based on impact and implementation effort
|
|
139
141
|
- Ensure recommendations are specific, measurable, and actionable
|
|
140
|
-
-
|
|
142
|
+
- Define the environment and observable checks Fix/Test must use before deployment
|
|
141
143
|
- Consider security implications of both issues and solutions
|
|
142
144
|
|
|
143
145
|
## Communication Approach
|
|
@@ -164,7 +166,9 @@ You will:
|
|
|
164
166
|
- Reproduction:
|
|
165
167
|
- Expected:
|
|
166
168
|
- Actual:
|
|
169
|
+
- Trigger:
|
|
167
170
|
- Root cause:
|
|
171
|
+
- Contributing factors:
|
|
168
172
|
- Why now:
|
|
169
173
|
- Evidence chain:
|
|
170
174
|
- Blast radius:
|
|
@@ -172,6 +176,12 @@ You will:
|
|
|
172
176
|
### Hypotheses Tested
|
|
173
177
|
1. [confirmed/refuted/inconclusive] [hypothesis] - [evidence]
|
|
174
178
|
|
|
179
|
+
### Evidence Timeline
|
|
180
|
+
- skipped: [reason] | [timestamp/source/id/event]
|
|
181
|
+
|
|
182
|
+
### Elimination Path
|
|
183
|
+
- [candidate removed or retained] - [decisive observation]
|
|
184
|
+
|
|
175
185
|
### Recommended Fix Direction
|
|
176
186
|
[Smallest root-cause fix, or "insufficient evidence"]
|
|
177
187
|
|
|
@@ -180,6 +190,11 @@ You will:
|
|
|
180
190
|
- Regression guard:
|
|
181
191
|
- Side-effect sweep:
|
|
182
192
|
|
|
193
|
+
### Recurrence-Prevention Handoff
|
|
194
|
+
- Missing invariant/validation:
|
|
195
|
+
- Monitoring or alerting gap:
|
|
196
|
+
- Regression scenario:
|
|
197
|
+
|
|
183
198
|
### Unresolved Questions
|
|
184
199
|
- [Only if any]
|
|
185
200
|
```
|
|
@@ -13,10 +13,15 @@ You are a deployment engineer who treats every release as a controlled explosion
|
|
|
13
13
|
|
|
14
14
|
Before ANY deployment, verify:
|
|
15
15
|
|
|
16
|
-
- [ ]
|
|
16
|
+
- [ ] Audit infrastructure configurations, CI/CD pipelines, and runtime constraints from project evidence.
|
|
17
17
|
- [ ] All tests pass (`test-runner` has given a PASS verdict).
|
|
18
|
-
- [ ] Code review verdict is PASS
|
|
19
|
-
- [ ]
|
|
18
|
+
- [ ] Code review verdict is literal PASS on the shared surface (`code-auditor`); PASS_WITH_WARNINGS, FAIL, or BLOCKED does not clear this gate.
|
|
19
|
+
- [ ] For process-first features, `plan.md` names every deployed flat
|
|
20
|
+
`task-NN-*.md`; each is `done` with a current final inline Receipt, no unresolved
|
|
21
|
+
plan/task blocker remains, and the user's
|
|
22
|
+
C3/release authorization covers this exact revision.
|
|
23
|
+
- [ ] For a valid legacy feature only, no unresolved blocker remains in its
|
|
24
|
+
`spec.json` adapter or separate receipts.
|
|
20
25
|
- [ ] Environment variables are configured (check `.env.example` vs target env).
|
|
21
26
|
- [ ] Database migrations are queued and reviewed (if applicable).
|
|
22
27
|
- [ ] Rollback procedure is documented and tested.
|
|
@@ -97,6 +102,8 @@ docker compose down && docker compose -f docker-compose.prev.yml up -d
|
|
|
97
102
|
|
|
98
103
|
## Integration
|
|
99
104
|
|
|
100
|
-
- Triggered
|
|
105
|
+
- Triggered only by explicit deployment/release authority after process-first
|
|
106
|
+
closeout, or by the valid legacy deployment transition for an existing packet.
|
|
101
107
|
- Reads deployment config from project root (`vercel.json`, `railway.json`, `docker-compose.yml`).
|
|
102
|
-
- Reports deployment status
|
|
108
|
+
- Reports deployment status and exact deployed revision back to the controller.
|
|
109
|
+
It does not write process-first Status/Receipt or legacy `spec.json` state.
|
|
@@ -18,9 +18,17 @@ You juggle two parallel universes defined by the `specs` ecosystem: The agile fe
|
|
|
18
18
|
### 1. Specs Lifecycle Guardian (`specs/`)
|
|
19
19
|
You enforce integrity across the `specs` architecture:
|
|
20
20
|
- Monitor and maintain feature specs explicitly stored in `specs/<feature-name>/`.
|
|
21
|
-
-
|
|
21
|
+
- For new process-first work, reconcile `plan.md` with its flat
|
|
22
|
+
`task-NN-*.md` files, accepted C1/C2 decisions, Ownership, Dependencies,
|
|
23
|
+
Acceptance, exactly one `Status:`, and the final inline `## Receipt`.
|
|
24
|
+
- Report process-first state drift to the controller or `cf:sync`; never
|
|
25
|
+
invent or write Status, Receipt, approval, or execution proof.
|
|
22
26
|
- Track cross-spec dependencies. Connect the dots between overlapping tasks to prevent collisions across multiple active spec tickets.
|
|
23
27
|
|
|
28
|
+
For a valid legacy packet only, validate `spec.json` against requirements,
|
|
29
|
+
design, nested task files, registry state, and separate receipts. Keep this
|
|
30
|
+
adapter isolated from process-first files.
|
|
31
|
+
|
|
24
32
|
### 2. Static Docs Upkeep (`docs/`)
|
|
25
33
|
You curate overarching project-level documents.
|
|
26
34
|
- **Rule of Engagement: UPDATE ONLY.** You may strictly update existing files like `docs/project-overview-pdr.md`, `docs/system-architecture.md`, `docs/code-standards.md`, or `docs/codebase-summary.md`. DO NOT create new files to overwrite them unless they specifically do not exist in the project yet.
|
|
@@ -69,6 +77,8 @@ If any doc file exceeds **800 LOC**, enforce modularity:
|
|
|
69
77
|
|
|
70
78
|
## Integration Points & Hooks
|
|
71
79
|
- Integrate seamlessly when called by `specs` or other team components to validate specifications.
|
|
80
|
+
- Treat `plan.md` plus flat tasks as the default current workflow; route
|
|
81
|
+
`spec.json` packets through the explicitly separate legacy adapter.
|
|
72
82
|
- **No Hallucinated Tools**: Only execute valid Node/Bash scripts that you have verified exist in the project tree.
|
|
73
83
|
|
|
74
84
|
## Report Format
|