cool-workflow 0.1.78
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/.claude-plugin/plugin.json +20 -0
- package/.codex-plugin/mcp.json +10 -0
- package/.codex-plugin/plugin.json +38 -0
- package/.mcp.json +10 -0
- package/LICENSE +24 -0
- package/README.md +638 -0
- package/apps/architecture-review/app.json +51 -0
- package/apps/architecture-review/workflow.js +116 -0
- package/apps/end-to-end-golden-path/app.json +30 -0
- package/apps/end-to-end-golden-path/workflow.js +33 -0
- package/apps/pr-review-fix-ci/app.json +59 -0
- package/apps/pr-review-fix-ci/workflow.js +90 -0
- package/apps/release-cut/app.json +54 -0
- package/apps/release-cut/workflow.js +82 -0
- package/apps/research-synthesis/app.json +50 -0
- package/apps/research-synthesis/workflow.js +76 -0
- package/apps/workflow-app-framework-demo/app.json +29 -0
- package/apps/workflow-app-framework-demo/workflow.js +44 -0
- package/dist/agent-config.js +223 -0
- package/dist/candidate-scoring.js +715 -0
- package/dist/capability-core.js +630 -0
- package/dist/capability-dispatcher.js +86 -0
- package/dist/capability-registry.js +523 -0
- package/dist/cli.js +1276 -0
- package/dist/collaboration.js +727 -0
- package/dist/commit.js +570 -0
- package/dist/contract-migration.js +234 -0
- package/dist/coordinator.js +1163 -0
- package/dist/daemon.js +44 -0
- package/dist/dispatch.js +201 -0
- package/dist/drive.js +503 -0
- package/dist/error-feedback.js +415 -0
- package/dist/evidence-grounding.js +179 -0
- package/dist/evidence-reasoning.js +733 -0
- package/dist/execution-backend.js +1279 -0
- package/dist/harness.js +61 -0
- package/dist/mcp-server.js +1615 -0
- package/dist/multi-agent-eval.js +857 -0
- package/dist/multi-agent-host.js +764 -0
- package/dist/multi-agent-operator-ux.js +537 -0
- package/dist/multi-agent-trust.js +366 -0
- package/dist/multi-agent.js +1173 -0
- package/dist/node-snapshot.js +270 -0
- package/dist/observability.js +922 -0
- package/dist/operator-ux.js +971 -0
- package/dist/orchestrator/audit-operations.js +182 -0
- package/dist/orchestrator/candidate-operations.js +117 -0
- package/dist/orchestrator/cli-options.js +288 -0
- package/dist/orchestrator/collaboration-operations.js +86 -0
- package/dist/orchestrator/feedback-operations.js +81 -0
- package/dist/orchestrator/host-operations.js +78 -0
- package/dist/orchestrator/lifecycle-operations.js +462 -0
- package/dist/orchestrator/migration-operations.js +44 -0
- package/dist/orchestrator/multi-agent-operations.js +362 -0
- package/dist/orchestrator/report.js +369 -0
- package/dist/orchestrator/topology-operations.js +84 -0
- package/dist/orchestrator.js +874 -0
- package/dist/pipeline-contract.js +92 -0
- package/dist/pipeline-runner.js +285 -0
- package/dist/reclamation.js +882 -0
- package/dist/result-normalize.js +194 -0
- package/dist/run-export.js +64 -0
- package/dist/run-registry.js +1347 -0
- package/dist/run-state-schema.js +67 -0
- package/dist/sandbox-profile.js +471 -0
- package/dist/scheduler.js +266 -0
- package/dist/scheduling.js +184 -0
- package/dist/schema-validate.js +98 -0
- package/dist/state-explosion.js +1213 -0
- package/dist/state-migrations.js +463 -0
- package/dist/state-node.js +301 -0
- package/dist/state.js +308 -0
- package/dist/telemetry-attestation.js +156 -0
- package/dist/telemetry-ledger.js +145 -0
- package/dist/topology.js +527 -0
- package/dist/triggers.js +159 -0
- package/dist/trust-audit.js +475 -0
- package/dist/types/blackboard.js +2 -0
- package/dist/types/boundary.js +29 -0
- package/dist/types/candidate.js +2 -0
- package/dist/types/collaboration.js +2 -0
- package/dist/types/core.js +2 -0
- package/dist/types/drive.js +10 -0
- package/dist/types/error-feedback.js +2 -0
- package/dist/types/evidence-reasoning.js +2 -0
- package/dist/types/execution-backend.js +2 -0
- package/dist/types/multi-agent.js +2 -0
- package/dist/types/observability.js +2 -0
- package/dist/types/pipeline.js +2 -0
- package/dist/types/reclamation.js +8 -0
- package/dist/types/result.js +2 -0
- package/dist/types/run-registry.js +2 -0
- package/dist/types/run.js +2 -0
- package/dist/types/sandbox.js +2 -0
- package/dist/types/schedule.js +2 -0
- package/dist/types/state-node.js +2 -0
- package/dist/types/topology.js +2 -0
- package/dist/types/trust.js +2 -0
- package/dist/types/workbench.js +2 -0
- package/dist/types/worker.js +2 -0
- package/dist/types/workflow-app.js +2 -0
- package/dist/types.js +43 -0
- package/dist/verifier-registry.js +46 -0
- package/dist/verifier.js +78 -0
- package/dist/version.js +8 -0
- package/dist/workbench-host.js +172 -0
- package/dist/workbench.js +190 -0
- package/dist/worker-isolation.js +1028 -0
- package/dist/workflow-api.js +98 -0
- package/dist/workflow-app-framework.js +626 -0
- package/docs/agent-delegation-drive.7.md +190 -0
- package/docs/agent-framework.md +176 -0
- package/docs/candidate-scoring.7.md +106 -0
- package/docs/canonical-workflow-apps.7.md +137 -0
- package/docs/capability-topology-registry.7.md +168 -0
- package/docs/cli-mcp-parity.7.md +373 -0
- package/docs/contract-migration-tooling.7.md +123 -0
- package/docs/control-plane-scheduling.7.md +110 -0
- package/docs/coordinator-blackboard.7.md +183 -0
- package/docs/dogfood/architecture-review-cool-workflow.md +16 -0
- package/docs/dogfood-one-real-repo.7.md +168 -0
- package/docs/durable-state-and-locking.7.md +107 -0
- package/docs/end-to-end-golden-path.7.md +117 -0
- package/docs/error-feedback.7.md +153 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +270 -0
- package/docs/execution-backends.7.md +300 -0
- package/docs/getting-started.md +99 -0
- package/docs/index.md +41 -0
- package/docs/mcp-app-surface.7.md +235 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +265 -0
- package/docs/multi-agent-eval-replay-harness.7.md +302 -0
- package/docs/multi-agent-operator-ux.7.md +314 -0
- package/docs/multi-agent-runtime-core.7.md +231 -0
- package/docs/multi-agent-topologies.7.md +103 -0
- package/docs/multi-agent-trust-policy-audit.7.md +154 -0
- package/docs/node-snapshot-diff-replay.7.md +135 -0
- package/docs/observability-cost-accounting.7.md +194 -0
- package/docs/operator-ux.7.md +180 -0
- package/docs/pipeline-runner.7.md +136 -0
- package/docs/project-index.md +261 -0
- package/docs/real-execution-backends.7.md +142 -0
- package/docs/release-and-migration.7.md +280 -0
- package/docs/release-tooling.7.md +159 -0
- package/docs/routines.md +48 -0
- package/docs/run-registry-control-plane.7.md +312 -0
- package/docs/run-retention-reclamation.7.md +191 -0
- package/docs/sandbox-profiles.7.md +137 -0
- package/docs/scheduled-tasks.md +80 -0
- package/docs/security-trust-hardening.7.md +117 -0
- package/docs/state-explosion-management.7.md +264 -0
- package/docs/state-node.7.md +96 -0
- package/docs/team-collaboration.7.md +207 -0
- package/docs/unix-principles.md +192 -0
- package/docs/verifier-gated-commit.7.md +140 -0
- package/docs/web-desktop-workbench.7.md +215 -0
- package/docs/worker-isolation.7.md +167 -0
- package/docs/workflow-app-framework.7.md +274 -0
- package/manifest/README.md +43 -0
- package/manifest/plugin.manifest.json +316 -0
- package/manifest/pricing.policy.json +14 -0
- package/package.json +79 -0
- package/scripts/agents/claude-p-agent.js +104 -0
- package/scripts/agents/claude-p-agent.sh +9 -0
- package/scripts/agents/cw-attest-keygen.js +55 -0
- package/scripts/agents/cw-attest-wrap.js +143 -0
- package/scripts/block-unapproved-tag.sh +39 -0
- package/scripts/bump-version.js +249 -0
- package/scripts/canonical-apps.js +171 -0
- package/scripts/cw.js +4 -0
- package/scripts/dist-drift-check.js +79 -0
- package/scripts/dogfood-architecture-review.js +237 -0
- package/scripts/dogfood-release.js +624 -0
- package/scripts/forward-ref-docs.js +73 -0
- package/scripts/gen-manifests.js +232 -0
- package/scripts/golden-path.js +300 -0
- package/scripts/mcp-server.js +4 -0
- package/scripts/new-feature.js +121 -0
- package/scripts/parity-check.js +213 -0
- package/scripts/release-check.js +118 -0
- package/scripts/release-flow.js +272 -0
- package/scripts/release-gate.sh +85 -0
- package/scripts/sync-project-index.js +387 -0
- package/scripts/validate-run-state-schema.js +126 -0
- package/scripts/verify-container-selfref.js +64 -0
- package/scripts/version-sync-check.js +237 -0
- package/skills/cool-workflow/SKILL.md +162 -0
- package/skills/cool-workflow/references/commands.md +282 -0
- package/tsconfig.json +16 -0
- package/ui/workbench/app.css +76 -0
- package/ui/workbench/app.js +159 -0
- package/ui/workbench/index.html +32 -0
- package/workflows/architecture-review.workflow.js +84 -0
- package/workflows/research-synthesis.workflow.js +47 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Control-Plane Scheduling
|
|
2
|
+
|
|
3
|
+
CW v0.1.37 adds Control-Plane Scheduling: a scheduling-policy layer over the
|
|
4
|
+
v0.1.28 Run Registry queue. Before v0.1.37 the queue had ORDER (priority,
|
|
5
|
+
`enqueuedAt`) but no policy — nothing limited how many runs were in flight, nothing
|
|
6
|
+
retried a transient failure with backoff, and nothing bounded retries
|
|
7
|
+
(`queue drain` would re-hand the same failing entry forever). v0.1.37 layers
|
|
8
|
+
policy-as-data over the existing queue (no queue file duplicated): priority +
|
|
9
|
+
readiness selection, a hard concurrency ceiling, leases, retry with computed
|
|
10
|
+
backoff, and a fail-closed park state. The verbs use a distinct `sched` namespace,
|
|
11
|
+
separate from the unrelated wall-clock `schedule` (loop/cron) scheduler.
|
|
12
|
+
|
|
13
|
+
The core (`src/scheduling.ts`) is pure and deterministic — every function takes an
|
|
14
|
+
injected `now`; "CW records readiness/order/leases, the host still executes the
|
|
15
|
+
workers."
|
|
16
|
+
|
|
17
|
+
## Policy as data
|
|
18
|
+
|
|
19
|
+
`SchedulingPolicy` is a plain, diffable file under `$CW_HOME/registry/
|
|
20
|
+
scheduling-policy.json`, defaulting to conservative fail-closed values when
|
|
21
|
+
absent: `maxConcurrent 1`, `maxAttempts 3`, `leaseTtlMs 300000`, backoff
|
|
22
|
+
`baseMs 1000 * factor 2 ^ (attempts-1)` capped at `60000` (no jitter).
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
sched policy show [--json]
|
|
26
|
+
sched policy set --maxConcurrent N --maxAttempts N --leaseTtlMs N --backoffBaseMs N --backoffFactor N --backoffCapMs N
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## The lease lifecycle
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
ready --lease--> leased --complete--> drained
|
|
33
|
+
^ | \--release(failed)/expire--> ready (+backoff) | parked
|
|
34
|
+
|__reset________/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- **`sched plan`** — READ-ONLY: the would-be lease plan for the current
|
|
38
|
+
queue+policy+now, deterministic and replayable, without mutating. Payload-
|
|
39
|
+
identical across CLI and MCP.
|
|
40
|
+
- **`sched lease`** — claim eligible entries (priority order via `compareQueue`,
|
|
41
|
+
skipping anything not yet eligible / parked / leased) as `leased` with a
|
|
42
|
+
`leaseId` and `leaseExpiresAt`. The **concurrency ceiling is a hard limit** —
|
|
43
|
+
leasing stops at `maxConcurrent`; over-limit entries stay `ready`.
|
|
44
|
+
- **`sched complete <leaseId>`** — terminal success (`drained`).
|
|
45
|
+
- **`sched release <leaseId> [--failed]`** — failed releases count an attempt
|
|
46
|
+
(retry/backoff or park); a clean release returns the entry to `ready`.
|
|
47
|
+
- **`sched reclaim`** — an EXPIRED lease (the host died) is reclaimable and counts
|
|
48
|
+
one failed attempt — recorded, not silently reset.
|
|
49
|
+
- **`sched reset <id>`** — operator recovery: a parked entry back to `ready`.
|
|
50
|
+
|
|
51
|
+
## Fail closed
|
|
52
|
+
|
|
53
|
+
- **Concurrency is a hard ceiling** — never exceeded; `sched plan`/`lease` stop at
|
|
54
|
+
`maxConcurrent` in-flight leases.
|
|
55
|
+
- **Park past budget** — when `attempts >= maxAttempts` the entry becomes `parked`
|
|
56
|
+
with a `parkedReason` and is NEVER re-selected. `sched reset` is the only way
|
|
57
|
+
back. The queue can never re-hand a failing entry forever.
|
|
58
|
+
- **Backoff is deterministic** — a pure curve, no randomness; a retried entry sets
|
|
59
|
+
`nextEligibleAt` and is skipped until then.
|
|
60
|
+
|
|
61
|
+
## Compatibility
|
|
62
|
+
|
|
63
|
+
Additive: `RunQueueEntry` gains optional `attempts`/`leaseId`/`leaseExpiresAt`/
|
|
64
|
+
`nextEligibleAt`/`parkedReason` and two statuses (`leased`/`parked`); a pre-0.1.37
|
|
65
|
+
`queue.json` loads unchanged (no scheduling fields = a plain ordered queue). The
|
|
66
|
+
existing `queue add|list|drain|show` verbs are unchanged. No new database, no
|
|
67
|
+
daemon-owned state.
|
|
68
|
+
|
|
69
|
+
## See Also
|
|
70
|
+
|
|
71
|
+
run-registry-control-plane(7), cli-mcp-parity(7), release-and-migration(7)
|
|
72
|
+
|
|
73
|
+
## Agent Delegation Drive (v0.1.38)
|
|
74
|
+
|
|
75
|
+
spawn an external agent process per worker, capture result.md + attestation, auto-drive plan->dispatch->fulfill->accept->commit
|
|
76
|
+
|
|
77
|
+
## Run Retention & Provable Reclamation (v0.1.39)
|
|
78
|
+
|
|
79
|
+
tiered, append-only, cryptographically-verifiable run reclamation: seal the audit skeleton, free the reconstructable bulk, prove it
|
|
80
|
+
|
|
81
|
+
## Durable State & Locking (v0.1.40)
|
|
82
|
+
|
|
83
|
+
atomic temp->rename writes + fsync-durability for authoritative stores; portable stale-stealing file lock serializing the cross-process read-modify-write stores
|
|
84
|
+
|
|
85
|
+
## Self-Audit Hardening & Pure-Router Decomposition (v0.1.41)
|
|
86
|
+
|
|
87
|
+
evidence grounding + durable audit append + symlink-hardened containment + deterministic worker ids + recursive redaction; BackendRegistry self-describing drivers (no per-id switches); orchestrator god-object decomposed into per-domain operation modules (pure loadRun->delegate router)
|
|
88
|
+
|
|
89
|
+
## Robust Result Ingest (v0.1.42)
|
|
90
|
+
|
|
91
|
+
capture findings/evidence from any reasonable agent shape (alt keys + prose), CW derives grounded evidence itself, warn on empty capture — closes the v0.1.41 live-drive 'accepted with 0 captured' failure
|
|
92
|
+
|
|
93
|
+
## No-False-Green Gate & Launch Prep (v0.1.43)
|
|
94
|
+
|
|
95
|
+
Hard gate blocking empty-capture verifier-gated commits, plus quickstart and launch-prep docs.
|
|
96
|
+
|
|
97
|
+
## Release-Gate Determinism & Agents Vendor (v0.1.44)
|
|
98
|
+
|
|
99
|
+
Release-readiness checks now validate the committed blob (`git show HEAD:<path>`) instead of the mutable working tree — eliminating false-red/false-green from concurrent working-tree writes (iCloud/Spotlight/editor). Adds the `agents` vendor manifest target: a generated `.agents/plugins/cool-workflow/` adapter giving any non-Claude AI agent one common interface to CW.
|
|
100
|
+
|
|
101
|
+
## P1-P2 Fixes & CI Content Surfaces (v0.1.49)
|
|
102
|
+
|
|
103
|
+
Migration DAG with reversible edges (v0.1.45), capability auto-discovery (v0.1.46), vendor-adapter registry (v0.1.47), state auto-compaction and P2 fixes (v0.1.48), plus CI content-surface determinism hardening (v0.1.49).
|
|
104
|
+
0.1.51
|
|
105
|
+
|
|
106
|
+
0.1.76
|
|
107
|
+
|
|
108
|
+
0.1.77
|
|
109
|
+
|
|
110
|
+
0.1.78
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Coordinator / Blackboard
|
|
2
|
+
|
|
3
|
+
CW v0.1.18 adds the Coordinator / Blackboard layer. Multi-Agent Runtime Core is
|
|
4
|
+
the process table; the blackboard is the shared coordination filesystem.
|
|
5
|
+
|
|
6
|
+
CW v0.1.25 adds `blackboard summarize <run-id>` (MCP: `cw_blackboard_summarize`),
|
|
7
|
+
a deterministic blackboard digest with topic rollups, thread summaries,
|
|
8
|
+
unresolved questions, conflicts, decisions, artifacts, adopted and missing
|
|
9
|
+
evidence, policy violations, judge rationale, recent changes, and high-signal
|
|
10
|
+
records. The digest is a derived userland index: it preserves links back to
|
|
11
|
+
source messages, contexts, artifacts, snapshots, coordinator decisions, and
|
|
12
|
+
audit events, and never deletes raw records. See
|
|
13
|
+
[state-explosion-management.7.md](state-explosion-management.7.md).
|
|
14
|
+
|
|
15
|
+
This release defines stable primitives for shared context, messages, artifact
|
|
16
|
+
indexing, snapshots, and coordinator decisions. It does not implement debate,
|
|
17
|
+
judge, map-reduce, swarm, committee, or synthesis topologies yet. Those
|
|
18
|
+
topologies should consume this substrate later.
|
|
19
|
+
|
|
20
|
+
## State Model
|
|
21
|
+
|
|
22
|
+
Blackboard state lives in run state:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
.cw/runs/<run-id>/state.json
|
|
26
|
+
blackboard:
|
|
27
|
+
schemaVersion: 1
|
|
28
|
+
boards: []
|
|
29
|
+
topics: []
|
|
30
|
+
messages: []
|
|
31
|
+
contexts: []
|
|
32
|
+
artifacts: []
|
|
33
|
+
snapshots: []
|
|
34
|
+
decisions: []
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Runtime objects are:
|
|
38
|
+
|
|
39
|
+
- `Blackboard`
|
|
40
|
+
- `BlackboardTopic`
|
|
41
|
+
- `BlackboardMessage`
|
|
42
|
+
- `BlackboardContext`
|
|
43
|
+
- `BlackboardArtifactRef`
|
|
44
|
+
- `BlackboardSnapshot`
|
|
45
|
+
- `CoordinatorDecision`
|
|
46
|
+
|
|
47
|
+
Every record carries schema version, stable id, timestamps, author/source,
|
|
48
|
+
scope, status, parent references, tags, metadata, and links back to workflow,
|
|
49
|
+
multi-agent, worker, task, candidate, verifier, commit, audit, and evidence
|
|
50
|
+
records where applicable.
|
|
51
|
+
|
|
52
|
+
## Storage Layout
|
|
53
|
+
|
|
54
|
+
CW mirrors blackboard state to durable local files:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
.cw/runs/<run-id>/blackboard/
|
|
58
|
+
index.json
|
|
59
|
+
messages.jsonl
|
|
60
|
+
topics/<topic-id>.json
|
|
61
|
+
contexts/<context-id>.json
|
|
62
|
+
artifacts/<artifact-ref-id>.json
|
|
63
|
+
snapshots/<snapshot-id>.json
|
|
64
|
+
decisions/<decision-id>.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`messages.jsonl` is append-friendly. `index.json` is regenerated
|
|
68
|
+
deterministically from run state. CW does not store secrets or raw environment
|
|
69
|
+
values in blackboard metadata.
|
|
70
|
+
|
|
71
|
+
## Context Semantics
|
|
72
|
+
|
|
73
|
+
Shared context supports:
|
|
74
|
+
|
|
75
|
+
- `fact`
|
|
76
|
+
- `constraint`
|
|
77
|
+
- `assumption`
|
|
78
|
+
- `question`
|
|
79
|
+
- `decision`
|
|
80
|
+
|
|
81
|
+
Context updates do not silently overwrite older records. If a new update has
|
|
82
|
+
the same topic, kind, and key as an active context record but a different value,
|
|
83
|
+
CW marks the records `conflicting` and records a `CoordinatorDecision`.
|
|
84
|
+
|
|
85
|
+
Use `--supersedes <context-id>` to intentionally replace older context. The
|
|
86
|
+
older record is marked `superseded`, and the new record links to it.
|
|
87
|
+
|
|
88
|
+
## Artifact Index
|
|
89
|
+
|
|
90
|
+
`BlackboardArtifactRef` indexes worker outputs, logs, result files, evidence
|
|
91
|
+
locators, generated artifacts, reports, commit snapshots, and external paths.
|
|
92
|
+
|
|
93
|
+
Artifact refs include kind, path or locator, owner, source, provenance,
|
|
94
|
+
evidence refs, checksum when the path is a readable file, and trust audit links.
|
|
95
|
+
Existing `StateArtifact` records remain valid; blackboard refs bridge them into
|
|
96
|
+
shared coordination state instead of replacing them.
|
|
97
|
+
|
|
98
|
+
## Multi-Agent Integration
|
|
99
|
+
|
|
100
|
+
`MultiAgentRun`, groups, roles, memberships, fanout, and fanin can link to a
|
|
101
|
+
blackboard id and topic ids. Worker manifests for blackboard-enabled work
|
|
102
|
+
include:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"blackboard": {
|
|
107
|
+
"id": "bb-release",
|
|
108
|
+
"topicIds": ["release-evidence"],
|
|
109
|
+
"indexPath": ".cw/runs/<run-id>/blackboard/index.json",
|
|
110
|
+
"messagesPath": ".cw/runs/<run-id>/blackboard/messages.jsonl"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Accepted worker output can publish result summaries and artifacts into the
|
|
116
|
+
blackboard. Fanin can require indexed blackboard evidence and fails closed when
|
|
117
|
+
required role memberships have no blackboard message or artifact refs.
|
|
118
|
+
|
|
119
|
+
## CLI
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
node scripts/cw.js blackboard summary <run-id>
|
|
123
|
+
node scripts/cw.js blackboard graph <run-id>
|
|
124
|
+
node scripts/cw.js blackboard resolve <run-id> --id bb --title "Shared state"
|
|
125
|
+
node scripts/cw.js blackboard topic create <run-id> --id topic --title "Synthesis"
|
|
126
|
+
node scripts/cw.js blackboard message post <run-id> --topic topic --body "..."
|
|
127
|
+
node scripts/cw.js blackboard message list <run-id> [--topic topic]
|
|
128
|
+
node scripts/cw.js blackboard context put <run-id> --topic topic --kind fact --key k --value v
|
|
129
|
+
node scripts/cw.js blackboard artifact add <run-id> --topic topic --path result.md --kind worker-result
|
|
130
|
+
node scripts/cw.js blackboard artifact list <run-id>
|
|
131
|
+
node scripts/cw.js blackboard snapshot <run-id>
|
|
132
|
+
node scripts/cw.js coordinator summary <run-id>
|
|
133
|
+
node scripts/cw.js coordinator decision <run-id> --kind conflict-resolution --outcome accepted --reason "..."
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The CLI is JSON-friendly by default for focused blackboard and coordinator
|
|
137
|
+
commands.
|
|
138
|
+
|
|
139
|
+
## MCP Parity
|
|
140
|
+
|
|
141
|
+
MCP exposes matching tools:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
cw_blackboard_summary
|
|
145
|
+
cw_blackboard_graph
|
|
146
|
+
cw_blackboard_resolve
|
|
147
|
+
cw_blackboard_topic_create
|
|
148
|
+
cw_blackboard_message_post
|
|
149
|
+
cw_blackboard_message_list
|
|
150
|
+
cw_blackboard_context_put
|
|
151
|
+
cw_blackboard_artifact_add
|
|
152
|
+
cw_blackboard_artifact_list
|
|
153
|
+
cw_blackboard_snapshot
|
|
154
|
+
cw_coordinator_summary
|
|
155
|
+
cw_coordinator_decision
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
There is no intentional CLI-only behavior for core blackboard operations.
|
|
159
|
+
|
|
160
|
+
## Operator UX
|
|
161
|
+
|
|
162
|
+
`status`, `report --show`, and graph output include a Blackboard / Coordinator
|
|
163
|
+
panel. It shows topics, message counts, open questions, conflicts, missing
|
|
164
|
+
evidence, artifact counts, snapshot paths, ready-for-fanin state, and next
|
|
165
|
+
recommended action.
|
|
166
|
+
|
|
167
|
+
Use:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
node scripts/cw.js status <run-id>
|
|
171
|
+
node scripts/cw.js graph <run-id>
|
|
172
|
+
node scripts/cw.js report <run-id> --show
|
|
173
|
+
node scripts/cw.js audit summary <run-id>
|
|
174
|
+
node scripts/cw.js audit provenance <run-id>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Migration
|
|
178
|
+
|
|
179
|
+
Older v0.1.17 and earlier runs normalize with empty blackboard state and a
|
|
180
|
+
`.cw/runs/<run-id>/blackboard/` path. Unknown user data is preserved.
|
|
181
|
+
|
|
182
|
+
Newer unsupported run-state schemas still fail closed.
|
|
183
|
+
0.1.51
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Dogfood: architecture-review --drive on cool-workflow (CW v0.1.77)
|
|
2
|
+
|
|
3
|
+
Maintainer-run live proof (OUT of CI): a real external agent drove the whole
|
|
4
|
+
architecture-review workflow end-to-end with zero hand-written result.md. The
|
|
5
|
+
model ran in the agent's process; CW spawned it and recorded the attested
|
|
6
|
+
output. CW holds no API key and imports no model SDK.
|
|
7
|
+
|
|
8
|
+
- Date: 2026-06-11
|
|
9
|
+
- Run: architecture-review-20260611T014521Z-gfdd5v
|
|
10
|
+
- Status: complete
|
|
11
|
+
- Workers driven: 14/14 (zero hand-written result.md)
|
|
12
|
+
- Agent-reported model(s): claude-opus-4-8[1m] — sourced solely from the agent's own report, never CW_AGENT_MODEL
|
|
13
|
+
- Agent-reported usage: 14/14 workers reported tokens (38069 in / 168789 out)
|
|
14
|
+
- agent-delegation audit events: 14
|
|
15
|
+
- Commit: state-20260611T022527Z-c0mj4v
|
|
16
|
+
- Agent template: scripts/agents/claude-p-agent.js (read-only claude; the wrapper persists result.md and forwards model+usage)
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Dogfood One Real Repo
|
|
2
|
+
|
|
3
|
+
CW v0.1.16 proves the release workflow against the real Cool Workflow
|
|
4
|
+
repository. The proof uses the canonical `release-cut` app, records isolated
|
|
5
|
+
worker outputs, scores a release candidate, selects it only with verifier
|
|
6
|
+
evidence, creates a verifier-gated CW state commit, and renders trust audit
|
|
7
|
+
provenance.
|
|
8
|
+
|
|
9
|
+
## Dry-Run Command
|
|
10
|
+
|
|
11
|
+
From the package directory:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd plugins/cool-workflow
|
|
15
|
+
npm run dogfood:release
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The command targets the repository two directories above the package, uses
|
|
19
|
+
`release-cut`, sets `version=0.1.18`, `previousVersion=0.1.17`, the current git
|
|
20
|
+
branch, and `dryRun=true`. It writes a machine-readable summary to:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
.cw/runs/<run-id>/dogfood-summary.json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The summary includes the run id, report path, audit summary path, provenance
|
|
27
|
+
counts, worker ids, candidate id, score id, selection id, commit or checkpoint
|
|
28
|
+
id, command log paths, and the release verdict.
|
|
29
|
+
|
|
30
|
+
## Real Evidence
|
|
31
|
+
|
|
32
|
+
The full dry-run collects real repository evidence from:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git status --short --branch
|
|
36
|
+
node scripts/version-sync-check.js
|
|
37
|
+
npm run build
|
|
38
|
+
npm run check
|
|
39
|
+
npm test
|
|
40
|
+
npm run fixture-compat
|
|
41
|
+
npm run canonical-apps
|
|
42
|
+
npm run golden-path
|
|
43
|
+
npm run release:check
|
|
44
|
+
npm pack --dry-run --json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Each command log is written under the worker `logs/` directory and cited in the
|
|
48
|
+
worker `cw:result` evidence array. The release verdict worker carries the full
|
|
49
|
+
set of command locators into the release candidate, score, selection, and
|
|
50
|
+
commit/checkpoint provenance.
|
|
51
|
+
|
|
52
|
+
## Inspect The Run
|
|
53
|
+
|
|
54
|
+
Use the standard operator commands:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
node scripts/cw.js status <run-id>
|
|
58
|
+
node scripts/cw.js graph <run-id>
|
|
59
|
+
node scripts/cw.js report <run-id> --show
|
|
60
|
+
node scripts/cw.js worker summary <run-id>
|
|
61
|
+
node scripts/cw.js candidate summary <run-id>
|
|
62
|
+
node scripts/cw.js feedback summary <run-id>
|
|
63
|
+
node scripts/cw.js commit summary <run-id>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Inspect trust records:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
node scripts/cw.js audit summary <run-id>
|
|
70
|
+
node scripts/cw.js audit provenance <run-id>
|
|
71
|
+
node scripts/cw.js audit provenance <run-id> --candidate dogfood-release-0.1.18
|
|
72
|
+
node scripts/cw.js audit provenance <run-id> --commit <commit-id>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The report answers why the candidate is trusted by showing sandbox profiles,
|
|
76
|
+
host attestations, evidence provenance, candidate scoring, acceptance rationale,
|
|
77
|
+
and the verifier-gated commit.
|
|
78
|
+
|
|
79
|
+
The dogfood command remains a local release-engineering script rather than a new
|
|
80
|
+
MCP tool because it composes existing first-class CW capabilities: `release-cut`
|
|
81
|
+
planning, dispatch, worker manifests/output, candidate scoring/selection,
|
|
82
|
+
commits, reports, and audit/provenance. MCP parity is preserved for the
|
|
83
|
+
inspectable state through the existing worker, candidate, commit, operator
|
|
84
|
+
report, and audit tools.
|
|
85
|
+
|
|
86
|
+
## Smoke Mode
|
|
87
|
+
|
|
88
|
+
`npm test` and `npm run release:check` run:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node test/dogfood-release-smoke.js
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The smoke test executes `scripts/dogfood-release.js --smoke --json`. It still
|
|
95
|
+
uses the real repository, `release-cut`, worker manifests, trust audit records,
|
|
96
|
+
candidate scoring, selection, verifier-gated commit, and a report, but keeps the
|
|
97
|
+
command set smaller to avoid recursive release checking.
|
|
98
|
+
|
|
99
|
+
## Promote To Real Release Actions
|
|
100
|
+
|
|
101
|
+
Dry-run mode never creates tags, pushes, publishes packages, or mutates a
|
|
102
|
+
marketplace. Real actions are separate maintainer commands after the dogfood
|
|
103
|
+
run passes:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm run dogfood:release
|
|
107
|
+
npm run release:check
|
|
108
|
+
git status --short --branch
|
|
109
|
+
git tag v0.1.18
|
|
110
|
+
git push origin main --tags
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Package publish and plugin marketplace updates should be separate visible
|
|
114
|
+
steps. If future execute flags are used, they must be explicit, for example
|
|
115
|
+
`--execute --tag --confirm-release-actions=0.1.18`. The script refuses tag,
|
|
116
|
+
push, or publish flags in dry-run mode and refuses execute mode without the
|
|
117
|
+
target-version confirmation.
|
|
118
|
+
|
|
119
|
+
## Safety Gates
|
|
120
|
+
|
|
121
|
+
The dogfood command holds the candidate and writes an explicit checkpoint if
|
|
122
|
+
any evidence command fails, version sync is incomplete, release docs are
|
|
123
|
+
missing, audit records are unavailable, or verifier evidence is absent. A
|
|
124
|
+
selected candidate requires score evidence and a verified verifier node; a
|
|
125
|
+
verifier-gated commit requires the selected candidate, score, evidence, sandbox
|
|
126
|
+
profile, worker, and acceptance rationale.
|
|
127
|
+
|
|
128
|
+
This is intentionally boring release engineering: local-first, inspectable,
|
|
129
|
+
scriptable, and fail-closed.
|
|
130
|
+
|
|
131
|
+
## Architecture-Review Agent-Delegation Dogfood (v0.1.38)
|
|
132
|
+
|
|
133
|
+
`scripts/dogfood-architecture-review.js` dogfoods the v0.1.38 Agent Delegation
|
|
134
|
+
Drive: the `architecture-review` app driven end-to-end by the `agent` backend,
|
|
135
|
+
with zero hand-written `result.md`.
|
|
136
|
+
|
|
137
|
+
It splits into two halves, exactly like the release dogfood above:
|
|
138
|
+
|
|
139
|
+
- **`--smoke` (CI-verifiable).** A hermetic STUB agent (no live binary, no second
|
|
140
|
+
repo, no network, no model SDK) drives the real app to a committed audited
|
|
141
|
+
report. `node scripts/dogfood-architecture-review.js --smoke --json` emits
|
|
142
|
+
`{ ok: true, mode: "smoke" }` with a `reportPath` and `auditSummaryPath` that
|
|
143
|
+
exist, the Verdict node accepted, and `audit.byKind["worker.agent-delegation"]
|
|
144
|
+
>= 1`. This is asserted under `npm test` (`test/dogfood-release-smoke.js`).
|
|
145
|
+
|
|
146
|
+
- **Live full-drive (MAINTAINER-RUN, OUT OF CI).** With a REAL configured agent
|
|
147
|
+
(`CW_AGENT_COMMAND`, e.g. `claude -p {{input}}` / `codex exec`, or
|
|
148
|
+
`--agent-command`) against ONE real external repository:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
CW_AGENT_COMMAND="claude -p {{input}}" \
|
|
152
|
+
node scripts/dogfood-architecture-review.js --repo /path/to/real/repo \
|
|
153
|
+
--question "Audit this repo's architecture and rank the real risks."
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
This drives plan → dispatch → agent-fulfill → accept/verify → commit for every
|
|
157
|
+
worker the planner emits, produces the committed audited risk report, and writes
|
|
158
|
+
a `docs/dogfood/architecture-review-<repo>.md` provenance note recording the repo
|
|
159
|
+
name and the agent-REPORTED model id. It depends on a live external agent binary
|
|
160
|
+
and a second repository, which CI cannot have (CI is node/npm/git-only and
|
|
161
|
+
hermetic), so it is **explicitly OUT of CI** — a maintainer bar run out-of-band,
|
|
162
|
+
exactly like the "Promote To Real Release Actions" above. The CI/release gate is
|
|
163
|
+
strictly the stub `--smoke` path.
|
|
164
|
+
|
|
165
|
+
The model runs in the external agent's process, never inside CW: this script
|
|
166
|
+
spawns the agent and records its attested output; it imports no model SDK and
|
|
167
|
+
holds no API key.
|
|
168
|
+
0.1.51
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Durable State & Locking
|
|
2
|
+
|
|
3
|
+
CW v0.1.40 closes the durability seams its own architecture self-audit found:
|
|
4
|
+
every authoritative write is now **atomic**, the audit-essential ones are
|
|
5
|
+
**fsync-durable**, and the cross-process read-modify-write stores are
|
|
6
|
+
**lock-serialized**. This is the hardening half of Run Retention & Provable
|
|
7
|
+
Reclamation (v0.1.39) — the reclamation transaction was already write-ahead, but
|
|
8
|
+
the kernel persistence primitive underneath it (`state.ts:writeJson`) was a
|
|
9
|
+
non-atomic in-place `fs.writeFileSync`, the prior verdict's #1 P1. That is now
|
|
10
|
+
fixed for the whole control plane, not just the tombstone.
|
|
11
|
+
|
|
12
|
+
## Atomic writes — order is the safety property
|
|
13
|
+
|
|
14
|
+
`writeJson(file, value, { durable? })` writes to a unique temp file and then
|
|
15
|
+
`rename(2)`s it over the target. Because rename is atomic on POSIX, a crash,
|
|
16
|
+
`SIGKILL`, or `ENOSPC` mid-write can never leave a truncated `state.json` that
|
|
17
|
+
throws `Invalid JSON` on reload — a reader always sees **EITHER the old bytes OR
|
|
18
|
+
the new bytes**, never a torn file. A failed rename cleans up its temp file, so no
|
|
19
|
+
half-written artifact is ever left behind.
|
|
20
|
+
|
|
21
|
+
With `{ durable: true }` the file is additionally `fsync`'d (and its directory
|
|
22
|
+
best-effort `fsync`'d) before the write is considered complete, so the bytes
|
|
23
|
+
survive power loss. Durability is reserved for **authoritative** state — `state.json`
|
|
24
|
+
(`saveCheckpoint`), the registry overlays (`archive.json`, `provenance.json`, the
|
|
25
|
+
home queue, `repos.json`), the scheduler store, and the reclamation `reclaimed.json`
|
|
26
|
+
— while high-frequency, rebuildable derived writes (node bodies, worker manifests,
|
|
27
|
+
the registry index) stay atomic-but-not-fsync'd so the cheap torn-write fix applies
|
|
28
|
+
everywhere without the fsync cost on the hot path.
|
|
29
|
+
|
|
30
|
+
## Locking — serialize the cross-process read-modify-write
|
|
31
|
+
|
|
32
|
+
The home queue (`queueAdd`/`queueDrain`), the archive overlay, the repos registry,
|
|
33
|
+
and the per-run reclamation chain are read-modify-write stores mutated by more than
|
|
34
|
+
one process (the long-running scheduler daemon and the CLI both touch the queue).
|
|
35
|
+
`withFileLock(targetPath, fn)` runs `fn` while holding a portable advisory lock:
|
|
36
|
+
|
|
37
|
+
- **Portable** — an `O_EXCL` (`wx`) lockfile beside the target; no native `flock(2)`,
|
|
38
|
+
so it works identically under CI (node/npm/git only).
|
|
39
|
+
- **Stale-stealing** — a lock older than the steal window (30 s) is reclaimed, so a
|
|
40
|
+
crashed holder can never wedge a store forever.
|
|
41
|
+
- **Always released** — the lock is removed in a `finally`, even if `fn` throws.
|
|
42
|
+
|
|
43
|
+
This makes the scheduling kernel's concurrency ceiling hold **across processes**,
|
|
44
|
+
not merely within one: a newly-added queue task can no longer vanish under a
|
|
45
|
+
concurrent drain, and two reclaimers can no longer lose a tombstone
|
|
46
|
+
(freed-without-proof).
|
|
47
|
+
|
|
48
|
+
## Reclamation durability (the write-ahead seam, v0.1.40)
|
|
49
|
+
|
|
50
|
+
The v0.1.39 reclamation transaction proved the *tombstone* crash-safe, but the
|
|
51
|
+
result-node re-point that scratch reclamation depends on lived outside that
|
|
52
|
+
boundary. It is now inside it. `runReclamation` runs, in order:
|
|
53
|
+
|
|
54
|
+
1. extract + seal skeleton — and **refuse** (`skeleton-incomplete`) not only on a
|
|
55
|
+
missing key but if extraction dropped audit **content** the run actually has
|
|
56
|
+
(a run with commits/evidence must seal them);
|
|
57
|
+
2. under the per-run lock: build the tombstone (reads `prevTombstoneHash`) and
|
|
58
|
+
commit it durably — atomic so the chain read-modify-write can never lose a link;
|
|
59
|
+
3. `prepareFree()` — re-point surviving nodes off the scratch, **durably persist**
|
|
60
|
+
`state.json`, and **prove** no surviving node references a freed path (and each
|
|
61
|
+
re-pointed node's `loadNodeSnapshot` stays `valid`), failing closed
|
|
62
|
+
(`repoint-incomplete`) otherwise;
|
|
63
|
+
4. only then free the bulk bytes.
|
|
64
|
+
|
|
65
|
+
A crash at any point now leaves EITHER the full run OR a complete tombstone with a
|
|
66
|
+
re-pointed, durably-persisted `state.json` — never a node referencing a freed path,
|
|
67
|
+
and never a tombstone whose capability claim diverges from reality.
|
|
68
|
+
|
|
69
|
+
## Compatibility
|
|
70
|
+
|
|
71
|
+
Additive and invisible to correct single-writer use. No schema change; pre-v0.1.40
|
|
72
|
+
runs and stores load unchanged. Atomicity and locking change only HOW the same
|
|
73
|
+
bytes are written, never WHAT — no audit, commit, or collaboration record is ever
|
|
74
|
+
rewritten.
|
|
75
|
+
|
|
76
|
+
## See Also
|
|
77
|
+
|
|
78
|
+
- `docs/run-retention-reclamation.7.md` — the v0.1.39 reclamation transaction this hardens.
|
|
79
|
+
- `docs/run-registry-control-plane.7.md` — the registry overlays + home queue now locked.
|
|
80
|
+
- `docs/control-plane-scheduling.7.md` — the concurrency ceiling now held across processes.
|
|
81
|
+
|
|
82
|
+
## Self-Audit Hardening & Pure-Router Decomposition (v0.1.41)
|
|
83
|
+
|
|
84
|
+
evidence grounding + durable audit append + symlink-hardened containment + deterministic worker ids + recursive redaction; BackendRegistry self-describing drivers (no per-id switches); orchestrator god-object decomposed into per-domain operation modules (pure loadRun->delegate router)
|
|
85
|
+
|
|
86
|
+
## Robust Result Ingest (v0.1.42)
|
|
87
|
+
|
|
88
|
+
capture findings/evidence from any reasonable agent shape (alt keys + prose), CW derives grounded evidence itself, warn on empty capture — closes the v0.1.41 live-drive 'accepted with 0 captured' failure
|
|
89
|
+
|
|
90
|
+
## No-False-Green Gate & Launch Prep (v0.1.43)
|
|
91
|
+
|
|
92
|
+
Hard gate blocking empty-capture verifier-gated commits, plus quickstart and launch-prep docs.
|
|
93
|
+
|
|
94
|
+
## Release-Gate Determinism & Agents Vendor (v0.1.44)
|
|
95
|
+
|
|
96
|
+
Release-readiness checks now validate the committed blob (`git show HEAD:<path>`) instead of the mutable working tree — eliminating false-red/false-green from concurrent working-tree writes (iCloud/Spotlight/editor). Adds the `agents` vendor manifest target: a generated `.agents/plugins/cool-workflow/` adapter giving any non-Claude AI agent one common interface to CW.
|
|
97
|
+
|
|
98
|
+
## P1-P2 Fixes & CI Content Surfaces (v0.1.49)
|
|
99
|
+
|
|
100
|
+
Migration DAG with reversible edges (v0.1.45), capability auto-discovery (v0.1.46), vendor-adapter registry (v0.1.47), state auto-compaction and P2 fixes (v0.1.48), plus CI content-surface determinism hardening (v0.1.49).
|
|
101
|
+
0.1.51
|
|
102
|
+
|
|
103
|
+
0.1.76
|
|
104
|
+
|
|
105
|
+
0.1.77
|
|
106
|
+
|
|
107
|
+
0.1.78
|