cclaw-cli 0.51.29 → 0.55.2
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 +22 -16
- package/dist/artifact-linter/brainstorm.d.ts +2 -0
- package/dist/artifact-linter/brainstorm.js +245 -0
- package/dist/artifact-linter/design.d.ts +2 -0
- package/dist/artifact-linter/design.js +323 -0
- package/dist/artifact-linter/plan.d.ts +2 -0
- package/dist/artifact-linter/plan.js +162 -0
- package/dist/artifact-linter/review-army.d.ts +24 -0
- package/dist/artifact-linter/review-army.js +365 -0
- package/dist/artifact-linter/review.d.ts +2 -0
- package/dist/artifact-linter/review.js +65 -0
- package/dist/artifact-linter/scope.d.ts +2 -0
- package/dist/artifact-linter/scope.js +115 -0
- package/dist/artifact-linter/shared.d.ts +246 -0
- package/dist/artifact-linter/shared.js +1488 -0
- package/dist/artifact-linter/ship.d.ts +2 -0
- package/dist/artifact-linter/ship.js +46 -0
- package/dist/artifact-linter/spec.d.ts +2 -0
- package/dist/artifact-linter/spec.js +108 -0
- package/dist/artifact-linter/tdd.d.ts +2 -0
- package/dist/artifact-linter/tdd.js +124 -0
- package/dist/artifact-linter.d.ts +4 -76
- package/dist/artifact-linter.js +56 -2949
- package/dist/cli.d.ts +2 -18
- package/dist/cli.js +8 -246
- package/dist/codex-feature-flag.d.ts +1 -1
- package/dist/codex-feature-flag.js +1 -1
- package/dist/config.d.ts +3 -2
- package/dist/config.js +67 -3
- package/dist/constants.d.ts +1 -7
- package/dist/constants.js +9 -15
- package/dist/content/cancel-command.js +2 -2
- package/dist/content/closeout-guidance.js +13 -10
- package/dist/content/core-agents.d.ts +18 -0
- package/dist/content/core-agents.js +51 -7
- package/dist/content/decision-protocol.d.ts +1 -1
- package/dist/content/decision-protocol.js +1 -1
- package/dist/content/examples.js +6 -6
- package/dist/content/harness-doc.js +20 -2
- package/dist/content/hook-inline-snippets.d.ts +17 -4
- package/dist/content/hook-inline-snippets.js +218 -5
- package/dist/content/hook-manifest.d.ts +2 -2
- package/dist/content/hook-manifest.js +2 -2
- package/dist/content/hooks.d.ts +1 -0
- package/dist/content/hooks.js +32 -137
- package/dist/content/idea-command.d.ts +8 -0
- package/dist/content/{ideate-command.js → idea-command.js} +57 -50
- package/dist/content/idea-frames.d.ts +31 -0
- package/dist/content/{ideate-frames.js → idea-frames.js} +9 -9
- package/dist/content/idea-ranking.d.ts +25 -0
- package/dist/content/{ideate-ranking.js → idea-ranking.js} +5 -5
- package/dist/content/iron-laws.d.ts +0 -1
- package/dist/content/iron-laws.js +31 -16
- package/dist/content/learnings.js +1 -1
- package/dist/content/meta-skill.js +11 -13
- package/dist/content/node-hooks.d.ts +10 -0
- package/dist/content/node-hooks.js +45 -11
- package/dist/content/opencode-plugin.js +3 -3
- package/dist/content/session-hooks.js +1 -1
- package/dist/content/skills.js +19 -7
- package/dist/content/stage-command.js +1 -1
- package/dist/content/stage-schema.js +44 -2
- package/dist/content/stages/_lint-metadata/index.js +26 -2
- package/dist/content/stages/brainstorm.js +13 -7
- package/dist/content/stages/design.js +16 -11
- package/dist/content/stages/plan.js +9 -6
- package/dist/content/stages/review.js +4 -4
- package/dist/content/stages/schema-types.d.ts +1 -1
- package/dist/content/stages/scope.js +15 -12
- package/dist/content/stages/ship.js +2 -2
- package/dist/content/stages/spec.js +9 -3
- package/dist/content/stages/tdd.js +14 -4
- package/dist/content/start-command.d.ts +2 -2
- package/dist/content/start-command.js +24 -21
- package/dist/content/status-command.js +8 -8
- package/dist/content/subagents.js +61 -7
- package/dist/content/templates.d.ts +1 -1
- package/dist/content/templates.js +104 -152
- package/dist/content/tree-command.js +2 -2
- package/dist/content/utility-skills.d.ts +2 -2
- package/dist/content/utility-skills.js +2 -2
- package/dist/content/view-command.js +4 -2
- package/dist/delegation.d.ts +2 -0
- package/dist/delegation.js +2 -1
- package/dist/early-loop.d.ts +66 -0
- package/dist/early-loop.js +275 -0
- package/dist/flow-state.d.ts +1 -1
- package/dist/flow-state.js +1 -1
- package/dist/gate-evidence.d.ts +8 -0
- package/dist/gate-evidence.js +141 -5
- package/dist/harness-adapters.d.ts +2 -2
- package/dist/harness-adapters.js +54 -122
- package/dist/harness-selection.d.ts +31 -0
- package/dist/harness-selection.js +214 -0
- package/dist/install.js +166 -38
- package/dist/internal/advance-stage/advance.d.ts +50 -0
- package/dist/internal/advance-stage/advance.js +480 -0
- package/dist/internal/advance-stage/cancel-run.d.ts +8 -0
- package/dist/internal/advance-stage/cancel-run.js +19 -0
- package/dist/internal/advance-stage/flow-state-coercion.d.ts +3 -0
- package/dist/internal/advance-stage/flow-state-coercion.js +81 -0
- package/dist/internal/advance-stage/helpers.d.ts +14 -0
- package/dist/internal/advance-stage/helpers.js +145 -0
- package/dist/internal/advance-stage/hook.d.ts +8 -0
- package/dist/internal/advance-stage/hook.js +40 -0
- package/dist/internal/advance-stage/parsers.d.ts +54 -0
- package/dist/internal/advance-stage/parsers.js +307 -0
- package/dist/internal/advance-stage/review-loop.d.ts +7 -0
- package/dist/internal/advance-stage/review-loop.js +170 -0
- package/dist/internal/advance-stage/rewind.d.ts +14 -0
- package/dist/internal/advance-stage/rewind.js +108 -0
- package/dist/internal/advance-stage/start-flow.d.ts +11 -0
- package/dist/internal/advance-stage/start-flow.js +136 -0
- package/dist/internal/advance-stage/verify.d.ts +29 -0
- package/dist/internal/advance-stage/verify.js +225 -0
- package/dist/internal/advance-stage.js +21 -1470
- package/dist/internal/compound-readiness.d.ts +1 -1
- package/dist/internal/compound-readiness.js +2 -2
- package/dist/internal/early-loop-status.d.ts +7 -0
- package/dist/internal/early-loop-status.js +90 -0
- package/dist/internal/runtime-integrity.d.ts +7 -0
- package/dist/internal/runtime-integrity.js +288 -0
- package/dist/internal/tdd-red-evidence.js +1 -1
- package/dist/knowledge-store.d.ts +3 -8
- package/dist/knowledge-store.js +16 -29
- package/dist/managed-resources.js +24 -2
- package/dist/policy.js +5 -7
- package/dist/run-archive.d.ts +1 -1
- package/dist/run-archive.js +16 -16
- package/dist/run-persistence.js +112 -12
- package/dist/tdd-cycle.d.ts +3 -3
- package/dist/tdd-cycle.js +1 -1
- package/dist/types.d.ts +18 -10
- package/package.json +1 -1
- package/dist/content/finish-command.d.ts +0 -2
- package/dist/content/finish-command.js +0 -26
- package/dist/content/ideate-command.d.ts +0 -8
- package/dist/content/ideate-frames.d.ts +0 -31
- package/dist/content/ideate-ranking.d.ts +0 -25
- package/dist/content/next-command.d.ts +0 -20
- package/dist/content/next-command.js +0 -298
- package/dist/content/seed-shelf.d.ts +0 -36
- package/dist/content/seed-shelf.js +0 -301
- package/dist/content/stage-common-guidance.d.ts +0 -1
- package/dist/content/stage-common-guidance.js +0 -106
- package/dist/doctor-registry.d.ts +0 -10
- package/dist/doctor-registry.js +0 -186
- package/dist/doctor.d.ts +0 -17
- package/dist/doctor.js +0 -2206
- package/dist/internal/hook-manifest.d.ts +0 -16
- package/dist/internal/hook-manifest.js +0 -77
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { conversationLanguagePolicyMarkdown } from "./language-policy.js";
|
|
2
|
-
export function stageCommonGuidanceMarkdown() {
|
|
3
|
-
return `# Common Stage Guidance
|
|
4
|
-
|
|
5
|
-
Shared guidance loaded by every stage skill. Keep this file concise and stable so
|
|
6
|
-
per-stage skills can stay focused on stage-specific work.
|
|
7
|
-
|
|
8
|
-
${conversationLanguagePolicyMarkdown()}
|
|
9
|
-
## Shared completion protocol
|
|
10
|
-
|
|
11
|
-
- Stage-specific skills expose **Completion Parameters** plus the gates that
|
|
12
|
-
matter for that stage.
|
|
13
|
-
- Generic execution stays inline: verify required gates, update the artifact,
|
|
14
|
-
harvest learnings, then use \`/cc-next\` for progression.
|
|
15
|
-
- Do not create separate protocol files.
|
|
16
|
-
|
|
17
|
-
## Context readiness
|
|
18
|
-
|
|
19
|
-
- Before drafting, know the upstream artifact freshness, required template shape, relevant code/reference patterns, and unresolved blockers.
|
|
20
|
-
- If any item is missing, load it or stop with a blocker instead of inventing content.
|
|
21
|
-
|
|
22
|
-
## Shared decision protocol
|
|
23
|
-
|
|
24
|
-
- Ask only decision-changing questions.
|
|
25
|
-
- Prefer one focused question over broad questionnaires.
|
|
26
|
-
- When choices are equivalent, recommend one path and state the trade-off.
|
|
27
|
-
- If a blocker remains after a short retry, stop and ask the user.
|
|
28
|
-
|
|
29
|
-
## Shared handoff menu
|
|
30
|
-
|
|
31
|
-
Use this same closeout menu for every stage:
|
|
32
|
-
|
|
33
|
-
- **A) Advance** — run \`/cc-next\` and continue the critical path; after \`ship\`, the same command drives \`retro -> compound -> archive\`.
|
|
34
|
-
- **B) Revise this stage** — stay on current stage and apply feedback.
|
|
35
|
-
- **C) Pause / park** — run \`/cc-view status\`, then stop and resume later.
|
|
36
|
-
- **D) Rewind** — run \`npx cclaw-cli internal rewind <target-stage> "<reason>"\` as the managed support/runtime repair action; after redoing the target stage, run \`npx cclaw-cli internal rewind --ack <target-stage>\` to clear the stale marker.
|
|
37
|
-
- **E) Abandon** — only when the user explicitly wants to end a non-ship active run early, archive with \`npx cclaw-cli archive --skip-retro --retro-reason="<reason>"\`. Once in post-ship closeout, continue \`/cc-next\` through retro/compound/archive instead.
|
|
38
|
-
|
|
39
|
-
Recommendation defaults:
|
|
40
|
-
|
|
41
|
-
- Completion status \`DONE\` -> recommend **A**.
|
|
42
|
-
- Completion status \`DONE_WITH_CONCERNS\` -> recommend **B**.
|
|
43
|
-
- Completion status \`BLOCKED\` -> recommend **B** or **C**.
|
|
44
|
-
|
|
45
|
-
## Iterate / Victory Detector
|
|
46
|
-
|
|
47
|
-
- Iterate while a required gate, artifact section, or fresh evidence item is missing.
|
|
48
|
-
- Stop only when the stage-specific Victory Detector passes or a named blocker is recorded.
|
|
49
|
-
- Do not use vague closeout wording such as \`looks good\`, \`done enough\`, or \`all set\` without the detector evidence.
|
|
50
|
-
|
|
51
|
-
## Completion status vocabulary
|
|
52
|
-
|
|
53
|
-
- \`DONE\` — all required gates and checks satisfied.
|
|
54
|
-
- \`DONE_WITH_CONCERNS\` — required gates pass, but recommended items remain.
|
|
55
|
-
- \`BLOCKED\` — one or more required/triggered conditions fail.
|
|
56
|
-
|
|
57
|
-
## Decision record template
|
|
58
|
-
|
|
59
|
-
Use when a stage makes a non-trivial architecture/scope/testing decision.
|
|
60
|
-
|
|
61
|
-
\`\`\`
|
|
62
|
-
Decision: <one-line title>
|
|
63
|
-
Context: <what forced this decision>
|
|
64
|
-
Options considered:
|
|
65
|
-
- A: ...
|
|
66
|
-
- B: ...
|
|
67
|
-
Chosen option: <A/B/...>
|
|
68
|
-
Why: <short rationale>
|
|
69
|
-
Risk: <main downside>
|
|
70
|
-
Rollback / fallback: <if decision proves wrong>
|
|
71
|
-
\`\`\`
|
|
72
|
-
|
|
73
|
-
## Self-improvement reminder
|
|
74
|
-
|
|
75
|
-
Before closeout, fill the artifact \`## Learnings\` section (do not write
|
|
76
|
-
\`.cclaw/knowledge.jsonl\` by hand):
|
|
77
|
-
- \`- None this stage.\` only when nothing reusable emerged.
|
|
78
|
-
- Or 1-3 JSON bullets with required keys \`type\`, \`trigger\`, \`action\`,
|
|
79
|
-
\`confidence\` (optional fields may mirror knowledge.jsonl schema keys).
|
|
80
|
-
- For meaningful \`design\`, \`tdd\`, or \`review\` work, prefer a small JSON
|
|
81
|
-
learning over \`None\` when you made a reusable decision, found a testing
|
|
82
|
-
pattern, or caught a review/security issue.
|
|
83
|
-
During \`node .cclaw/hooks/stage-complete.mjs <stage>\`, cclaw validates those
|
|
84
|
-
bullets, appends unique entries to \`.cclaw/knowledge.jsonl\`, and stamps a
|
|
85
|
-
harvest marker in the artifact.
|
|
86
|
-
|
|
87
|
-
Prefer \`type=rule|pattern|lesson\` (\`compound\` stays retro-focused).
|
|
88
|
-
|
|
89
|
-
Track policy:
|
|
90
|
-
- \`standard\` / \`medium\`: required for \`design\`, \`tdd\`, and \`review\`;
|
|
91
|
-
recommended for other stages.
|
|
92
|
-
- \`quick\`: recommended only.
|
|
93
|
-
|
|
94
|
-
\`- None this stage.\` is acceptable only when the stage produced no reusable
|
|
95
|
-
insight (for example, purely mechanical edits with no new decisions). If unsure,
|
|
96
|
-
record a concise \`lesson\` with \`confidence":"medium"\` instead of dropping
|
|
97
|
-
operator knowledge.
|
|
98
|
-
|
|
99
|
-
## Progressive disclosure baseline
|
|
100
|
-
|
|
101
|
-
- Start with the current stage skill.
|
|
102
|
-
- Load deeper skills or docs only when required by a blocker or gate.
|
|
103
|
-
- Keep examples as short shape cues inside the current skill instead of
|
|
104
|
-
materializing separate reference files.
|
|
105
|
-
`;
|
|
106
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type DoctorSeverity = "error" | "warning" | "info";
|
|
2
|
-
export type DoctorActionGroup = "sync" | "user-action" | "stage-work" | "informational";
|
|
3
|
-
export interface DoctorCheckMetadata {
|
|
4
|
-
severity: DoctorSeverity;
|
|
5
|
-
summary: string;
|
|
6
|
-
fix: string;
|
|
7
|
-
actionGroup: DoctorActionGroup;
|
|
8
|
-
docRef?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function doctorCheckMetadata(checkName: string): DoctorCheckMetadata;
|
package/dist/doctor-registry.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
function ref(fileName) {
|
|
2
|
-
const anchor = fileName.replace(/\.md$/u, "").replace(/[^a-z0-9]+/giu, "-").toLowerCase();
|
|
3
|
-
return `README.md#${anchor}`;
|
|
4
|
-
}
|
|
5
|
-
const RULES = [
|
|
6
|
-
{
|
|
7
|
-
test: /^gates:reconcile:writeback$/,
|
|
8
|
-
metadata: {
|
|
9
|
-
severity: "info",
|
|
10
|
-
summary: "Gate reconciliation status update.",
|
|
11
|
-
fix: "No action required unless subsequent gate checks fail.",
|
|
12
|
-
actionGroup: "informational",
|
|
13
|
-
docRef: ref("config.md")
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
test: /^warning:/,
|
|
18
|
-
metadata: {
|
|
19
|
-
severity: "warning",
|
|
20
|
-
summary: "Advisory signal; runtime can continue with caution.",
|
|
21
|
-
fix: "Address when possible to prevent future drift or degraded behavior.",
|
|
22
|
-
actionGroup: "informational",
|
|
23
|
-
docRef: "README.md"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
test: /^skill:.*:(max_lines|min_lines|canonical_sections)$/,
|
|
28
|
-
metadata: {
|
|
29
|
-
severity: "warning",
|
|
30
|
-
summary: "Stage skill quality guardrail check.",
|
|
31
|
-
fix: "Tune generated stage skill content and re-run `cclaw sync`.",
|
|
32
|
-
actionGroup: "sync",
|
|
33
|
-
docRef: "README.md"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
test: /^capability:required:/,
|
|
38
|
-
metadata: {
|
|
39
|
-
severity: "error",
|
|
40
|
-
summary: "Required runtime tooling availability check.",
|
|
41
|
-
fix: "Install the missing required tool and re-run `cclaw doctor`.",
|
|
42
|
-
actionGroup: "user-action",
|
|
43
|
-
docRef: "README.md"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
test: /^(dir:|command:|utility_command:|stage_command:|skill:|utility_skill:|agent:|harness_tool_ref:|harness_ref:|stage_examples_ref:|doctor_ref:)/,
|
|
48
|
-
metadata: {
|
|
49
|
-
severity: "error",
|
|
50
|
-
summary: "Generated runtime surface presence check.",
|
|
51
|
-
fix: "Run `cclaw sync` to safely regenerate generated runtime files, then re-run doctor.",
|
|
52
|
-
actionGroup: "sync",
|
|
53
|
-
docRef: "README.md"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
test: /^managed_resources:/,
|
|
58
|
-
metadata: {
|
|
59
|
-
severity: "error",
|
|
60
|
-
summary: "Managed generated resource manifest integrity check.",
|
|
61
|
-
fix: "Run `cclaw sync` to refresh managed generated files; inspect upgrade backup paths before discarding local edits.",
|
|
62
|
-
actionGroup: "sync",
|
|
63
|
-
docRef: ref("config.md")
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
test: /^(hook:|hooks:|lifecycle:|git_hooks:)/,
|
|
68
|
-
metadata: {
|
|
69
|
-
severity: "error",
|
|
70
|
-
summary: "Hook wiring and lifecycle integration check.",
|
|
71
|
-
fix: "Run `cclaw sync` to regenerate hook/plugin wiring; if the check still fails, validate harness config and permissions.",
|
|
72
|
-
actionGroup: "sync",
|
|
73
|
-
docRef: ref("harnesses.md")
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
test: /^(shim:|agents:cclaw_block|rules:cursor:)/,
|
|
78
|
-
metadata: {
|
|
79
|
-
severity: "error",
|
|
80
|
-
summary: "Harness shim and routing file consistency check.",
|
|
81
|
-
fix: "Run `cclaw sync` to regenerate harness adapters; confirm enabled harness list if it remains failing.",
|
|
82
|
-
actionGroup: "sync",
|
|
83
|
-
docRef: ref("harnesses.md")
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
test: /^(flow_state:|state:|gates:)/,
|
|
88
|
-
metadata: {
|
|
89
|
-
severity: "error",
|
|
90
|
-
summary: "Flow state and gate evidence consistency check.",
|
|
91
|
-
fix: "Repair the named stage artifacts/gate evidence, then run `cclaw doctor --reconcile-gates --explain` to refresh derived gate status only.",
|
|
92
|
-
actionGroup: "stage-work",
|
|
93
|
-
docRef: ref("config.md")
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
test: /^(knowledge:|artifacts:|runs:)/,
|
|
98
|
-
metadata: {
|
|
99
|
-
severity: "error",
|
|
100
|
-
summary: "Knowledge and artifact runtime integrity check.",
|
|
101
|
-
fix: "Restore the missing `.cclaw/` runtime file or run `cclaw sync` when it is generated surface drift.",
|
|
102
|
-
actionGroup: "sync",
|
|
103
|
-
docRef: "README.md"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
test: /^(meta_skill:|protocol:|stage_skill:)/,
|
|
108
|
-
metadata: {
|
|
109
|
-
severity: "error",
|
|
110
|
-
summary: "Routing skill and protocol integrity check.",
|
|
111
|
-
fix: "Run `cclaw sync` to regenerate runtime skills, then re-run doctor.",
|
|
112
|
-
actionGroup: "sync",
|
|
113
|
-
docRef: ref("harnesses.md")
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
// `reference:*` checks (flow-map.md and similar overview documents)
|
|
118
|
-
// are useful to detect drift from the generated baseline, but they
|
|
119
|
-
// document the surface rather than gate it. A missing section here
|
|
120
|
-
// means the map is out of date, not that a runtime contract is
|
|
121
|
-
// broken — so they report as a warning instead of hard-failing
|
|
122
|
-
// doctor / CI. `cclaw sync` rewrites the file.
|
|
123
|
-
test: /^reference:/,
|
|
124
|
-
metadata: {
|
|
125
|
-
severity: "warning",
|
|
126
|
-
summary: "Reference/overview doc integrity (non-blocking).",
|
|
127
|
-
fix: "Run `cclaw sync` to regenerate the reference surface from the canonical source.",
|
|
128
|
-
actionGroup: "sync",
|
|
129
|
-
docRef: ref("harnesses.md")
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
test: /^harness:reality:/,
|
|
134
|
-
metadata: {
|
|
135
|
-
severity: "info",
|
|
136
|
-
summary: "Harness reality label for dispatch/proof support.",
|
|
137
|
-
fix: "No action required; use this label to interpret native/generic/role-switch proof requirements.",
|
|
138
|
-
actionGroup: "informational",
|
|
139
|
-
docRef: ref("harnesses.md")
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
test: /^delegation:/,
|
|
144
|
-
metadata: {
|
|
145
|
-
severity: "error",
|
|
146
|
-
summary: "Mandatory delegation completion check.",
|
|
147
|
-
fix: "Run the named mandatory agent, record dispatch proof/evidenceRefs, or explicitly waive it with a user-visible rationale.",
|
|
148
|
-
actionGroup: "user-action",
|
|
149
|
-
docRef: ref("harnesses.md")
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
test: /^trace:/,
|
|
154
|
-
metadata: {
|
|
155
|
-
severity: "error",
|
|
156
|
-
summary: "Cross-artifact traceability integrity check.",
|
|
157
|
-
fix: "Repair criterion/task/test ID mappings across spec, plan, and TDD artifacts, then re-run doctor.",
|
|
158
|
-
actionGroup: "stage-work",
|
|
159
|
-
docRef: "README.md"
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
test: /^(config:|rules:policy_schema|language_rule_pack:|gitignore:|git:)/,
|
|
164
|
-
metadata: {
|
|
165
|
-
severity: "error",
|
|
166
|
-
summary: "Config or policy schema consistency check.",
|
|
167
|
-
fix: "Fix config/rules drift, then run `cclaw sync` and re-run doctor.",
|
|
168
|
-
actionGroup: "user-action",
|
|
169
|
-
docRef: ref("config.md")
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
];
|
|
173
|
-
export function doctorCheckMetadata(checkName) {
|
|
174
|
-
for (const rule of RULES) {
|
|
175
|
-
if (rule.test.test(checkName)) {
|
|
176
|
-
return { ...rule.metadata };
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return {
|
|
180
|
-
severity: "warning",
|
|
181
|
-
summary: "Unclassified doctor check.",
|
|
182
|
-
fix: "Report this check name to cclaw maintainers so doctor-registry can classify it explicitly.",
|
|
183
|
-
actionGroup: "informational",
|
|
184
|
-
docRef: "README.md"
|
|
185
|
-
};
|
|
186
|
-
}
|
package/dist/doctor.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DoctorActionGroup, DoctorSeverity } from "./doctor-registry.js";
|
|
2
|
-
export interface DoctorCheck {
|
|
3
|
-
name: string;
|
|
4
|
-
ok: boolean;
|
|
5
|
-
details: string;
|
|
6
|
-
severity: DoctorSeverity;
|
|
7
|
-
summary: string;
|
|
8
|
-
fix: string;
|
|
9
|
-
actionGroup: DoctorActionGroup;
|
|
10
|
-
docRef?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface DoctorOptions {
|
|
13
|
-
/** When true, normalize current-stage gate catalog and persist reconciliation before checks. */
|
|
14
|
-
reconcileCurrentStageGates?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare function doctorChecks(projectRoot: string, options?: DoctorOptions): Promise<DoctorCheck[]>;
|
|
17
|
-
export declare function doctorSucceeded(checks: DoctorCheck[]): boolean;
|