cool-workflow 0.1.82 → 0.1.84

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 (92) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.codex-plugin/plugin.json +4 -4
  3. package/README.md +128 -120
  4. package/apps/architecture-review/app.json +1 -1
  5. package/apps/architecture-review-fast/app.json +1 -1
  6. package/apps/end-to-end-golden-path/app.json +1 -1
  7. package/apps/pr-review-fix-ci/app.json +1 -1
  8. package/apps/release-cut/app.json +1 -1
  9. package/apps/research-synthesis/app.json +1 -1
  10. package/dist/capability-core.js +16 -8
  11. package/dist/capability-registry.js +270 -0
  12. package/dist/cli/command-surface.js +1320 -0
  13. package/dist/cli.js +2 -1307
  14. package/dist/commit.js +5 -1
  15. package/dist/doctor.js +153 -0
  16. package/dist/mcp-server.js +15 -1451
  17. package/dist/mcp-surface.js +1441 -0
  18. package/dist/orchestrator.js +13 -0
  19. package/dist/reclamation/hash.js +72 -0
  20. package/dist/reclamation.js +25 -78
  21. package/dist/run-registry/queue.js +6 -7
  22. package/dist/run-registry.js +35 -24
  23. package/dist/scheduler.js +78 -53
  24. package/dist/version.js +1 -1
  25. package/dist/worker-accept/acceptance.js +114 -0
  26. package/dist/worker-accept/blackboard-fanout.js +80 -0
  27. package/dist/worker-accept/blackboard-linkage.js +19 -0
  28. package/dist/worker-accept/context.js +2 -0
  29. package/dist/worker-accept/telemetry-ledger.js +116 -0
  30. package/dist/worker-accept/validation.js +77 -0
  31. package/dist/worker-accept/verifier-completion.js +73 -0
  32. package/dist/worker-isolation.js +41 -446
  33. package/docs/agent-delegation-drive.7.md +94 -86
  34. package/docs/agent-framework.md +33 -32
  35. package/docs/candidate-scoring.7.md +26 -24
  36. package/docs/canonical-workflow-apps.7.md +40 -40
  37. package/docs/capability-topology-registry.7.md +24 -24
  38. package/docs/cli-mcp-parity.7.md +230 -154
  39. package/docs/contract-migration-tooling.7.md +52 -41
  40. package/docs/control-plane-scheduling.7.md +49 -41
  41. package/docs/coordinator-blackboard.7.md +30 -30
  42. package/docs/dogfood-one-real-repo.7.md +44 -44
  43. package/docs/durable-state-and-locking.7.md +38 -30
  44. package/docs/end-to-end-golden-path.7.md +29 -29
  45. package/docs/error-feedback.7.md +27 -27
  46. package/docs/evidence-adoption-reasoning-chain.7.md +66 -58
  47. package/docs/execution-backends.7.md +88 -80
  48. package/docs/getting-started.md +35 -18
  49. package/docs/index.md +3 -3
  50. package/docs/mcp-app-surface.7.md +64 -64
  51. package/docs/multi-agent-cli-mcp-surface.7.md +86 -77
  52. package/docs/multi-agent-eval-replay-harness.7.md +63 -55
  53. package/docs/multi-agent-operator-ux.7.md +73 -65
  54. package/docs/multi-agent-runtime-core.7.md +39 -39
  55. package/docs/multi-agent-topologies.7.md +24 -24
  56. package/docs/multi-agent-trust-policy-audit.7.md +38 -38
  57. package/docs/node-snapshot-diff-replay.7.md +30 -22
  58. package/docs/observability-cost-accounting.7.md +53 -45
  59. package/docs/operator-ux.7.md +30 -30
  60. package/docs/pipeline-runner.7.md +31 -31
  61. package/docs/project-index.md +16 -5
  62. package/docs/real-execution-backends.7.md +51 -43
  63. package/docs/release-and-migration.7.md +46 -38
  64. package/docs/release-tooling.7.md +67 -50
  65. package/docs/routines.md +16 -16
  66. package/docs/run-registry-control-plane.7.md +124 -116
  67. package/docs/run-retention-reclamation.7.md +49 -41
  68. package/docs/sandbox-profiles.7.md +32 -32
  69. package/docs/scheduled-tasks.md +14 -14
  70. package/docs/security-trust-hardening.7.md +29 -29
  71. package/docs/source-context-profiles.7.md +28 -28
  72. package/docs/state-explosion-management.7.md +67 -59
  73. package/docs/state-node.7.md +8 -8
  74. package/docs/team-collaboration.7.md +66 -58
  75. package/docs/trust-model.md +126 -126
  76. package/docs/unix-principles.md +80 -80
  77. package/docs/vendor-manifest-loadability.7.md +20 -20
  78. package/docs/verifier-gated-commit.7.md +16 -16
  79. package/docs/web-desktop-workbench.7.md +73 -65
  80. package/docs/worker-isolation.7.md +34 -37
  81. package/docs/workflow-app-framework.7.md +38 -38
  82. package/manifest/plugin.manifest.json +4 -4
  83. package/package.json +3 -2
  84. package/scripts/bump-version.js +9 -1
  85. package/scripts/canonical-apps.js +4 -4
  86. package/scripts/dogfood-release.js +1 -1
  87. package/scripts/gen-parity-doc.js +106 -0
  88. package/scripts/golden-path.js +4 -4
  89. package/scripts/parity-check.js +27 -57
  90. package/scripts/release-flow.js +7 -6
  91. package/scripts/sync-project-index.js +1 -1
  92. package/dist/verifier-registry.js +0 -46
@@ -1,7 +1,7 @@
1
1
  # Canonical Workflow Apps
2
2
 
3
- Canonical Workflow Apps are the official CW userland apps maintained with the
4
- runtime. They are not loose examples. Each one lives in a first-class app
3
+ Canonical Workflow Apps are the official CW userland apps kept up with the
4
+ runtime. They are not loose examples. Each one is in a first-class app
5
5
  directory:
6
6
 
7
7
  ```text
@@ -9,7 +9,7 @@ apps/<app-id>/app.json
9
9
  apps/<app-id>/workflow.js
10
10
  ```
11
11
 
12
- The runner remains the base system. Canonical apps carry domain behavior:
12
+ The runner is still the base system. Canonical apps add domain behavior:
13
13
  inputs, phases, task prompts, evidence gates, sandbox profile hints, and app
14
14
  metadata.
15
15
 
@@ -17,8 +17,8 @@ metadata.
17
17
 
18
18
  `architecture-review`
19
19
 
20
- Map a repository architecture, assess risks, verify important findings, and
21
- synthesize an evidence-backed verdict.
20
+ Map out a repository architecture, weigh the risks, check the important
21
+ findings, and put together an evidence-backed verdict.
22
22
 
23
23
  ```bash
24
24
  node scripts/cw.js plan architecture-review \
@@ -31,10 +31,10 @@ node scripts/cw.js plan architecture-review \
31
31
  `architecture-review-fast`
32
32
 
33
33
  Run a shorter architecture review for a fast first result. The app keeps the
34
- full `architecture-review` contract available under its original id, but uses two
34
+ full `architecture-review` contract open under its first id, but uses two
35
35
  parallel Map workers, two parallel Assess workers, one verifier, and one verdict
36
- worker. Operators can optionally provide a pinned JSONL source context and route
37
- mapping/assessment work to a faster model while reserving stronger models for
36
+ worker. Operators may give a pinned JSONL source context and send
37
+ mapping/assessment work to a faster model while keeping stronger models for
38
38
  verification and synthesis.
39
39
 
40
40
  ```bash
@@ -47,29 +47,29 @@ node scripts/architecture-review-fast.js \
47
47
  --schedule-full
48
48
  ```
49
49
 
50
- The wrapper prepares one cached JSONL source context, passes its sha256 digest to
51
- the fast app, runs `quickstart architecture-review-fast`, and optionally creates
50
+ The wrapper gets one cached JSONL source context ready, passes its sha256 digest to
51
+ the fast app, runs `quickstart architecture-review-fast`, and may make
52
52
  a one-shot background schedule for the full `architecture-review` app. When run
53
- against an external repo without `--profile` or `--profile-file`, it writes a
54
- small repo-local `repo` profile covering common tracked text surfaces such as
53
+ against an outside repo without `--profile` or `--profile-file`, it writes a
54
+ small repo-local `repo` profile that covers common tracked text surfaces such as
55
55
  README/package metadata, `src/`, `lib/`, `apps/`, `scripts/`, docs, and tests.
56
- If the selected profile exports zero records, the wrapper fails closed instead of
56
+ If the picked profile sends out zero records, the wrapper fails closed in place of
57
57
  passing an empty context digest to the app.
58
- `--fast-model` and `--strong-model` are userland policy flags; internally they
58
+ `--fast-model` and `--strong-model` are userland policy flags; inside, they
59
59
  set the same task-level hints as `CW_ARCHITECTURE_REVIEW_FAST_MODEL` and
60
60
  `CW_ARCHITECTURE_REVIEW_STRONG_MODEL`.
61
- `--metrics` is opt-in; when present the wrapper adds elapsed-time, worker-step,
61
+ `--metrics` is opt-in; when it is there the wrapper adds elapsed-time, worker-step,
62
62
  agent-spawn, and result-cache-hit counts to the JSON payload so operators can
63
- measure foreground wait reductions without changing the default output shape.
63
+ measure foreground wait cuts without changing the default output shape.
64
64
 
65
- For long full reviews, use the existing routine or schedule surfaces to run
66
- `architecture-review` in the background after the fast report has returned.
65
+ For long full reviews, use the routine or schedule surfaces you have to run
66
+ `architecture-review` in the background after the fast report has come back.
67
67
 
68
68
  `pr-review-fix-ci`
69
69
 
70
- Review a pull request or branch, inspect CI failures, diagnose actionable
71
- issues, optionally patch when `--mode fix` is allowed, verify outcomes, and
72
- summarize with evidence.
70
+ Review a pull request or branch, look at CI failures, work out the issues
71
+ you can act on, patch when `--mode fix` is allowed, check the outcomes, and
72
+ give a short account with evidence.
73
73
 
74
74
  ```bash
75
75
  node scripts/cw.js plan pr-review-fix-ci \
@@ -82,8 +82,8 @@ node scripts/cw.js plan pr-review-fix-ci \
82
82
 
83
83
  `release-cut`
84
84
 
85
- Prepare a release with checklist discipline: version checks, changelog, tests,
86
- packaging, release notes, and final verification.
85
+ Get a release ready with checklist discipline: version checks, changelog, tests,
86
+ packaging, release notes, and a last verification.
87
87
 
88
88
  ```bash
89
89
  node scripts/cw.js plan release-cut \
@@ -95,8 +95,8 @@ node scripts/cw.js plan release-cut \
95
95
 
96
96
  `research-synthesis`
97
97
 
98
- Split a research question into claims, investigate sources, cross-check
99
- evidence, verify claims, and synthesize a concise answer.
98
+ Break a research question into claims, look into sources, cross-check
99
+ the evidence, check the claims, and put together a short answer.
100
100
 
101
101
  ```bash
102
102
  node scripts/cw.js plan research-synthesis \
@@ -109,7 +109,7 @@ node scripts/cw.js plan research-synthesis \
109
109
 
110
110
  ## Validation Matrix
111
111
 
112
- Run the canonical app matrix from the plugin root:
112
+ Run the canonical app matrix from the plugin root directory:
113
113
 
114
114
  ```bash
115
115
  cd plugins/cool-workflow
@@ -118,19 +118,19 @@ npm run canonical-apps
118
118
 
119
119
  The command uses only Node.js standard library APIs and local temporary
120
120
  workspaces. It validates each canonical app, shows its app metadata, plans it
121
- with representative inputs, checks app id/version metadata in run state, checks
121
+ with sample inputs, checks app id/version metadata in run state, checks
122
122
  evidence-required verification or synthesis/verdict tasks, checks sandbox
123
- profile hints, checks unique task ids, and checks duplicate ids do not break
123
+ profile hints, checks unique task ids, and checks that duplicate ids do not break
124
124
  discovery.
125
125
 
126
- `npm test` includes `test/canonical-workflow-apps-smoke.js`, which repeats the
127
- same core assertions against generated `dist/`.
126
+ `npm test` takes in `test/canonical-workflow-apps-smoke.js`, which does the
127
+ same core assertions again against generated `dist/`.
128
128
 
129
129
  ## Framework Pressure
130
130
 
131
- The apps intentionally stress different parts of the Workflow App framework:
131
+ The apps put weight on different parts of the Workflow App framework on purpose:
132
132
 
133
- - declared required, optional, and repeated inputs
133
+ - named required, optional, and repeated inputs
134
134
  - app-directory discovery and app metadata
135
135
  - readonly, locked-down, and workspace-write sandbox hints
136
136
  - evidence-required verifier, synthesis, summary, and verdict tasks
@@ -138,7 +138,7 @@ The apps intentionally stress different parts of the Workflow App framework:
138
138
  - compatibility between canonical app ids and legacy workflow-file wrappers
139
139
 
140
140
  The legacy `workflows/architecture-review.workflow.js` and
141
- `workflows/research-synthesis.workflow.js` files remain loadable with explicit
141
+ `workflows/research-synthesis.workflow.js` files can still be loaded with named
142
142
  compatibility ids:
143
143
 
144
144
  ```text
@@ -146,25 +146,25 @@ legacy-architecture-review
146
146
  legacy-research-synthesis
147
147
  ```
148
148
 
149
- The public `architecture-review` and `research-synthesis` ids are now owned by
149
+ The public `architecture-review` and `research-synthesis` ids are now held by
150
150
  the canonical app directories.
151
151
 
152
152
  ## Relationship To The Golden Path
153
153
 
154
- `npm run canonical-apps` proves the official userland app matrix validates and
155
- plans correctly. It does not run every worker for every app.
154
+ `npm run canonical-apps` shows that the official userland app matrix validates and
155
+ plans the right way. It does not run every worker for every app.
156
156
 
157
- `npm run golden-path` remains the full integration proof:
157
+ `npm run golden-path` is still the full integration proof:
158
158
 
159
159
  ```text
160
160
  workflow app -> plan -> dispatch -> isolated worker -> candidate scoring
161
161
  -> verifier -> gated commit -> report
162
162
  ```
163
163
 
164
- Together they keep the kernel small while making the maintained userland boring,
165
- inspectable, and useful.
164
+ Together they keep the kernel small while making the kept-up userland dull,
165
+ easy to inspect, and useful.
166
166
 
167
- Use the Operator UX commands to inspect any canonical app run:
167
+ Use the Operator UX commands to look at any canonical app run:
168
168
 
169
169
  ```bash
170
170
  node scripts/cw.js status <run-id>
@@ -6,12 +6,12 @@
6
6
 
7
7
  ## Description
8
8
 
9
- v0.1.53 introduces two open registries that let agents extend CW at runtime
10
- without manual wiring in multiple files. New capabilities self-register and
11
- auto-work across CLI, MCP, and Workbench. New topologies self-register and
12
- auto-appear in `topology list`, `topology validate`, and `topology apply`.
9
+ v0.1.53 adds two open registries. They let agents grow CW at runtime
10
+ with no need to wire things by hand in many files. New capabilities put
11
+ themselves in the registry and then work by themselves across CLI, MCP, and Workbench. New topologies put
12
+ themselves in the registry too and then come up by themselves in `topology list`, `topology validate`, and `topology apply`.
13
13
 
14
- BSD discipline: **mechanism** (Map / pipe) separate from **policy** (entries).
14
+ BSD way: keep **mechanism** (Map / pipe) apart from **policy** (entries).
15
15
  Fail-closed on unknown ids.
16
16
 
17
17
  ## Capability Registry
@@ -53,18 +53,18 @@ registerCapabilityHandler({
53
53
 
54
54
  ### How it works
55
55
 
56
- 1. `registerCapabilityHandler()` stores the handler in a `Map<string, CapabilityHandler>`
57
- 2. CLI: `resolveCliPath(["my", "new-tool"])` resolves the CLI path to the capability id
58
- 3. MCP: `resolveMcpTool("cw_my_new_tool")` resolves the tool name to the capability id
59
- 4. `dispatchCapability(id, args, ctx)` invokes `handler.run(args, ctx)`
60
- 5. Both the CLI and MCP surfaces fall through to the dynamic dispatcher when
61
- their hardcoded switch statements don't match an unknown command/tool
56
+ 1. `registerCapabilityHandler()` keeps the handler in a `Map<string, CapabilityHandler>`
57
+ 2. CLI: `resolveCliPath(["my", "new-tool"])` turns the CLI path into the capability id
58
+ 3. MCP: `resolveMcpTool("cw_my_new_tool")` turns the tool name into the capability id
59
+ 4. `dispatchCapability(id, args, ctx)` calls `handler.run(args, ctx)`
60
+ 5. Both the CLI and MCP surfaces drop through to the dynamic dispatcher when
61
+ their hardcoded switch statements do not match an unknown command/tool
62
62
 
63
63
  ### Existing capabilities
64
64
 
65
- All existing 182 capabilities continue to work through their hardcoded switch
65
+ All 182 capabilities that are there now keep working through their hardcoded switch
66
66
  cases in `cli.ts` and `mcp-server.ts`. The dynamic dispatch is a **fallback**
67
- — it only activates for commands/tools not found in the legacy switches.
67
+ — it turns on only for commands/tools not found in the old switches.
68
68
 
69
69
  ## Topology Registry
70
70
 
@@ -143,24 +143,24 @@ registerTopology({
143
143
  ### How it works
144
144
 
145
145
  1. `registerTopology()` stores the definition in a `Map<string, MultiAgentTopologyDefinition>`
146
- 2. `listTopologyDefinitions()` returns official + registered, registered wins on id collision
147
- 3. `getTopologyDefinition(id)` checks registered first, then official
148
- 4. `materializedRoles()` uses `role.count` for replication — no more hardcoded
146
+ 2. `listTopologyDefinitions()` gives back official + registered; registered wins when two ids are the same
147
+ 3. `getTopologyDefinition(id)` looks at registered first, then official
148
+ 4. `materializedRoles()` uses `role.count` to make copies — no more hardcoded
149
149
  mapper/judge switch logic
150
- 5. `applyTopology()` works identically for official and registered topologies
150
+ 5. `applyTopology()` works the same way for official and registered topologies
151
151
 
152
152
  ### Data-driven role expansion
153
153
 
154
- Before v0.1.53, `materializedRoles()` hardcoded "mapper" and "judge" role
155
- expansion. Now it checks `role.count` on each role spec:
156
- - `role.count > 1`: creates `role-1`, `role-2`, ... `role-N`
157
- - `role.count` undefined or 1: creates a single role instance
158
- - For backward compat with official topologies, `mapperCount` and `judgeCount`
159
- input overrides still apply
154
+ Before v0.1.53, `materializedRoles()` hardcoded the "mapper" and "judge" role
155
+ expansion. Now it reads `role.count` on each role spec:
156
+ - `role.count > 1`: makes `role-1`, `role-2`, ... `role-N`
157
+ - `role.count` undefined or 1: makes one role instance
158
+ - So that official topologies keep working as before, the `mapperCount` and `judgeCount`
159
+ input overrides still hold
160
160
 
161
161
  ## See Also
162
162
 
163
- - `capability-registry.ts` — the single source of truth for all capabilities
163
+ - `capability-registry.ts` — the one true source for all capabilities
164
164
  - `capability-dispatcher.ts` — the thin Map-based dispatch pipe
165
165
  - `topology.ts` — topology definitions and the registry
166
166
  - `types/topology.ts` — topology type definitions