cclaw-cli 0.13.0 → 0.15.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.
Files changed (41) hide show
  1. package/dist/cli.js +11 -0
  2. package/dist/config.js +0 -8
  3. package/dist/constants.d.ts +1 -1
  4. package/dist/constants.js +3 -0
  5. package/dist/content/archive-command.d.ts +2 -0
  6. package/dist/content/archive-command.js +98 -0
  7. package/dist/content/contracts.js +1 -1
  8. package/dist/content/diff-command.js +2 -2
  9. package/dist/content/feature-command.js +7 -7
  10. package/dist/content/harnesses-doc.js +15 -8
  11. package/dist/content/hooks.js +2 -2
  12. package/dist/content/learnings.d.ts +0 -3
  13. package/dist/content/learnings.js +0 -38
  14. package/dist/content/meta-skill.js +3 -2
  15. package/dist/content/next-command.js +12 -5
  16. package/dist/content/ops-command.d.ts +2 -0
  17. package/dist/content/ops-command.js +60 -0
  18. package/dist/content/protocols.js +14 -2
  19. package/dist/content/retro-command.js +3 -3
  20. package/dist/content/rewind-command.js +5 -5
  21. package/dist/content/stage-common-guidance.js +14 -5
  22. package/dist/content/stage-schema.d.ts +0 -16
  23. package/dist/content/stage-schema.js +7 -181
  24. package/dist/content/status-command.d.ts +2 -2
  25. package/dist/content/status-command.js +13 -13
  26. package/dist/content/tdd-log-command.js +6 -6
  27. package/dist/content/templates.d.ts +1 -1
  28. package/dist/content/templates.js +2 -2
  29. package/dist/content/tree-command.js +3 -3
  30. package/dist/content/utility-skills.js +1 -1
  31. package/dist/content/view-command.d.ts +2 -0
  32. package/dist/content/view-command.js +57 -0
  33. package/dist/doctor-registry.js +22 -4
  34. package/dist/doctor.js +8 -32
  35. package/dist/harness-adapters.d.ts +1 -0
  36. package/dist/harness-adapters.js +15 -54
  37. package/dist/install.js +13 -10
  38. package/dist/policy.js +1 -1
  39. package/dist/runs.js +1 -1
  40. package/dist/types.d.ts +1 -3
  41. package/package.json +1 -1
@@ -6,14 +6,6 @@ export interface StageGate {
6
6
  /** Used when tier=conditional. Predicate syntax mirrors conditional delegation rules. */
7
7
  condition?: string;
8
8
  }
9
- export interface StageRationalization {
10
- claim: string;
11
- reality: string;
12
- }
13
- export interface CognitivePattern {
14
- name: string;
15
- description: string;
16
- }
17
9
  export interface ReviewSection {
18
10
  title: string;
19
11
  evaluationPoints: string[];
@@ -54,10 +46,6 @@ export interface StageAutoSubagentDispatch {
54
46
  /** Optional skill folder the dispatched agent should load as additional context. */
55
47
  skill?: string;
56
48
  }
57
- export interface NamedAntiPattern {
58
- title: string;
59
- description: string;
60
- }
61
49
  export interface StageSchema {
62
50
  stage: FlowStage;
63
51
  skillFolder: string;
@@ -87,19 +75,15 @@ export interface StageSchema {
87
75
  blockers: string[];
88
76
  exitCriteria: string[];
89
77
  antiPatterns: string[];
90
- rationalizations: StageRationalization[];
91
78
  redFlags: string[];
92
79
  policyNeedles: string[];
93
80
  artifactFile: string;
94
81
  next: FlowStage | "done";
95
82
  checklist: string[];
96
- cognitivePatterns: CognitivePattern[];
97
83
  reviewSections: ReviewSection[];
98
84
  completionStatus: string[];
99
85
  crossStageTrace: CrossStageTrace;
100
86
  artifactValidation: ArtifactValidation[];
101
- namedAntiPattern?: NamedAntiPattern;
102
- decisionRecordFormat?: string;
103
87
  /** When true, stage skill includes wave auto-execute guidance (tdd). */
104
88
  waveExecutionAllowed?: boolean;
105
89
  /** Sections that remain required even when the trivial-change escape hatch is active (design only). */
@@ -217,11 +217,6 @@ const BRAINSTORM = {
217
217
  "Jumping directly into implementation",
218
218
  "Requesting approval without stating what decision is being approved"
219
219
  ],
220
- rationalizations: [
221
- { claim: "I already know what to build, so exploration is unnecessary.", reality: "Checking files and context catches wrong assumptions that waste hours later." },
222
- { claim: "Any question is useful context.", reality: "Only questions whose answers change what we build improve the design." },
223
- { claim: "Two options that differ only in tooling count as distinct approaches.", reality: "Distinct means different architecture, not different libraries for the same approach." }
224
- ],
225
220
  redFlags: [
226
221
  "No project context exploration before questions",
227
222
  "Questions that only gather preferences without design impact",
@@ -238,13 +233,6 @@ const BRAINSTORM = {
238
233
  ],
239
234
  artifactFile: "01-brainstorm.md",
240
235
  next: "scope",
241
- cognitivePatterns: [
242
- { name: "Context Before Questions", description: "Understand what exists before asking what to build." },
243
- { name: "Depth Matches Complexity", description: "Brief design for simple tasks, thorough exploration for complex ones." },
244
- { name: "Diverge Then Commit", description: "Explore multiple architecturally distinct options first, commit only after explicit approval." },
245
- { name: "Question Quality Over Quantity", description: "Each question should change what we build, not just gather trivia." },
246
- { name: "Know When To Move On", description: "Stop asking when problem, constraints, and success criteria are clear enough to compare approaches." }
247
- ],
248
236
  reviewSections: [],
249
237
  completionStatus: ["DONE", "DONE_WITH_CONCERNS", "BLOCKED"],
250
238
  crossStageTrace: {
@@ -260,11 +248,7 @@ const BRAINSTORM = {
260
248
  { section: "Selected Direction", required: true, validationRule: "Must include the selected approach, rationale, and explicit approval marker." },
261
249
  { section: "Design", required: true, validationRule: "Must cover architecture, key components, and data flow scaled to complexity." },
262
250
  { section: "Assumptions and Open Questions", required: true, validationRule: "Must capture unresolved assumptions/open questions, or explicitly state none." }
263
- ],
264
- namedAntiPattern: {
265
- title: "This Is Too Simple To Need A Design",
266
- description: "Every project goes through this process. Simple projects are where unexamined assumptions cause the most wasted work. The design can be short, but you MUST present it and get approval."
267
- }
251
+ ]
268
252
  };
269
253
  // ---------------------------------------------------------------------------
270
254
  // SCOPE — reference: gstack CEO review
@@ -370,13 +354,6 @@ const SCOPE = {
370
354
  "Batching multiple scope issues into one question",
371
355
  "Re-arguing for smaller scope after user rejects reduction"
372
356
  ],
373
- rationalizations: [
374
- { claim: "Scope can be finalized during implementation.", reality: "Late scope decisions create architecture churn and missed deadlines." },
375
- { claim: "Mode selection is unnecessary overhead.", reality: "Mode selection makes trade-offs explicit and prevents silent drift." },
376
- { claim: "Out-of-scope is obvious.", reality: "Unwritten exclusions return later as hidden requirements." },
377
- { claim: "We do not need alternatives for a clear request.", reality: "Even clear requests benefit from a minimal-viable vs ideal comparison." },
378
- { claim: "Pushback risks sounding confrontational, so I should stay neutral.", reality: "Respectful pushback catches framing errors before they become expensive implementation mistakes." }
379
- ],
380
357
  redFlags: [
381
358
  "No selected mode in artifact",
382
359
  "Mode selected without heuristic justification",
@@ -389,17 +366,6 @@ const SCOPE = {
389
366
  policyNeedles: ["Scope mode", "In Scope", "Out of Scope", "Discretion Areas", "NOT in scope", "Premise Challenge"],
390
367
  artifactFile: "02-scope.md",
391
368
  next: "design",
392
- cognitivePatterns: [
393
- { name: "Depth Matches Complexity", description: "Scale each section to project complexity: concise for simple prototypes, deep for production systems." },
394
- { name: "Classification Instinct", description: "Categorize every decision by reversibility x magnitude. Most things are two-way doors — move fast. Only slow down for irreversible + high-magnitude decisions." },
395
- { name: "Inversion Reflex", description: "For every 'how do we win?' also ask 'what would make us fail?' Map failure modes before committing to scope." },
396
- { name: "Focus as Subtraction", description: "Primary value-add is what to NOT do. Default: do fewer things, better. Every feature must earn its place." },
397
- { name: "Speed Calibration", description: "Fast is default. Only slow down for irreversible + high-magnitude decisions. 70% information is enough to decide." },
398
- { name: "Leverage Obsession", description: "Find inputs where small effort creates massive output. Reuse existing code aggressively. Build new only when nothing exists." },
399
- { name: "Proxy Skepticism", description: "Is this metric/feature solving the actual problem or a proxy for it? Ask: if this succeeds perfectly, does the user's real problem go away?" },
400
- { name: "Narrative Coherence", description: "The scope should tell a story: problem → insight → solution → impact. If you cannot tell that story in two sentences, scope is too broad or misframed." },
401
- { name: "Blast Radius Awareness", description: "For every scope item, count how many systems/files/teams it touches. High blast radius = high risk = needs explicit justification." }
402
- ],
403
369
  reviewSections: [
404
370
  {
405
371
  title: "Scope Boundary Audit",
@@ -470,11 +436,7 @@ const SCOPE = {
470
436
  { section: "Scope Summary", required: true, validationRule: "Clean summary: mode, strongest challenges, recommended path, accepted scope, deferred, excluded." },
471
437
  { section: "Dream State Mapping", required: false, validationRule: "If present (complex projects): CURRENT STATE, THIS PLAN, 12-MONTH IDEAL, and alignment verdict." },
472
438
  { section: "Temporal Interrogation", required: false, validationRule: "If present (complex projects): timeline simulation table with decision pressures and lock-now vs defer verdicts." }
473
- ],
474
- namedAntiPattern: {
475
- title: "Scope Is Obvious From Context",
476
- description: "Scope is never obvious. Unstated boundaries return as hidden requirements during implementation. Even when a request seems perfectly clear, the act of writing explicit in-scope and out-of-scope lists reveals assumptions that would otherwise surface as late surprises."
477
- }
439
+ ]
478
440
  };
479
441
  // ---------------------------------------------------------------------------
480
442
  // DESIGN — reference: gstack Eng review
@@ -593,14 +555,6 @@ const DESIGN = {
593
555
  "Agreeing with user's architecture choice without evaluating alternatives",
594
556
  "Hedging every recommendation with 'it depends' instead of taking a position"
595
557
  ],
596
- rationalizations: [
597
- { claim: "Architecture can emerge incrementally while coding.", reality: "Unplanned architecture decisions cause incompatible module boundaries." },
598
- { claim: "Failure modes are edge cases we can ignore for now.", reality: "Production incidents usually come from unplanned edge paths." },
599
- { claim: "Performance can be optimized after launch.", reality: "Missing performance budgets make regressions invisible until late." },
600
- { claim: "This is a strategy doc so implementation sections do not apply.", reality: "Implementation details are where strategy breaks down. Every section must be evaluated." },
601
- { claim: "The user preferred approach A, so we should go with it.", reality: "User preference is an input, not a conclusion. Evaluate on engineering merit. If approach B is objectively better, recommend B with evidence." },
602
- { claim: "Both options are roughly equivalent.", reality: "Options are never equivalent once you quantify effort (S/M/L/XL) and risk (Low/Med/High). If you cannot distinguish them, you have not investigated deeply enough." }
603
- ],
604
558
  redFlags: [
605
559
  "No explicit architecture boundary section",
606
560
  "No failure recovery strategy",
@@ -619,19 +573,6 @@ const DESIGN = {
619
573
  ],
620
574
  artifactFile: "03-design.md",
621
575
  next: "spec",
622
- cognitivePatterns: [
623
- { name: "Boring By Default", description: "Every company gets about three innovation tokens. Everything else should be proven technology. If the plan rolls a custom solution where a built-in exists, flag it." },
624
- { name: "Incremental Over Revolutionary", description: "Strangler fig, not big bang. Canary, not global rollout. Refactor, not rewrite." },
625
- { name: "Systems Over Heroes", description: "Design for tired humans at 3am, not your best engineer on their best day. If it requires heroics to operate, the design is wrong." },
626
- { name: "Essential vs Accidental Complexity", description: "Before adding anything: is this solving a real problem or one we created? Distinguish essential complexity from accidental." },
627
- { name: "Blast Radius Instinct", description: "Every decision evaluated through: what is the worst case and how many systems/people does it affect?" },
628
- { name: "Completeness Push", description: "AI effort is cheap. Push for completeness in plans: cover all files in blast radius, all edge cases in touched code, all affected tests. Favor doing it now over creating a TODO." },
629
- { name: "Owner Preference Alignment", description: "Every recommendation must align with project conventions (DRY, test style, minimal diff, edge-case rigor). Read existing patterns before recommending new ones." },
630
- { name: "Failure Is Information", description: "A design that fails fast and visibly is better than one that silently degrades. Map every failure mode and make it observable. Undetected failures compound." },
631
- { name: "Search Breadth Before Depth", description: "Before committing to a design path, survey the full solution space: stdlib, existing code, open-source, prior art. A 30-minute search can save a 30-hour custom build." },
632
- { name: "Outside Voice", description: "When confidence is high and options seem obvious, that is exactly when to seek contradiction. Ask: what would a skeptical reviewer challenge here? What assumption am I not questioning?" },
633
- { name: "Ambiguity Classification", description: "Before resolving any unclear requirement, classify it: (A) Insufficient information — ask the user. (B) Multiple valid interpretations — enumerate and pick with justification. (C) Genuinely unknown — propose hypothesis and validation path. Never treat all ambiguity the same way." }
634
- ],
635
576
  reviewSections: [
636
577
  {
637
578
  title: "Architecture Review",
@@ -710,20 +651,7 @@ const DESIGN = {
710
651
  { section: "Patterns to Mirror", required: false, validationRule: "If present: list discovered codebase patterns to follow, with file references and rationale for each." },
711
652
  { section: "Completion Dashboard", required: true, validationRule: "Lists every review section with status (clear / issues-found-resolved / issues-open), decision count, and unresolved items (or 'None')." }
712
653
  ],
713
- trivialOverrideSections: ["Architecture Boundaries", "NOT in scope", "Completion Dashboard"],
714
- namedAntiPattern: {
715
- title: "Architecture Will Emerge While Coding",
716
- description: "Emergent architecture is a myth for non-trivial systems. What actually emerges is accidental complexity, incompatible module boundaries, and tech debt that costs 10x to fix later. Lock architecture explicitly before writing code."
717
- },
718
- decisionRecordFormat: `### Decision: [TITLE]
719
- **Status:** Proposed | Accepted | Rejected
720
- **Context:** [What is the situation?]
721
- **Options:**
722
- - A: [option] — effort: [S/M/L], risk: [low/med/high]
723
- - B: [option] — effort: [S/M/L], risk: [low/med/high]
724
- **Decision:** [chosen option]
725
- **Rationale:** [why this option over others]
726
- **Consequences:** [what changes as a result]`
654
+ trivialOverrideSections: ["Architecture Boundaries", "NOT in scope", "Completion Dashboard"]
727
655
  };
728
656
  // ---------------------------------------------------------------------------
729
657
  // SPEC
@@ -810,12 +738,6 @@ const SPEC = {
810
738
  "Proceeding to plan before approval",
811
739
  "Using vague adjectives (fast, intuitive, robust) without thresholds"
812
740
  ],
813
- rationalizations: [
814
- { claim: "The implementation will clarify this requirement.", reality: "Unclear specs create rework and contradictory implementations." },
815
- { claim: "Acceptance criteria do not need to be measurable.", reality: "Without measurability, verification becomes subjective." },
816
- { claim: "We can skip explicit approval to save time.", reality: "Skipping approval shifts uncertainty into later, costlier stages." },
817
- { claim: "Edge cases are implementation details.", reality: "Edge cases determine acceptance boundaries; specifying them prevents scope creep." }
818
- ],
819
741
  redFlags: [
820
742
  "Criteria use vague language (fast, intuitive, robust) without thresholds",
821
743
  "No explicit assumptions section",
@@ -826,12 +748,6 @@ const SPEC = {
826
748
  policyNeedles: ["Acceptance Criteria", "Constraints", "Testability", "approved spec", "Edge Cases"],
827
749
  artifactFile: "04-spec.md",
828
750
  next: "plan",
829
- cognitivePatterns: [
830
- { name: "Observable Over Descriptive", description: "Requirements describe what can be observed, not what should feel like. Replace every adjective with a measurement." },
831
- { name: "Boundary Precision", description: "Every acceptance criterion has boundary conditions. What is the minimum valid input? Maximum? What happens at the edges?" },
832
- { name: "Assumption Surfacing", description: "Implicit assumptions are invisible requirements. Force every assumption into an explicit statement. If you cannot name the assumption, you have not found it yet." },
833
- { name: "Ambiguity Classification", description: "Before resolving any unclear requirement, classify it: (A) Insufficient information — ask the user. (B) Multiple valid interpretations — enumerate and pick with justification. (C) Genuinely unknown — propose hypothesis and validation path. Never treat all ambiguity the same way." }
834
- ],
835
751
  reviewSections: [
836
752
  {
837
753
  title: "Acceptance Criteria Audit",
@@ -871,11 +787,7 @@ const SPEC = {
871
787
  { section: "Non-Functional Requirements", required: false, validationRule: "If present: performance thresholds, security constraints, scalability limits, reliability targets with measurable values." },
872
788
  { section: "Interface Contracts", required: false, validationRule: "If present: for each module boundary list produces (outputs) and consumes (inputs) with data types." },
873
789
  { section: "Approval", required: true, validationRule: "Explicit user approval marker present." }
874
- ],
875
- namedAntiPattern: {
876
- title: "Implementation Will Clarify Requirements",
877
- description: "Unclear specs do not become clear during coding — they become contradictory implementations, rework, and scope creep. If a requirement cannot be stated in observable, testable terms right now, it is not ready for implementation. Rewrite it until it is falsifiable."
878
- }
790
+ ]
879
791
  };
880
792
  // ---------------------------------------------------------------------------
881
793
  // PLAN
@@ -962,11 +874,6 @@ const PLAN = {
962
874
  "Starting execution before approval",
963
875
  "Tasks that touch multiple unrelated areas"
964
876
  ],
965
- rationalizations: [
966
- { claim: "Task details can be finalized during coding.", reality: "Underspecified tasks cause context thrash and broken sequencing." },
967
- { claim: "Dependency map is overkill for this change.", reality: "Missing dependencies are a major source of blocked execution." },
968
- { claim: "We can assume approval and continue.", reality: "Explicit confirmation is the contract boundary between planning and execution." }
969
- ],
970
877
  redFlags: [
971
878
  "No dependency graph",
972
879
  "No WAIT_FOR_CONFIRM marker",
@@ -977,16 +884,6 @@ const PLAN = {
977
884
  policyNeedles: ["WAIT_FOR_CONFIRM", "Task Graph", "Dependency Waves", "Acceptance Mapping", "verification steps"],
978
885
  artifactFile: "05-plan.md",
979
886
  next: "tdd",
980
- cognitivePatterns: [
981
- { name: "Vertical Slice Thinking", description: "Each task delivers one thin end-to-end slice of value. Horizontal layers (all models, then all controllers) create integration risk. Vertical slices (one feature through all layers) reduce it." },
982
- { name: "Two-Minute Smell Test", description: "If a competent engineer cannot understand and start a task in two minutes, the task is too large or too vague. Break it down further." },
983
- { name: "Five-Minute Budget (hard)", description: "Every plan step MUST fit a 2-to-5-minute execution budget on a competent implementer. If a step plausibly takes longer, it is two steps pretending to be one — split it. Measure by 'keyboard minutes on this slice', not by wall clock. Write the estimated minutes next to each task (e.g. `[~3m]`); when a TDD slice later consumes >2× the estimate, log an operational-self-improvement entry so future plans calibrate better." },
984
- { name: "No Placeholders", description: "Plan text must be copy-pasteable. Forbidden tokens anywhere in the artifact: `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, `...` (as ellipsis for omitted content — real commands use real args). Every acceptance-criterion link, file path, test command, and verification command must be concrete and runnable as written. A placeholder is a deferred decision masquerading as a plan; decide it now or remove the task." },
985
- { name: "Make the Change Easy, Then Make the Easy Change", description: "Refactor first, implement second. Never structural + behavioral changes simultaneously. Sequence tasks accordingly." },
986
- { name: "Diagnose Before Fix", description: "Before decomposing work, understand the current state of the codebase. Read existing code, tests, and conventions. Tasks should reference what exists, not assume a blank slate." },
987
- { name: "Scrap Signals", description: "If a task description is vague, the acceptance criterion is missing, or the verification command is a placeholder — it is scrap. Either rewrite it or remove it. Half-specified tasks waste more time than no tasks." },
988
- { name: "Risk-First Exploration", description: "Sequence the highest-risk or most uncertain tasks first. If wave 1 proves the risky assumption wrong, the rest of the plan can adapt. If the risk is buried in wave 3, you discover failure late." }
989
- ],
990
887
  reviewSections: [
991
888
  {
992
889
  title: "Task Decomposition Audit",
@@ -1036,11 +933,7 @@ const PLAN = {
1036
933
  { section: "Boundary Map", required: false, validationRule: "If present: per-wave or per-task interface contracts listing what each task produces (exports) and consumes (imports) from other tasks." },
1037
934
  { section: "WAIT_FOR_CONFIRM", required: true, validationRule: "Explicit marker present. Status: pending until user approves." },
1038
935
  { section: "No-Placeholder Scan", required: false, validationRule: "If present: confirmation that a text scan for `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, or bare ellipses has zero hits in the task list. A placeholder is a deferred decision masquerading as a plan." }
1039
- ],
1040
- namedAntiPattern: {
1041
- title: "Task Details Can Be Finalized During Coding",
1042
- description: "Underspecified tasks do not become clear during implementation — they become context thrash, broken sequencing, and rework. Every task needs an acceptance criterion, a verification command, and a wave assignment before execution starts. If you cannot describe what 'done' looks like for a task, the task is not ready."
1043
- }
936
+ ]
1044
937
  };
1045
938
  // ---------------------------------------------------------------------------
1046
939
  // TDD — RED → GREEN → REFACTOR cycle (merged test + build)
@@ -1140,15 +1033,6 @@ const TDD = {
1140
1033
  "Undocumented refactor changes",
1141
1034
  "Adding features beyond what RED tests require"
1142
1035
  ],
1143
- rationalizations: [
1144
- { claim: "This change is obvious, tests can be added later.", reality: "Without RED proof, regressions hide behind optimistic assumptions." },
1145
- { claim: "A passing baseline is enough to continue.", reality: "Baseline pass does not prove new behavior requirements." },
1146
- { claim: "One broad integration test is enough.", reality: "Slice-level RED tests are required for precise failure signal." },
1147
- { claim: "Refactor can be skipped for speed.", reality: "Skipping refactor accumulates debt and weakens maintainability." },
1148
- { claim: "Only changed tests need to pass.", reality: "Full-suite checks are needed to detect regressions." },
1149
- { claim: "Traceability is implied by commit diff.", reality: "Explicit mapping avoids ambiguity in review and rollback." },
1150
- { claim: "Tests written after implementation achieve the same goals.", reality: "Post-hoc tests confirm assumptions, not behavior. They test what you built, not what you should have built. TDD forces you to think about behavior before you have an implementation to be anchored by." }
1151
- ],
1152
1036
  redFlags: [
1153
1037
  "No failing test output (RED missing)",
1154
1038
  "Implementation edits appear before RED evidence",
@@ -1160,20 +1044,6 @@ const TDD = {
1160
1044
  policyNeedles: ["RED", "GREEN", "REFACTOR", "failing test", "full test suite", "acceptance criteria", "traceable to plan slice"],
1161
1045
  artifactFile: "06-tdd.md",
1162
1046
  next: "review",
1163
- cognitivePatterns: [
1164
- { name: "Behavior Over Implementation", description: "Tests describe WHAT the system does, not HOW. Test the observable behavior from outside the unit. If you need to test internals, the design needs work." },
1165
- { name: "Failure-First Thinking", description: "The failing test IS the specification. Until you see the right failure, you do not understand what you are building. Wrong failures are information." },
1166
- { name: "Minimal Viable Change", description: "The best implementation is the smallest one that passes all RED tests. Every extra line is risk. Resist the urge to 'improve while you are here.'" },
1167
- { name: "Regression Paranoia", description: "Assume every change breaks something until the full suite proves otherwise. Partial test runs are lies of omission." },
1168
- { name: "Refactor-as-Hygiene", description: "Refactoring is not optional cleanup — it is the third leg of TDD. GREEN without REFACTOR accumulates mess. REFACTOR without GREEN breaks things." },
1169
- { name: "Evidence Over Anecdote", description: "Every claim about test state must be backed by captured output. 'It passed' without terminal evidence is not evidence. 'I saw it fail' without the failure output is not RED. Capture commands, outputs, and results — not summaries from memory." },
1170
- { name: "Characterization First", description: "Before changing existing behavior, write characterization tests that capture current behavior as-is. These tests document what the system does today — even if that behavior is wrong. Only after the characterization suite is green do you add the new RED test for the desired change. This prevents accidental behavior destruction during refactoring." },
1171
- { name: "Test Pyramid Shape", description: "Healthy test suites look like a pyramid: many small fast tests at the base, fewer medium integration tests in the middle, few large end-to-end tests at the top. Each layer catches a different class of bug; none of them substitutes for another. If your suite is top-heavy (mostly E2E) it is slow and flaky; if it is base-only it misses integration contracts. During TDD, default to the smallest layer that can prove the behavior." },
1172
- { name: "Prove-It Pattern (bug fixes)", description: "For any reported regression or hotfix, the FIRST test is a reproduction — it must fail without your fix, pass with your fix, and fail again if the fix is reverted. This is the only way to prove you fixed the reported bug and not a superficially similar one. Skipping this step is how bugs come back two releases later wearing a different name." },
1173
- { name: "Test Size Model", description: "Size tests by scope, not by name: Small = pure logic, no I/O, <50ms; Medium = one process boundary, possibly filesystem or an in-memory DB; Large = multi-process / network / real external service. Small tests are the default; escalate to Medium only when a real boundary must be exercised, and to Large only for end-to-end user journeys. Record the size class in the TDD artifact so reviewers can sanity-check the pyramid shape." },
1174
- { name: "State Over Interaction", description: "Assert on observable outcomes (return values, state changes, persisted data, HTTP responses) — NOT on which helper methods were called, how many times, or in what order. Interaction-style assertions (`expect(mock.foo).toHaveBeenCalledWith(...)` without a state assertion) couple tests to implementation and shatter under harmless refactors. Use mocks only at trust boundaries (network, filesystem, time); for everything inside the module, let state do the asserting. If you cannot observe the outcome without a mock-spy, rework the seam before writing the test." },
1175
- { name: "Beyoncé Rule", description: "If you liked it, you should have put a test on it. Every surface that a caller can observe — public API, CLI flag, config key, exit code, persisted schema — is a contract, and every contract without a test is a silent regression waiting to happen. When a bug or production incident reveals an uncovered surface, the fix is never 'patch the code'; it is 'patch the code AND add the test that would have caught it'. Untested behavior does not exist for future refactors — it only exists until somebody accidentally removes it." }
1176
- ],
1177
1047
  reviewSections: [
1178
1048
  {
1179
1049
  title: "RED Evidence Audit",
@@ -1247,10 +1117,6 @@ const TDD = {
1247
1117
  { section: "Test Pyramid Shape", required: false, validationRule: "If present: per-slice count of Small/Medium/Large tests added, to let reviewers verify the suite is not drifting top-heavy." },
1248
1118
  { section: "Prove-It Reproduction", required: false, validationRule: "Required for bug-fix slices: original failing reproduction test (RED without fix), passing output with fix (GREEN), and a note confirming the test fails again if the fix is reverted." }
1249
1119
  ],
1250
- namedAntiPattern: {
1251
- title: "Code Before Failing Test",
1252
- description: "Production code written before a failing test is not TDD — it is guessing validated after the fact. Tests written after implementation confirm assumptions, not behavior. If you wrote code first, delete it and start with RED. Delete means delete — not 'keep as reference.' The failing test IS the specification."
1253
- },
1254
1120
  waveExecutionAllowed: true
1255
1121
  };
1256
1122
  // ---------------------------------------------------------------------------
@@ -1350,14 +1216,6 @@ const REVIEW = {
1350
1216
  "Batching multiple findings into one report without individual resolution",
1351
1217
  "Skipping Layer 2 sections because Layer 1 passed"
1352
1218
  ],
1353
- rationalizations: [
1354
- { claim: "Passing tests mean spec compliance by default.", reality: "Tests can miss requirement mismatches; explicit spec review is mandatory." },
1355
- { claim: "Severity labels are unnecessary.", reality: "Without severity, release decisions become inconsistent." },
1356
- { claim: "Critical issues can be fixed after ship.", reality: "Critical blockers must be resolved before release handoff." },
1357
- { claim: "Security review is not needed for internal tools.", reality: "Internal tools become external surface area. Security is always in scope." },
1358
- { claim: "A quick skim is sufficient for small diffs.", reality: "Small diffs hide high-impact changes. A 3-line auth bypass is still critical. Every diff gets layered review regardless of size." },
1359
- { claim: "The author already reviewed their own code.", reality: "Self-review misses blind spots by definition. Independent review exists precisely because authors cannot objectively evaluate their own assumptions." }
1360
- ],
1361
1219
  redFlags: [
1362
1220
  "No separate Layer 1/Layer 2 outcomes",
1363
1221
  "No structured review-army reconciliation artifact",
@@ -1369,14 +1227,6 @@ const REVIEW = {
1369
1227
  policyNeedles: ["Layer 1", "Layer 2", "Critical", "Review Army", "Ready to Ship", "One issue at a time"],
1370
1228
  artifactFile: "07-review.md",
1371
1229
  next: "ship",
1372
- cognitivePatterns: [
1373
- { name: "Severity Discipline", description: "Every finding gets a severity label. Critical blocks ship. Important should be fixed. Suggestion is optional. No ambiguous middle ground." },
1374
- { name: "Spec-First Not Code-First", description: "Review starts with the spec, not the code. Does the code do what was specified? Only after spec compliance is confirmed do you review code quality." },
1375
- { name: "Blocker Resolution Before Progress", description: "When a critical finding is identified, stop and resolve it before continuing the review. Do not accumulate criticals for batch resolution." },
1376
- { name: "Evidence or Unknown", description: "For every safety/correctness claim, cite file:line or test name. If you cannot point to evidence, the claim is 'UNKNOWN' not 'safe'. Never say 'probably tested' — check." },
1377
- { name: "Diff-Scoped Thinking", description: "Start with the diff (git diff vs main). Review only what changed unless a change has blast-radius implications. Skip unchanged files unless directly affected." },
1378
- { name: "Change-Size Awareness", description: "~100 lines = normal review. ~300 lines = consider splitting. ~1000+ lines = strongly recommend splitting into stacked PRs. Large diffs hide bugs." }
1379
- ],
1380
1230
  reviewSections: [
1381
1231
  {
1382
1232
  title: "Layer 1: Spec Compliance",
@@ -1464,11 +1314,7 @@ const REVIEW = {
1464
1314
  { section: "Completeness Score", required: true, validationRule: "Records AC coverage, task coverage, test-slice coverage, and adversarial-review pass status as numeric or boolean values. At minimum, a line like 'AC coverage: N/M' or 'AC coverage: 100%'." },
1465
1315
  { section: "Severity Summary", required: true, validationRule: "Per-severity count lines for critical, important, and suggestion buckets." },
1466
1316
  { section: "Final Verdict", required: true, validationRule: "Exactly one of: APPROVED, APPROVED_WITH_CONCERNS, BLOCKED." }
1467
- ],
1468
- namedAntiPattern: {
1469
- title: "Tests Pass So It Must Be Correct",
1470
- description: "Tests verify what the developer thought to test. They do not verify what the spec requires. A passing test suite with failing spec compliance is a false green. Layer 1 exists precisely because tests and specs can diverge without anyone noticing."
1471
- }
1317
+ ]
1472
1318
  };
1473
1319
  // ---------------------------------------------------------------------------
1474
1320
  // SHIP — reference: superpowers finishing-a-development-branch + gstack /ship
@@ -1555,14 +1401,6 @@ const SHIP = {
1555
1401
  "Selecting multiple finalization modes",
1556
1402
  "Shipping with BLOCKED review verdict"
1557
1403
  ],
1558
- rationalizations: [
1559
- { claim: "Rollback details can be written after release.", reality: "Rollback is part of release readiness, not post-release cleanup." },
1560
- { claim: "Finalization choice is obvious from context.", reality: "Explicit branch action prevents accidental release state." },
1561
- { claim: "Urgent fixes can skip preflight.", reality: "Urgency increases risk; preflight discipline matters more, not less." },
1562
- { 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." },
1563
- { 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." },
1564
- { 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." }
1565
- ],
1566
1404
  redFlags: [
1567
1405
  "No rollback trigger/steps",
1568
1406
  "More than one finalization mode implied",
@@ -1581,14 +1419,6 @@ const SHIP = {
1581
1419
  ],
1582
1420
  artifactFile: "08-ship.md",
1583
1421
  next: "done",
1584
- cognitivePatterns: [
1585
- { name: "Preflight Discipline", description: "Preflight is not bureaucracy — it is the last safety net. Every skip 'just this once' normalizes skipping. Run the checks every time." },
1586
- { 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." },
1587
- { 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.'" },
1588
- { 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." },
1589
- { 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." },
1590
- { 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." }
1591
- ],
1592
1422
  reviewSections: [
1593
1423
  {
1594
1424
  title: "Preflight Verification",
@@ -1626,11 +1456,7 @@ const SHIP = {
1626
1456
  { section: "Finalization", required: true, validationRule: "Exactly one finalization enum token selected. Execution result documented. Worktree cleaned if applicable." },
1627
1457
  { section: "Completion Status", required: false, validationRule: "If present: exactly one of SHIPPED, SHIPPED_WITH_EXCEPTIONS, BLOCKED. Exceptions documented when applicable." },
1628
1458
  { section: "Compound Step", required: false, validationRule: "Optional retrospective: at least one bullet of the form 'Insight: ... | Action: append [compound] entry to .cclaw/knowledge.jsonl', or an explicit 'No compound insight this run.' line." }
1629
- ],
1630
- namedAntiPattern: {
1631
- title: "Green CI Means Safe to Merge",
1632
- 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."
1633
- }
1459
+ ]
1634
1460
  };
1635
1461
  // ---------------------------------------------------------------------------
1636
1462
  // Stage map and accessors
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Command contract for /cc-status — a read-only snapshot command.
2
+ * Command contract for /cc-view status — a read-only snapshot command.
3
3
  * Does not mutate state. Always safe to run.
4
4
  */
5
5
  export declare function statusCommandContract(): string;
6
6
  /**
7
- * Skill body for /cc-status — read-only status snapshot.
7
+ * Skill body for /cc-view status — read-only status snapshot.
8
8
  */
9
9
  export declare function statusCommandSkillMarkdown(): string;
@@ -23,13 +23,13 @@ function snapshotPath() {
23
23
  return `${RUNTIME_ROOT}/state/flow-state.snapshot.json`;
24
24
  }
25
25
  /**
26
- * Command contract for /cc-status — a read-only snapshot command.
26
+ * Command contract for /cc-view status — a read-only snapshot command.
27
27
  * Does not mutate state. Always safe to run.
28
28
  */
29
29
  export function statusCommandContract() {
30
30
  const flowPath = flowStatePath();
31
31
  const delegationPath = delegationLogPath();
32
- return `# /cc-status
32
+ return `# /cc-view status
33
33
 
34
34
  ## Purpose
35
35
 
@@ -41,10 +41,10 @@ time to answer "where are we?" without advancing the flow.
41
41
 
42
42
  ## HARD-GATE
43
43
 
44
- - **Do not** use \`/cc-status\` output to infer gate completion for decisions — cite
44
+ - **Do not** use \`/cc-view status\` output to infer gate completion for decisions — cite
45
45
  artifact evidence via \`/cc-next\` when advancing.
46
46
  - **Do not** mutate \`${flowPath}\` or delegation log from this command.
47
- - **Do not** rewrite \`${snapshotPath()}\` from this command (use \`/cc-diff\`).
47
+ - **Do not** rewrite \`${snapshotPath()}\` from this command (use \`/cc-view diff\`).
48
48
 
49
49
  ## Algorithm
50
50
 
@@ -59,7 +59,7 @@ time to answer "where are we?" without advancing the flow.
59
59
  - Compute the duration as \`now - signalTimestamp\` and render compactly: \`<X>m\`, \`<X>h<Y>m\`, or \`<X>d<Y>h\`.
60
60
  - If no signal exists, render \`(unknown)\`.
61
61
  5. Optionally read **\`${snapshotPath()}\`** to compute gate delta versus prior baseline:
62
- - If missing or invalid, render \`delta: (baseline unavailable; run /cc-diff)\`.
62
+ - If missing or invalid, render \`delta: (baseline unavailable; run /cc-view diff)\`.
63
63
  6. Read the top of **\`${knowledgePath}\`** — surface up to 3 most recent entries
64
64
  (by trailing timestamp or source marker).
65
65
  7. Emit the visual status block described below. Do **not** load any stage skill.
@@ -83,14 +83,14 @@ cclaw status
83
83
  - <latest entry summary>
84
84
  - <second entry summary>
85
85
  - <third entry summary>
86
- next: /cc-next · /cc-tree · /cc-diff
86
+ next: /cc-next · /cc-view tree · /cc-view diff
87
87
  \`\`\`
88
88
 
89
89
  ## Anti-patterns
90
90
 
91
91
  - Inventing gate status without reading \`${flowPath}\`.
92
92
  - Reporting delegations as satisfied when the log says \`pending\`.
93
- - Advancing the stage from \`/cc-status\` — progression belongs to \`/cc-next\`.
93
+ - Advancing the stage from \`/cc-view status\` — progression belongs to \`/cc-next\`.
94
94
  - Hiding stale stages; stale markers must be surfaced directly in the status line.
95
95
 
96
96
  ## Primary skill
@@ -99,7 +99,7 @@ cclaw status
99
99
  `;
100
100
  }
101
101
  /**
102
- * Skill body for /cc-status — read-only status snapshot.
102
+ * Skill body for /cc-view status — read-only status snapshot.
103
103
  */
104
104
  export function statusCommandSkillMarkdown() {
105
105
  const flowPath = flowStatePath();
@@ -109,11 +109,11 @@ name: ${STATUS_SKILL_NAME}
109
109
  description: "Read-only visual snapshot of the cclaw flow with progress bar, gate delta, delegations, and stale markers."
110
110
  ---
111
111
 
112
- # /cc-status — Flow Status Snapshot
112
+ # /cc-view status — Flow Status Snapshot
113
113
 
114
114
  ## Overview
115
115
 
116
- \`/cc-status\` is the quickest way to answer "where are we in the flow?" without
116
+ \`/cc-view status\` is the quickest way to answer "where are we in the flow?" without
117
117
  advancing or mutating anything. Safe to run at any point.
118
118
 
119
119
  ## HARD-GATE
@@ -132,7 +132,7 @@ a read-only command. Do **not** update \`${snapshotPath()}\` here.
132
132
  - Render \`<X>d<Y>h\`, \`<X>h<Y>m\`, \`<X>m\`, or \`(unknown)\`.
133
133
  5. Try reading \`${snapshotPath()}\` for gate delta:
134
134
  - If available, compare current stage \`passed\` / \`blocked\` sets against baseline.
135
- - If unavailable, render \`delta: (baseline unavailable; run /cc-diff)\`.
135
+ - If unavailable, render \`delta: (baseline unavailable; run /cc-view diff)\`.
136
136
  6. Read \`${RUNTIME_ROOT}/knowledge.jsonl\`. If missing or empty → knowledge highlights are \`(none recorded)\`. Parse each line as JSON and surface its \`trigger\`/\`action\`.
137
137
  7. For each gate in \`stageGateCatalog[currentStage].required\`:
138
138
  - Satisfied if present in \`passed\` and absent from \`blocked\`.
@@ -151,11 +151,11 @@ a read-only command. Do **not** update \`${snapshotPath()}\` here.
151
151
  - Keep output compact (≤ 30 lines) — status, not narrative.
152
152
  - Report counts, not full artifact contents.
153
153
  - If any data source is missing or corrupt, say so explicitly rather than guessing.
154
- - Include \`/cc-tree\` for deep structure and \`/cc-diff\` for before/after map in the final line.
154
+ - Include \`/cc-view tree\` for deep structure and \`/cc-view diff\` for before/after map in the final line.
155
155
 
156
156
  ## Anti-patterns
157
157
 
158
- - Rebuilding trace-matrix or running doctor from \`/cc-status\` — those belong to dedicated tools.
158
+ - Rebuilding trace-matrix or running doctor from \`/cc-view status\` — those belong to dedicated tools.
159
159
  - Treating absence of delegation log as "all delegations complete".
160
160
  - Mutating state to "clean up" during a status check.
161
161
  `;
@@ -8,7 +8,7 @@ function flowStatePath() {
8
8
  return `${RUNTIME_ROOT}/state/flow-state.json`;
9
9
  }
10
10
  export function tddLogCommandContract() {
11
- return `# /cc-tdd-log
11
+ return `# /cc-ops tdd-log
12
12
 
13
13
  ## Purpose
14
14
 
@@ -21,10 +21,10 @@ Record explicit RED/GREEN/REFACTOR evidence used by workflow guard and doctor ch
21
21
 
22
22
  ## Subcommands
23
23
 
24
- - \`/cc-tdd-log red <slice> <command> [note]\`
25
- - \`/cc-tdd-log green <slice> <command> [note]\`
26
- - \`/cc-tdd-log refactor <slice> <command> [note]\`
27
- - \`/cc-tdd-log show\`
24
+ - \`/cc-ops tdd-log red <slice> <command> [note]\`
25
+ - \`/cc-ops tdd-log green <slice> <command> [note]\`
26
+ - \`/cc-ops tdd-log refactor <slice> <command> [note]\`
27
+ - \`/cc-ops tdd-log show\`
28
28
 
29
29
  ## Log Schema
30
30
 
@@ -48,7 +48,7 @@ name: ${TDD_LOG_SKILL_NAME}
48
48
  description: "Append RED/GREEN/REFACTOR entries into tdd-cycle-log.jsonl for guard/doctor enforcement."
49
49
  ---
50
50
 
51
- # /cc-tdd-log
51
+ # /cc-ops tdd-log
52
52
 
53
53
  ## HARD-GATE
54
54
 
@@ -1,4 +1,4 @@
1
1
  export declare const ARTIFACT_TEMPLATES: Record<string, string>;
2
2
  export declare const RULEBOOK_MARKDOWN = "# Cclaw Rulebook\n\n## MUST_ALWAYS\n- Follow flow order: brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship\n- Require explicit user confirmation after plan before TDD\n- Keep evidence artifacts in `.cclaw/artifacts/`\n- Enforce RED before GREEN in TDD\n- Run two-layer review (spec_compliance and code_quality) before ship\n- Validate all inputs before processing \u2014 never trust external data without sanitization\n- Prefer immutable data patterns and pure functions where the language supports them\n- Follow existing repo conventions, patterns, and directory structure \u2014 match the codebase\n- Verify claims with fresh evidence: \"tests pass\" requires running tests in this message\n- Use conventional commits: `type(scope): description` (feat, fix, refactor, test, docs, chore)\n\n## MUST_NEVER\n- Skip RED phase and jump directly to GREEN in TDD\n- Ship with critical review findings\n- Start implementation during /brainstorm\n- Modify generated cclaw files manually when CLI can regenerate them\n- Commit `.cclaw/` or generated shim files\n- Expose secrets, tokens, API keys, or absolute system paths in agent output\n- Duplicate existing functionality without explicit justification \u2014 search before building\n- Bypass security checks, linting hooks, or type checking to \"move faster\"\n- Claim success (\"Done,\" \"All good,\" \"Tests pass\") without running verification in this message\n- Make changes outside the blast radius of the current task without user consent\n\n## DELEGATION\nWhen a task requires specialist knowledge (security audit, performance profiling, database review),\ndelegate to a specialized agent or skill if the harness supports it. The primary agent should:\n1. Identify the specialist domain\n2. Provide focused context (relevant files, the specific concern)\n3. Evaluate the specialist output before acting on it \u2014 do not blindly apply recommendations\n";
3
- export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick or medium track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc-next` = only progression path.\n- `/cc-learn` = knowledge capture and recall.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive only via `cclaw archive`.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Protocols: `.cclaw/references/protocols/*.md`.\n- Preamble budget: `.cclaw/references/protocols/ethos.md`.\n";
3
+ export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick or medium track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc-next` = only progression path.\n- `/cc-learn` = knowledge capture and recall.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `/cc-ops archive` (agent flow) or archive runtime.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Protocols: `.cclaw/references/protocols/*.md`.\n- Preamble budget: `.cclaw/references/protocols/ethos.md`.\n";
4
4
  export declare function buildRulesJson(): Record<string, unknown>;
@@ -481,7 +481,7 @@ Execution rule: complete and verify each wave before starting the next wave.
481
481
  - Exceptions (if any):
482
482
 
483
483
  ## Retro Gate Handoff
484
- - Run \`/cc-retro\` before archive.
484
+ - Run \`/cc-ops retro\` before archive.
485
485
  - Retro artifact path: \`.cclaw/artifacts/09-retro.md\`
486
486
  - Archive remains blocked until retro gate is complete.
487
487
  `,
@@ -593,7 +593,7 @@ Track-specific skips are allowed only when \`flow-state.track\` + \`skippedStage
593
593
 
594
594
  - No completion claim without fresh command evidence in this turn.
595
595
  - Do not mark gates passed from memory.
596
- - Keep evidence in \`.cclaw/artifacts/\`; archive only via \`cclaw archive\`.
596
+ - Keep evidence in \`.cclaw/artifacts/\`; archive via \`/cc-ops archive\` (agent flow) or archive runtime.
597
597
 
598
598
  ## Delegation And Approvals
599
599
 
@@ -14,7 +14,7 @@ function rewindLogPath() {
14
14
  return `${RUNTIME_ROOT}/state/rewind-log.jsonl`;
15
15
  }
16
16
  export function treeCommandContract() {
17
- return `# /cc-tree
17
+ return `# /cc-view tree
18
18
 
19
19
  ## Purpose
20
20
 
@@ -23,7 +23,7 @@ stale markers, and artifact presence.
23
23
 
24
24
  ## HARD-GATE
25
25
 
26
- - \`/cc-tree\` is read-only. Do not mutate flow-state or artifacts.
26
+ - \`/cc-view tree\` is read-only. Do not mutate flow-state or artifacts.
27
27
  - Use values from \`${flowStatePath()}\` and \`${delegationLogPath()}\`; never infer missing evidence.
28
28
 
29
29
  ## Algorithm
@@ -64,7 +64,7 @@ name: ${TREE_SKILL_NAME}
64
64
  description: "Render a visual flow tree for stages, gates, delegations, and artifacts."
65
65
  ---
66
66
 
67
- # /cc-tree
67
+ # /cc-view tree
68
68
 
69
69
  ## HARD-GATE
70
70
 
@@ -771,7 +771,7 @@ description: "Read-only curation pass over the canonical strict-JSONL knowledge
771
771
  ## When to run
772
772
 
773
773
  - Triggered automatically by **\`/cc-learn curate\`**.
774
- - Recommended after \`cclaw archive\` of a feature run, when knowledge has grown.
774
+ - Recommended after \`/cc-ops archive\` (or archive runtime) of a feature run, when knowledge has grown.
775
775
  - Recommended when active entry count exceeds **50**.
776
776
 
777
777
  ## Audit dimensions