cclaw-cli 0.51.16 → 0.51.18
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
CHANGED
|
@@ -654,18 +654,38 @@ function validateApproachesTaxonomy(sectionBody) {
|
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
656
|
function validateCalibratedSelfReview(sectionBody) {
|
|
657
|
-
const
|
|
658
|
-
const
|
|
659
|
-
const
|
|
660
|
-
|
|
657
|
+
const statusLineMatch = /^\s*-\s*Status:\s*(.*)$/imu.exec(sectionBody);
|
|
658
|
+
const statusValue = statusLineMatch ? statusLineMatch[1].trim() : "";
|
|
659
|
+
const mentionsApproved = /\bApproved\b/iu.test(statusValue);
|
|
660
|
+
const mentionsIssuesFound = /\bIssues Found\b/iu.test(statusValue);
|
|
661
|
+
const statusPickedExactlyOne = statusLineMatch !== null && (mentionsApproved !== mentionsIssuesFound);
|
|
662
|
+
const hasPatchesHeader = /^\s*-\s*Patches applied:/imu.test(sectionBody);
|
|
663
|
+
const hasConcernsHeader = /^\s*-\s*Remaining concerns:/imu.test(sectionBody);
|
|
664
|
+
if (statusPickedExactlyOne && hasPatchesHeader && hasConcernsHeader) {
|
|
661
665
|
return {
|
|
662
|
-
ok:
|
|
663
|
-
details: "Self-Review Notes
|
|
666
|
+
ok: true,
|
|
667
|
+
details: "Self-Review Notes use the calibrated review prompt format."
|
|
664
668
|
};
|
|
665
669
|
}
|
|
670
|
+
const problems = [];
|
|
671
|
+
if (!statusLineMatch) {
|
|
672
|
+
problems.push("missing `- Status:` line");
|
|
673
|
+
}
|
|
674
|
+
else if (!mentionsApproved && !mentionsIssuesFound) {
|
|
675
|
+
problems.push("`- Status:` must include `Approved` or `Issues Found`");
|
|
676
|
+
}
|
|
677
|
+
else if (mentionsApproved && mentionsIssuesFound) {
|
|
678
|
+
problems.push("`- Status:` must pick exactly one of `Approved` or `Issues Found` (the placeholder `Approved | Issues Found` is not a decision)");
|
|
679
|
+
}
|
|
680
|
+
if (!hasPatchesHeader)
|
|
681
|
+
problems.push("missing `- Patches applied:` line");
|
|
682
|
+
if (!hasConcernsHeader)
|
|
683
|
+
problems.push("missing `- Remaining concerns:` line");
|
|
666
684
|
return {
|
|
667
|
-
ok:
|
|
668
|
-
details: "Self-Review Notes use the calibrated review prompt format."
|
|
685
|
+
ok: false,
|
|
686
|
+
details: "Self-Review Notes must use the calibrated review prompt format: `- Status: Approved` (or `Issues Found`), `- Patches applied:` (inline note or sub-bullets), and `- Remaining concerns:` (inline note or sub-bullets). Issues: " +
|
|
687
|
+
problems.join("; ") +
|
|
688
|
+
"."
|
|
669
689
|
};
|
|
670
690
|
}
|
|
671
691
|
function validateRequirementsTaxonomy(sectionBody) {
|
package/dist/content/skills.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FlowStage, type FlowTrack } from "../types.js";
|
|
2
2
|
export declare function stageSkillFolder(stage: FlowStage): string;
|
|
3
3
|
export declare function stageSkillMarkdown(stage: FlowStage, track?: FlowTrack): string;
|
package/dist/content/skills.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RUNTIME_ROOT, STAGE_TO_SKILL_FOLDER } from "../constants.js";
|
|
2
2
|
import { nextStage as nextStageForTrack } from "../flow-state.js";
|
|
3
|
+
import { FLOW_STAGES } from "../types.js";
|
|
3
4
|
import { stageExamples } from "./examples.js";
|
|
4
5
|
import { reviewStackAwareRoutes, reviewStackAwareRoutingSummary, stageAutoSubagentDispatch, stageSchema, stageTrackRenderContext } from "./stage-schema.js";
|
|
5
6
|
import { conversationLanguagePolicyMarkdown } from "./language-policy.js";
|
|
@@ -13,7 +14,12 @@ ${items.map((item) => `- ${item}`).join("\n")}
|
|
|
13
14
|
|
|
14
15
|
`;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function artifactTemplatePathForStage(stage) {
|
|
18
|
+
const stageIndex = FLOW_STAGES.indexOf(stage) + 1;
|
|
19
|
+
const stageNumber = String(stageIndex).padStart(2, "0");
|
|
20
|
+
return `${RUNTIME_ROOT}/templates/${stageNumber}-${stage}.md`;
|
|
21
|
+
}
|
|
22
|
+
function contextLoadingBlock(stage, trace, executionModel) {
|
|
17
23
|
const readLines = trace.readsFrom.length > 0
|
|
18
24
|
? trace.readsFrom.map((value) => `- \`${value}\``).join("\n")
|
|
19
25
|
: "- (first stage — no upstream artifacts)";
|
|
@@ -23,6 +29,7 @@ function contextLoadingBlock(trace, executionModel) {
|
|
|
23
29
|
const requiredContext = executionModel.requiredContext.length > 0
|
|
24
30
|
? executionModel.requiredContext.map((item) => `- ${item}`).join("\n")
|
|
25
31
|
: "- None beyond this skill";
|
|
32
|
+
const artifactTemplatePath = artifactTemplatePathForStage(stage);
|
|
26
33
|
return `## Context Loading
|
|
27
34
|
|
|
28
35
|
Before execution:
|
|
@@ -34,16 +41,19 @@ ${readLines}
|
|
|
34
41
|
Treat it as the machine-readable skeleton: required top-level fields,
|
|
35
42
|
closed taxonomies, and the derived markdown path. Do not validate natural-language
|
|
36
43
|
prose by regex; put semantic quality checks in the review prompts.
|
|
37
|
-
5.
|
|
44
|
+
5. Read the canonical artifact template at \`${artifactTemplatePath}\` and reuse its
|
|
45
|
+
exact section layout — per-row tables with stable column order, calibrated review block;
|
|
46
|
+
do not invent layouts for sections the template already defines.
|
|
47
|
+
6. Extract upstream decisions, constraints, and open questions into the current
|
|
38
48
|
artifact's \`Upstream Handoff\` section when that section exists.
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
7. Before doing stage work, give a compact user-facing drift preamble: "Carrying forward: <1-3 bullets>. Drift since upstream: None / <specific drift>. Recommendation: continue / re-scope."
|
|
50
|
+
8. If you change an upstream decision, record an explicit drift reason in the
|
|
41
51
|
current artifact before continuing.
|
|
42
|
-
|
|
52
|
+
9. Confirm stage inputs:
|
|
43
53
|
${inputs}
|
|
44
|
-
|
|
54
|
+
10. Confirm required context:
|
|
45
55
|
${requiredContext}
|
|
46
|
-
|
|
56
|
+
11. Use the injected knowledge digest from session-start; only fall back to full
|
|
47
57
|
\`.cclaw/knowledge.jsonl\` when the digest is insufficient.
|
|
48
58
|
`;
|
|
49
59
|
}
|
|
@@ -395,7 +405,7 @@ This is the stage **state machine** — the canonical ordered flow. For every de
|
|
|
395
405
|
|
|
396
406
|
${processFlowMermaid.length > 0 ? processFlowMermaid : "```mermaid\nflowchart TD\n S1[\"Execute Checklist\"] --> S2[\"Satisfy required gates\"] --> S3[\"Verify before closeout\"]\n```"}
|
|
397
407
|
|
|
398
|
-
${platformNotesBlock}${contextLoadingBlock(artifactRules.crossStageTrace, executionModel)}
|
|
408
|
+
${platformNotesBlock}${contextLoadingBlock(stage, artifactRules.crossStageTrace, executionModel)}
|
|
399
409
|
${autoSubagentDispatchBlock(stage, track)}
|
|
400
410
|
${stackAwareReviewRoutingBlock(stage)}
|
|
401
411
|
${researchPlaybooksBlock(executionModel.researchPlaybooks ?? [])}
|
|
@@ -47,7 +47,7 @@ export const BRAINSTORM = {
|
|
|
47
47
|
"**Compare 2-3 distinct approaches with stable Role/Upside columns** — Role values are `baseline` | `challenger` | `wild-card`; Upside is `low` | `modest` | `high` | `higher`; include real trade-offs and reuse notes; include exactly one challenger with explicit `high` or `higher` upside.",
|
|
48
48
|
"**Collect reaction before recommending** — ask which option feels closest and what concern remains, then recommend based on that reaction.",
|
|
49
49
|
"**Write the `Not Doing` list** — name 3-5 things this brainstorm explicitly is not committing to (vs. deferred). This protects scope from silent enlargement and the next stage from rework.",
|
|
50
|
-
"**Self-review before user approval** — re-read the artifact and patch contradictions, weak trade-offs, placeholders, ambiguity, and weak handoff language
|
|
50
|
+
"**Self-review before user approval** — re-read the artifact and patch contradictions, weak trade-offs, placeholders, ambiguity, and weak handoff language. Record the result in `Self-Review Notes` using the calibrated review format: `- Status: Approved` (or `Issues Found`), `- Patches applied:` with inline note or sub-bullets, `- Remaining concerns:` with inline note or sub-bullets. Use `Patches applied: None` and `Remaining concerns: None` when there is nothing to record.",
|
|
51
51
|
"**Request explicit approval** — state exactly what direction is being approved; do not advance without approval and artifact review.",
|
|
52
52
|
"**Handoff** — only after approval, complete the stage and point to `/cc-next`."
|
|
53
53
|
],
|
|
@@ -137,7 +137,7 @@ export const BRAINSTORM = {
|
|
|
137
137
|
{ section: "Not Doing", required: false, validationRule: "Recommended: 3-5 explicitly non-committed items (distinct from deferred). Protects scope from silent enlargement and the next stage from rework." },
|
|
138
138
|
{ section: "Design", required: false, validationRule: "Must cover architecture, key components, and data flow scaled to complexity." },
|
|
139
139
|
{ section: "Visual Companion", required: false, validationRule: "If architecture/data-flow complexity is medium+, include compact ASCII/Mermaid diagram or explicitly justify omission." },
|
|
140
|
-
{ section: "Self-Review Notes", required: false, validationRule: "Recommended:
|
|
140
|
+
{ section: "Self-Review Notes", required: false, validationRule: "Recommended: use the calibrated review format — `- Status: Approved` (or `Issues Found`), `- Patches applied:` (inline note or sub-bullets, use `None` if nothing changed), `- Remaining concerns:` (inline note or sub-bullets, use `None` if nothing remains). Done before requesting user approval." },
|
|
141
141
|
{ section: "Assumptions and Open Questions", required: false, validationRule: "Must capture unresolved assumptions/open questions, or explicitly state none." }
|
|
142
142
|
],
|
|
143
143
|
trivialOverrideSections: [
|
|
@@ -96,7 +96,7 @@ ${SEED_SHELF_SECTION}
|
|
|
96
96
|
- (compact ASCII/Mermaid diagram for medium+ complexity, or one-line justification for omission.)
|
|
97
97
|
|
|
98
98
|
## Self-Review Notes
|
|
99
|
-
- Status: Approved
|
|
99
|
+
- Status: Approved
|
|
100
100
|
- Patches applied:
|
|
101
101
|
- None
|
|
102
102
|
- Remaining concerns:
|