cool-workflow 0.2.4 → 0.2.5

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 (132) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/.gemini-plugin/mcp.json +10 -0
  4. package/.gemini-plugin/plugin.json +40 -0
  5. package/.opencode-plugin/mcp.json +10 -0
  6. package/.opencode-plugin/plugin.json +40 -0
  7. package/README.md +202 -48
  8. package/apps/architecture-review/app.json +1 -1
  9. package/apps/architecture-review-fast/app.json +1 -1
  10. package/apps/end-to-end-golden-path/app.json +1 -1
  11. package/apps/pr-review-fix-ci/app.json +1 -1
  12. package/apps/release-cut/app.json +1 -1
  13. package/apps/research-synthesis/app.json +1 -1
  14. package/dist/cli/dispatch.js +32 -4
  15. package/dist/cli/entry.js +11 -19
  16. package/dist/cli/global-flags.js +113 -0
  17. package/dist/cli/parseargv.js +7 -1
  18. package/dist/core/capability-data.js +337 -8
  19. package/dist/core/format/help.js +73 -3
  20. package/dist/core/format/recovery-hint.js +32 -0
  21. package/dist/core/multi-agent/collaboration.js +35 -6
  22. package/dist/core/multi-agent/runtime.js +7 -0
  23. package/dist/core/multi-agent/trust-policy.js +7 -1
  24. package/dist/core/pipeline/contract.js +7 -0
  25. package/dist/core/pipeline/error-feedback.js +2 -2
  26. package/dist/core/trust/evidence-grounding.js +13 -1
  27. package/dist/core/util/cli-args.js +22 -0
  28. package/dist/core/version.js +1 -1
  29. package/dist/mcp/dispatch.js +22 -2
  30. package/dist/mcp/server.js +124 -13
  31. package/dist/mcp-server.js +20 -0
  32. package/dist/shell/commit.js +8 -2
  33. package/dist/shell/coordinator-io.js +73 -1
  34. package/dist/shell/drive.js +120 -63
  35. package/dist/shell/error-feedback-io.js +6 -0
  36. package/dist/shell/execution-backend/agent.js +195 -23
  37. package/dist/shell/execution-backend/container.js +44 -10
  38. package/dist/shell/execution-backend/local.js +32 -0
  39. package/dist/shell/fs-atomic.js +93 -12
  40. package/dist/shell/ledger-cli.js +9 -2
  41. package/dist/shell/multi-agent-cli.js +5 -1
  42. package/dist/shell/onramp.js +48 -5
  43. package/dist/shell/pipeline.js +2 -1
  44. package/dist/shell/reclamation-io.js +10 -9
  45. package/dist/shell/run-export.js +52 -4
  46. package/dist/shell/run-store.js +156 -0
  47. package/dist/shell/scheduler-io.js +101 -10
  48. package/dist/shell/telemetry-ledger-io.js +36 -24
  49. package/dist/shell/trust-audit.js +104 -10
  50. package/dist/shell/workbench-host.js +121 -10
  51. package/dist/shell/workbench.js +79 -5
  52. package/dist/shell/worker-isolation.js +1 -1
  53. package/dist/wiring/capability-table/basics.js +5 -0
  54. package/dist/wiring/capability-table/exec-backend.js +40 -22
  55. package/dist/wiring/capability-table/pipeline.js +32 -0
  56. package/dist/wiring/capability-table/registry-core.js +26 -3
  57. package/dist/wiring/capability-table/reporting.js +7 -1
  58. package/dist/wiring/capability-table/scheduling-registry.js +8 -2
  59. package/dist/wiring/capability-table/trust-ledger.js +54 -12
  60. package/docs/agent-delegation-drive.7.md +15 -0
  61. package/docs/cli-mcp-parity.7.md +25 -0
  62. package/docs/contract-migration-tooling.7.md +2 -0
  63. package/docs/control-plane-scheduling.7.md +36 -0
  64. package/docs/cross-agent-ledger.7.md +20 -8
  65. package/docs/durable-state-and-locking.7.md +2 -0
  66. package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
  67. package/docs/execution-backends.7.md +2 -0
  68. package/docs/fix.7.md +4 -4
  69. package/docs/getting-started.md +40 -32
  70. package/docs/index.md +17 -0
  71. package/docs/launch/demo.tape +4 -3
  72. package/docs/mcp-app-surface.7.md +6 -0
  73. package/docs/multi-agent-cli-mcp-surface.7.md +2 -0
  74. package/docs/multi-agent-eval-replay-harness.7.md +2 -0
  75. package/docs/multi-agent-operator-ux.7.md +2 -0
  76. package/docs/node-snapshot-diff-replay.7.md +2 -0
  77. package/docs/observability-cost-accounting.7.md +2 -0
  78. package/docs/project-index.md +39 -9
  79. package/docs/real-execution-backends.7.md +2 -0
  80. package/docs/release-and-migration.7.md +2 -0
  81. package/docs/release-tooling.7.md +2 -0
  82. package/docs/routine.7.md +22 -0
  83. package/docs/run-registry-control-plane.7.md +2 -0
  84. package/docs/run-retention-reclamation.7.md +10 -4
  85. package/docs/state-explosion-management.7.md +2 -0
  86. package/docs/team-collaboration.7.md +2 -0
  87. package/docs/trust-audit-anchor.7.md +2 -0
  88. package/docs/web-desktop-workbench.7.md +24 -2
  89. package/docs/workflow-app-framework.7.md +31 -0
  90. package/manifest/plugin.manifest.json +1 -1
  91. package/manifest/source-context-profiles.json +4 -3
  92. package/package.json +4 -2
  93. package/scripts/agents/agent-adapter-core.js +26 -0
  94. package/scripts/agents/claude-p-agent.js +4 -1
  95. package/scripts/agents/codex-agent.js +4 -0
  96. package/scripts/agents/cw-attest-wrap.js +1 -1
  97. package/scripts/agents/gemini-agent.js +4 -0
  98. package/scripts/agents/opencode-agent.js +5 -0
  99. package/scripts/block-unapproved-tag.js +160 -0
  100. package/scripts/canonical-apps.js +4 -4
  101. package/scripts/children/batch-delegate-child.js +72 -4
  102. package/scripts/children/http-batch-delegate-child.js +132 -0
  103. package/scripts/children/http-delegate-child.js +8 -0
  104. package/scripts/dogfood-release.js +2 -2
  105. package/scripts/fake-date-for-reproduction.js +1 -1
  106. package/scripts/golden-path.js +4 -4
  107. package/scripts/lang-policy-check.js +82 -0
  108. package/scripts/purity-gate.js +16 -3
  109. package/scripts/release-check.js +2 -1
  110. package/scripts/release-flow.js +128 -30
  111. package/scripts/release-gate.js +184 -0
  112. package/scripts/release-oneclick.js +38 -7
  113. package/scripts/release-tags.js +47 -0
  114. package/scripts/verdict-keygen.js +2 -2
  115. package/scripts/verify-bump-reproduction.js +193 -0
  116. package/scripts/verify-verdict-signature.js +1 -1
  117. package/ui/workbench/app.css +41 -9
  118. package/ui/workbench/app.js +160 -27
  119. package/ui/workbench/index.html +2 -2
  120. package/docs/agent-framework.md +0 -177
  121. package/docs/designs/handoff-ledger.md +0 -145
  122. package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +0 -40
  123. package/docs/launch/launch-kit.md +0 -195
  124. package/docs/launch/pre-launch-checklist.md +0 -53
  125. package/docs/readme-v0.1.87-full.md +0 -301
  126. package/docs/routines.md +0 -101
  127. package/docs/scheduled-tasks.md +0 -80
  128. package/scripts/agents/claude-p-agent.sh +0 -9
  129. package/scripts/block-unapproved-tag.sh +0 -75
  130. package/scripts/release-gate.sh +0 -94
  131. package/scripts/verify-bump-reproduction.sh +0 -148
  132. package/scripts/verify-container-selfref.js +0 -64
@@ -1,14 +1,21 @@
1
1
  # Getting Started
2
2
 
3
+ *This page is for people changing CW itself. To USE `cw`, see the wiki
4
+ [Getting Started](https://github.com/coo1white/cool-workflow/wiki/Getting-Started).*
5
+
3
6
  Start from a new clone:
4
7
 
5
8
  ```bash
6
9
  cd plugins/cool-workflow
7
10
  npm install
8
11
  npm run build
12
+ npm link # puts the `cw` command on your PATH
9
13
  cw app list
10
14
  ```
11
15
 
16
+ No `npm link`? Every `cw <args>` line on this page also works as
17
+ `node scripts/cw.js <args>` from this directory.
18
+
12
19
  ## Check your setup first (`cw doctor`)
13
20
 
14
21
  Like `brew doctor`, this names any setup problem and the fix for it before you
@@ -44,53 +51,54 @@ small:
44
51
  Add `--changed-from origin/main` in a source checkout to get the nearest smoke
45
52
  tests and guard checks for your current change.
46
53
 
47
- Make a run with a canonical workflow app:
54
+ ## One run, end to end
55
+
56
+ Plan a run with a canonical workflow app. `--dryRun true` keeps it safe;
57
+ put real version numbers in place of `X.Y.Z` / `X.Y.W`:
48
58
 
49
59
  ```bash
50
60
  cw plan release-cut \
51
61
  --repo "$PWD" \
52
- --version 0.1.25 \
53
- --previousVersion 0.1.24 \
62
+ --version X.Y.Z \
63
+ --previousVersion X.Y.W \
54
64
  --releaseBranch main \
55
65
  --dryRun true
56
66
  ```
57
67
 
58
- Use the run id you get back:
68
+ The plan prints a run id. See where that run is:
59
69
 
60
70
  ```bash
61
71
  cw status <run-id>
62
- cw graph <run-id>
72
+ ```
73
+
74
+ Give the next ready task to your agent, one step at a time, in a
75
+ read-only sandbox:
76
+
77
+ ```bash
63
78
  cw dispatch <run-id> --limit 1 --sandbox readonly
64
- cw worker summary <run-id>
65
- cw topology list
66
- cw topology apply <run-id> map-reduce --task <task-id>
67
- cw topology summary <run-id>
68
- cw multi-agent run <run-id> --topology judge-panel --task <task-id>
69
- cw multi-agent status <run-id>
70
- cw multi-agent graph <run-id>
71
- cw multi-agent dependencies <run-id>
72
- cw multi-agent failures <run-id>
73
- cw multi-agent evidence <run-id>
74
- cw multi-agent step <run-id> --sandbox readonly
75
- cw multi-agent blackboard <run-id> summary
76
- cw multi-agent score <run-id> <candidate-id> --criterion correctness=1 --evidence <ref>
77
- cw multi-agent select <run-id> <candidate-id> --reason "verified winner"
78
- cw multi-agent summary <run-id>
79
- cw blackboard summary <run-id>
80
- cw audit summary <run-id>
81
- cw audit multi-agent <run-id>
82
- cw audit policy <run-id>
83
- cw audit blackboard <run-id>
84
- cw audit judge <run-id>
85
- cw eval snapshot <run-id> --id <suite-id>
86
- cw eval replay .cw/evals/<suite-id>/snapshot.json
87
- cw eval compare .cw/evals/<suite-id>/snapshot.json .cw/evals/<suite-id>/replay-run.json
88
- cw eval score .cw/evals/<suite-id>/replay-run.json
89
- cw eval gate .cw/evals/<suite-id>
90
- cw eval report .cw/evals/<suite-id>/replay-run.json
79
+ ```
80
+
81
+ When the run is complete, read the report, then prove its record chain
82
+ offline:
83
+
84
+ ```bash
91
85
  cw report <run-id> --show
86
+ cw telemetry verify <run-id>
87
+ ```
88
+
89
+ If a run comes to a stop before the end — an agent error, a Ctrl-C, a
90
+ lost session — take it up again from where it stopped:
91
+
92
+ ```bash
93
+ cw run resume <run-id> --drive
92
94
  ```
93
95
 
96
+ That is the whole loop: plan → status → dispatch → report → verify →
97
+ resume. The common command shapes are on the wiki page
98
+ [Commands or API](https://github.com/coo1white/cool-workflow/wiki/Commands-or-API);
99
+ the complete, generated list of every command — topology, multi-agent,
100
+ audit, eval, and the rest — is in [`cli-mcp-parity.7.md`](cli-mcp-parity.7.md).
101
+
94
102
  Run the smallest check that fits the change:
95
103
 
96
104
  ```bash
package/docs/index.md CHANGED
@@ -52,6 +52,23 @@ advanced pages only when you need those parts.
52
52
  - [Trust Audit Anchor](trust-audit-anchor.7.md) - head anchor that makes a cut-off audit-log tail visible.
53
53
  - [State Explosion Management](state-explosion-management.7.md) - summaries, compact graph views, blackboard digests, and stale-aware compaction.
54
54
  - [Evidence Adoption Reasoning Chain](evidence-adoption-reasoning-chain.7.md) - why evidence was adopted or rejected.
55
+ - [Pipeline Runner](pipeline-runner.7.md) - the plan/dispatch/result/commit state machine at the kernel's center.
56
+ - [Pipeline Verbs](pipeline-verbs.7.md) - `cw plan|dispatch|result` and the worker result contract.
57
+ - [Verifier-Gated Commit](verifier-gated-commit.7.md) - evidence checks that let a commit through or refuse it.
58
+ - [Worker Isolation](worker-isolation.7.md) - worker-local state, write acceptance, and the isolation boundary.
59
+ - [Candidate Scoring](candidate-scoring.7.md) - scoring and selection across worker candidates.
60
+ - [Error Feedback](error-feedback.7.md) - structured error records fed back into the next attempt.
61
+ - [State Node](state-node.7.md) - the durable node record every run is made of.
62
+ - [Capability / Topology Registry](capability-topology-registry.7.md) - the one data source behind CLI, MCP, and help.
63
+ - [Cross-Agent Ledger](cross-agent-ledger.7.md) - digest-sealed proposals and reviews between two agents (`cw ledger`).
64
+ - [Routine Triggers](routine.7.md) - `cw routine` local trigger bridge for API/GitHub events.
65
+ - [Remote Source Review](remote-source-review.7.md) - reviewing a repository the agent cannot clone.
66
+ - [Vendor Manifest Loadability](vendor-manifest-loadability.7.md) - proving generated vendor manifests actually load.
67
+ - [Canonical Workflow Apps](canonical-workflow-apps.7.md) - the official app matrix and its checks.
68
+ - [Doctor](doctor.7.md) - environment and onramp diagnosis (`cw doctor`).
69
+ - [Demo](demo.7.md) - the tamper-evidence demo (`cw demo`).
70
+ - [Fix](fix.7.md) - `cw fix` guided recovery for a blocked run.
71
+ - [Init](init.7.md) - `cw init` repository bootstrap.
55
72
 
56
73
  CW is the base system. Workflow apps are userland. Release and migration rules
57
74
  must keep that line clear: stable contracts, clear compatibility checks, and
@@ -5,9 +5,10 @@
5
5
  #
6
6
  # vhs plugins/cool-workflow/docs/launch/demo.tape
7
7
  #
8
- # Output: docs/launch/demo-tamper.gif. Then in the root README, replace the
9
- # fenced demo output block under "See it in 30 seconds" with:
10
- # ![cw demo tamper](plugins/cool-workflow/docs/launch/demo-tamper.gif)
8
+ # Output: plugins/cool-workflow/docs/launch/demo-tamper.gif. The SHIPPED hero
9
+ # GIF is docs/assets/demo.gif (README.md:18) after a fresh capture, copy it
10
+ # there so the README picks it up:
11
+ # cp plugins/cool-workflow/docs/launch/demo-tamper.gif docs/assets/demo.gif
11
12
 
12
13
  Output plugins/cool-workflow/docs/launch/demo-tamper.gif
13
14
 
@@ -14,6 +14,12 @@ The bridge keeps to CW's base-system rules:
14
14
  `criteria`
15
15
  - errors fail closed through JSON-RPC errors and lasting ErrorFeedback where the
16
16
  runtime already keeps feedback
17
+ - a failed `tools/call` (a bad tool name, a missing needed value, or the
18
+ tool's own code failing) comes back as a normal result shaped
19
+ `{ content: [...], isError: true }`, with a `Try: <hint>` line when one
20
+ applies, not a bare JSON-RPC error — so a host that does not show
21
+ protocol errors to the model still lets it read the message and try
22
+ again
17
23
 
18
24
  ## App Run Flow
19
25
 
@@ -333,3 +333,5 @@ The host-facing surface tracks the CLI golden-path fixes (`cw -q` routing + repo
333
333
  0.2.3
334
334
 
335
335
  0.2.4
336
+
337
+ 0.2.5
@@ -359,3 +359,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
359
359
  0.2.3
360
360
 
361
361
  0.2.4
362
+
363
+ 0.2.5
@@ -371,3 +371,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
371
371
  0.2.3
372
372
 
373
373
  0.2.4
374
+
375
+ 0.2.5
@@ -192,3 +192,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
192
192
  0.2.3
193
193
 
194
194
  0.2.4
195
+
196
+ 0.2.5
@@ -252,3 +252,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
252
252
  0.2.3
253
253
 
254
254
  0.2.4
255
+
256
+ 0.2.5
@@ -1,15 +1,15 @@
1
1
  # Cool Workflow Project Index
2
2
 
3
- Generated from the current repository code on 2026-07-11 by `npm run sync:project-index`.
3
+ Generated from the current repository code on 2026-07-13 by `npm run sync:project-index`.
4
4
 
5
5
  ## Snapshot
6
6
 
7
7
  - Package: `cool-workflow`
8
- - Version: `0.2.4`
9
- - Source modules: `149`
8
+ - Version: `0.2.5`
9
+ - Source modules: `151`
10
10
  - Workflow apps: `8`
11
- - Docs: `62`
12
- - Smoke tests: `204`
11
+ - Docs: `58`
12
+ - Smoke tests: `236`
13
13
  - Repository: https://github.com/coo1white/cool-workflow
14
14
 
15
15
  ## Architecture
@@ -80,12 +80,14 @@ multi-agent host -> topology -> blackboard/coordinator
80
80
 
81
81
  - [cli/dispatch.ts](../src/cli/dispatch.ts)
82
82
  - [cli/entry.ts](../src/cli/entry.ts)
83
+ - [cli/global-flags.ts](../src/cli/global-flags.ts)
83
84
  - [cli/io.ts](../src/cli/io.ts)
84
85
  - [cli/parseargv.ts](../src/cli/parseargv.ts)
85
86
  - [core/capability-data.ts](../src/core/capability-data.ts)
86
87
  - [core/capability-table.ts](../src/core/capability-table.ts)
87
88
  - [core/format/completion.ts](../src/core/format/completion.ts)
88
89
  - [core/format/help.ts](../src/core/format/help.ts)
90
+ - [core/format/recovery-hint.ts](../src/core/format/recovery-hint.ts)
89
91
  - [core/format/safe-json.ts](../src/core/format/safe-json.ts)
90
92
  - [core/format/state-explosion-text.ts](../src/core/format/state-explosion-text.ts)
91
93
  - [core/hash.ts](../src/core/hash.ts)
@@ -218,7 +220,6 @@ multi-agent host -> topology -> blackboard/coordinator
218
220
  ## Documentation Map
219
221
 
220
222
  - [Agent Delegation Drive](agent-delegation-drive.7.md)
221
- - [Workflow App framework](agent-framework.md)
222
223
  - [CANDIDATE-SCORING(7)](candidate-scoring.7.md)
223
224
  - [Canonical Workflow Apps](canonical-workflow-apps.7.md)
224
225
  - [CAPABILITY-TOPOLOGY-REGISTRY(7) — Cool Workflow Agent-Driven Self-Evolution](capability-topology-registry.7.md)
@@ -253,7 +254,6 @@ multi-agent host -> topology -> blackboard/coordinator
253
254
  - [PIPELINE-RUNNER(7)](pipeline-runner.7.md)
254
255
  - [PIPELINE-VERBS(7)](pipeline-verbs.7.md)
255
256
  - [Cool Workflow Project Index](project-index.md)
256
- - [Cool Workflow](readme-v0.1.87-full.md)
257
257
  - [Real Execution Backend Integrations](real-execution-backends.7.md)
258
258
  - [Release And Migration Discipline](release-and-migration.7.md)
259
259
  - [Cool Workflow Release History](release-history.md)
@@ -261,11 +261,9 @@ multi-agent host -> topology -> blackboard/coordinator
261
261
  - [Remote-Source Review (`--link`)](remote-source-review.7.md)
262
262
  - [Verifiable Report Bundle](report-verifiable-bundle.7.md)
263
263
  - [ROUTINE(7)](routine.7.md)
264
- - [Routines](routines.md)
265
264
  - [Run Registry / Control Plane](run-registry-control-plane.7.md)
266
265
  - [Run Retention & Provable Reclamation](run-retention-reclamation.7.md)
267
266
  - [SANDBOX-PROFILES(7)](sandbox-profiles.7.md)
268
- - [Scheduled Tasks](scheduled-tasks.md)
269
267
  - [Security / Trust Hardening](security-trust-hardening.7.md)
270
268
  - [Source Context Profiles](source-context-profiles.7.md)
271
269
  - [State Explosion Management](state-explosion-management.7.md)
@@ -298,7 +296,9 @@ Smoke tests mirror the public contracts. The high-signal suites are:
298
296
  - [artifact-integrity-smoke.js](../test/artifact-integrity-smoke.js)
299
297
  - [audit-verify-smoke.js](../test/audit-verify-smoke.js)
300
298
  - [backend-registry-smoke.js](../test/backend-registry-smoke.js)
299
+ - [batch-delegate-error-flush-smoke.js](../test/batch-delegate-error-flush-smoke.js)
301
300
  - [batch-output-overflow-smoke.js](../test/batch-output-overflow-smoke.js)
301
+ - [bench-run-smoke.js](../test/bench-run-smoke.js)
302
302
  - [blackboard-state-explosion-management-smoke.js](../test/blackboard-state-explosion-management-smoke.js)
303
303
  - [block-unapproved-tag-smoke.js](../test/block-unapproved-tag-smoke.js)
304
304
  - [budget-scaling-loop-smoke.js](../test/budget-scaling-loop-smoke.js)
@@ -323,13 +323,19 @@ Smoke tests mirror the public contracts. The high-signal suites are:
323
323
  - [clones-gc-smoke.js](../test/clones-gc-smoke.js)
324
324
  - [codex-agent-wrapper-smoke.js](../test/codex-agent-wrapper-smoke.js)
325
325
  - [collaboration-ops-unit-smoke.js](../test/collaboration-ops-unit-smoke.js)
326
+ - [commit-snapshot-slim-smoke.js](../test/commit-snapshot-slim-smoke.js)
326
327
  - [concurrency-default-smoke.js](../test/concurrency-default-smoke.js)
327
328
  - [concurrent-failure-semantics-smoke.js](../test/concurrent-failure-semantics-smoke.js)
328
329
  - [concurrent-subworkflow-cache-nesting-smoke.js](../test/concurrent-subworkflow-cache-nesting-smoke.js)
330
+ - [concurrent-subworkflow-no-wasted-spawn-smoke.js](../test/concurrent-subworkflow-no-wasted-spawn-smoke.js)
331
+ - [concurrent-subworkflow-only-batch-sigkill-smoke.js](../test/concurrent-subworkflow-only-batch-sigkill-smoke.js)
329
332
  - [concurrent-workflow-dsl-smoke.js](../test/concurrent-workflow-dsl-smoke.js)
333
+ - [container-backend-sandbox-deny-smoke.js](../test/container-backend-sandbox-deny-smoke.js)
330
334
  - [contract-migration-tooling-smoke.js](../test/contract-migration-tooling-smoke.js)
331
335
  - [control-plane-scheduling-smoke.js](../test/control-plane-scheduling-smoke.js)
332
336
  - [coordinator-blackboard-smoke.js](../test/coordinator-blackboard-smoke.js)
337
+ - [coordinator-messages-jsonl-atomic-smoke.js](../test/coordinator-messages-jsonl-atomic-smoke.js)
338
+ - [coordinator-messages-jsonl-dirty-append-smoke.js](../test/coordinator-messages-jsonl-dirty-append-smoke.js)
333
339
  - [coordinator-topology-persist-dirty-tracking-smoke.js](../test/coordinator-topology-persist-dirty-tracking-smoke.js)
334
340
  - [cw-help-per-command-smoke.js](../test/cw-help-per-command-smoke.js)
335
341
  - [dead-export-removal-guard-smoke.js](../test/dead-export-removal-guard-smoke.js)
@@ -347,13 +353,17 @@ Smoke tests mirror the public contracts. The high-signal suites are:
347
353
  - [drive-concurrent-round-sigkill-smoke.js](../test/drive-concurrent-round-sigkill-smoke.js)
348
354
  - [drive-exhaustion-blocked-smoke.js](../test/drive-exhaustion-blocked-smoke.js)
349
355
  - [drive-round-cache-serial-smoke.js](../test/drive-round-cache-serial-smoke.js)
356
+ - [drive-run-mutex-smoke.js](../test/drive-run-mutex-smoke.js)
350
357
  - [durable-atomic-write-smoke.js](../test/durable-atomic-write-smoke.js)
351
358
  - [end-to-end-demo-smoke.js](../test/end-to-end-demo-smoke.js)
352
359
  - [end-to-end-golden-path-smoke.js](../test/end-to-end-golden-path-smoke.js)
360
+ - [endpoint-concurrent-round-smoke.js](../test/endpoint-concurrent-round-smoke.js)
353
361
  - [error-feedback-resolution-smoke.js](../test/error-feedback-resolution-smoke.js)
354
362
  - [error-feedback-smoke.js](../test/error-feedback-smoke.js)
355
363
  - [evidence-adoption-reasoning-smoke.js](../test/evidence-adoption-reasoning-smoke.js)
356
364
  - [evidence-content-extraction-smoke.js](../test/evidence-content-extraction-smoke.js)
365
+ - [exec-child-termination-smoke.js](../test/exec-child-termination-smoke.js)
366
+ - [exec-vendor-reap-smoke.js](../test/exec-vendor-reap-smoke.js)
357
367
  - [execution-backend-agent-smoke.js](../test/execution-backend-agent-smoke.js)
358
368
  - [execution-backend-ci-smoke.js](../test/execution-backend-ci-smoke.js)
359
369
  - [execution-backends-smoke.js](../test/execution-backends-smoke.js)
@@ -364,17 +374,24 @@ Smoke tests mirror the public contracts. The high-signal suites are:
364
374
  - [gemini-opencode-agent-wrapper-smoke.js](../test/gemini-opencode-agent-wrapper-smoke.js)
365
375
  - [h7-custom-profile-persist-smoke.js](../test/h7-custom-profile-persist-smoke.js)
366
376
  - [headline-commands-smoke.js](../test/headline-commands-smoke.js)
377
+ - [http-delegate-child-multibyte-stdin-smoke.js](../test/http-delegate-child-multibyte-stdin-smoke.js)
367
378
  - [incremental-resume-smoke.js](../test/incremental-resume-smoke.js)
379
+ - [lang-policy-check-smoke.js](../test/lang-policy-check-smoke.js)
368
380
  - [ledger-apply-smoke.js](../test/ledger-apply-smoke.js)
369
381
  - [ledger-resolution-smoke.js](../test/ledger-resolution-smoke.js)
370
382
  - [ledger-verify-smoke.js](../test/ledger-verify-smoke.js)
371
383
  - [loop-bounded-expansion-smoke.js](../test/loop-bounded-expansion-smoke.js)
372
384
  - [man-run-registry-traversal-smoke.js](../test/man-run-registry-traversal-smoke.js)
373
385
  - [mcp-app-surface-smoke.js](../test/mcp-app-surface-smoke.js)
386
+ - [mcp-ping-and-arg-coercion-smoke.js](../test/mcp-ping-and-arg-coercion-smoke.js)
387
+ - [mcp-protocol-version-smoke.js](../test/mcp-protocol-version-smoke.js)
388
+ - [mcp-queue-epipe-smoke.js](../test/mcp-queue-epipe-smoke.js)
374
389
  - [mcp-surface-registry-smoke.js](../test/mcp-surface-registry-smoke.js)
375
390
  - [mcp-tool-call-coverage-smoke.js](../test/mcp-tool-call-coverage-smoke.js)
391
+ - [mcp-tool-call-error-isresult-smoke.js](../test/mcp-tool-call-error-isresult-smoke.js)
376
392
  - [mcp-untrusted-content-advisory-smoke.js](../test/mcp-untrusted-content-advisory-smoke.js)
377
393
  - [metrics-summary-limit-smoke.js](../test/metrics-summary-limit-smoke.js)
394
+ - [missing-artifact-gate-live-smoke.js](../test/missing-artifact-gate-live-smoke.js)
378
395
  - [multi-agent-cli-mcp-surface-smoke.js](../test/multi-agent-cli-mcp-surface-smoke.js)
379
396
  - [multi-agent-eval-determinism-regression-smoke.js](../test/multi-agent-eval-determinism-regression-smoke.js)
380
397
  - [multi-agent-eval-replay-harness-smoke.js](../test/multi-agent-eval-replay-harness-smoke.js)
@@ -393,6 +410,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
393
410
  - [numeric-flag-parsing-smoke.js](../test/numeric-flag-parsing-smoke.js)
394
411
  - [observability-cost-accounting-smoke.js](../test/observability-cost-accounting-smoke.js)
395
412
  - [one-way-boundary-smoke.js](../test/one-way-boundary-smoke.js)
413
+ - [onramp-baseref-failclosed-smoke.js](../test/onramp-baseref-failclosed-smoke.js)
396
414
  - [onramp-check-smoke.js](../test/onramp-check-smoke.js)
397
415
  - [opencode-agent-wrapper-smoke.js](../test/opencode-agent-wrapper-smoke.js)
398
416
  - [operator-ux-smoke.js](../test/operator-ux-smoke.js)
@@ -407,6 +425,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
407
425
  - [pipeline-auto-advance-smoke.js](../test/pipeline-auto-advance-smoke.js)
408
426
  - [pipeline-runner-smoke.js](../test/pipeline-runner-smoke.js)
409
427
  - [project-index-sync-smoke.js](../test/project-index-sync-smoke.js)
428
+ - [purity-gate-dynamic-import-smoke.js](../test/purity-gate-dynamic-import-smoke.js)
410
429
  - [quickstart-bundle-smoke.js](../test/quickstart-bundle-smoke.js)
411
430
  - [quickstart-check-smoke.js](../test/quickstart-check-smoke.js)
412
431
  - [quickstart-corpus-smoke.js](../test/quickstart-corpus-smoke.js)
@@ -419,14 +438,18 @@ Smoke tests mirror the public contracts. The high-signal suites are:
419
438
  - [registry-corrupt-fail-closed-smoke.js](../test/registry-corrupt-fail-closed-smoke.js)
420
439
  - [registry-corrupt-state-distinct-error-smoke.js](../test/registry-corrupt-state-distinct-error-smoke.js)
421
440
  - [release-check-skip-smoke.js](../test/release-check-skip-smoke.js)
441
+ - [release-flow-cut-hardening-smoke.js](../test/release-flow-cut-hardening-smoke.js)
422
442
  - [release-flow-smoke.js](../test/release-flow-smoke.js)
443
+ - [release-gate-detached-head-smoke.js](../test/release-gate-detached-head-smoke.js)
423
444
  - [release-gate-smoke.js](../test/release-gate-smoke.js)
445
+ - [release-oneclick-resume-repush-smoke.js](../test/release-oneclick-resume-repush-smoke.js)
424
446
  - [release-oneclick-smoke.js](../test/release-oneclick-smoke.js)
425
447
  - [release-pipeline-hygiene-smoke.js](../test/release-pipeline-hygiene-smoke.js)
426
448
  - [release-tooling-smoke.js](../test/release-tooling-smoke.js)
427
449
  - [remote-link-archive-smoke.js](../test/remote-link-archive-smoke.js)
428
450
  - [remote-link-git-smoke.js](../test/remote-link-git-smoke.js)
429
451
  - [report-bundle-smoke.js](../test/report-bundle-smoke.js)
452
+ - [report-pubkey-pin-smoke.js](../test/report-pubkey-pin-smoke.js)
430
453
  - [report-verify-bundle-smoke.js](../test/report-verify-bundle-smoke.js)
431
454
  - [result-normalize-smoke.js](../test/result-normalize-smoke.js)
432
455
  - [robustness-failclosed-smoke.js](../test/robustness-failclosed-smoke.js)
@@ -449,6 +472,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
449
472
  - [sample-determinism-smoke.js](../test/sample-determinism-smoke.js)
450
473
  - [sandbox-env-batch-hardening-smoke.js](../test/sandbox-env-batch-hardening-smoke.js)
451
474
  - [sandbox-profile-smoke.js](../test/sandbox-profile-smoke.js)
475
+ - [sched-input-bounds-smoke.js](../test/sched-input-bounds-smoke.js)
452
476
  - [sched-policy-validation-smoke.js](../test/sched-policy-validation-smoke.js)
453
477
  - [schedule-routine-daemon-smoke.js](../test/schedule-routine-daemon-smoke.js)
454
478
  - [scheduling-routine-lock-concurrency-smoke.js](../test/scheduling-routine-lock-concurrency-smoke.js)
@@ -469,6 +493,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
469
493
  - [telemetry-attest-wrap-smoke.js](../test/telemetry-attest-wrap-smoke.js)
470
494
  - [telemetry-attestation-smoke.js](../test/telemetry-attestation-smoke.js)
471
495
  - [telemetry-fail-closed-smoke.js](../test/telemetry-fail-closed-smoke.js)
496
+ - [telemetry-ledger-append-lock-concurrency-smoke.js](../test/telemetry-ledger-append-lock-concurrency-smoke.js)
472
497
  - [telemetry-ledger-smoke.js](../test/telemetry-ledger-smoke.js)
473
498
  - [telemetry-metrics-coverage-smoke.js](../test/telemetry-metrics-coverage-smoke.js)
474
499
  - [telemetry-verify-signatures-smoke.js](../test/telemetry-verify-signatures-smoke.js)
@@ -476,14 +501,19 @@ Smoke tests mirror the public contracts. The high-signal suites are:
476
501
  - [trust-audit-anchor-smoke.js](../test/trust-audit-anchor-smoke.js)
477
502
  - [trust-audit-append-lock-concurrency-smoke.js](../test/trust-audit-append-lock-concurrency-smoke.js)
478
503
  - [trust-audit-append-tail-cache-smoke.js](../test/trust-audit-append-tail-cache-smoke.js)
504
+ - [trust-audit-ensure-create-no-truncate-smoke.js](../test/trust-audit-ensure-create-no-truncate-smoke.js)
505
+ - [trust-audit-summary-durable-write-skip-smoke.js](../test/trust-audit-summary-durable-write-skip-smoke.js)
506
+ - [trust-audit-torn-tail-append-smoke.js](../test/trust-audit-torn-tail-append-smoke.js)
479
507
  - [vendor-manifest-load-smoke.js](../test/vendor-manifest-load-smoke.js)
480
508
  - [vendor-preflight-smoke.js](../test/vendor-preflight-smoke.js)
481
509
  - [verdict-signing-workflow-smoke.js](../test/verdict-signing-workflow-smoke.js)
482
510
  - [verifier-gated-commit-smoke.js](../test/verifier-gated-commit-smoke.js)
511
+ - [verify-audit-cites-smoke.js](../test/verify-audit-cites-smoke.js)
483
512
  - [verify-bump-reproduction-smoke.js](../test/verify-bump-reproduction-smoke.js)
484
513
  - [verify-import-audit-chain-smoke.js](../test/verify-import-audit-chain-smoke.js)
485
514
  - [web-desktop-workbench-smoke.js](../test/web-desktop-workbench-smoke.js)
486
515
  - [wiring-lazy-shell-imports-smoke.js](../test/wiring-lazy-shell-imports-smoke.js)
516
+ - [workbench-port-range-smoke.js](../test/workbench-port-range-smoke.js)
487
517
  - [worker-accept-path-architecture-smoke.js](../test/worker-accept-path-architecture-smoke.js)
488
518
  - [worker-isolation-smoke.js](../test/worker-isolation-smoke.js)
489
519
  - [worker-retry-count-smoke.js](../test/worker-retry-count-smoke.js)
@@ -199,3 +199,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
199
199
  0.2.3
200
200
 
201
201
  0.2.4
202
+
203
+ 0.2.5
@@ -339,3 +339,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
339
339
  0.2.3
340
340
 
341
341
  0.2.4
342
+
343
+ 0.2.5
@@ -320,3 +320,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
320
320
  0.2.3
321
321
 
322
322
  0.2.4
323
+
324
+ 0.2.5
package/docs/routine.7.md CHANGED
@@ -67,6 +67,28 @@ and fills out the prompt.
67
67
  | 0 | Command done |
68
68
  | 1 | Error (bad arguments, missing trigger, etc.) |
69
69
 
70
+ ## EXAMPLES
71
+
72
+ Long architecture reviews as background routines: use
73
+ `architecture-review-fast` for the foreground user path, then put the full
74
+ `architecture-review` app in line as background work so a deep look-over does
75
+ not get in the way of a back-and-forth session:
76
+
77
+ ```bash
78
+ node scripts/architecture-review-fast.js \
79
+ --repo /path/to/repo \
80
+ --question "Is this architecture sound?" \
81
+ --metrics \
82
+ --schedule-full
83
+ ```
84
+
85
+ The wrapper makes a one-shot reminder schedule whose `workflowId` is
86
+ `architecture-review`. The schedule prompt carries the foreground fast run id,
87
+ fast report path, and source-context digest/profile, and asks the background
88
+ agent to give back the full review report path and digest. `--metrics` is
89
+ optional and reports foreground time plus agent-spawn and result-cache-hit
90
+ counts for the fast run.
91
+
70
92
  ## SEE ALSO
71
93
 
72
94
  cw sched — durable run-queue scheduling for workflow runs
@@ -482,3 +482,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
482
482
  0.2.3
483
483
 
484
484
  0.2.4
485
+
486
+ 0.2.5
@@ -109,16 +109,20 @@ node points to a freed path. Opt out with `--keep-scratch`.
109
109
 
110
110
  ## Commit snapshots — never reconstructable, always downgrades to verify-only
111
111
 
112
- `commitState` embeds the FULL run into `commits/<id>.json` on every commit, so
113
- these grow unbounded in both count and per-file size with no cap. Reclaiming them
112
+ `commitState` writes only the commit's own (small, bounded) record into
113
+ `commits/<id>.json` on every commit it no longer embeds the whole run, so
114
+ these files stay small and do not grow with the run's size. Reclaiming them
114
115
  frees the run's superseded, non-`verifierGated` "checkpoint" commit snapshots —
115
116
  the run's LATEST commit and every `verifierGated` commit (the actual
116
117
  audit-significant milestones) are always kept. `run.commits`' own lightweight
117
118
  metadata (id, `verifierGated`, evidence digests, acceptance rationale — everything
118
119
  `extractSkeleton` seals) lives in `state.json`, not the snapshot file, so it stays
119
- fully intact and queryable regardless. Unlike a node snapshot, a commit snapshot is
120
- a genuine point-in-time capture with no `ReconstructionRecipe` — reclaiming even
120
+ fully intact and queryable regardless. A commit snapshot is treated as never
121
+ reconstructable there is no `ReconstructionRecipe` for it so reclaiming even
121
122
  one downgrades capability to `verify-only`, never `re-runnable-by-reconstruction`.
123
+ This is left conservative on purpose: even though the snapshot file's content is
124
+ now a strict subset of what `state.json` already keeps durably, the reclaim
125
+ classification does not (yet) treat that as a basis for reconstruction.
122
126
  Each reclaimed commit's own `StateNode` had its `snapshot` artifact stripped (not
123
127
  re-pointed — there is no retained alternative) before the free, so `prepareFree`'s
124
128
  dangling-reference proof covers this kind too. Opt out with `--keep-commits`.
@@ -288,3 +292,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
288
292
  0.2.3
289
293
 
290
294
  0.2.4
295
+
296
+ 0.2.5
@@ -328,3 +328,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
328
328
  0.2.3
329
329
 
330
330
  0.2.4
331
+
332
+ 0.2.5
@@ -264,3 +264,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
264
264
  0.2.3
265
265
 
266
266
  0.2.4
267
+
268
+ 0.2.5
@@ -71,3 +71,5 @@ security-trust-hardening(7), cli-mcp-parity(7), report-verifiable-bundle(7)
71
71
  0.2.3
72
72
 
73
73
  0.2.4
74
+
75
+ 0.2.5
@@ -97,9 +97,16 @@ capability core entry that already exists — never a side code path — so it c
97
97
  CLI/MCP and is covered by the parity gate.
98
98
 
99
99
  Authentication is opt-in, not on by default: set `CW_WORKBENCH_TOKEN` and every
100
- request must carry it as `Authorization: Bearer <token>` or `?token=<token>`
100
+ `/api/*` request must carry it as `Authorization: Bearer <token>` or `?token=<token>`
101
101
  (timing-safe compare); left unset, the loopback/read-only/GET-only controls
102
- above are the only defense and any local process can read. Pass
102
+ above are the only defense and any local process can read. The static UI files
103
+ (`/ui/*`, and `/` when the UI is installed) are served without the token: they
104
+ are fixed code with no run data, and the browser needs them before the page can
105
+ say anything at all. The fallback `/` page (used when the UI is not installed)
106
+ stays behind the token, because it holds the serve descriptor with the repo
107
+ root path. Open the page as `/?token=<token>`: the UI reads the token from the
108
+ page address and adds it to every `/api/*` request; without it the page still
109
+ loads and tells you to reopen it with the token. Pass
103
110
  `--require-token` to `cw workbench serve` to fail closed instead: the server
104
111
  refuses to start at all unless `CW_WORKBENCH_TOKEN` is already set. This is a
105
112
  strict opt-in — leaving it off keeps today's default behavior unchanged.
@@ -282,3 +289,18 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
282
289
  0.2.3
283
290
 
284
291
  0.2.4
292
+
293
+ ## Workbench UI/host round 2 (Unreleased)
294
+
295
+ - With `CW_WORKBENCH_TOKEN` set, the page now works: the static UI files are
296
+ open, and every `/api/*` request stays behind the token (see "Trust
297
+ boundary" above). The UI reads `?token=` from the page address, and a 401
298
+ answer tells you to reopen the page with the token.
299
+ - `cw workbench view --json` (and `/api/run/:runId`) gains a `lifecycle` key:
300
+ the run registry's own state for the run
301
+ (queued|running|blocked|completed|failed|archived|reclaimed). The key is
302
+ left out when the run cannot be classified, so those payloads keep their
303
+ old bytes. The UI shows it as a badge in the run header, with one
304
+ next-step line when a run is blocked or failed.
305
+
306
+ 0.2.5
@@ -32,6 +32,37 @@ runner owns state transitions, dispatch, result recording, verifier gates,
32
32
  commits, and reports. A workflow app owns its own inputs, phases, task
33
33
  prompts, evidence needs, and sandbox profile hints.
34
34
 
35
+ Every CW workflow keeps to one loop, and the loop maps to real framework
36
+ operations:
37
+
38
+ | Loop stage | framework operation | Responsibility |
39
+ | --- | --- | --- |
40
+ | Interpret | `plan()` | Load workflow, check inputs, make tasks |
41
+ | Act | `dispatch()` | Move tasks that can run from pending to running |
42
+ | Observe | `recordResult()` | Read Markdown/JSON-RPC result evidence |
43
+ | Adjust | verifier gates | Check evidence and pick the next phase |
44
+ | Checkpoint | `commitState()` | Take a snapshot of state after important changes |
45
+
46
+ The language split is on purpose: the platform is TypeScript
47
+ (`src/*.ts -> dist/*.js`, strongly typed so it is simple to keep up), while
48
+ workflow apps are plain JavaScript modules (`apps/<app-id>/workflow.js`,
49
+ legacy `workflows/*.workflow.js`) so workflow scripts run without `ts-node`.
50
+
51
+ Verification and verdict tasks give back a `cw:result` JSON fence:
52
+
53
+ ````text
54
+ ```cw:result
55
+ {
56
+ "summary": "short summary",
57
+ "findings": [],
58
+ "evidence": ["/absolute/path/file.ts:42"]
59
+ }
60
+ ```
61
+ ````
62
+
63
+ CW says no to high-priority findings without evidence. This keeps agent work
64
+ nearer to engineering output you can look into than to free talk.
65
+
35
66
  The framework is kept small on purpose. The public app helpers are:
36
67
 
37
68
  - `defineWorkflowApp(definition)`
@@ -2,7 +2,7 @@
2
2
  "_comment": "SINGLE SOURCE OF TRUTH for every vendor manifest. Edit THIS file, then run `npm run gen:manifests`. Do NOT hand-edit the generated vendor manifests (.claude-plugin/, .codex-plugin/, .agents/, .mcp.json) — `npm run gen:manifests -- --check` (run by release:check) will fail if they drift from this source.",
3
3
  "identity": {
4
4
  "name": "cool-workflow",
5
- "version": "0.2.4",
5
+ "version": "0.2.5",
6
6
  "license": "BSD-2-Clause",
7
7
  "homepage": "https://github.com/coo1white/cool-workflow",
8
8
  "author": {
@@ -3,7 +3,7 @@
3
3
  "profiles": {
4
4
  "core": {
5
5
  "description": "Default AI source context: runtime source, apps, package metadata, and agent wrappers; generated artifacts, tests, docs, release records, and long logs are manifest-only.",
6
- "maxLines": 50000,
6
+ "maxLines": 52000,
7
7
  "include": [
8
8
  "plugins/cool-workflow/src/**",
9
9
  "plugins/cool-workflow/apps/**",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "runtime": {
27
27
  "description": "Runtime-kernel source context for state, orchestration, scheduling, execution, and shared types.",
28
- "maxLines": 48000,
28
+ "maxLines": 49000,
29
29
  "include": [
30
30
  "plugins/cool-workflow/src/**",
31
31
  "plugins/cool-workflow/package.json",
@@ -95,7 +95,8 @@
95
95
  "include": [
96
96
  "AGENTS.md",
97
97
  "plugins/cool-workflow/scripts/release-flow.js",
98
- "plugins/cool-workflow/scripts/release-gate.sh",
98
+ "plugins/cool-workflow/scripts/release-gate.js",
99
+ "plugins/cool-workflow/scripts/release-tags.js",
99
100
  "plugins/cool-workflow/scripts/dogfood-release.js",
100
101
  "plugins/cool-workflow/scripts/gen-manifests.js",
101
102
  "plugins/cool-workflow/scripts/version-sync-check.js",