@aibyzero/cm-workflow 0.17.0 → 0.18.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/.codex-plugin/plugin.json +1 -1
- package/AGENTS.md +27 -0
- package/CHANGELOG.md +230 -1
- package/CONTRIBUTING.md +47 -0
- package/README.md +21 -3
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/VERSION +1 -1
- package/compat/claude-commands/cm-challenge.md +3 -0
- package/docs/architecture.md +40 -13
- package/docs/cm-control-policy-v2.md +127 -9
- package/docs/fixes/20261013-claude-preinit-ui-invalidate.md +48 -0
- package/docs/installation.md +310 -4
- package/docs/js-workflow-control.md +153 -16
- package/docs/live-evidence-drivers.md +28 -4
- package/docs/out-of-scope/README.md +25 -0
- package/docs/out-of-scope/background-supervisor.md +32 -0
- package/docs/reviewed-integration.md +48 -0
- package/docs/user-guide.md +50 -21
- package/install-codex.sh +331 -18
- package/install.ps1 +28 -2
- package/install.sh +321 -17
- package/package.json +2 -1
- package/runtime/js/cm-ai/batch-location.mjs +55 -0
- package/runtime/js/cm-ai/batch-plan.mjs +242 -0
- package/runtime/js/cm-ai/checkpoint-package-material.mjs +162 -0
- package/runtime/js/cm-ai/claude-developer-proposal.schema.json +55 -1
- package/runtime/js/cm-ai/claude-review-stream.mjs +94 -21
- package/runtime/js/cm-ai/claude-tool-preview.mjs +11 -9
- package/runtime/js/cm-ai/cm-ai-admission.mjs +18 -12
- package/runtime/js/cm-ai/cm-ai-conversation-entry.mjs +91 -6
- package/runtime/js/cm-ai/cm-ai-qa-log.mjs +5 -1
- package/runtime/js/cm-ai/codex-config.mjs +6 -2
- package/runtime/js/cm-ai/codex-developer-basic-output.schema.json +3 -2
- package/runtime/js/cm-ai/codex-developer-output.schema.json +2 -1
- package/runtime/js/cm-ai/codex-reconnect-notice.mjs +6 -0
- package/runtime/js/cm-ai/codex-review-adapter.mjs +27 -7
- package/runtime/js/cm-ai/control-policy.mjs +24 -6
- package/runtime/js/cm-ai/developer-adapter.mjs +19 -5
- package/runtime/js/cm-ai/drive-core.mjs +236 -34
- package/runtime/js/cm-ai/drive-rate-limit.mjs +105 -0
- package/runtime/js/cm-ai/durable-runner-state.mjs +234 -33
- package/runtime/js/cm-ai/effect-contract.mjs +11 -2
- package/runtime/js/cm-ai/execution-policy.mjs +3 -1
- package/runtime/js/cm-ai/execution-snapshot.mjs +4 -2
- package/runtime/js/cm-ai/execution-store-limits.mjs +14 -7
- package/runtime/js/cm-ai/execution-store.mjs +60 -17
- package/runtime/js/cm-ai/fix-code-association.mjs +73 -2
- package/runtime/js/cm-ai/host-check.mjs +14 -6
- package/runtime/js/cm-ai/host-conversation-execution.mjs +70 -28
- package/runtime/js/cm-ai/host-qa-executor.mjs +38 -5
- package/runtime/js/cm-ai/host-qa-fix-owner.mjs +2 -2
- package/runtime/js/cm-ai/host-qa-policy.mjs +19 -2
- package/runtime/js/cm-ai/host-replay.mjs +148 -0
- package/runtime/js/cm-ai/host-session.mjs +42 -9
- package/runtime/js/cm-ai/host-stage-observer.mjs +26 -0
- package/runtime/js/cm-ai/host-tool-bridge.mjs +22 -9
- package/runtime/js/cm-ai/host-workflow-capabilities.mjs +19 -2
- package/runtime/js/cm-ai/host.mjs +1 -1
- package/runtime/js/cm-ai/implicit-qa-decision.mjs +5 -0
- package/runtime/js/cm-ai/integration-snapshots.mjs +50 -0
- package/runtime/js/cm-ai/live-evidence.mjs +28 -6
- package/runtime/js/cm-ai/operator-guidance.mjs +63 -30
- package/runtime/js/cm-ai/owned-process-cleanup.mjs +27 -9
- package/runtime/js/cm-ai/process-group-exit.mjs +46 -0
- package/runtime/js/cm-ai/provider-review-observation.mjs +3 -2
- package/runtime/js/cm-ai/qa-attachment.mjs +22 -0
- package/runtime/js/cm-ai/qa-config-revision.mjs +7 -2
- package/runtime/js/cm-ai/requirement-evidence.mjs +102 -0
- package/runtime/js/cm-ai/review-package.mjs +79 -7
- package/runtime/js/cm-ai/review-presentation-delta.mjs +166 -0
- package/runtime/js/cm-ai/review-presentation.mjs +177 -8
- package/runtime/js/cm-ai/reviewed-evidence-supersede.mjs +70 -2
- package/runtime/js/cm-ai/reviewed-integration.mjs +260 -0
- package/runtime/js/cm-ai/scope-revision.mjs +38 -0
- package/runtime/js/cm-ai/specification-material.mjs +2 -2
- package/runtime/js/cm-ai/task-runner.mjs +247 -41
- package/runtime/js/cm-ai/verification-auto.mjs +38 -0
- package/runtime/js/cm-ai/worker-claude-developer.mjs +39 -15
- package/runtime/js/cm-ai/worker-claude.mjs +35 -13
- package/runtime/js/cm-ai/worker-codex-developer.mjs +43 -17
- package/runtime/js/cm-ai/worker-codex.mjs +41 -7
- package/runtime/js/cm-fix/cause-invocation.mjs +16 -2
- package/runtime/js/cm-fix/cause-package.mjs +46 -1
- package/runtime/js/cm-fix/command-correction.mjs +37 -0
- package/runtime/js/cm-fix/cooperative.mjs +12 -0
- package/runtime/js/cm-fix/dossier.mjs +8 -2
- package/runtime/js/cm-fix/execution.mjs +578 -100
- package/runtime/js/cm-fix/final-review.mjs +39 -8
- package/runtime/js/cm-fix/finish.mjs +15 -11
- package/runtime/js/cm-fix/host-review.mjs +65 -10
- package/runtime/js/cm-fix/host.mjs +35 -12
- package/runtime/js/cm-fix/jest-command-correction.mjs +69 -0
- package/runtime/js/cm-fix/metrics.mjs +18 -5
- package/runtime/js/cm-fix/regression-evidence.mjs +3 -2
- package/runtime/js/cm-fix/regression.mjs +16 -7
- package/runtime/js/cm-fix/repair.mjs +29 -8
- package/runtime/js/cm-fix/review-verification-command.mjs +135 -0
- package/runtime/js/cm-fix/review-verification-contract.mjs +54 -0
- package/runtime/js/cm-fix/review-verification-diagnostic.mjs +75 -0
- package/runtime/js/cm-fix/review-verification-recovery.mjs +44 -0
- package/runtime/js/cm-fix/review-verification-server.mjs +38 -0
- package/runtime/js/cm-fix/review-verification.mjs +214 -0
- package/runtime/js/cm-fix/source-correction-recovery.mjs +65 -0
- package/runtime/js/cm-fix/start.mjs +6 -3
- package/runtime/js/cm-fix/test-type-correction.mjs +86 -0
- package/runtime/js/cm-fix/test-type-recovery.mjs +51 -0
- package/runtime/js/cm-fix/type-import-correction.mjs +89 -0
- package/runtime/js/cm-prd/accepted-design.mjs +8 -0
- package/runtime/js/cm-prd/analysis.mjs +13 -9
- package/runtime/js/cm-prd/change.mjs +37 -16
- package/runtime/js/cm-prd/draft-save.mjs +13 -6
- package/runtime/js/cm-prd/draft.mjs +31 -3
- package/runtime/js/cm-prd/failed-correction.mjs +19 -3
- package/runtime/js/cm-prd/inputs-replaced.mjs +3 -0
- package/runtime/js/cm-prd/review-correction.mjs +6 -4
- package/runtime/js/cm-prd/review-disposition.mjs +7 -1
- package/runtime/js/cm-prd/self-check-revision.mjs +2 -2
- package/runtime/js/cm-prd/self-check.mjs +125 -6
- package/runtime/js/cm-prd/session.mjs +30 -1
- package/runtime/js/cm-prd/summary.mjs +38 -17
- package/runtime/js/cm-prd/task-scope-record.mjs +97 -0
- package/runtime/js/cm-prd/tree-digest.mjs +34 -0
- package/runtime/js/cm-prd/validation-reason.mjs +8 -4
- package/runtime/js/cm-security/scan.mjs +1 -1
- package/runtime/js/commander/decision.mjs +44 -0
- package/runtime/js/commander/dispatch-registry.mjs +110 -0
- package/runtime/js/commander/ledger.mjs +265 -0
- package/runtime/js/commander/preflight.mjs +107 -0
- package/runtime/js/notify-later.mjs +13 -0
- package/runtime/js/notify-send.mjs +6 -2
- package/runtime/js/notify.mjs +570 -63
- package/runtime/js/review-findings.mjs +38 -0
- package/runtime/js/session-boundary.mjs +56 -0
- package/runtime/js/session-handoff.mjs +68 -0
- package/runtime/js/spec-task-line.mjs +27 -13
- package/runtime/js/specs-status.mjs +1 -1
- package/runtime/js/task-scope.mjs +197 -0
- package/runtime/logging.md +6 -1
- package/runtime/model-efficiency.md +69 -10
- package/runtime/orchestration.md +3 -1
- package/runtime/project-learning.md +2 -0
- package/runtime/review.md +12 -2
- package/runtime/test-contract.md +1 -0
- package/scripts/ci-test-weights.json +3 -0
- package/scripts/cm-ai-admission.mjs +11 -5
- package/scripts/cm-ai-admission.test.mjs +23 -2
- package/scripts/cm-ai-batch-drive.mjs +79 -18
- package/scripts/cm-ai-batch-drive.test.mjs +169 -3
- package/scripts/cm-ai-batch-host.mjs +38 -9
- package/scripts/cm-ai-batch-host.test.mjs +27 -14
- package/scripts/cm-ai-batch-learning-merge.test.mjs +36 -0
- package/scripts/cm-ai-batch-location.test.mjs +57 -0
- package/scripts/cm-ai-batch-plan.mjs +52 -0
- package/scripts/cm-ai-batch-plan.test.mjs +397 -0
- package/scripts/cm-ai-batch-run-fixture.mjs +446 -35
- package/scripts/cm-ai-batch-run-member-stops.test.mjs +16 -0
- package/scripts/cm-ai-batch-run-parallel.test.mjs +28 -1
- package/scripts/cm-ai-batch-run.mjs +483 -63
- package/scripts/cm-ai-batch-run.test.mjs +23 -4
- package/scripts/cm-ai-batch-session-e2e.test.mjs +235 -0
- package/scripts/cm-ai-batch-session-member.test.mjs +293 -0
- package/scripts/cm-ai-batch-session-recovery.test.mjs +423 -0
- package/scripts/cm-ai-check-recheck-cancellation.test.mjs +247 -0
- package/scripts/cm-ai-checklist-coverage.test.mjs +4 -2
- package/scripts/cm-ai-checkpoint-package-material.test.mjs +221 -0
- package/scripts/cm-ai-checkpoint-package-owner.test.mjs +193 -0
- package/scripts/cm-ai-control-launch.test.mjs +21 -0
- package/scripts/cm-ai-control-policy.test.mjs +82 -0
- package/scripts/cm-ai-control-v2-drive.test.mjs +398 -3
- package/scripts/cm-ai-control-v2-supersede-race.mjs +25 -0
- package/scripts/cm-ai-control-v2-supersede.test.mjs +318 -0
- package/scripts/cm-ai-develop-driver-gaps.test.mjs +163 -0
- package/scripts/cm-ai-development-rework.test.mjs +423 -0
- package/scripts/cm-ai-drive-bootstrap-rules.test.mjs +3 -2
- package/scripts/cm-ai-drive.mjs +73 -17
- package/scripts/cm-ai-drive.test.mjs +37 -5
- package/scripts/cm-ai-execution-store-legacy-probe.test.mjs +84 -0
- package/scripts/cm-ai-host-fixture.mjs +9 -6
- package/scripts/cm-ai-host-protected.test.mjs +1 -1
- package/scripts/cm-ai-host.mjs +60 -19
- package/scripts/cm-ai-host.test.mjs +15 -0
- package/scripts/cm-ai-integration-adoption.test.mjs +223 -0
- package/scripts/cm-ai-integration-independence.test.mjs +23 -0
- package/scripts/cm-ai-integration-launch.test.mjs +240 -0
- package/scripts/cm-ai-integration-preview.mjs +41 -0
- package/scripts/cm-ai-integration-snapshots.test.mjs +197 -0
- package/scripts/cm-ai-nested-execution.test.mjs +29 -1
- package/scripts/cm-ai-operator-guidance.test.mjs +71 -0
- package/scripts/cm-ai-prefinal-delivery.test.mjs +278 -0
- package/scripts/cm-ai-project-qa-gate.test.mjs +56 -0
- package/scripts/cm-ai-qa-fingerprint-config.test.mjs +28 -0
- package/scripts/cm-ai-qa-rerun-timeouts.test.mjs +36 -2
- package/scripts/cm-ai-requirement-evidence.test.mjs +65 -0
- package/scripts/cm-ai-review-failure.test.mjs +150 -5
- package/scripts/cm-ai-review-timeout.test.mjs +20 -0
- package/scripts/cm-ai-run.mjs +88 -21
- package/scripts/cm-ai-scope-revision.test.mjs +341 -0
- package/scripts/cm-ai-spec-rebind.test.mjs +13 -0
- package/scripts/cm-ai-supersede.test.mjs +28 -0
- package/scripts/cm-ai-verification-auto.test.mjs +99 -0
- package/scripts/cm-announce-hook.mjs +35 -8
- package/scripts/cm-announce-hook.test.mjs +25 -0
- package/scripts/cm-challenge.test.mjs +61 -0
- package/scripts/cm-check-drive-files.mjs +2 -2
- package/scripts/cm-check-host.test.mjs +1 -1
- package/scripts/cm-check-runtime.sh +58 -1
- package/scripts/cm-claude-developer-worker.test.mjs +56 -7
- package/scripts/cm-claude-install-layout.test.mjs +1 -1
- package/scripts/cm-claude-probe.test.mjs +26 -0
- package/scripts/cm-claude-review-diagnostics.test.mjs +235 -0
- package/scripts/cm-claude-review-stream.test.mjs +49 -0
- package/scripts/cm-claude-worker.test.mjs +16 -0
- package/scripts/cm-codex-developer-reconnect-notice.test.mjs +98 -0
- package/scripts/cm-codex-developer-worker.test.mjs +120 -0
- package/scripts/cm-codex-install-local-edit-guard.test.mjs +436 -0
- package/scripts/cm-codex-prompt-input.test.mjs +153 -0
- package/scripts/cm-codex-reconnect-notice.test.mjs +167 -0
- package/scripts/cm-commander-ledger.test.mjs +260 -0
- package/scripts/cm-commander-p2.test.mjs +295 -0
- package/scripts/cm-commander-preflight.mjs +84 -0
- package/scripts/cm-commander.mjs +116 -0
- package/scripts/cm-config-lock.mjs +35 -0
- package/scripts/cm-controlled-correction.test.mjs +10 -1
- package/scripts/cm-developer-failure-code.test.mjs +62 -0
- package/scripts/cm-display-task-id.test.mjs +41 -0
- package/scripts/cm-drive-liveness.test.mjs +83 -0
- package/scripts/cm-efficiency-presentation-delta.test.mjs +218 -0
- package/scripts/cm-execution-snapshot-reuse.test.mjs +115 -0
- package/scripts/cm-external-batch-host.test.mjs +12 -9
- package/scripts/cm-external-process-cleanup.test.mjs +128 -0
- package/scripts/cm-external-qa-fix.test.mjs +89 -7
- package/scripts/cm-external-review-reconciliation.test.mjs +11 -0
- package/scripts/cm-failover.mjs +48 -10
- package/scripts/cm-failover.test.mjs +46 -0
- package/scripts/cm-fix-cause-invocation.test.mjs +19 -4
- package/scripts/cm-fix-command-correction.mjs +17 -0
- package/scripts/cm-fix-command-correction.test.mjs +211 -0
- package/scripts/cm-fix-cooperative-closeout.test.mjs +87 -0
- package/scripts/cm-fix-diagnosis-module-correction.test.mjs +217 -0
- package/scripts/cm-fix-drive.mjs +33 -5
- package/scripts/cm-fix-drive.test.mjs +49 -0
- package/scripts/cm-fix-host-review-assembly.test.mjs +197 -1
- package/scripts/cm-fix-host-review.test.mjs +21 -9
- package/scripts/cm-fix-host.mjs +26 -8
- package/scripts/cm-fix-monorepo-map.test.mjs +92 -0
- package/scripts/cm-fix-observation-task-id.test.mjs +122 -0
- package/scripts/cm-fix-regression-input-budget.test.mjs +111 -0
- package/scripts/cm-fix-repair-input-budget.test.mjs +119 -0
- package/scripts/cm-fix-review-file-paging.test.mjs +91 -0
- package/scripts/cm-fix-review-preflight.mjs +24 -0
- package/scripts/cm-fix-review-storage.test.mjs +233 -0
- package/scripts/cm-fix-review-verification-command.test.mjs +242 -0
- package/scripts/cm-fix-review-verification-evidence.test.mjs +218 -0
- package/scripts/cm-fix-review-verification-integration.test.mjs +81 -0
- package/scripts/cm-fix-review-verification-recovery.test.mjs +198 -0
- package/scripts/cm-fix-review-verification.test.mjs +146 -0
- package/scripts/cm-fix-revision-transport.test.mjs +81 -0
- package/scripts/cm-fix-source-correction.test.mjs +296 -0
- package/scripts/cm-fix-test-type-correction.mjs +18 -0
- package/scripts/cm-fix-test-type-correction.test.mjs +123 -0
- package/scripts/cm-fix-test-type-owner.test.mjs +208 -0
- package/scripts/cm-fix-test-type-verification-cost.test.mjs +66 -0
- package/scripts/cm-fix-type-import-correction.test.mjs +95 -0
- package/scripts/cm-fix-verification-diagnostic.test.mjs +200 -0
- package/scripts/cm-fix-verification-recovery.mjs +33 -0
- package/scripts/cm-host-diagnostic.test.mjs +33 -0
- package/scripts/cm-host-liveness.test.mjs +150 -0
- package/scripts/cm-host-qa-executor.test.mjs +77 -0
- package/scripts/cm-host-replay.test.mjs +176 -0
- package/scripts/cm-host-stage-observer.test.mjs +41 -0
- package/scripts/cm-install-local-edit-guard.test.mjs +621 -0
- package/scripts/cm-install-manifest.sh +351 -0
- package/scripts/cm-live-evidence.test.mjs +59 -1
- package/scripts/cm-log-event.mjs +61 -10
- package/scripts/cm-log-event.test.mjs +121 -1
- package/scripts/cm-matt-skills.mjs +576 -0
- package/scripts/cm-matt-skills.test.mjs +550 -0
- package/scripts/cm-notify-command.test.mjs +42 -10
- package/scripts/cm-notify.mjs +14 -10
- package/scripts/cm-notify.test.mjs +625 -75
- package/scripts/cm-patrol.mjs +4 -1
- package/scripts/cm-patrol.test.mjs +23 -5
- package/scripts/cm-prd-answer-gaps.test.mjs +2 -2
- package/scripts/cm-prd-completion.test.mjs +56 -13
- package/scripts/cm-prd-design-phase.test.mjs +78 -8
- package/scripts/cm-prd-draft-save.test.mjs +12 -0
- package/scripts/cm-prd-draft.test.mjs +1 -1
- package/scripts/cm-prd-drive.mjs +13 -6
- package/scripts/cm-prd-drive.test.mjs +46 -2
- package/scripts/cm-prd-gate-diagnostic.test.mjs +2 -2
- package/scripts/cm-prd-host.mjs +10 -5
- package/scripts/cm-prd-host.test.mjs +4 -2
- package/scripts/cm-prd-inputs-replaced.test.mjs +1 -1
- package/scripts/cm-prd-review-disposition.test.mjs +124 -8
- package/scripts/cm-prd-revision.test.mjs +1 -1
- package/scripts/cm-prd-self-check-revision.test.mjs +16 -1
- package/scripts/cm-prd-self-check-rules.test.mjs +239 -0
- package/scripts/cm-prd-self-check.test.mjs +105 -5
- package/scripts/cm-prd-session-recovery.test.mjs +5 -3
- package/scripts/cm-prd-summary.test.mjs +55 -3
- package/scripts/cm-prd-task-grouping.test.mjs +6 -6
- package/scripts/cm-prd-tree-digest.test.mjs +74 -0
- package/scripts/cm-refactor-drive.mjs +2 -1
- package/scripts/cm-refactor-drive.test.mjs +9 -0
- package/scripts/cm-release-smoke.sh +3 -15
- package/scripts/cm-skill-hints-autowire.test.mjs +394 -0
- package/scripts/cm-skill-hints-exam.mjs +149 -0
- package/scripts/cm-skill-hints-install.test.mjs +168 -0
- package/scripts/cm-skill-hints.exam.json +706 -0
- package/scripts/cm-skill-hints.json +119 -0
- package/scripts/cm-skill-hints.mjs +669 -0
- package/scripts/cm-skill-hints.test.mjs +831 -0
- package/scripts/cm-skill-judge.mjs +181 -0
- package/scripts/cm-skill-judge.test.mjs +255 -0
- package/scripts/cm-specs-status.test.mjs +4 -2
- package/scripts/cm-start-check.mjs +208 -0
- package/scripts/cm-start-check.test.mjs +321 -0
- package/scripts/cm-task-gate.mjs +150 -29
- package/scripts/cm-task-gate.test.mjs +73 -1
- package/scripts/cm-task-id-grammar.test.mjs +66 -0
- package/scripts/cm-task-scope.test.mjs +308 -0
- package/scripts/cm-test-suite.mjs +109 -0
- package/scripts/cm-test-suite.test.mjs +162 -0
- package/scripts/cm-upgrade-compat-batch.test.mjs +172 -0
- package/scripts/cm-upgrade-compat.test.mjs +239 -0
- package/scripts/cm-workflow-config.mjs +12 -2
- package/scripts/fixtures/fix-verification-claude.mjs +44 -0
- package/scripts/fixtures/host-diagnostic.mjs +33 -0
- package/scripts/fixtures/reviewed-integration.mjs +202 -0
- package/scripts/scan-public-safety.py +1 -0
- package/scripts/session-boundary.test.mjs +170 -0
- package/scripts/test-npm-install.py +14 -3
- package/scripts/test-shell-compat.sh +2 -0
- package/scripts/validate-public-repo.py +1 -0
- package/scripts/validate-test-cases.mjs +3 -2
- package/skills/cm-ai/SKILL.md +5 -2
- package/skills/cm-ai/references/N4-review.md +2 -1
- package/skills/cm-ai/references/N6-qa-eval.md +3 -1
- package/skills/cm-ai/references/N8-finish.md +22 -0
- package/skills/cm-ai/references/js-host-qa-recovery.md +1 -1
- package/skills/cm-ai/references/js-host-recovery.md +79 -3
- package/skills/cm-ai/references/js-host.md +89 -17
- package/skills/cm-challenge/SKILL.md +65 -0
- package/skills/cm-challenge/evals/README.md +18 -0
- package/skills/cm-challenge/evals/trigger-cases.json +20 -0
- package/skills/cm-challenge/evals/trigger-config.json +28 -0
- package/skills/cm-challenge/references/examples.md +15 -0
- package/skills/cm-check/SKILL.md +5 -0
- package/skills/cm-check/references/js-host.md +2 -0
- package/skills/cm-fix/SKILL.md +12 -3
- package/skills/cm-fix/references/command-correction.md +67 -0
- package/skills/cm-fix/references/isolated-review.md +54 -0
- package/skills/cm-fix/references/js-host.md +62 -2
- package/skills/cm-fix/references/test-type-correction.md +72 -0
- package/skills/cm-fix/references/verification-recovery.md +114 -0
- package/skills/cm-idea/SKILL.md +2 -0
- package/skills/cm-idea/references/js-host.md +2 -0
- package/skills/cm-notify/SKILL.md +2 -0
- package/skills/cm-prd/SKILL.md +12 -8
- package/skills/cm-prd/references/brownfield.md +8 -1
- package/skills/cm-prd/references/change-mode.md +6 -0
- package/skills/cm-prd/references/greenfield.md +4 -0
- package/skills/cm-prd/references/js-host.md +4 -2
- package/skills/cm-prd/references/spec-self-check.md +5 -1
- package/skills/cm-refactor/SKILL.md +8 -0
- package/skills/cm-refactor/references/js-host.md +2 -0
- package/skills/cm-test/SKILL.md +4 -0
- package/templates/dashboard/dashboard.html +2 -2
- package/templates/pixel/cm-pixel.html +1 -1
- package/templates/pixel/cm-pixel.sh +1 -1
- package/templates/pixel/dev/template.html +1 -1
- package/templates/statusline/cm-statusline.sh +1 -1
package/docs/installation.md
CHANGED
|
@@ -76,7 +76,7 @@ Install or upgrade with the same command:
|
|
|
76
76
|
npx @aibyzero/cm-workflow@latest install
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
To pin a version, use `npx @aibyzero/cm-workflow@0.
|
|
79
|
+
To pin a version, use `npx @aibyzero/cm-workflow@0.18.0 install` from outside
|
|
80
80
|
the CM Workflow source checkout (for example, your home directory). Inside a
|
|
81
81
|
checkout with the same package name and version, npm can select the local
|
|
82
82
|
uninstalled package and report `cm-workflow: command not found`.
|
|
@@ -96,9 +96,11 @@ Running `cm-workflow install` through npm installs into the
|
|
|
96
96
|
same `~/plugins/cm-workflow` directory and personal marketplace as the source
|
|
97
97
|
installer. Existing installations require confirmation; `install --yes` accepts
|
|
98
98
|
replacement. The npm `--yes` before `--package` only accepts npm's package-fetch
|
|
99
|
-
prompt; it does not accept plugin replacement.
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
prompt; it does not accept plugin replacement. Files of the managed plugin that
|
|
100
|
+
were edited after the last install stop the replacement (see
|
|
101
|
+
[Local edits, install lock and known limitations](#local-edits-install-lock-and-known-limitations));
|
|
102
|
+
files the installer never recorded are removed with the old plugin directory.
|
|
103
|
+
Source checkouts, project code and specs remain outside the managed destination. Installing older source afterward can downgrade it.
|
|
102
104
|
Start a new Codex task after an upgrade. `npx --yes` accepts npm's download
|
|
103
105
|
prompt only; `install --yes` separately accepts replacing the managed plugin.
|
|
104
106
|
|
|
@@ -141,6 +143,9 @@ accept replacement of all listed CM files:
|
|
|
141
143
|
./install.sh --yes
|
|
142
144
|
```
|
|
143
145
|
|
|
146
|
+
Both Bash installers refuse to discard local edits; see
|
|
147
|
+
[Local edits, install lock and known limitations](#local-edits-install-lock-and-known-limitations).
|
|
148
|
+
|
|
144
149
|
The installer runs the shared mechanical check before reporting success. Start a
|
|
145
150
|
new Claude Code session, then run `/cm-check`. The installer also keeps the
|
|
146
151
|
historic `/cm:check` alias on macOS/Linux. The installed manual is available at
|
|
@@ -176,6 +181,108 @@ Claude-specific workflow fork is installed.
|
|
|
176
181
|
|
|
177
182
|
这只是启动命令的建议规则,不是 CM 的运行授权;计划文件里的操作与权限仍须逐项审查。覆盖旧审查证据的 `--supersede-reviewed-evidence`、保留前驱代码漂移的 `--accept-superseded-code-drift`、SwiftPM 的 `--disable-sandbox`、QA 重跑的 `--rerun-unknown-qa`/`--rerun-blocked-qa`、放弃审查的 `--allow-abandon-review`,以及修改权限配置,都应由用户针对本次动作确认。尤其 `--supersede-reviewed-evidence` 和 `--accept-superseded-code-drift` 可以写在驱动的 `PLAN.permissions` 中,单凭上面的 Bash 通配规则无法识别;无法逐次审阅计划时,不要启用这些通配规则。要试改驱动脚本,请把副本放在项目或临时工作目录,不在 `~/.claude/scripts/` 原地编辑。若组织级权限策略继续拒绝,即使项目规则允许也应遵循该策略。
|
|
178
183
|
|
|
184
|
+
## Local edits, install lock and known limitations
|
|
185
|
+
|
|
186
|
+
Applies to `install.sh` and `install-codex.sh` (not `install.ps1`).
|
|
187
|
+
|
|
188
|
+
**Install manifest.** A successful install records the sha256 of each core file
|
|
189
|
+
it wrote: `<CLAUDE_HOME>/cm-workflow/install-manifest.sha256` (default
|
|
190
|
+
`~/.claude/...`) and `~/plugins/cm-workflow/.cm-install-manifest.sha256`.
|
|
191
|
+
`__pycache__` and `.DS_Store` files are copied but not recorded, and the optional
|
|
192
|
+
updater scripts in `~/.cm-workflow` are outside the core install and the manifest.
|
|
193
|
+
A file name containing a backslash is refused.
|
|
194
|
+
|
|
195
|
+
**Local edits.** On reinstall, a recorded file that still exists but whose
|
|
196
|
+
sha256 changed is a local edit. A symlink, a directory, or a symlinked parent at
|
|
197
|
+
a recorded path also counts. The installer lists the files and exits with
|
|
198
|
+
status 3; `--yes` and an interactive `y` do not bypass this. Pass
|
|
199
|
+
`--overwrite-local-edits` only to discard those edits. A manifest that is
|
|
200
|
+
malformed or not a regular file also stops the install, and so does any
|
|
201
|
+
check that cannot read its own files or cannot search a directory holding a
|
|
202
|
+
recorded file (that is never taken as "deleted"). Without a previous
|
|
203
|
+
manifest (first install or an older version) the check is skipped with a
|
|
204
|
+
notice, so edits made before the first manifest cannot be detected. A recorded
|
|
205
|
+
file that was deleted is not treated as an edit.
|
|
206
|
+
|
|
207
|
+
The check runs before anything is written, again after the overwrite prompt,
|
|
208
|
+
and again in the middle of the transaction:
|
|
209
|
+
|
|
210
|
+
| Installer | When the late check finds a change | What is left |
|
|
211
|
+
| ---- | ---- | ---- |
|
|
212
|
+
| `install.sh` | Right before each file is copied (content, file type and parent path) | Exit 3 after files were already written: the files written so far are rolled back; the changed file is untouched |
|
|
213
|
+
| `install-codex.sh` | After the old plugin directory is renamed aside | Exit 3: the old directory is moved back and the marketplace restored |
|
|
214
|
+
|
|
215
|
+
The npm entry and `$cm-check` automatic upgrades only pass `--yes`. When the
|
|
216
|
+
installer stops for local edits, `$cm-check` reports the upgrade as `blocked`
|
|
217
|
+
(its CLI exits 1, not 3). Save your edits, then run the Bash installer yourself
|
|
218
|
+
with `--overwrite-local-edits` if you want to discard them.
|
|
219
|
+
|
|
220
|
+
**Install lock.** One install per real target at a time. The lock is a
|
|
221
|
+
directory next to the target named `.<target name>.cm-install.lock`:
|
|
222
|
+
`~/..claude.cm-install.lock` for the default Claude target (two dots: the target
|
|
223
|
+
name itself starts with a dot) and `~/plugins/.cm-workflow.cm-install.lock` for
|
|
224
|
+
Codex. Paths are resolved to their physical location first, so `CLAUDE_HOME`
|
|
225
|
+
spellings such as `~/.claude/.` and a Claude install aimed at
|
|
226
|
+
`~/plugins/cm-workflow` share the same lock. A second install exits with status 4
|
|
227
|
+
and names the holder pid, its start time and whether it is still running. A
|
|
228
|
+
leftover lock is never taken over automatically: the installer prints a
|
|
229
|
+
shell-quoted `rm -rf` command to run after you confirm no install is in progress.
|
|
230
|
+
The lock is released on success, on failure, and on HUP/INT/TERM, including a
|
|
231
|
+
signal sent to the whole process group: the lock `mkdir` and the Codex rename run
|
|
232
|
+
with those signals ignored, so their result is always recorded before the
|
|
233
|
+
installer exits.
|
|
234
|
+
|
|
235
|
+
**Paths.** The install root must not be a symlink (`CLAUDE_HOME=/link/.` is
|
|
236
|
+
refused); its parent directories are resolved with `pwd -P`. For Codex,
|
|
237
|
+
`~/plugins`, `~/plugins/cm-workflow`, `~/.agents`, `~/.agents/plugins` and
|
|
238
|
+
`marketplace.json` must not be symlinks, and the marketplace must be a regular
|
|
239
|
+
file. Use real directories at those paths. The marketplace and its two parent
|
|
240
|
+
directories are checked again right before the marketplace is written and right
|
|
241
|
+
before a rollback writes it back; if a rollback finds the wrong type there, it
|
|
242
|
+
writes nothing, reports the rollback as incomplete and keeps the marketplace
|
|
243
|
+
backup.
|
|
244
|
+
|
|
245
|
+
**Rollback.** A failed install restores what it wrote. It trusts only complete
|
|
246
|
+
records of its own list of written files that name a file this install manages;
|
|
247
|
+
a record cut short (for example by a full disk) or an unknown one is not used and
|
|
248
|
+
makes the rollback incomplete. If a restore step itself
|
|
249
|
+
fails, the installer still tries the remaining steps and releases the lock, reports
|
|
250
|
+
that the rollback is incomplete (`回滚不完整` / `rollback is incomplete`), and keeps the recovery copies
|
|
251
|
+
(`.cm-claude.backup.<pid>` next to the Claude target, holding the previous files
|
|
252
|
+
and `.cm-previous-install-manifest`; for Codex the listed backup, failed-plugin
|
|
253
|
+
and marketplace-backup paths under `~/plugins`).
|
|
254
|
+
If `~/plugins` itself cannot be searched when a Codex install fails, the
|
|
255
|
+
installer cannot tell what is there: it restores nothing under it, reports the
|
|
256
|
+
rollback as incomplete, prints the expected recovery paths, and leaves the lock
|
|
257
|
+
for you to remove after restoring access.
|
|
258
|
+
|
|
259
|
+
Protection boundary (decided for this feature):
|
|
260
|
+
|
|
261
|
+
> 安装器以用户本人账号运行,「安装进行途中有人故意把受管目录或其父目录替换成符号链接」不在本功能防护范围内——能这样做的人本来就能直接改家目录任何文件,安装器挡不住。本功能要防的是别的会话手改已装文件后被静默覆盖。入口处已有的静态链接拒绝保留。
|
|
262
|
+
|
|
263
|
+
In English: the installers run as you. Deliberately swapping a managed directory
|
|
264
|
+
or one of its parents for a symlink while an install runs is out of scope,
|
|
265
|
+
because whoever can do that can already change any file in your home directory.
|
|
266
|
+
This feature protects files that another session edited from being silently
|
|
267
|
+
overwritten. The symlink refusals at the entry checks stay.
|
|
268
|
+
|
|
269
|
+
Known limitations:
|
|
270
|
+
|
|
271
|
+
| Limitation | Why / what to do |
|
|
272
|
+
| ---- | ---- |
|
|
273
|
+
| No atomic exclusion against people editing files | A file can still change between its check and its copy, and a rollback can overwrite an edit made to a file after it was written. Do not edit installed CM files while an install runs. |
|
|
274
|
+
| Readers see the transaction | `install.sh` copies file by file, so a running CM session can read a mix of versions or a half-written file; `install-codex.sh` leaves the plugin directory briefly missing between its two renames. Finish active CM tasks first, then start a new session after installing. |
|
|
275
|
+
| SIGKILL, power loss, kernel or storage failure | The exit trap cannot run and there is no persistent recovery journal. The lock and the backup directory may remain; recover by hand using them. |
|
|
276
|
+
| No manifest yet; deleted and unrecorded files | Without a manifest nothing can be judged. A deleted recorded file is not an edit. Codex replaces the whole directory, so unrecorded files you added there are removed; Claude leaves files it does not install in place. |
|
|
277
|
+
| Windows and the optional updater | `install.ps1` has none of this protection. `~/.cm-workflow/cm-update.sh` and `cm-announce.sh` are not in the manifest. |
|
|
278
|
+
| No forced overwrite from npm or `$cm-check` | Intentional: they stop on local edits; run the Bash installer yourself to discard edits. |
|
|
279
|
+
| `~/.cm-workflow/cm-update.sh` deletes first | The optional auto-updater uses its own lock and older path list and deletes files removed upstream before it runs `install.sh`, outside this lock and check. It can delete a file and then stop on a local edit. |
|
|
280
|
+
| Other marketplace writers and Codex internal state | The lock only coordinates CM installers. Do not manage other Codex plugins while CM installs: a rollback restores the whole previous `marketplace.json`. Cleanup does not undo Codex cache or registration side effects of `codex plugin add`. |
|
|
281
|
+
| Directories replaced while an install runs | Out of scope (see the boundary above). Partial checks remain: the marketplace structure is re-checked before its directory is first created, before it is written and before a rollback writes it; the Codex local-edit checks stop with status 2 when `~/plugins` is no longer the physical directory resolved at start, and then the lock is not deleted through the replaced path (remove it by hand). Other write points are not re-checked. |
|
|
282
|
+
| Temporary manifest | `install.sh` writes the new manifest to a random `.install-manifest.XXXXXX` file created by `mktemp` next to it and removes only that file on failure. |
|
|
283
|
+
| File names | The manifest is line based; names containing a newline or a backslash are not supported. |
|
|
284
|
+
| Test hook | `CM_INSTALL_TEST_HOOK` exists for the repository's fault-injection tests. It is unset normally; when set, the installer runs that program at fixed points, so never set it outside tests. |
|
|
285
|
+
|
|
179
286
|
## Claude Code on Windows
|
|
180
287
|
|
|
181
288
|
```powershell
|
|
@@ -236,6 +343,205 @@ supported Bash environment, add the following commands to Claude Code's
|
|
|
236
343
|
|
|
237
344
|
Set `CM_UPDATE_REMOTE` when your team intentionally uses a fork.
|
|
238
345
|
|
|
346
|
+
## Optional companion skills (Matt Pocock)
|
|
347
|
+
|
|
348
|
+
CM recommends thirteen skills from [mattpocock/skills](https://github.com/mattpocock/skills)
|
|
349
|
+
(MIT) for work between CM stages, such as grilling a plan before `cm-prd` or finding
|
|
350
|
+
refactoring opportunities before `cm-refactor`, or a `retro` of the session once
|
|
351
|
+
`cm-ai` has finished (N8 prints one line pointing at it). CM never depends on them.
|
|
352
|
+
|
|
353
|
+
Installers put them in by default: `install.sh`, `install-codex.sh` and `install.ps1`
|
|
354
|
+
copy the ones missing from `~/.claude/skills` and `~/.agents/skills`, with the same
|
|
355
|
+
fetch and checks as the manual command below, and print what was added. A fetch that
|
|
356
|
+
fails (no network, no `git`) only warns; CM itself is installed either way, and the
|
|
357
|
+
manual command is printed for later. `/cm-check` reports the status and whether the
|
|
358
|
+
install-time default is on.
|
|
359
|
+
|
|
360
|
+
An install does not add the skills when:
|
|
361
|
+
|
|
362
|
+
- you pass `--no-matt-skills` (`-NoMattSkills` for `install.ps1`) or set
|
|
363
|
+
`CM_MATT_SKILLS_INSTALL=off`. This covers that run only: the next install without
|
|
364
|
+
them adds the skills as usual; skills already there are kept;
|
|
365
|
+
- `~/.cm-workflow/matt-skills.local.json` has `"install": false`, which turns the
|
|
366
|
+
default off for good; or that file cannot be read, is empty, or has the wrong shape
|
|
367
|
+
(`install` must be `true`/`false`). Then it warns and changes nothing until you fix
|
|
368
|
+
the file;
|
|
369
|
+
- a skill is settled: CM records every skill it has seen in a skills directory (put in
|
|
370
|
+
by it, or already there, including a same-named skill with other content) in
|
|
371
|
+
`~/.cm-workflow/matt-skills.auto.json`. A settled skill that is missing later was
|
|
372
|
+
removed by you, and no install puts it back. If that record cannot be read or has
|
|
373
|
+
another shape, it is kept as it is and no install adds anything until you fix or
|
|
374
|
+
delete it.
|
|
375
|
+
|
|
376
|
+
Upgrade boundary: versions before this one kept no record, so a skill you installed by
|
|
377
|
+
hand and removed earlier cannot be told from one you never had, and the first install of
|
|
378
|
+
this version adds every missing skill once. To keep that choice, opt out first (the flag or
|
|
379
|
+
the environment variable for that run, or `"install": false`). The fetch is bounded (two
|
|
380
|
+
minutes per git call); a stalled network ends in the same warning as a failed one.
|
|
381
|
+
|
|
382
|
+
A skill whose name already exists with other content is never overwritten, by the
|
|
383
|
+
default or by the manual command. To install by hand (for example after opting out),
|
|
384
|
+
run the printed command:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
node ~/.claude/scripts/cm-matt-skills.mjs install
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
The command fetches only commit `5beb35b` into a private temporary repository,
|
|
391
|
+
reads files straight from git without a checkout, and checks every file and the
|
|
392
|
+
upstream `LICENSE` against the SHA-256 list built into the script. Any mismatch,
|
|
393
|
+
extra or missing file, or non-regular file aborts the whole install before
|
|
394
|
+
anything is written. Each skill is copied with `LICENSE` into both skill
|
|
395
|
+
directories; a skill whose name already exists is skipped and reported, never
|
|
396
|
+
overwritten, and a skills directory that is not a usable directory is reported
|
|
397
|
+
as a failure. Nothing downloaded is executed: git runs without your git
|
|
398
|
+
configuration, hooks or credential helpers, over https or local paths only;
|
|
399
|
+
proxy settings are taken from `https_proxy`-style environment variables.
|
|
400
|
+
`--source <https URL or path>` uses a mirror, which must serve the pinned commit
|
|
401
|
+
by id; the commit and checksums still apply. Start a new session to see newly
|
|
402
|
+
installed skills.
|
|
403
|
+
|
|
404
|
+
## Optional skill hints (trial)
|
|
405
|
+
|
|
406
|
+
A `UserPromptSubmit` hook that reads each message you type, matches it against a
|
|
407
|
+
keyword table and, when a skill fits, shows you a one-line hint such as
|
|
408
|
+
`💡 技能提醒:可以试 /grill-me——…`. The hint is shown to you directly
|
|
409
|
+
(`systemMessage`) and is not added to the model's context. For these hints,
|
|
410
|
+
matching is local keyword and optional regex matching: nothing is sent anywhere
|
|
411
|
+
and no tokens are spent on it. The three auto-started skills below are the
|
|
412
|
+
exception: when a TypeSafe key is available, the first 500 characters of each
|
|
413
|
+
message are sent to TypeSafe's Jev to judge them. Messages over 2000 characters and text inside ``` fences are
|
|
414
|
+
skipped, at most two skills are hinted per message, and each skill at most once
|
|
415
|
+
per session. Sessions that CM itself launches set `CM_SKILL_HINTS=off`.
|
|
416
|
+
|
|
417
|
+
Three author skills that the model cannot start on its own (they are marked
|
|
418
|
+
`disable-model-invocation`) are started instead of hinted, when their pinned author
|
|
419
|
+
version is installed for that host:
|
|
420
|
+
|
|
421
|
+
- `handoff`: the hook adds one sentence to the model's context telling it to read
|
|
422
|
+
that skill's `SKILL.md` and follow it, and shows you
|
|
423
|
+
`🤖 技能自动调用:已让模型用 /handoff`.
|
|
424
|
+
- `wayfinder` and `improve-codebase-architecture`: the model is told to ask you
|
|
425
|
+
first and to read the skill only after you agree
|
|
426
|
+
(`🤖 技能自动调用:已让模型先问你要不要用 /wayfinder`).
|
|
427
|
+
|
|
428
|
+
Whether one of them fits is judged by TypeSafe's Jev when a TypeSafe key is
|
|
429
|
+
available (`TYPESAFE_API_KEY`, or on macOS a keychain item named
|
|
430
|
+
`TYPESAFE_API_KEY` for your user). Only the first 500 characters of the message
|
|
431
|
+
are sent. A message is kept local, and the keyword table decides for it, when:
|
|
432
|
+
|
|
433
|
+
- after folding it contains one of a fixed
|
|
434
|
+
list of credential words: password, passwd, pwd, passcode, token, secret, API key,
|
|
435
|
+
access key, private key, credential, `密码`, `密钥`, `口令`, `令牌`, `凭证`, `凭据`
|
|
436
|
+
and their traditional Chinese forms. Folding works character by character: a letter
|
|
437
|
+
or digit becomes its plain form (full-width and other compatibility forms made plain,
|
|
438
|
+
accents split off), a symbol stays only when it stands for exactly one letter or digit
|
|
439
|
+
(a circled letter), and everything else is dropped (spaces, punctuation, zero-width
|
|
440
|
+
and control characters, modifier letters, Hangul fillers, symbols such as `№`); then
|
|
441
|
+
lower case. So `API key`, `api_key`, `API key` and a zero-width space inside the
|
|
442
|
+
word all count;
|
|
443
|
+
- or it holds a known key shape (API keys, tokens, private keys), a long mixed-case run,
|
|
444
|
+
or the TypeSafe key itself.
|
|
445
|
+
|
|
446
|
+
This is pattern matching, not a guarantee. It does not catch: a credential pasted with
|
|
447
|
+
no recognisable shape and no credential word; look-alike letters from other scripts
|
|
448
|
+
(a Cyrillic `а` in `pаssword`); letters with no decomposition (`tøken`); extra, missing,
|
|
449
|
+
swapped or digit-for-letter characters (`passXword`, `t0ken`); escapes and encodings
|
|
450
|
+
(`pass%77ord`); text reordered with bidirectional controls; other wording or languages. Jev gets at most 3
|
|
451
|
+
seconds, with a second request when the first fails or has not answered within 1
|
|
452
|
+
second. Without a key, on a credential-looking message, or when Jev fails, the
|
|
453
|
+
same keyword table decides. A message that opens with a command (`/handoff …`) is
|
|
454
|
+
left to the host. `"judge": false` in your local file keeps it to keywords even
|
|
455
|
+
with a key. The log records which skill was started and whether Jev or keywords
|
|
456
|
+
decided, never the message or the key.
|
|
457
|
+
|
|
458
|
+
Installers turn it on by default. `install.sh` and `install.ps1` add the hook to
|
|
459
|
+
`~/.claude/settings.json`, and `install-codex.sh` adds it to `~/.codex/hooks.json`,
|
|
460
|
+
once per host; the output says so in one line, with how to turn hints off and the
|
|
461
|
+
TypeSafe note above. Codex asks you to trust the new hook the first time it runs;
|
|
462
|
+
CM does not trust it for you. A later install does not add it again.
|
|
463
|
+
|
|
464
|
+
To turn hints off, write `"enabled": false` in
|
|
465
|
+
`~/.cm-workflow/skill-hints.local.json`: the hook stays in place but does nothing
|
|
466
|
+
and sends nothing. `--no-skill-hints` does not turn anything off; it only stops
|
|
467
|
+
installs from adding the hook. An install does not wire the hook when:
|
|
468
|
+
|
|
469
|
+
- you pass `--no-skill-hints` (`-NoSkillHints` for `install.ps1`) or set
|
|
470
|
+
`CM_SKILL_HINTS_INSTALL=off` (this also works for `cm-workflow install`). This
|
|
471
|
+
covers that run only: the next install without them wires the host as usual, and
|
|
472
|
+
a hook already there is kept;
|
|
473
|
+
- `~/.cm-workflow/skill-hints.local.json` has `"enabled": false`; or it cannot be
|
|
474
|
+
read, is empty, or is not an object, or a known field has the wrong type (`enabled` and
|
|
475
|
+
`judge` must be `true`/`false`, `rules` a list, `disable` a list of strings). Then
|
|
476
|
+
it warns and changes nothing until you fix the file;
|
|
477
|
+
- that host is settled: the hook was there before and you removed it. CM keeps the
|
|
478
|
+
hosts it has wired or found wired in
|
|
479
|
+
`~/.cm-workflow/skill-hints.auto.json` (`{"version": 1, "hosts": [...]}`), written
|
|
480
|
+
under the same lock as its other config writes and before any copy is made. If
|
|
481
|
+
`~/.cm-workflow/skill-hints/` exists but that file does not (you ran `enable`
|
|
482
|
+
before installers did this), both hosts count as settled, and nothing is added;
|
|
483
|
+
- `skill-hints.auto.json` cannot be read or has another shape: it is kept as it is,
|
|
484
|
+
with a warning, and no install adds the hook until you fix or delete it;
|
|
485
|
+
- the host config cannot be read or has the wrong shape: it is left untouched and
|
|
486
|
+
reported in one line, and the next install tries again.
|
|
487
|
+
|
|
488
|
+
In every case the install itself still succeeds; a problem here is a warning. To add
|
|
489
|
+
the hook by hand (for example to a settled host):
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
node ~/.claude/scripts/cm-skill-hints.mjs enable
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
This copies the script, CM's table, the author-skill checker
|
|
496
|
+
(`cm-matt-skills.mjs`) and the Jev judge (`cm-skill-judge.mjs`) to
|
|
497
|
+
`~/.cm-workflow/skill-hints/` and adds
|
|
498
|
+
one `UserPromptSubmit` hook to `~/.claude/settings.json` and `~/.codex/hooks.json`
|
|
499
|
+
(`--claude` or `--codex` for one side), keeping every other setting and hook. A
|
|
500
|
+
file it cannot parse is left untouched. If the file changes while
|
|
501
|
+
`enable` is writing it, nothing is written and you are asked to run it again.
|
|
502
|
+
|
|
503
|
+
Once hints are on (the hook is wired, or `~/.cm-workflow/skill-hints/` exists),
|
|
504
|
+
every run of `install.sh`, `install-codex.sh` or `install.ps1` refreshes that copy
|
|
505
|
+
(`node ~/.claude/scripts/cm-skill-hints.mjs refresh` does the same by hand). It
|
|
506
|
+
replaces only the script, the table and the three helper scripts; Codex
|
|
507
|
+
trust, session state and logs are left alone, and a host config is only written
|
|
508
|
+
when the hook is added as described above. A failed refresh is a warning, not an
|
|
509
|
+
install failure.
|
|
510
|
+
|
|
511
|
+
Your own rules live in `~/.cm-workflow/skill-hints.local.json`, which CM never
|
|
512
|
+
overwrites. They take precedence over CM's table:
|
|
513
|
+
|
|
514
|
+
```json
|
|
515
|
+
{
|
|
516
|
+
"enabled": true,
|
|
517
|
+
"disable": ["fix-bug"],
|
|
518
|
+
"rules": [
|
|
519
|
+
{"id": "my-review", "skill": "codex-review", "keywords": ["二审", "交叉审查"], "reason": "让 Codex 独立审一遍"}
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
If the local file has any problem (it cannot be read, is empty or only whitespace,
|
|
525
|
+
is not JSON or not an object, or a known field has the wrong type), hints pause as a whole: no hint, no skill started and
|
|
526
|
+
nothing sent to Jev, so a valid `"enabled": false` next to a broken field still holds.
|
|
527
|
+
`/cm-check` shows "本地配置格式异常,提醒已暂停" with the cause; a missing or valid file
|
|
528
|
+
works as before. `"enabled": false` turns hints off; `disable` lists CM rule ids to switch off; a
|
|
529
|
+
user rule with the same `id` as a CM rule replaces it, and a user rule only ever
|
|
530
|
+
hints (it never starts a skill). `patterns` (regular
|
|
531
|
+
expressions) share a 200 ms budget per message; past it they count as no match. An
|
|
532
|
+
author skill (`grill-me`, `grill-with-docs`, `handoff`, `wayfinder`,
|
|
533
|
+
`improve-codebase-architecture`, `prototype`) is only hinted when its pinned
|
|
534
|
+
author version (see above) is installed for that host; otherwise its CM
|
|
535
|
+
counterpart is hinted, if there is one. Per-session state (a few hundred bytes
|
|
536
|
+
each, under `~/.cm-workflow/skill-hints/state/`) is never removed, so a session
|
|
537
|
+
resumed later does not repeat a hint.
|
|
538
|
+
`~/.cm-workflow/logs/skill-hints.jsonl` records rule id, skill, host and time of
|
|
539
|
+
each hint and of each adoption (you typed the skill within the next five
|
|
540
|
+
messages), never message text; it drops its older half past 1 MB. `/cm-check`
|
|
541
|
+
reports whether the hook is wired, the switch, whether installs wire it and which
|
|
542
|
+
hosts are already settled, the rule counts and whether the copy matches the
|
|
543
|
+
installed version (with the `refresh` command when it does not).
|
|
544
|
+
|
|
239
545
|
## Uninstall
|
|
240
546
|
|
|
241
547
|
For a Codex install registered by the installer, remove the enabled plugin and
|