cclaw-cli 0.51.27 → 0.51.29
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/dist/artifact-linter.js +73 -16
- package/dist/cli.d.ts +17 -1
- package/dist/cli.js +185 -49
- package/dist/codex-feature-flag.d.ts +1 -1
- package/dist/codex-feature-flag.js +1 -1
- package/dist/config.js +3 -0
- package/dist/content/cancel-command.d.ts +2 -0
- package/dist/content/cancel-command.js +25 -0
- package/dist/content/finish-command.d.ts +2 -0
- package/dist/content/finish-command.js +26 -0
- package/dist/content/harness-doc.js +1 -1
- package/dist/content/hooks.js +32 -9
- package/dist/content/ideate-command.js +12 -7
- package/dist/content/next-command.js +17 -13
- package/dist/content/node-hooks.js +22 -6
- package/dist/content/opencode-plugin.js +1 -1
- package/dist/content/stages/review.js +1 -1
- package/dist/content/stages/tdd.js +1 -1
- package/dist/content/start-command.js +6 -5
- package/dist/content/state-contracts.js +1 -1
- package/dist/content/status-command.js +4 -3
- package/dist/content/track-render-context.d.ts +1 -0
- package/dist/content/track-render-context.js +2 -0
- package/dist/doctor-registry.d.ts +2 -0
- package/dist/doctor-registry.js +37 -10
- package/dist/doctor.d.ts +2 -1
- package/dist/doctor.js +183 -2
- package/dist/fs-utils.js +6 -0
- package/dist/harness-adapters.js +29 -5
- package/dist/install.d.ts +4 -1
- package/dist/install.js +37 -4
- package/dist/internal/advance-stage.js +6 -6
- package/dist/managed-resources.d.ts +53 -0
- package/dist/managed-resources.js +289 -0
- package/dist/run-archive.d.ts +8 -0
- package/dist/run-archive.js +19 -5
- package/dist/runs.d.ts +1 -1
- package/dist/runs.js +1 -1
- package/dist/tdd-cycle.js +10 -10
- package/dist/tdd-verification-evidence.js +4 -4
- package/dist/track-heuristics.d.ts +2 -0
- package/dist/track-heuristics.js +11 -3
- package/package.json +1 -1
package/dist/tdd-cycle.js
CHANGED
|
@@ -95,7 +95,7 @@ export function validateTddCycleOrder(entries, options = {}) {
|
|
|
95
95
|
// cycles could appear to share a RED/GREEN pair.
|
|
96
96
|
for (const slice of bySlice.keys()) {
|
|
97
97
|
if (!SLICE_ID_PATTERN.test(slice)) {
|
|
98
|
-
issues.push(`slice "${slice}": id must match /^S-\\d+$/ (e.g. S-1)
|
|
98
|
+
issues.push(`slice "${slice}": id must match /^S-\\d+$/ (e.g. S-1); repair by re-logging RED/GREEN/REFACTOR with a stable slice id.`);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
for (const [slice, sliceEntries] of bySlice.entries()) {
|
|
@@ -103,15 +103,15 @@ export function validateTddCycleOrder(entries, options = {}) {
|
|
|
103
103
|
for (const entry of sliceEntries) {
|
|
104
104
|
if (entry.phase === "red") {
|
|
105
105
|
if (entry.exitCode === undefined) {
|
|
106
|
-
issues.push(`slice ${slice}: red entry must record a non-zero exitCode
|
|
106
|
+
issues.push(`slice ${slice}: RED repair needed: red entry must record a non-zero exitCode from a failing test.`);
|
|
107
107
|
continue;
|
|
108
108
|
}
|
|
109
109
|
if (entry.exitCode === 0) {
|
|
110
|
-
issues.push(`slice ${slice}: red entry exitCode must be non-zero
|
|
110
|
+
issues.push(`slice ${slice}: RED repair needed: red entry exitCode must be non-zero; passing output is not RED evidence.`);
|
|
111
111
|
continue;
|
|
112
112
|
}
|
|
113
113
|
if (state === "red_open") {
|
|
114
|
-
issues.push(`slice ${slice}: duplicate
|
|
114
|
+
issues.push(`slice ${slice}: RED/GREEN repair needed: duplicate RED before GREEN; record the GREEN pass that closes the prior RED or split into a new slice.`);
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
117
|
state = "red_open";
|
|
@@ -119,15 +119,15 @@ export function validateTddCycleOrder(entries, options = {}) {
|
|
|
119
119
|
}
|
|
120
120
|
if (entry.phase === "green") {
|
|
121
121
|
if (entry.exitCode === undefined) {
|
|
122
|
-
issues.push(`slice ${slice}: green entry must record exitCode 0
|
|
122
|
+
issues.push(`slice ${slice}: GREEN repair needed: green entry must record exitCode 0 from the verification command.`);
|
|
123
123
|
continue;
|
|
124
124
|
}
|
|
125
125
|
if (entry.exitCode !== 0) {
|
|
126
|
-
issues.push(`slice ${slice}: green entry exitCode must be 0
|
|
126
|
+
issues.push(`slice ${slice}: GREEN repair needed: green entry exitCode must be 0; fix regressions before advancing.`);
|
|
127
127
|
continue;
|
|
128
128
|
}
|
|
129
129
|
if (state !== "red_open") {
|
|
130
|
-
issues.push(`slice ${slice}: green logged before
|
|
130
|
+
issues.push(`slice ${slice}: GREEN repair needed: green logged before RED; add the failing RED test evidence first.`);
|
|
131
131
|
continue;
|
|
132
132
|
}
|
|
133
133
|
state = "green_done";
|
|
@@ -135,15 +135,15 @@ export function validateTddCycleOrder(entries, options = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
// refactor — must preserve the passing state established by green.
|
|
137
137
|
if (entry.exitCode === undefined) {
|
|
138
|
-
issues.push(`slice ${slice}: refactor entry must record exitCode 0
|
|
138
|
+
issues.push(`slice ${slice}: REFACTOR repair needed: refactor entry must record exitCode 0 proving behavior stayed green.`);
|
|
139
139
|
continue;
|
|
140
140
|
}
|
|
141
141
|
if (entry.exitCode !== 0) {
|
|
142
|
-
issues.push(`slice ${slice}:
|
|
142
|
+
issues.push(`slice ${slice}: REFACTOR repair needed: tests must stay green after cleanup; rerun/fix before closing the slice.`);
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
145
145
|
if (state !== "green_done") {
|
|
146
|
-
issues.push(`slice ${slice}: refactor logged before
|
|
146
|
+
issues.push(`slice ${slice}: REFACTOR repair needed: refactor logged before GREEN; prove GREEN first, then cleanup.`);
|
|
147
147
|
continue;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -14,20 +14,20 @@ export async function validateTddVerificationEvidence(projectRoot, evidence, opt
|
|
|
14
14
|
const gitPresent = configuredVcs !== "none" && await exists(path.join(projectRoot, ".git"));
|
|
15
15
|
const issues = [];
|
|
16
16
|
if (options.requireCommand !== false && !TEST_COMMAND_HINT_PATTERN.test(normalized)) {
|
|
17
|
-
issues.push("
|
|
17
|
+
issues.push("GREEN repair needed: include the fresh verification command that was run (for example `npm test`, `pytest`, `go test`, or equivalent).");
|
|
18
18
|
}
|
|
19
19
|
if (options.requirePassStatus !== false && !PASS_STATUS_PATTERN.test(normalized)) {
|
|
20
|
-
issues.push("
|
|
20
|
+
issues.push("GREEN repair needed: include explicit success status (for example `PASS` or `GREEN`).");
|
|
21
21
|
}
|
|
22
22
|
const hasSha = SHA_WITH_LABEL_PATTERN.test(normalized);
|
|
23
23
|
const hasNoVcs = NO_VCS_ATTESTATION_PATTERN.test(normalized);
|
|
24
24
|
const hasNoVcsHash = NO_VCS_HASH_PATTERN.test(normalized);
|
|
25
25
|
if (mode !== "disabled" && configuredVcs === "none") {
|
|
26
26
|
if (!hasNoVcs) {
|
|
27
|
-
issues.push("
|
|
27
|
+
issues.push("NO_VCS_MODE repair needed: include an explicit no-VCS reason because `vcs` is `none`.");
|
|
28
28
|
}
|
|
29
29
|
if (!hasNoVcsHash) {
|
|
30
|
-
issues.push("
|
|
30
|
+
issues.push("NO_VCS_MODE repair needed: include a content/artifact hash for no-VCS TDD evidence (for example `artifact-hash: sha256:<hash>`).");
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
else if (mode === "required" && !hasSha) {
|
package/dist/track-heuristics.js
CHANGED
|
@@ -111,15 +111,23 @@ export function resolveTrackFromPrompt(prompt, config) {
|
|
|
111
111
|
if (matched.length > 0) {
|
|
112
112
|
return {
|
|
113
113
|
track,
|
|
114
|
-
reason: `matched ${track} heuristic`,
|
|
115
|
-
matchedTokens: matched
|
|
114
|
+
reason: `matched ${track} heuristic (${matched.join(", ")})`,
|
|
115
|
+
matchedTokens: matched,
|
|
116
|
+
confidence: matched.length > 1 ? "high" : "medium",
|
|
117
|
+
overrideGuidance: track === "quick"
|
|
118
|
+
? "Use medium/standard instead when product framing, architecture, schema, migration, security, or unclear scope appears; quick skips ceremony, not safety."
|
|
119
|
+
: track === "medium"
|
|
120
|
+
? "Use standard if architecture, data model, security boundary, or migration risk is uncertain."
|
|
121
|
+
: "Use medium or quick only when the blast radius and architecture are already known."
|
|
116
122
|
};
|
|
117
123
|
}
|
|
118
124
|
}
|
|
119
125
|
return {
|
|
120
126
|
track: fallback,
|
|
121
127
|
reason: `no explicit match, fallback=${fallback}`,
|
|
122
|
-
matchedTokens: []
|
|
128
|
+
matchedTokens: [],
|
|
129
|
+
confidence: "low",
|
|
130
|
+
overrideGuidance: "Confirm or override before state is written; choose quick only for known low-blast-radius work, medium for known architecture with product framing, standard for uncertainty."
|
|
123
131
|
};
|
|
124
132
|
}
|
|
125
133
|
export const TRACK_HEURISTICS_DEFAULTS = {
|