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,237 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const assert = require("node:assert/strict");
|
|
5
|
+
const fs = require("node:fs");
|
|
6
|
+
const path = require("node:path");
|
|
7
|
+
const { spawnSync } = require("node:child_process");
|
|
8
|
+
|
|
9
|
+
const pluginRoot = path.resolve(__dirname, "..");
|
|
10
|
+
const repoRoot = path.resolve(pluginRoot, "..", "..");
|
|
11
|
+
|
|
12
|
+
// Deterministic source-of-record: validate the COMMIT being released (the blob
|
|
13
|
+
// at HEAD), NOT the mutable working tree. A working tree is a moving target —
|
|
14
|
+
// any concurrent editor, formatter, or stray process can write-then-revert a
|
|
15
|
+
// surface file, and a read that lands in that window makes a release gate
|
|
16
|
+
// false-RED on a clean tree (and, symmetrically, a gate that trusts an
|
|
17
|
+
// uncommitted edit could false-GREEN). Reading `git show HEAD:<path>` removes
|
|
18
|
+
// that entire failure class: the bytes are immutable for the life of the commit.
|
|
19
|
+
// CI checks out HEAD, so HEAD === the tree it is releasing.
|
|
20
|
+
//
|
|
21
|
+
// Fallback to the filesystem only when we cannot read from HEAD: not a git work
|
|
22
|
+
// tree, or the path is not tracked at HEAD (e.g. the gitignored package-lock).
|
|
23
|
+
// node + git only — no ripgrep (CI portability rule).
|
|
24
|
+
const insideGitWorkTree = (() => {
|
|
25
|
+
const r = spawnSync("git", ["rev-parse", "--is-inside-work-tree"], { cwd: repoRoot, encoding: "utf8" });
|
|
26
|
+
return r.status === 0 && (r.stdout || "").trim() === "true";
|
|
27
|
+
})();
|
|
28
|
+
|
|
29
|
+
function readReleaseSource(relativePath) {
|
|
30
|
+
// relativePath is repoRoot-relative (the form every check below already uses).
|
|
31
|
+
if (insideGitWorkTree) {
|
|
32
|
+
const r = spawnSync("git", ["show", `HEAD:${relativePath}`], {
|
|
33
|
+
cwd: repoRoot,
|
|
34
|
+
encoding: "utf8",
|
|
35
|
+
maxBuffer: 1024 * 1024 * 32
|
|
36
|
+
});
|
|
37
|
+
if (r.status === 0) return { text: r.stdout, exists: true, fromHead: true };
|
|
38
|
+
// Not tracked at HEAD — fall through to the working tree (e.g. package-lock).
|
|
39
|
+
}
|
|
40
|
+
const abs = path.join(repoRoot, relativePath);
|
|
41
|
+
if (!fs.existsSync(abs)) return { text: null, exists: false, fromHead: false };
|
|
42
|
+
return { text: fs.readFileSync(abs, "utf8"), exists: true, fromHead: false };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Single source of truth: package.json. `scripts/bump-version.js` rewrites this
|
|
46
|
+
// (and every other surface); version:sync then asserts all surfaces equal it.
|
|
47
|
+
// Read it from the released commit so the asserted-against version is itself
|
|
48
|
+
// taken from HEAD, not a half-written working copy.
|
|
49
|
+
const VERSION = JSON.parse(readReleaseSource("plugins/cool-workflow/package.json").text).version;
|
|
50
|
+
const canonicalApps = [
|
|
51
|
+
"architecture-review",
|
|
52
|
+
"end-to-end-golden-path",
|
|
53
|
+
"pr-review-fix-ci",
|
|
54
|
+
"release-cut",
|
|
55
|
+
"research-synthesis"
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
function main() {
|
|
59
|
+
const checks = [];
|
|
60
|
+
checkJson("plugins/cool-workflow/package.json", "version", VERSION, checks);
|
|
61
|
+
// package-lock.json is a gitignored install artifact (the documented install
|
|
62
|
+
// uses `npm install --no-package-lock`), so only validate it when present.
|
|
63
|
+
checkJsonIfPresent("plugins/cool-workflow/package-lock.json", "version", VERSION, checks);
|
|
64
|
+
checkJson("plugins/cool-workflow/.codex-plugin/plugin.json", "version", VERSION, checks);
|
|
65
|
+
checkNestedJson("plugins/cool-workflow/manifest/plugin.manifest.json", ["identity", "version"], VERSION, checks);
|
|
66
|
+
checkJson("plugins/cool-workflow/.claude-plugin/plugin.json", "version", VERSION, checks);
|
|
67
|
+
checkJson("plugins/cool-workflow/.gemini-plugin/plugin.json", "version", VERSION, checks);
|
|
68
|
+
checkJson("plugins/cool-workflow/.opencode-plugin/plugin.json", "version", VERSION, checks);
|
|
69
|
+
checkIncludes("plugins/cool-workflow/src/version.ts", `CURRENT_COOL_WORKFLOW_VERSION = "${VERSION}"`, checks);
|
|
70
|
+
checkIncludes("plugins/cool-workflow/src/version.ts", "CURRENT_RUN_STATE_SCHEMA_VERSION = 1", checks);
|
|
71
|
+
checkIncludes("plugins/cool-workflow/src/mcp-server.ts", "CURRENT_COOL_WORKFLOW_VERSION", checks);
|
|
72
|
+
checkIncludes("plugins/cool-workflow/src/workflow-app-framework.ts", "CURRENT_COOL_WORKFLOW_VERSION", checks);
|
|
73
|
+
|
|
74
|
+
for (const appId of canonicalApps) {
|
|
75
|
+
checkJson(`plugins/cool-workflow/apps/${appId}/app.json`, "version", VERSION, checks);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
checkIncludes("plugins/cool-workflow/scripts/golden-path.js", VERSION, checks);
|
|
79
|
+
checkIncludes("plugins/cool-workflow/scripts/canonical-apps.js", VERSION, checks);
|
|
80
|
+
checkIncludes("plugins/cool-workflow/scripts/dogfood-release.js", VERSION, checks);
|
|
81
|
+
checkIncludes("plugins/cool-workflow/test/dogfood-release-smoke.js", VERSION, checks);
|
|
82
|
+
checkIncludes("plugins/cool-workflow/test/coordinator-blackboard-smoke.js", "coordinator-blackboard-smoke", checks);
|
|
83
|
+
checkIncludes("plugins/cool-workflow/test/multi-agent-topologies-smoke.js", "multi-agent-topologies-smoke", checks);
|
|
84
|
+
checkIncludes("plugins/cool-workflow/test/multi-agent-cli-mcp-surface-smoke.js", "multi-agent-cli-mcp-surface-smoke", checks);
|
|
85
|
+
checkIncludes("plugins/cool-workflow/test/multi-agent-eval-replay-harness-smoke.js", "multi-agent-eval-replay-smoke", checks);
|
|
86
|
+
checkIncludes("plugins/cool-workflow/test/state-explosion-management-smoke.js", "state-explosion-management-smoke", checks);
|
|
87
|
+
checkIncludes("plugins/cool-workflow/test/evidence-adoption-reasoning-smoke.js", "evidence-adoption-reasoning-smoke", checks);
|
|
88
|
+
checkIncludes("plugins/cool-workflow/test/mcp-app-surface-smoke.js", VERSION, checks);
|
|
89
|
+
checkIncludes("plugins/cool-workflow/test/canonical-workflow-apps-smoke.js", VERSION, checks);
|
|
90
|
+
checkIncludes("plugins/cool-workflow/test/workflow-app-framework-smoke.js", VERSION, checks);
|
|
91
|
+
checkIncludes("plugins/cool-workflow/dist/version.js", VERSION, checks);
|
|
92
|
+
checkIncludes("plugins/cool-workflow/dist/mcp-server.js", "CURRENT_COOL_WORKFLOW_VERSION", checks);
|
|
93
|
+
checkIncludes("plugins/cool-workflow/dist/workflow-app-framework.js", "CURRENT_COOL_WORKFLOW_VERSION", checks);
|
|
94
|
+
|
|
95
|
+
checkIncludes("plugins/cool-workflow/README.md", `v${VERSION}`, checks);
|
|
96
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "release and migration", checks);
|
|
97
|
+
checkIncludes("plugins/cool-workflow/docs/multi-agent-topologies.7.md", "Multi-Agent Topologies", checks);
|
|
98
|
+
checkIncludes("plugins/cool-workflow/docs/multi-agent-cli-mcp-surface.7.md", VERSION, checks);
|
|
99
|
+
checkIncludes("plugins/cool-workflow/docs/multi-agent-operator-ux.7.md", VERSION, checks);
|
|
100
|
+
checkIncludes("plugins/cool-workflow/docs/multi-agent-eval-replay-harness.7.md", VERSION, checks);
|
|
101
|
+
checkIncludes("plugins/cool-workflow/docs/state-explosion-management.7.md", "State Explosion Management", checks);
|
|
102
|
+
checkIncludes("plugins/cool-workflow/docs/state-explosion-management.7.md", VERSION, checks);
|
|
103
|
+
checkIncludes("plugins/cool-workflow/docs/evidence-adoption-reasoning-chain.7.md", "Evidence Adoption Reasoning Chain", checks);
|
|
104
|
+
checkIncludes("plugins/cool-workflow/docs/evidence-adoption-reasoning-chain.7.md", VERSION, checks);
|
|
105
|
+
checkIncludes("plugins/cool-workflow/docs/coordinator-blackboard.7.md", "Coordinator / Blackboard", checks);
|
|
106
|
+
checkIncludes("plugins/cool-workflow/docs/cli-mcp-parity.7.md", "CLI", checks);
|
|
107
|
+
checkIncludes("plugins/cool-workflow/docs/cli-mcp-parity.7.md", VERSION, checks);
|
|
108
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "cli-mcp-parity.7.md", checks);
|
|
109
|
+
checkIncludes("plugins/cool-workflow/docs/run-registry-control-plane.7.md", "Run Registry / Control Plane", checks);
|
|
110
|
+
checkIncludes("plugins/cool-workflow/docs/run-registry-control-plane.7.md", VERSION, checks);
|
|
111
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "run-registry-control-plane.7.md", checks);
|
|
112
|
+
checkIncludes("plugins/cool-workflow/test/run-registry-control-plane-smoke.js", "run-registry-control-plane-smoke", checks);
|
|
113
|
+
checkIncludes("plugins/cool-workflow/docs/execution-backends.7.md", "Execution Backends", checks);
|
|
114
|
+
checkIncludes("plugins/cool-workflow/docs/execution-backends.7.md", VERSION, checks);
|
|
115
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "execution-backends.7.md", checks);
|
|
116
|
+
checkIncludes("plugins/cool-workflow/test/execution-backends-smoke.js", "execution-backends-smoke", checks);
|
|
117
|
+
checkIncludes("plugins/cool-workflow/docs/web-desktop-workbench.7.md", "Web / Desktop Workbench", checks);
|
|
118
|
+
checkIncludes("plugins/cool-workflow/docs/web-desktop-workbench.7.md", VERSION, checks);
|
|
119
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "web-desktop-workbench.7.md", checks);
|
|
120
|
+
checkIncludes("plugins/cool-workflow/test/web-desktop-workbench-smoke.js", "web-desktop-workbench-smoke", checks);
|
|
121
|
+
checkIncludes("plugins/cool-workflow/docs/observability-cost-accounting.7.md", "Observability + Cost Accounting", checks);
|
|
122
|
+
checkIncludes("plugins/cool-workflow/docs/observability-cost-accounting.7.md", VERSION, checks);
|
|
123
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "observability-cost-accounting.7.md", checks);
|
|
124
|
+
checkIncludes("plugins/cool-workflow/test/observability-cost-accounting-smoke.js", "observability-cost-accounting-smoke", checks);
|
|
125
|
+
checkIncludes("plugins/cool-workflow/docs/team-collaboration.7.md", "Team Collaboration", checks);
|
|
126
|
+
checkIncludes("plugins/cool-workflow/docs/team-collaboration.7.md", VERSION, checks);
|
|
127
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "team-collaboration.7.md", checks);
|
|
128
|
+
checkIncludes("plugins/cool-workflow/test/team-collaboration-smoke.js", "team-collaboration-smoke", checks);
|
|
129
|
+
checkIncludes("plugins/cool-workflow/docs/release-tooling.7.md", "Release Tooling", checks);
|
|
130
|
+
checkIncludes("plugins/cool-workflow/docs/release-tooling.7.md", VERSION, checks);
|
|
131
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "release-tooling.7.md", checks);
|
|
132
|
+
checkIncludes("plugins/cool-workflow/test/release-tooling-smoke.js", "release-tooling-smoke", checks);
|
|
133
|
+
checkIncludes("plugins/cool-workflow/docs/real-execution-backends.7.md", "Real Execution Backend Integrations", checks);
|
|
134
|
+
checkIncludes("plugins/cool-workflow/docs/real-execution-backends.7.md", VERSION, checks);
|
|
135
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "real-execution-backends.7.md", checks);
|
|
136
|
+
checkIncludes("plugins/cool-workflow/test/real-execution-backends-smoke.js", "real-execution-backends-smoke", checks);
|
|
137
|
+
checkIncludes("plugins/cool-workflow/docs/node-snapshot-diff-replay.7.md", "Node Snapshot / Diff / Replay", checks);
|
|
138
|
+
checkIncludes("plugins/cool-workflow/docs/node-snapshot-diff-replay.7.md", VERSION, checks);
|
|
139
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "node-snapshot-diff-replay.7.md", checks);
|
|
140
|
+
checkIncludes("plugins/cool-workflow/test/node-snapshot-diff-replay-smoke.js", "node-snapshot-diff-replay-smoke", checks);
|
|
141
|
+
checkIncludes("plugins/cool-workflow/docs/contract-migration-tooling.7.md", "Contract Migration Tooling", checks);
|
|
142
|
+
checkIncludes("plugins/cool-workflow/docs/contract-migration-tooling.7.md", VERSION, checks);
|
|
143
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "contract-migration-tooling.7.md", checks);
|
|
144
|
+
checkIncludes("plugins/cool-workflow/test/contract-migration-tooling-smoke.js", "contract-migration-tooling-smoke", checks);
|
|
145
|
+
checkIncludes("plugins/cool-workflow/docs/control-plane-scheduling.7.md", "Control-Plane Scheduling", checks);
|
|
146
|
+
checkIncludes("plugins/cool-workflow/docs/control-plane-scheduling.7.md", VERSION, checks);
|
|
147
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "control-plane-scheduling.7.md", checks);
|
|
148
|
+
checkIncludes("plugins/cool-workflow/test/control-plane-scheduling-smoke.js", "control-plane-scheduling-smoke", checks);
|
|
149
|
+
checkIncludes("plugins/cool-workflow/docs/agent-delegation-drive.7.md", "Agent Delegation Drive", checks);
|
|
150
|
+
checkIncludes("plugins/cool-workflow/docs/agent-delegation-drive.7.md", VERSION, checks);
|
|
151
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "agent-delegation-drive.7.md", checks);
|
|
152
|
+
checkIncludes("plugins/cool-workflow/test/agent-delegation-drive-smoke.js", "agent-delegation-drive-smoke", checks);
|
|
153
|
+
checkIncludes("plugins/cool-workflow/docs/run-retention-reclamation.7.md", "Run Retention & Provable Reclamation", checks);
|
|
154
|
+
checkIncludes("plugins/cool-workflow/docs/run-retention-reclamation.7.md", VERSION, checks);
|
|
155
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "run-retention-reclamation.7.md", checks);
|
|
156
|
+
checkIncludes("plugins/cool-workflow/test/run-retention-reclamation-smoke.js", "run-retention-reclamation-smoke", checks);
|
|
157
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "gc.plan", checks);
|
|
158
|
+
checkIncludes("plugins/cool-workflow/docs/durable-state-and-locking.7.md", "Durable State & Locking", checks);
|
|
159
|
+
checkIncludes("plugins/cool-workflow/docs/durable-state-and-locking.7.md", VERSION, checks);
|
|
160
|
+
checkIncludes("plugins/cool-workflow/docs/index.md", "durable-state-and-locking.7.md", checks);
|
|
161
|
+
checkIncludes("plugins/cool-workflow/test/durable-atomic-write-smoke.js", "durable-atomic-write-smoke", checks);
|
|
162
|
+
checkIncludes("plugins/cool-workflow/src/state.ts", "withFileLock", checks);
|
|
163
|
+
checkIncludes("plugins/cool-workflow/src/drive.ts", "driveStep", checks);
|
|
164
|
+
checkIncludes("plugins/cool-workflow/dist/drive.js", "driveStep", checks);
|
|
165
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "run.drive", checks);
|
|
166
|
+
checkIncludes("plugins/cool-workflow/src/collaboration.ts", "deriveReviewState", checks);
|
|
167
|
+
checkIncludes("plugins/cool-workflow/dist/collaboration.js", "deriveReviewState", checks);
|
|
168
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "review.status", checks);
|
|
169
|
+
checkIncludes("plugins/cool-workflow/src/observability.ts", "deriveMetricsReport", checks);
|
|
170
|
+
checkIncludes("plugins/cool-workflow/dist/observability.js", "deriveMetricsReport", checks);
|
|
171
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "metrics.show", checks);
|
|
172
|
+
checkIncludes("plugins/cool-workflow/manifest/pricing.policy.json", "schemaVersion", checks);
|
|
173
|
+
checkIncludes("plugins/cool-workflow/src/workbench.ts", "buildWorkbenchRunView", checks);
|
|
174
|
+
checkIncludes("plugins/cool-workflow/dist/workbench.js", "buildWorkbenchRunView", checks);
|
|
175
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "workbench.view", checks);
|
|
176
|
+
checkIncludes("plugins/cool-workflow/src/execution-backend.ts", "ExecutionBackend", checks);
|
|
177
|
+
checkIncludes("plugins/cool-workflow/dist/execution-backend.js", "ExecutionBackend", checks);
|
|
178
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "backend.list", checks);
|
|
179
|
+
checkIncludes("plugins/cool-workflow/src/run-registry.ts", "RunRegistry", checks);
|
|
180
|
+
checkIncludes("plugins/cool-workflow/dist/run-registry.js", "RunRegistry", checks);
|
|
181
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "registry.refresh", checks);
|
|
182
|
+
checkIncludes("plugins/cool-workflow/package.json", "parity:check", checks);
|
|
183
|
+
checkIncludes("plugins/cool-workflow/scripts/parity-check.js", "buildParityReport", checks);
|
|
184
|
+
checkIncludes("plugins/cool-workflow/test/cli-mcp-parity-smoke.js", "cli-mcp-parity-smoke", checks);
|
|
185
|
+
checkIncludes("plugins/cool-workflow/src/capability-registry.ts", "CAPABILITY_REGISTRY", checks);
|
|
186
|
+
checkIncludes("plugins/cool-workflow/src/capability-core.ts", "planSummary", checks);
|
|
187
|
+
checkIncludes("plugins/cool-workflow/dist/capability-registry.js", "CAPABILITY_REGISTRY", checks);
|
|
188
|
+
checkIncludes("plugins/cool-workflow/docs/multi-agent-runtime-core.7.md", "Multi-Agent Runtime Core", checks);
|
|
189
|
+
checkIncludes("plugins/cool-workflow/docs/dogfood-one-real-repo.7.md", "Dogfood One Real Repo", checks);
|
|
190
|
+
checkIncludes("plugins/cool-workflow/docs/getting-started.md", "npm run release:check", checks);
|
|
191
|
+
checkIncludes("plugins/cool-workflow/package.json", "eval:replay", checks);
|
|
192
|
+
checkIncludes("plugins/cool-workflow/docs/release-and-migration.7.md", VERSION, checks);
|
|
193
|
+
checkIncludes("CHANGELOG.md", `## ${VERSION}`, checks);
|
|
194
|
+
checkIncludes("RELEASE.md", VERSION, checks);
|
|
195
|
+
checkIncludes("plugins/cool-workflow/skills/cool-workflow/SKILL.md", "release:check", checks);
|
|
196
|
+
|
|
197
|
+
process.stdout.write(
|
|
198
|
+
`${JSON.stringify({ ok: true, version: VERSION, source: insideGitWorkTree ? "git:HEAD" : "working-tree", checks }, null, 2)}\n`
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function checkJson(relativePath, key, expected, checks) {
|
|
203
|
+
const src = readReleaseSource(relativePath);
|
|
204
|
+
assert.ok(src.exists, `${relativePath} must exist`);
|
|
205
|
+
const value = JSON.parse(src.text)[key];
|
|
206
|
+
assert.equal(value, expected, `${relativePath}.${key} must be ${expected}`);
|
|
207
|
+
checks.push({ path: relativePath, key, value });
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function checkNestedJson(relativePath, keyPath, expected, checks) {
|
|
211
|
+
const src = readReleaseSource(relativePath);
|
|
212
|
+
assert.ok(src.exists, `${relativePath} must exist`);
|
|
213
|
+
let value = JSON.parse(src.text);
|
|
214
|
+
for (const key of keyPath) value = value?.[key];
|
|
215
|
+
assert.equal(value, expected, `${relativePath}.${keyPath.join(".")} must be ${expected}`);
|
|
216
|
+
checks.push({ path: relativePath, key: keyPath.join("."), value });
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function checkJsonIfPresent(relativePath, key, expected, checks) {
|
|
220
|
+
const src = readReleaseSource(relativePath);
|
|
221
|
+
if (!src.exists) {
|
|
222
|
+
checks.push({ path: relativePath, key, skipped: "absent" });
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const value = JSON.parse(src.text)[key];
|
|
226
|
+
assert.equal(value, expected, `${relativePath}.${key} must be ${expected}`);
|
|
227
|
+
checks.push({ path: relativePath, key, value });
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function checkIncludes(relativePath, needle, checks) {
|
|
231
|
+
const src = readReleaseSource(relativePath);
|
|
232
|
+
assert.ok(src.exists, `${relativePath} must exist`);
|
|
233
|
+
assert.ok(src.text.includes(needle), `${relativePath} must include ${needle}`);
|
|
234
|
+
checks.push({ path: relativePath, includes: needle });
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
main();
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cool-workflow
|
|
3
|
+
description: Use when the user asks for Cool Workflow, CW, agent workflow control-plane, TypeScript workflow orchestration, phased multi-agent work, background workflow tasks, or reusable workflow apps.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cool Workflow
|
|
7
|
+
|
|
8
|
+
Cool Workflow (CW) is an agent workflow control-plane. Use it to turn broad tasks into a
|
|
9
|
+
TypeScript/Node workflow run with phases, agent task manifests, durable run
|
|
10
|
+
state, verifier-gated commits, and a final report.
|
|
11
|
+
|
|
12
|
+
CW is a control plane: it makes an agent host's work durable, inspectable,
|
|
13
|
+
verifiable, and replayable. **It delegates execution; it never runs models
|
|
14
|
+
itself.** The host still executes agents and enforces OS/process/network/
|
|
15
|
+
environment controls — CW records, validates, and gates.
|
|
16
|
+
|
|
17
|
+
## When To Use
|
|
18
|
+
|
|
19
|
+
Use this skill when the user asks for:
|
|
20
|
+
|
|
21
|
+
- `Cool Workflow` or `CW`
|
|
22
|
+
- agent workflow control-plane
|
|
23
|
+
- TypeScript workflow runner/orchestration
|
|
24
|
+
- multi-agent phased work
|
|
25
|
+
- background task style planning
|
|
26
|
+
- reusable workflow apps/scripts
|
|
27
|
+
- architecture review workflows
|
|
28
|
+
- canonical workflow apps such as `architecture-review`, `pr-review-fix-ci`,
|
|
29
|
+
`release-cut`, and `research-synthesis`
|
|
30
|
+
|
|
31
|
+
## Core Model
|
|
32
|
+
|
|
33
|
+
CW has three layers:
|
|
34
|
+
|
|
35
|
+
- **Package**: installable shared runtime.
|
|
36
|
+
- **Skill**: trigger and operating instructions for the agent host (this file).
|
|
37
|
+
- **TypeScript Node/Bun runtime**: workflow definitions, state files, task
|
|
38
|
+
queue, deterministic harness, verifier, commits, and reports.
|
|
39
|
+
|
|
40
|
+
Treat CW like a platform framework. The runtime owns the contract; developers write
|
|
41
|
+
workflow apps against it using `defineWorkflowApp`, `workflow`, `phase`,
|
|
42
|
+
`agent`, `artifact`, and `input`. First-class apps live under
|
|
43
|
+
`apps/<app-id>/app.json` with a plain JavaScript entrypoint; legacy
|
|
44
|
+
`workflows/*.workflow.js` factories remain valid as wrapped compatibility apps.
|
|
45
|
+
|
|
46
|
+
The runner does **not** spawn workers. It writes pending agent tasks to
|
|
47
|
+
`.cw/runs/<run-id>/tasks/*.md`. The agent host reads those tasks, spawns workers
|
|
48
|
+
only when the user explicitly asks for agent/parallel/background work, then
|
|
49
|
+
records results back with the runner.
|
|
50
|
+
|
|
51
|
+
CW records the model loop explicitly as:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
interpret -> act -> observe -> adjust -> checkpoint
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use this loop to explain workflow progress when reporting status.
|
|
58
|
+
|
|
59
|
+
## Operating Loop
|
|
60
|
+
|
|
61
|
+
1. Pick or create a workflow.
|
|
62
|
+
2. `node scripts/cw.js plan <workflow-id> ...` from the plugin root (or the
|
|
63
|
+
absolute plugin script path).
|
|
64
|
+
3. `node scripts/cw.js dispatch <run-id> --limit N` to create a dispatch
|
|
65
|
+
manifest for the current phase. Add `--sandbox <profile-id>` when an explicit
|
|
66
|
+
worker policy profile is needed.
|
|
67
|
+
4. If — and only if — the user explicitly asked for agents, spawn one subagent
|
|
68
|
+
per dispatched task with disjoint scopes.
|
|
69
|
+
5. Save each subagent summary to `.cw/runs/<run-id>/results/<task-id>.md`.
|
|
70
|
+
6. `node scripts/cw.js result <run-id> <task-id> <result-file>`.
|
|
71
|
+
7. When all required work is complete, `node scripts/cw.js report <run-id>`.
|
|
72
|
+
8. Synthesize the final user-facing answer from the report and verified
|
|
73
|
+
evidence.
|
|
74
|
+
|
|
75
|
+
Run data is written to `.cw/runs/<run-id>/` under `--cwd`, or under `--repo`
|
|
76
|
+
when `--cwd` is not given. Durable state lives at
|
|
77
|
+
`.cw/runs/<run-id>/state.json`; `state check <run-id>` dry-runs migration and
|
|
78
|
+
normalization, failing closed on newer unsupported schemas while preserving
|
|
79
|
+
unknown user data. The runtime source is TypeScript under `src/`, compiled to
|
|
80
|
+
`dist/`.
|
|
81
|
+
|
|
82
|
+
## Capabilities
|
|
83
|
+
|
|
84
|
+
CW layers these on top of the plan → dispatch → record → verify → commit →
|
|
85
|
+
report chain. See `references/commands.md` for the exact invocations.
|
|
86
|
+
|
|
87
|
+
- **Workflow apps** — discover, validate, plan, package, and scaffold apps;
|
|
88
|
+
canonical apps are `architecture-review`, `pr-review-fix-ci`, `release-cut`,
|
|
89
|
+
`research-synthesis`.
|
|
90
|
+
- **Topologies** — `map-reduce`, `debate`, and `judge-panel` as deterministic
|
|
91
|
+
userland recipes, not hidden autonomous coordination.
|
|
92
|
+
- **Multi-agent host surface** — high-level `run -> status -> step ->
|
|
93
|
+
blackboard -> score -> select` plus operator views (dependencies, failures,
|
|
94
|
+
adopted evidence), wrapping the low-level runtime state and the coordination
|
|
95
|
+
filesystem.
|
|
96
|
+
- **Coordinator / blackboard** — durable shared substrate (topics, messages,
|
|
97
|
+
context frames, artifact refs, snapshots, coordinator decisions).
|
|
98
|
+
- **Trust / policy / audit** — inspect role authority, message provenance,
|
|
99
|
+
blackboard write decisions, and judge/panel rationale; missing
|
|
100
|
+
policy/evidence/provenance/rationale fail closed.
|
|
101
|
+
- **State explosion management** — derived, provenance-backed digests for runs
|
|
102
|
+
too large to read; summaries never delete raw records and fail closed when
|
|
103
|
+
stale.
|
|
104
|
+
- **Eval & replay** — deterministic snapshot/replay/compare/score/gate/report
|
|
105
|
+
for release-gate evidence under `.cw/evals/<suite-id>/`.
|
|
106
|
+
- **Sandbox profiles** — named CW policy contracts (read/write paths, command,
|
|
107
|
+
network, environment, host enforcement); CW validates, the host enforces.
|
|
108
|
+
- **Scheduling & routines** — loop/cron/reminder schedules and API/GitHub
|
|
109
|
+
trigger routines.
|
|
110
|
+
|
|
111
|
+
## Essential Commands
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
node scripts/cw.js list
|
|
115
|
+
node scripts/cw.js plan architecture-review --repo /path/to/repo --question "Is this architecture sound?"
|
|
116
|
+
node scripts/cw.js dispatch <run-id> --limit 6
|
|
117
|
+
node scripts/cw.js result <run-id> <task-id> /path/to/result.md
|
|
118
|
+
node scripts/cw.js report <run-id> --show
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
When working in this repository, the plugin root is `plugins/cool-workflow`.
|
|
122
|
+
When installed from a GitHub package source, the host resolves the package root
|
|
123
|
+
from the source snapshot.
|
|
124
|
+
|
|
125
|
+
**For the full command catalog and the matching MCP tool surface, read
|
|
126
|
+
`references/commands.md`.** It covers apps, topologies, the multi-agent host and
|
|
127
|
+
low-level state, eval/replay, blackboard/coordinator, sandbox profiles, commit/
|
|
128
|
+
state/summaries, scheduling/routines, and release scripts.
|
|
129
|
+
|
|
130
|
+
## CLI / MCP Parity
|
|
131
|
+
|
|
132
|
+
When an MCP host is available, the same runtime surface is exposed with
|
|
133
|
+
JSON-first `cw_*` tools (see `references/commands.md`). Operator output is
|
|
134
|
+
human-readable by default; pass `--json` / `--format json` for structured
|
|
135
|
+
output. **Preserve CLI/MCP parity when extending CW** — every CLI capability
|
|
136
|
+
must have a matching MCP tool and vice versa. Status recommendations are
|
|
137
|
+
deterministic hints, not hidden automation.
|
|
138
|
+
|
|
139
|
+
## Multi-Agent Rule
|
|
140
|
+
|
|
141
|
+
Only spawn workers when the user explicitly asks for agents, delegation,
|
|
142
|
+
parallel work, or background work. Otherwise run the phases locally in the main
|
|
143
|
+
thread and still use CW state/report files when helpful.
|
|
144
|
+
|
|
145
|
+
## Result Quality
|
|
146
|
+
|
|
147
|
+
Subagent results should be concise, evidence-based, and ready for synthesis.
|
|
148
|
+
Avoid raw logs unless they are the evidence. Use absolute file paths and line
|
|
149
|
+
numbers when referencing local code. Verification and verdict tasks must include
|
|
150
|
+
a `cw:result` JSON fence with `findings` and `evidence`; CW rejects P0/P1/P2
|
|
151
|
+
findings without evidence.
|
|
152
|
+
|
|
153
|
+
## Release Discipline
|
|
154
|
+
|
|
155
|
+
Run `npm run release:check` before tagging a release. It is a dry-run gate that
|
|
156
|
+
builds, type-checks, runs tests, validates canonical apps and the golden path,
|
|
157
|
+
checks old run fixtures, runs the multi-agent / topology / CLI-MCP / operator /
|
|
158
|
+
trust-audit / eval-replay / dogfood smoke coverage, and verifies version
|
|
159
|
+
synchronization — without tagging, pushing, publishing, or mutating fixtures.
|
|
160
|
+
Use `npm run dogfood:release` to exercise the canonical `release-cut` app
|
|
161
|
+
against this repo in dry-run mode. See `references/commands.md` for the full
|
|
162
|
+
release/maintenance script list.
|