cclaw-cli 0.5.14 → 0.5.15
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.
|
@@ -11,6 +11,12 @@ export function commandContract(stage) {
|
|
|
11
11
|
const gateIds = schema.requiredGates
|
|
12
12
|
.map((g) => `\`${g.id}\``)
|
|
13
13
|
.join(", ");
|
|
14
|
+
const writes = schema.crossStageTrace.writesTo;
|
|
15
|
+
const writesLine = writes.map((w) => `\`${w}\``).join(", ");
|
|
16
|
+
const primaryArtifact = `.cclaw/artifacts/${schema.artifactFile}`;
|
|
17
|
+
const writeStepPaths = writes.length > 1
|
|
18
|
+
? writes.map((w) => `\`${w}\``).join(" and ")
|
|
19
|
+
: `\`${primaryArtifact}\``;
|
|
14
20
|
return `# /cc-${stage}
|
|
15
21
|
|
|
16
22
|
Load and follow **${skillPath}** — it contains the full checklist, examples, interaction protocol, and verification discipline.
|
|
@@ -20,7 +26,7 @@ ${schema.hardGate}
|
|
|
20
26
|
|
|
21
27
|
## In / Out
|
|
22
28
|
- **Reads:** ${readsLine}
|
|
23
|
-
- **Writes:**
|
|
29
|
+
- **Writes:** ${writesLine}
|
|
24
30
|
- **Next:** \`/cc-next\` (updates flow-state and loads the next stage)
|
|
25
31
|
|
|
26
32
|
## Context Hydration (mandatory before stage work)
|
|
@@ -29,7 +35,7 @@ ${schema.hardGate}
|
|
|
29
35
|
3. Load required upstream artifacts for this stage:
|
|
30
36
|
${hydrationLines}
|
|
31
37
|
4. Load \`.cclaw/knowledge.md\` and apply relevant entries.
|
|
32
|
-
5. Write stage output to
|
|
38
|
+
5. Write stage output to ${writeStepPaths}.
|
|
33
39
|
6. Do NOT copy artifacts into \`.cclaw/runs/\`; archival is handled only by \`cclaw archive\`.
|
|
34
40
|
|
|
35
41
|
## Gates
|
package/dist/content/examples.js
CHANGED
|
@@ -398,33 +398,39 @@ Execution rule: complete and verify each wave before starting the next wave.
|
|
|
398
398
|
### Final Verdict
|
|
399
399
|
|
|
400
400
|
- BLOCKED`,
|
|
401
|
-
ship: `### Preflight
|
|
401
|
+
ship: `### Preflight Results
|
|
402
402
|
|
|
403
|
-
-
|
|
404
|
-
-
|
|
405
|
-
-
|
|
406
|
-
-
|
|
403
|
+
- Review verdict: APPROVED_WITH_CONCERNS (R-1 resolved, R-2 accepted as known debt)
|
|
404
|
+
- Build: pass (\`pnpm build\` succeeds)
|
|
405
|
+
- Tests: pass (\`pnpm vitest run && pnpm playwright test\` — 47 passed, 0 failed)
|
|
406
|
+
- Lint: pass (\`pnpm lint\` clean)
|
|
407
|
+
- Type-check: pass (\`pnpm typecheck\` clean)
|
|
408
|
+
- Working tree clean: yes (\`git status\` shows no uncommitted changes)
|
|
407
409
|
|
|
408
|
-
### Release
|
|
410
|
+
### Release Notes
|
|
409
411
|
|
|
410
|
-
- **Added:** In-app notification feed with SSE updates and REST fallback snapshotting.
|
|
411
|
-
- **Changed:** Notification payloads now include a stable dedupe key for idempotent rendering.
|
|
412
|
+
- **Added:** In-app notification feed with SSE updates and REST fallback snapshotting (AC-1, AC-3).
|
|
413
|
+
- **Changed:** Notification payloads now include a stable dedupe key for idempotent rendering (AC-2).
|
|
412
414
|
- **Fixed:** Panel no longer drops the newest item when reconnecting after sleep/resume.
|
|
415
|
+
- **Breaking changes:** None.
|
|
413
416
|
|
|
414
|
-
### Rollback
|
|
417
|
+
### Rollback Plan
|
|
415
418
|
|
|
416
|
-
|
|
417
|
-
|
|
419
|
+
- Trigger conditions: error rate on \`/notifications/stream\` exceeds 5% for >5 minutes, or p95 publish-to-visible lag exceeds 10s.
|
|
420
|
+
- Rollback steps: \`git revert <merge-sha> && git push origin main\` then redeploy; if DB migrations shipped, run \`2026_04_12_notifications_cursor_down.sql\` before traffic.
|
|
421
|
+
- Verification steps: confirm error rate returns to pre-release baseline within 10 minutes; smoke-test feed panel manually.
|
|
418
422
|
|
|
419
|
-
###
|
|
423
|
+
### Monitoring
|
|
420
424
|
|
|
421
|
-
-
|
|
422
|
-
-
|
|
425
|
+
- Metrics/logs to watch: error rate on \`/notifications/stream\` and snapshot endpoint for 24h; p95 publish-to-visible lag via metrics dashboard.
|
|
426
|
+
- Risk note (if no monitoring): N/A — monitoring is in place.
|
|
423
427
|
|
|
424
|
-
###
|
|
428
|
+
### Finalization
|
|
425
429
|
|
|
426
|
-
-
|
|
427
|
-
-
|
|
430
|
+
- Selected enum: FINALIZE_OPEN_PR
|
|
431
|
+
- Selected label: B
|
|
432
|
+
- Execution result: PR #42 created via \`gh pr create\`; CI passed; squash-merged to main.
|
|
433
|
+
- PR URL: https://github.com/example/repo/pull/42`,
|
|
428
434
|
};
|
|
429
435
|
export function stageExamples(stage) {
|
|
430
436
|
const examples = STAGE_EXAMPLES[stage];
|
|
@@ -1350,7 +1350,8 @@ const SHIP = {
|
|
|
1350
1350
|
{ id: "ship_release_notes_written", description: "Release notes are complete and accurate." },
|
|
1351
1351
|
{ id: "ship_rollback_plan_ready", description: "Rollback trigger, steps, and verification are documented." },
|
|
1352
1352
|
{ id: "ship_finalization_mode_selected", description: "Exactly one finalization action is selected." },
|
|
1353
|
-
{ id: "ship_finalization_executed", description: "Selected finalization action was executed and verified." }
|
|
1353
|
+
{ id: "ship_finalization_executed", description: "Selected finalization action was executed and verified." },
|
|
1354
|
+
{ id: "ship_post_merge_tests", description: "Full test suite re-run on the merged result (not just the branch). Post-merge failures caught before release." }
|
|
1354
1355
|
],
|
|
1355
1356
|
requiredEvidence: [
|
|
1356
1357
|
"Artifact written to `.cclaw/artifacts/08-ship.md`.",
|
|
@@ -1383,7 +1384,10 @@ const SHIP = {
|
|
|
1383
1384
|
rationalizations: [
|
|
1384
1385
|
{ claim: "Rollback details can be written after release.", reality: "Rollback is part of release readiness, not post-release cleanup." },
|
|
1385
1386
|
{ claim: "Finalization choice is obvious from context.", reality: "Explicit branch action prevents accidental release state." },
|
|
1386
|
-
{ claim: "Urgent fixes can skip preflight.", reality: "Urgency increases risk; preflight discipline matters more, not less." }
|
|
1387
|
+
{ claim: "Urgent fixes can skip preflight.", reality: "Urgency increases risk; preflight discipline matters more, not less." },
|
|
1388
|
+
{ claim: "Monitoring can be set up after deploy.", reality: "If you cannot observe the release, you cannot detect failure. Monitoring is a ship prerequisite, not a follow-up task." },
|
|
1389
|
+
{ claim: "A small merge does not need post-merge testing.", reality: "Small merges on diverged bases cause silent conflicts. Post-merge suite runs catch what branch-only CI misses." },
|
|
1390
|
+
{ claim: "Release notes are internal documentation, not a ship gate.", reality: "Release notes are the rollback decision input. Without them, the team cannot assess what changed or why a rollback is needed." }
|
|
1387
1391
|
],
|
|
1388
1392
|
redFlags: [
|
|
1389
1393
|
"No rollback trigger/steps",
|
|
@@ -1408,7 +1412,8 @@ const SHIP = {
|
|
|
1408
1412
|
{ name: "Rollback-First Thinking", description: "Before shipping, answer: what tells me this is broken? How do I undo it? How do I verify the undo worked? If you cannot answer all three, you are not ready." },
|
|
1409
1413
|
{ name: "Explicit Over Implicit Finalization", description: "Merge, PR, keep, discard — each has different consequences. Pick one. Say it out loud. Write it down. Never let finalization be 'whatever the default is.'" },
|
|
1410
1414
|
{ name: "Post-Merge Paranoia", description: "The merge itself can introduce failures even when both branches pass independently. Always run the full suite AFTER merge, not just before." },
|
|
1411
|
-
{ name: "Observability Before Ship", description: "If you cannot monitor the change in production, you cannot know if it is broken. Monitoring/logging is a ship prerequisite, not a follow-up." }
|
|
1415
|
+
{ name: "Observability Before Ship", description: "If you cannot monitor the change in production, you cannot know if it is broken. Monitoring/logging is a ship prerequisite, not a follow-up." },
|
|
1416
|
+
{ name: "Release Blast Radius", description: "Before shipping, map the blast radius: how many users are affected if this breaks? Is it one endpoint or the entire app? Scale rollback urgency and monitoring to the blast radius, not the diff size. A 3-line auth change can have infinite blast radius." }
|
|
1412
1417
|
],
|
|
1413
1418
|
reviewSections: [
|
|
1414
1419
|
{
|
|
@@ -1435,17 +1440,22 @@ const SHIP = {
|
|
|
1435
1440
|
],
|
|
1436
1441
|
completionStatus: ["SHIPPED", "SHIPPED_WITH_EXCEPTIONS", "BLOCKED"],
|
|
1437
1442
|
crossStageTrace: {
|
|
1438
|
-
readsFrom: [".cclaw/artifacts/07-review.md", ".cclaw/artifacts/06-tdd.md"],
|
|
1443
|
+
readsFrom: [".cclaw/artifacts/07-review.md", ".cclaw/artifacts/06-tdd.md", ".cclaw/artifacts/05-plan.md", ".cclaw/artifacts/04-spec.md"],
|
|
1439
1444
|
writesTo: [".cclaw/artifacts/08-ship.md"],
|
|
1440
|
-
traceabilityRule: "Ship artifact must reference review verdict and resolution status. Rollback plan must reference specific changes that could fail."
|
|
1445
|
+
traceabilityRule: "Ship artifact must reference review verdict and resolution status. Release notes must reference spec criteria. Rollback plan must reference specific changes that could fail."
|
|
1441
1446
|
},
|
|
1442
1447
|
artifactValidation: [
|
|
1443
1448
|
{ section: "Preflight Results", required: true, validationRule: "Build, test, lint, type-check results captured with fresh output. Exceptions documented if any." },
|
|
1444
1449
|
{ section: "Release Notes", required: true, validationRule: "What changed, why, impact. References spec criteria. Breaking changes flagged." },
|
|
1445
1450
|
{ section: "Rollback Plan", required: true, validationRule: "Trigger conditions, rollback steps (exact commands), verification steps." },
|
|
1446
1451
|
{ section: "Monitoring", required: false, validationRule: "If applicable: what metrics/logs to watch post-deploy. Risk note if no monitoring." },
|
|
1447
|
-
{ section: "Finalization", required: true, validationRule: "Exactly one finalization enum token selected. Execution result documented. Worktree cleaned if applicable." }
|
|
1448
|
-
|
|
1452
|
+
{ section: "Finalization", required: true, validationRule: "Exactly one finalization enum token selected. Execution result documented. Worktree cleaned if applicable." },
|
|
1453
|
+
{ section: "Completion Status", required: false, validationRule: "If present: exactly one of SHIPPED, SHIPPED_WITH_EXCEPTIONS, BLOCKED. Exceptions documented when applicable." }
|
|
1454
|
+
],
|
|
1455
|
+
namedAntiPattern: {
|
|
1456
|
+
title: "Green CI Means Safe to Merge",
|
|
1457
|
+
description: "CI passing on a feature branch does not prove the merged result is safe. Post-merge test failures are common when the base branch has diverged. Re-run the full suite on the merge result, not just the branch. A green branch badge is a necessary condition, not a sufficient one."
|
|
1458
|
+
}
|
|
1449
1459
|
};
|
|
1450
1460
|
// ---------------------------------------------------------------------------
|
|
1451
1461
|
// Stage map and accessors
|
|
@@ -422,6 +422,10 @@ Execution rule: complete and verify each wave before starting the next wave.
|
|
|
422
422
|
- Selected label (A/B/C/D):
|
|
423
423
|
- Execution result:
|
|
424
424
|
- PR URL / merge commit / kept branch / discard confirmation:
|
|
425
|
+
|
|
426
|
+
## Completion Status
|
|
427
|
+
- SHIPPED | SHIPPED_WITH_EXCEPTIONS | BLOCKED
|
|
428
|
+
- Exceptions (if any):
|
|
425
429
|
`
|
|
426
430
|
};
|
|
427
431
|
export const RULEBOOK_MARKDOWN = `# Cclaw Rulebook
|