cclaw-cli 7.7.0 → 8.1.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.
- package/README.md +210 -134
- package/dist/artifact-frontmatter.d.ts +51 -0
- package/dist/artifact-frontmatter.js +131 -0
- package/dist/artifact-paths.d.ts +7 -27
- package/dist/artifact-paths.js +20 -249
- package/dist/cancel.d.ts +16 -0
- package/dist/cancel.js +66 -0
- package/dist/cli.d.ts +2 -27
- package/dist/cli.js +90 -508
- package/dist/compound.d.ts +26 -0
- package/dist/compound.js +96 -0
- package/dist/config.d.ts +14 -51
- package/dist/config.js +23 -359
- package/dist/constants.d.ts +11 -18
- package/dist/constants.js +19 -106
- package/dist/content/antipatterns.d.ts +1 -0
- package/dist/content/antipatterns.js +109 -0
- package/dist/content/artifact-templates.d.ts +10 -0
- package/dist/content/artifact-templates.js +550 -0
- package/dist/content/cancel-command.d.ts +2 -2
- package/dist/content/cancel-command.js +25 -17
- package/dist/content/core-agents.d.ts +9 -233
- package/dist/content/core-agents.js +39 -766
- package/dist/content/decision-protocol.d.ts +1 -12
- package/dist/content/decision-protocol.js +27 -20
- package/dist/content/examples.d.ts +8 -42
- package/dist/content/examples.js +293 -425
- package/dist/content/idea-command.d.ts +2 -0
- package/dist/content/idea-command.js +38 -0
- package/dist/content/iron-laws.d.ts +4 -138
- package/dist/content/iron-laws.js +18 -197
- package/dist/content/meta-skill.d.ts +1 -3
- package/dist/content/meta-skill.js +57 -132
- package/dist/content/node-hooks.d.ts +12 -8
- package/dist/content/node-hooks.js +188 -838
- package/dist/content/recovery.d.ts +8 -0
- package/dist/content/recovery.js +179 -0
- package/dist/content/reference-patterns.d.ts +4 -13
- package/dist/content/reference-patterns.js +260 -389
- package/dist/content/research-playbooks.d.ts +8 -8
- package/dist/content/research-playbooks.js +108 -121
- package/dist/content/review-loop.d.ts +6 -192
- package/dist/content/review-loop.js +29 -731
- package/dist/content/skills.d.ts +8 -38
- package/dist/content/skills.js +681 -732
- package/dist/content/specialist-prompts/architect.d.ts +1 -0
- package/dist/content/specialist-prompts/architect.js +225 -0
- package/dist/content/specialist-prompts/brainstormer.d.ts +1 -0
- package/dist/content/specialist-prompts/brainstormer.js +168 -0
- package/dist/content/specialist-prompts/index.d.ts +2 -0
- package/dist/content/specialist-prompts/index.js +14 -0
- package/dist/content/specialist-prompts/planner.d.ts +1 -0
- package/dist/content/specialist-prompts/planner.js +182 -0
- package/dist/content/specialist-prompts/reviewer.d.ts +1 -0
- package/dist/content/specialist-prompts/reviewer.js +193 -0
- package/dist/content/specialist-prompts/security-reviewer.d.ts +1 -0
- package/dist/content/specialist-prompts/security-reviewer.js +133 -0
- package/dist/content/specialist-prompts/slice-builder.d.ts +1 -0
- package/dist/content/specialist-prompts/slice-builder.js +232 -0
- package/dist/content/stage-playbooks.d.ts +8 -0
- package/dist/content/stage-playbooks.js +404 -0
- package/dist/content/start-command.d.ts +2 -12
- package/dist/content/start-command.js +221 -207
- package/dist/flow-state.d.ts +21 -178
- package/dist/flow-state.js +67 -170
- package/dist/fs-utils.d.ts +6 -26
- package/dist/fs-utils.js +29 -162
- package/dist/gitignore.d.ts +2 -1
- package/dist/gitignore.js +51 -34
- package/dist/harness-detect.d.ts +10 -0
- package/dist/harness-detect.js +29 -0
- package/dist/install.d.ts +27 -15
- package/dist/install.js +230 -1342
- package/dist/knowledge-store.d.ts +19 -163
- package/dist/knowledge-store.js +56 -590
- package/dist/logger.d.ts +8 -3
- package/dist/logger.js +13 -4
- package/dist/orchestrator-routing.d.ts +29 -0
- package/dist/orchestrator-routing.js +156 -0
- package/dist/run-persistence.d.ts +7 -118
- package/dist/run-persistence.js +29 -845
- package/dist/runtime/run-hook.entry.d.ts +1 -3
- package/dist/runtime/run-hook.entry.js +19 -4
- package/dist/runtime/run-hook.mjs +13 -1024
- package/dist/types.d.ts +25 -261
- package/dist/types.js +8 -36
- package/package.json +6 -3
- package/dist/artifact-linter/brainstorm.d.ts +0 -2
- package/dist/artifact-linter/brainstorm.js +0 -353
- package/dist/artifact-linter/design.d.ts +0 -18
- package/dist/artifact-linter/design.js +0 -444
- package/dist/artifact-linter/findings-dedup.d.ts +0 -56
- package/dist/artifact-linter/findings-dedup.js +0 -232
- package/dist/artifact-linter/plan.d.ts +0 -2
- package/dist/artifact-linter/plan.js +0 -826
- package/dist/artifact-linter/review-army.d.ts +0 -49
- package/dist/artifact-linter/review-army.js +0 -520
- package/dist/artifact-linter/review.d.ts +0 -2
- package/dist/artifact-linter/review.js +0 -113
- package/dist/artifact-linter/scope.d.ts +0 -2
- package/dist/artifact-linter/scope.js +0 -158
- package/dist/artifact-linter/shared.d.ts +0 -637
- package/dist/artifact-linter/shared.js +0 -2163
- package/dist/artifact-linter/ship.d.ts +0 -2
- package/dist/artifact-linter/ship.js +0 -250
- package/dist/artifact-linter/spec.d.ts +0 -2
- package/dist/artifact-linter/spec.js +0 -176
- package/dist/artifact-linter/tdd.d.ts +0 -118
- package/dist/artifact-linter/tdd.js +0 -1404
- package/dist/artifact-linter.d.ts +0 -15
- package/dist/artifact-linter.js +0 -517
- package/dist/codex-feature-flag.d.ts +0 -58
- package/dist/codex-feature-flag.js +0 -193
- package/dist/content/closeout-guidance.d.ts +0 -14
- package/dist/content/closeout-guidance.js +0 -44
- package/dist/content/diff-command.d.ts +0 -1
- package/dist/content/diff-command.js +0 -43
- package/dist/content/harness-doc.d.ts +0 -1
- package/dist/content/harness-doc.js +0 -65
- package/dist/content/hook-events.d.ts +0 -9
- package/dist/content/hook-events.js +0 -23
- package/dist/content/hook-manifest.d.ts +0 -81
- package/dist/content/hook-manifest.js +0 -156
- package/dist/content/hooks.d.ts +0 -11
- package/dist/content/hooks.js +0 -1972
- package/dist/content/idea.d.ts +0 -60
- package/dist/content/idea.js +0 -416
- package/dist/content/language-policy.d.ts +0 -2
- package/dist/content/language-policy.js +0 -13
- package/dist/content/learnings.d.ts +0 -6
- package/dist/content/learnings.js +0 -141
- package/dist/content/observe.d.ts +0 -19
- package/dist/content/observe.js +0 -86
- package/dist/content/opencode-plugin.d.ts +0 -1
- package/dist/content/opencode-plugin.js +0 -635
- package/dist/content/review-prompts.d.ts +0 -1
- package/dist/content/review-prompts.js +0 -104
- package/dist/content/runtime-shared-snippets.d.ts +0 -8
- package/dist/content/runtime-shared-snippets.js +0 -80
- package/dist/content/session-hooks.d.ts +0 -7
- package/dist/content/session-hooks.js +0 -107
- package/dist/content/skills-elicitation.d.ts +0 -1
- package/dist/content/skills-elicitation.js +0 -167
- package/dist/content/stage-command.d.ts +0 -2
- package/dist/content/stage-command.js +0 -17
- package/dist/content/stage-schema.d.ts +0 -117
- package/dist/content/stage-schema.js +0 -955
- package/dist/content/stages/_lint-metadata/index.d.ts +0 -2
- package/dist/content/stages/_lint-metadata/index.js +0 -97
- package/dist/content/stages/brainstorm.d.ts +0 -2
- package/dist/content/stages/brainstorm.js +0 -184
- package/dist/content/stages/design.d.ts +0 -2
- package/dist/content/stages/design.js +0 -288
- package/dist/content/stages/index.d.ts +0 -8
- package/dist/content/stages/index.js +0 -11
- package/dist/content/stages/plan.d.ts +0 -2
- package/dist/content/stages/plan.js +0 -191
- package/dist/content/stages/review.d.ts +0 -2
- package/dist/content/stages/review.js +0 -240
- package/dist/content/stages/schema-types.d.ts +0 -203
- package/dist/content/stages/schema-types.js +0 -1
- package/dist/content/stages/scope.d.ts +0 -2
- package/dist/content/stages/scope.js +0 -254
- package/dist/content/stages/ship.d.ts +0 -2
- package/dist/content/stages/ship.js +0 -159
- package/dist/content/stages/spec.d.ts +0 -2
- package/dist/content/stages/spec.js +0 -170
- package/dist/content/stages/tdd.d.ts +0 -4
- package/dist/content/stages/tdd.js +0 -273
- package/dist/content/state-contracts.d.ts +0 -1
- package/dist/content/state-contracts.js +0 -63
- package/dist/content/status-command.d.ts +0 -4
- package/dist/content/status-command.js +0 -109
- package/dist/content/subagent-context-skills.d.ts +0 -4
- package/dist/content/subagent-context-skills.js +0 -279
- package/dist/content/subagents.d.ts +0 -3
- package/dist/content/subagents.js +0 -997
- package/dist/content/templates.d.ts +0 -26
- package/dist/content/templates.js +0 -1692
- package/dist/content/track-render-context.d.ts +0 -18
- package/dist/content/track-render-context.js +0 -53
- package/dist/content/tree-command.d.ts +0 -1
- package/dist/content/tree-command.js +0 -64
- package/dist/content/utility-skills.d.ts +0 -30
- package/dist/content/utility-skills.js +0 -160
- package/dist/content/view-command.d.ts +0 -2
- package/dist/content/view-command.js +0 -92
- package/dist/delegation.d.ts +0 -649
- package/dist/delegation.js +0 -1539
- package/dist/early-loop.d.ts +0 -70
- package/dist/early-loop.js +0 -302
- package/dist/execution-topology.d.ts +0 -36
- package/dist/execution-topology.js +0 -73
- package/dist/gate-evidence.d.ts +0 -85
- package/dist/gate-evidence.js +0 -631
- package/dist/harness-adapters.d.ts +0 -151
- package/dist/harness-adapters.js +0 -756
- package/dist/harness-selection.d.ts +0 -31
- package/dist/harness-selection.js +0 -214
- package/dist/hook-schema.d.ts +0 -6
- package/dist/hook-schema.js +0 -114
- package/dist/hook-schemas/claude-hooks.v1.json +0 -10
- package/dist/hook-schemas/codex-hooks.v1.json +0 -10
- package/dist/hook-schemas/cursor-hooks.v1.json +0 -13
- package/dist/init-detect.d.ts +0 -2
- package/dist/init-detect.js +0 -50
- package/dist/internal/advance-stage/advance.d.ts +0 -89
- package/dist/internal/advance-stage/advance.js +0 -655
- package/dist/internal/advance-stage/cancel-run.d.ts +0 -8
- package/dist/internal/advance-stage/cancel-run.js +0 -19
- package/dist/internal/advance-stage/flow-state-coercion.d.ts +0 -3
- package/dist/internal/advance-stage/flow-state-coercion.js +0 -81
- package/dist/internal/advance-stage/helpers.d.ts +0 -14
- package/dist/internal/advance-stage/helpers.js +0 -145
- package/dist/internal/advance-stage/hook.d.ts +0 -8
- package/dist/internal/advance-stage/hook.js +0 -40
- package/dist/internal/advance-stage/parsers.d.ts +0 -72
- package/dist/internal/advance-stage/parsers.js +0 -357
- package/dist/internal/advance-stage/proactive-delegation-trace.d.ts +0 -24
- package/dist/internal/advance-stage/proactive-delegation-trace.js +0 -56
- package/dist/internal/advance-stage/review-loop.d.ts +0 -16
- package/dist/internal/advance-stage/review-loop.js +0 -199
- package/dist/internal/advance-stage/rewind.d.ts +0 -14
- package/dist/internal/advance-stage/rewind.js +0 -108
- package/dist/internal/advance-stage/start-flow.d.ts +0 -13
- package/dist/internal/advance-stage/start-flow.js +0 -241
- package/dist/internal/advance-stage/verify.d.ts +0 -21
- package/dist/internal/advance-stage/verify.js +0 -185
- package/dist/internal/advance-stage.d.ts +0 -7
- package/dist/internal/advance-stage.js +0 -138
- package/dist/internal/cohesion-contract-stub.d.ts +0 -24
- package/dist/internal/cohesion-contract-stub.js +0 -148
- package/dist/internal/compound-readiness.d.ts +0 -23
- package/dist/internal/compound-readiness.js +0 -102
- package/dist/internal/detect-public-api-changes.d.ts +0 -5
- package/dist/internal/detect-public-api-changes.js +0 -45
- package/dist/internal/detect-supply-chain-changes.d.ts +0 -6
- package/dist/internal/detect-supply-chain-changes.js +0 -138
- package/dist/internal/early-loop-status.d.ts +0 -7
- package/dist/internal/early-loop-status.js +0 -93
- package/dist/internal/envelope-validate.d.ts +0 -7
- package/dist/internal/envelope-validate.js +0 -66
- package/dist/internal/flow-state-repair.d.ts +0 -20
- package/dist/internal/flow-state-repair.js +0 -104
- package/dist/internal/plan-split-waves.d.ts +0 -190
- package/dist/internal/plan-split-waves.js +0 -764
- package/dist/internal/runtime-integrity.d.ts +0 -7
- package/dist/internal/runtime-integrity.js +0 -268
- package/dist/internal/slice-commit.d.ts +0 -7
- package/dist/internal/slice-commit.js +0 -619
- package/dist/internal/tdd-loop-status.d.ts +0 -14
- package/dist/internal/tdd-loop-status.js +0 -68
- package/dist/internal/tdd-red-evidence.d.ts +0 -7
- package/dist/internal/tdd-red-evidence.js +0 -153
- package/dist/internal/waiver-grant.d.ts +0 -62
- package/dist/internal/waiver-grant.js +0 -294
- package/dist/internal/wave-status.d.ts +0 -63
- package/dist/internal/wave-status.js +0 -450
- package/dist/managed-resources.d.ts +0 -53
- package/dist/managed-resources.js +0 -313
- package/dist/policy.d.ts +0 -10
- package/dist/policy.js +0 -167
- package/dist/retro-gate.d.ts +0 -9
- package/dist/retro-gate.js +0 -47
- package/dist/run-archive.d.ts +0 -61
- package/dist/run-archive.js +0 -391
- package/dist/runs.d.ts +0 -2
- package/dist/runs.js +0 -2
- package/dist/stack-detection.d.ts +0 -116
- package/dist/stack-detection.js +0 -489
- package/dist/streaming/event-stream.d.ts +0 -31
- package/dist/streaming/event-stream.js +0 -114
- package/dist/tdd-cycle.d.ts +0 -107
- package/dist/tdd-cycle.js +0 -289
- package/dist/tdd-verification-evidence.d.ts +0 -17
- package/dist/tdd-verification-evidence.js +0 -122
- package/dist/track-heuristics.d.ts +0 -27
- package/dist/track-heuristics.js +0 -154
- package/dist/util/slice-id.d.ts +0 -58
- package/dist/util/slice-id.js +0 -89
- package/dist/worktree-manager.d.ts +0 -20
- package/dist/worktree-manager.js +0 -108
package/dist/types.d.ts
CHANGED
|
@@ -1,267 +1,31 @@
|
|
|
1
|
-
export declare const FLOW_STAGES: readonly ["
|
|
1
|
+
export declare const FLOW_STAGES: readonly ["plan", "build", "review", "ship"];
|
|
2
2
|
export type FlowStage = (typeof FLOW_STAGES)[number];
|
|
3
|
-
export declare const FLOW_TRACKS: readonly ["quick", "medium", "standard"];
|
|
4
|
-
export type FlowTrack = (typeof FLOW_TRACKS)[number];
|
|
5
|
-
export declare const DISCOVERY_MODES: readonly ["lean", "guided", "deep"];
|
|
6
|
-
export type DiscoveryMode = (typeof DISCOVERY_MODES)[number];
|
|
7
|
-
/**
|
|
8
|
-
* Ordered stages that make up each flow track.
|
|
9
|
-
*
|
|
10
|
-
* - `standard` runs the full 8-stage pipeline (default — same as before tracks existed).
|
|
11
|
-
* - `medium` keeps product framing but skips heavy scope/design lock-in:
|
|
12
|
-
* brainstorm -> spec -> plan -> tdd -> review -> ship.
|
|
13
|
-
* - `quick` skips the upstream product stages (brainstorm/scope/design/plan) for
|
|
14
|
-
* small bug fixes or single-purpose changes where the spec is already known.
|
|
15
|
-
* It still keeps the non-negotiable safety gates: spec → tdd → review → ship.
|
|
16
|
-
*/
|
|
17
|
-
export declare const TRACK_STAGES: Record<FlowTrack, readonly FlowStage[]>;
|
|
18
3
|
export declare const HARNESS_IDS: readonly ["claude", "cursor", "opencode", "codex"];
|
|
19
4
|
export type HarnessId = (typeof HARNESS_IDS)[number];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Optional prompt-to-track overrides for /cc classification.
|
|
47
|
-
*
|
|
48
|
-
* Honesty note: this config is **advisory**. cclaw surfaces these lists in
|
|
49
|
-
* the /cc skill and contract prose so the LLM can apply them when picking a
|
|
50
|
-
* track. There is no Node-level routing layer that mechanically enforces the
|
|
51
|
-
* result — which is why we only ship `triggers`, `veto`, and `fallback`, not
|
|
52
|
-
* regex patterns or priority overrides.
|
|
53
|
-
*
|
|
54
|
-
* Removed:
|
|
55
|
-
* - `priority`: track evaluation order is always `standard -> medium -> quick`
|
|
56
|
-
* (narrow-to-broad matching). Overriding it was never wired.
|
|
57
|
-
*/
|
|
58
|
-
export interface TrackHeuristicsConfig {
|
|
59
|
-
/** Track used when no trigger matches. Defaults to `standard`. */
|
|
60
|
-
fallback?: FlowTrack;
|
|
61
|
-
/** Per-track vocabulary hints. */
|
|
62
|
-
tracks?: Partial<Record<FlowTrack, TrackHeuristicRule>>;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Opt-in plan-slice review heuristic.
|
|
66
|
-
*
|
|
67
|
-
* When enabled, the TDD stage skill is instructed to insert a
|
|
68
|
-
* `## Per-Slice Review` section into `06-tdd.md` for every plan slice
|
|
69
|
-
* whose estimated `touchCount` meets `filesChangedThreshold`, whose
|
|
70
|
-
* `touchPaths` match any `touchTriggers` glob, or whose plan row is
|
|
71
|
-
* flagged `highRisk: true`. The section records a short spec-compliance
|
|
72
|
-
* pass plus a short quality pass (delegated to the `reviewer` subagent
|
|
73
|
-
* when the harness supports native dispatch, otherwise fulfilled via
|
|
74
|
-
* an explicit in-session role switch with evidence).
|
|
75
|
-
*
|
|
76
|
-
* Track gating: `enforceOnTracks` lists the tracks where the sync/runtime check escalates to a warning. Tracks outside this list still see
|
|
77
|
-
* the skill prose but leave the decision to the user.
|
|
78
|
-
*
|
|
79
|
-
* All fields optional; sensible defaults: disabled, threshold 5, no
|
|
80
|
-
* touch triggers, `enforceOnTracks: ["standard"]`.
|
|
81
|
-
*/
|
|
82
|
-
export interface SliceReviewConfig {
|
|
83
|
-
/** Turn the heuristic on (disabled by default). */
|
|
84
|
-
enabled?: boolean;
|
|
85
|
-
/** Minimum estimated touchCount for a slice to be eligible. */
|
|
86
|
-
filesChangedThreshold?: number;
|
|
87
|
-
/** Glob hints; any plan-task touchPath match triggers review. */
|
|
88
|
-
touchTriggers?: string[];
|
|
89
|
-
/** Tracks on which missed reviews escalate to a sync/runtime warning. */
|
|
90
|
-
enforceOnTracks?: FlowTrack[];
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* File-path routing hints used by workflow-guard during `tdd` stage.
|
|
94
|
-
*
|
|
95
|
-
* - `testPathPatterns`: paths considered test-side changes (RED writes).
|
|
96
|
-
* - `productionPathPatterns`: optional allowlist for production paths that
|
|
97
|
-
* participate in GREEN/REFACTOR checks. When omitted, workflow-guard treats
|
|
98
|
-
* non-test code files as production writes.
|
|
99
|
-
*/
|
|
100
|
-
export interface TddPathConfig {
|
|
101
|
-
testPathPatterns?: string[];
|
|
102
|
-
productionPathPatterns?: string[];
|
|
103
|
-
/**
|
|
104
|
-
* Verification reference policy for tdd_verified_before_complete evidence.
|
|
105
|
-
* - auto: require commit SHA when .git exists; with vcs:none require no-VCS reason plus content/artifact hash.
|
|
106
|
-
* - required: always require a commit SHA except explicit vcs:none still uses no-VCS hash evidence.
|
|
107
|
-
* - disabled: command + pass status are enough.
|
|
108
|
-
*/
|
|
109
|
-
verificationRef?: "auto" | "required" | "disabled";
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Compound-stage clustering policy.
|
|
113
|
-
*
|
|
114
|
-
* `recurrenceThreshold` is the base minimum repeat count for a trigger/action
|
|
115
|
-
* cluster before it is eligible for promotion into durable rules/skills.
|
|
116
|
-
*/
|
|
117
|
-
export interface CompoundConfig {
|
|
118
|
-
recurrenceThreshold?: number;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Early-stage Ralph loop policy for brainstorm/scope/design.
|
|
122
|
-
*
|
|
123
|
-
* - enabled: when false, skip early-loop gate/diagnostics and hook writes.
|
|
124
|
-
* - maxIterations: capped producer/critic iterations before convergence
|
|
125
|
-
* escalation. Defaults to 3.
|
|
126
|
-
*/
|
|
127
|
-
export interface EarlyLoopConfig {
|
|
128
|
-
enabled?: boolean;
|
|
129
|
-
maxIterations?: number;
|
|
130
|
-
}
|
|
131
|
-
export interface IronLawsConfig {
|
|
132
|
-
/**
|
|
133
|
-
* Per-law escape hatch: list the iron-law ids that must always be strict,
|
|
134
|
-
* independent of the project-wide `strictness` knob. Kept as an advanced
|
|
135
|
-
* override for teams that want e.g. `tdd-red-before-write` strict while the
|
|
136
|
-
* rest of the pipeline stays advisory.
|
|
137
|
-
*/
|
|
138
|
-
strictLaws?: string[];
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Optional opt-in audit toggles for additional stage lint gates.
|
|
142
|
-
*
|
|
143
|
-
* `scopePreAudit` stays opt-in (disabled by default). `staleDiagramAudit` is
|
|
144
|
-
* default-on and can be explicitly disabled when teams intentionally skip it.
|
|
145
|
-
*/
|
|
146
|
-
export interface OptInAuditsConfig {
|
|
147
|
-
/** When true, scope lint requires a filled `Pre-Scope System Audit` section. */
|
|
148
|
-
scopePreAudit?: boolean;
|
|
149
|
-
/** Default true; when enabled, design lint runs stale diagram drift checks against blast radius files. */
|
|
150
|
-
staleDiagramAudit?: boolean;
|
|
151
|
-
}
|
|
152
|
-
export interface ReviewLoopExternalSecondOpinionConfig {
|
|
153
|
-
/** Enables a second outside-voice pass for review-loop iterations. */
|
|
154
|
-
enabled?: boolean;
|
|
155
|
-
/** Optional model label for traceability in artifacts/logs. */
|
|
156
|
-
model?: string;
|
|
157
|
-
/** Minimum score delta that should be surfaced as disagreement context. */
|
|
158
|
-
scoreDeltaThreshold?: number;
|
|
159
|
-
}
|
|
160
|
-
export interface ReviewLoopConfig {
|
|
161
|
-
externalSecondOpinion?: ReviewLoopExternalSecondOpinionConfig;
|
|
162
|
-
}
|
|
163
|
-
export type VcsMode = "git-with-remote" | "git-local-only" | "none";
|
|
164
|
-
export type TddCommitMode = "managed-per-slice" | "agent-required" | "checkpoint-only" | "off";
|
|
165
|
-
export type TddIsolationMode = "worktree" | "in-place" | "auto";
|
|
166
|
-
export type ExecutionTopology = "auto" | "inline" | "single-builder" | "parallel-builders" | "strict-micro";
|
|
167
|
-
export type ExecutionStrictnessProfile = "fast" | "balanced" | "strict";
|
|
168
|
-
export type PlanSliceGranularity = "feature-atomic" | "strict-micro";
|
|
169
|
-
export type PlanMicroTaskPolicy = "advisory" | "strict";
|
|
170
|
-
/**
|
|
171
|
-
* 7.6.0 — what slice-commit does when a manifest in the slice's
|
|
172
|
-
* claim drifts its corresponding lockfile twin (e.g. Cargo.toml +
|
|
173
|
-
* Cargo.lock; package.json + package-lock.json; pyproject.toml +
|
|
174
|
-
* poetry.lock; etc).
|
|
175
|
-
*
|
|
176
|
-
* - `auto-include` (default) — fold the lockfile drift into the slice
|
|
177
|
-
* commit so the manifest + lockfile land atomically.
|
|
178
|
-
* - `auto-revert` — revert the lockfile drift before commit so the
|
|
179
|
-
* slice ships only the manifest change; the next CI/test run will
|
|
180
|
-
* regenerate the lockfile.
|
|
181
|
-
* - `strict-fence` — reject the lockfile drift as
|
|
182
|
-
* `slice_commit_path_drift` (pre-7.6.0 behavior).
|
|
183
|
-
*/
|
|
184
|
-
export type LockfileTwinPolicy = "auto-include" | "auto-revert" | "strict-fence";
|
|
185
|
-
export interface TddConfig {
|
|
186
|
-
/**
|
|
187
|
-
* Commit ownership model for closed TDD slices.
|
|
188
|
-
* - managed-per-slice: cclaw-generated hook performs one commit per closed slice.
|
|
189
|
-
* - agent-required: worker/controller must create the commit outside cclaw.
|
|
190
|
-
* - checkpoint-only: coarse-grained checkpoints are allowed (no per-slice enforcement).
|
|
191
|
-
* - off: skip commit-shape enforcement.
|
|
192
|
-
*/
|
|
193
|
-
commitMode?: TddCommitMode;
|
|
194
|
-
/**
|
|
195
|
-
* Slice execution isolation model.
|
|
196
|
-
* - worktree: default; allocate one git worktree per slice span.
|
|
197
|
-
* - in-place: run in the main working tree.
|
|
198
|
-
* - auto: prefer worktree, degrade to in-place when unavailable.
|
|
199
|
-
*/
|
|
200
|
-
isolationMode?: TddIsolationMode;
|
|
201
|
-
/**
|
|
202
|
-
* Repo-relative root used for managed slice worktrees.
|
|
203
|
-
*/
|
|
204
|
-
worktreeRoot?: string;
|
|
205
|
-
/**
|
|
206
|
-
* 7.6.0 — slice-commit policy when a manifest claim drifts its lockfile
|
|
207
|
-
* twin (Cargo.toml/Cargo.lock, package.json/package-lock.json, etc).
|
|
208
|
-
* Defaults to `auto-include` so the manifest + regenerated lockfile
|
|
209
|
-
* land in the same managed commit instead of failing on drift.
|
|
210
|
-
*/
|
|
211
|
-
lockfileTwinPolicy?: LockfileTwinPolicy;
|
|
212
|
-
}
|
|
213
|
-
export interface ExecutionConfig {
|
|
214
|
-
/**
|
|
215
|
-
* 7.7.0 — adaptive execution topology for implementation units.
|
|
216
|
-
*
|
|
217
|
-
* - `auto` (default): choose the cheapest safe route from plan shape.
|
|
218
|
-
* - `inline`: controller may execute a low-risk unit inline while still
|
|
219
|
-
* recording RED/GREEN/REFACTOR evidence.
|
|
220
|
-
* - `single-builder`: one slice-builder owns a feature-atomic unit.
|
|
221
|
-
* - `parallel-builders`: fan out independent substantial units only.
|
|
222
|
-
* - `strict-micro`: preserve the pre-7.7 posture where each tiny task is
|
|
223
|
-
* its own schedulable slice.
|
|
224
|
-
*/
|
|
225
|
-
topology?: ExecutionTopology;
|
|
226
|
-
/**
|
|
227
|
-
* 7.7.0 — default calibration for topology and plan-shape advisories.
|
|
228
|
-
* `balanced` is the default: prefer feature-atomic units with internal
|
|
229
|
-
* 2-5 minute TDD steps, warning on microtask-only plans without blocking.
|
|
230
|
-
*/
|
|
231
|
-
strictness?: ExecutionStrictnessProfile;
|
|
232
|
-
/**
|
|
233
|
-
* 7.7.0 — upper bound for simultaneous slice-builder workers when the
|
|
234
|
-
* router selects `parallel-builders`.
|
|
235
|
-
*/
|
|
236
|
-
maxBuilders?: number;
|
|
237
|
-
}
|
|
238
|
-
export interface PlanConfig {
|
|
239
|
-
/**
|
|
240
|
-
* 7.7.0 — default schedulable surface for plan authoring.
|
|
241
|
-
* - feature-atomic: U-* slices contain internal 2-5 minute TDD steps.
|
|
242
|
-
* - strict-micro: one tiny task can remain one schedulable slice.
|
|
243
|
-
*/
|
|
244
|
-
sliceGranularity?: PlanSliceGranularity;
|
|
245
|
-
/**
|
|
246
|
-
* 7.7.0 — how strongly the plan linter reacts to microtask-only plans.
|
|
247
|
-
* `advisory` warns in fast/balanced execution; `strict` treats strict
|
|
248
|
-
* microtask planning as intentional.
|
|
249
|
-
*/
|
|
250
|
-
microTaskPolicy?: PlanMicroTaskPolicy;
|
|
251
|
-
}
|
|
252
|
-
export interface CclawConfig {
|
|
253
|
-
version: string;
|
|
254
|
-
flowVersion: string;
|
|
255
|
-
harnesses: HarnessId[];
|
|
256
|
-
tdd?: TddConfig;
|
|
257
|
-
execution?: ExecutionConfig;
|
|
258
|
-
plan?: PlanConfig;
|
|
259
|
-
}
|
|
260
|
-
export interface TransitionRule {
|
|
261
|
-
from: FlowStage;
|
|
262
|
-
to: FlowStage;
|
|
263
|
-
guards: string[];
|
|
264
|
-
}
|
|
5
|
+
export declare const DISCOVERY_SPECIALISTS: readonly ["brainstormer", "architect", "planner"];
|
|
6
|
+
export type DiscoverySpecialistId = (typeof DISCOVERY_SPECIALISTS)[number];
|
|
7
|
+
export declare const SPECIALISTS: readonly ["brainstormer", "architect", "planner", "reviewer", "security-reviewer", "slice-builder"];
|
|
8
|
+
export type SpecialistId = (typeof SPECIALISTS)[number];
|
|
9
|
+
export type ReviewerMode = "code" | "text-review" | "integration" | "release" | "adversarial";
|
|
10
|
+
export type SecurityReviewerMode = "threat-model" | "sensitive-change";
|
|
11
|
+
export type SliceBuilderMode = "build" | "fix-only";
|
|
12
|
+
export type ArtifactStatus = "active" | "shipped";
|
|
13
|
+
export type AcceptanceCriterionStatus = "pending" | "committed";
|
|
14
|
+
export type TddPhase = "red" | "green" | "refactor";
|
|
15
|
+
export interface TddPhaseRecord {
|
|
16
|
+
sha?: string;
|
|
17
|
+
skipped?: boolean;
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AcceptanceCriterionState {
|
|
21
|
+
id: string;
|
|
22
|
+
text: string;
|
|
23
|
+
commit?: string;
|
|
24
|
+
status: AcceptanceCriterionStatus;
|
|
25
|
+
phases?: Partial<Record<TddPhase, TddPhaseRecord>>;
|
|
26
|
+
}
|
|
27
|
+
export type BuildProfile = "default" | "bootstrap";
|
|
28
|
+
export type RoutingClass = "trivial" | "small-medium" | "large-risky";
|
|
265
29
|
export interface CliContext {
|
|
266
30
|
cwd: string;
|
|
267
31
|
stdout: NodeJS.WriteStream;
|
package/dist/types.js
CHANGED
|
@@ -1,37 +1,9 @@
|
|
|
1
|
-
export const FLOW_STAGES = [
|
|
2
|
-
"brainstorm",
|
|
3
|
-
"scope",
|
|
4
|
-
"design",
|
|
5
|
-
"spec",
|
|
6
|
-
"plan",
|
|
7
|
-
"tdd",
|
|
8
|
-
"review",
|
|
9
|
-
"ship"
|
|
10
|
-
];
|
|
11
|
-
export const FLOW_TRACKS = ["quick", "medium", "standard"];
|
|
12
|
-
export const DISCOVERY_MODES = ["lean", "guided", "deep"];
|
|
13
|
-
/**
|
|
14
|
-
* Ordered stages that make up each flow track.
|
|
15
|
-
*
|
|
16
|
-
* - `standard` runs the full 8-stage pipeline (default — same as before tracks existed).
|
|
17
|
-
* - `medium` keeps product framing but skips heavy scope/design lock-in:
|
|
18
|
-
* brainstorm -> spec -> plan -> tdd -> review -> ship.
|
|
19
|
-
* - `quick` skips the upstream product stages (brainstorm/scope/design/plan) for
|
|
20
|
-
* small bug fixes or single-purpose changes where the spec is already known.
|
|
21
|
-
* It still keeps the non-negotiable safety gates: spec → tdd → review → ship.
|
|
22
|
-
*/
|
|
23
|
-
export const TRACK_STAGES = {
|
|
24
|
-
standard: FLOW_STAGES,
|
|
25
|
-
medium: ["brainstorm", "spec", "plan", "tdd", "review", "ship"],
|
|
26
|
-
quick: ["spec", "tdd", "review", "ship"]
|
|
27
|
-
};
|
|
1
|
+
export const FLOW_STAGES = ["plan", "build", "review", "ship"];
|
|
28
2
|
export const HARNESS_IDS = ["claude", "cursor", "opencode", "codex"];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
export const LANGUAGE_RULE_PACKS = ["typescript", "python", "go"];
|
|
3
|
+
export const DISCOVERY_SPECIALISTS = ["brainstormer", "architect", "planner"];
|
|
4
|
+
export const SPECIALISTS = [
|
|
5
|
+
...DISCOVERY_SPECIALISTS,
|
|
6
|
+
"reviewer",
|
|
7
|
+
"security-reviewer",
|
|
8
|
+
"slice-builder"
|
|
9
|
+
];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cclaw-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
|
+
"description": "Lightweight harness-first flow toolkit for coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cclaw-cli": "dist/cli.js",
|
|
@@ -33,7 +33,10 @@
|
|
|
33
33
|
"cli",
|
|
34
34
|
"agent",
|
|
35
35
|
"workflow",
|
|
36
|
-
"
|
|
36
|
+
"harness",
|
|
37
|
+
"claude",
|
|
38
|
+
"cursor",
|
|
39
|
+
"opencode",
|
|
37
40
|
"npx"
|
|
38
41
|
],
|
|
39
42
|
"license": "MIT",
|