cool-workflow 0.1.79 → 0.1.81

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 (131) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/README.md +51 -3
  4. package/apps/architecture-review/app.json +1 -1
  5. package/apps/architecture-review-fast/app.json +64 -0
  6. package/apps/architecture-review-fast/workflow.js +153 -0
  7. package/apps/end-to-end-golden-path/app.json +1 -1
  8. package/apps/pr-review-fix-ci/app.json +1 -1
  9. package/apps/release-cut/app.json +1 -1
  10. package/apps/research-synthesis/app.json +1 -1
  11. package/dist/agent-config.js +21 -7
  12. package/dist/candidate-scoring.js +42 -22
  13. package/dist/capability-core.js +132 -17
  14. package/dist/capability-registry.js +138 -168
  15. package/dist/cli.js +97 -98
  16. package/dist/collaboration.js +5 -6
  17. package/dist/commit.js +20 -6
  18. package/dist/compare.js +18 -0
  19. package/dist/coordinator/classify.js +45 -0
  20. package/dist/coordinator/paths.js +42 -0
  21. package/dist/coordinator/util.js +129 -0
  22. package/dist/coordinator.js +127 -300
  23. package/dist/dispatch.js +35 -0
  24. package/dist/drive.js +79 -6
  25. package/dist/error-feedback.js +8 -4
  26. package/dist/evidence-reasoning.js +3 -3
  27. package/dist/execution-backend/agent.js +331 -0
  28. package/dist/execution-backend/probes.js +96 -0
  29. package/dist/execution-backend/util.js +47 -0
  30. package/dist/execution-backend.js +73 -421
  31. package/dist/mcp-server.js +79 -183
  32. package/dist/multi-agent/graph.js +84 -0
  33. package/dist/multi-agent/helpers.js +145 -0
  34. package/dist/multi-agent/paths.js +22 -0
  35. package/dist/multi-agent-eval/format.js +194 -0
  36. package/dist/multi-agent-eval/normalize.js +51 -0
  37. package/dist/multi-agent-eval.js +39 -244
  38. package/dist/multi-agent-host.js +0 -19
  39. package/dist/multi-agent.js +125 -314
  40. package/dist/node-snapshot.js +3 -3
  41. package/dist/observability/format.js +61 -0
  42. package/dist/observability/intake.js +98 -0
  43. package/dist/observability.js +14 -160
  44. package/dist/operator-ux/format.js +364 -0
  45. package/dist/operator-ux.js +22 -363
  46. package/dist/orchestrator/lifecycle-operations.js +2 -1
  47. package/dist/orchestrator/report.js +8 -0
  48. package/dist/orchestrator.js +26 -9
  49. package/dist/reclamation.js +26 -21
  50. package/dist/run-export.js +494 -25
  51. package/dist/run-registry/derive.js +172 -0
  52. package/dist/run-registry/format.js +124 -0
  53. package/dist/run-registry/gc.js +251 -0
  54. package/dist/run-registry/policy.js +16 -0
  55. package/dist/run-registry/queue.js +116 -0
  56. package/dist/run-registry.js +89 -597
  57. package/dist/run-state-schema.js +1 -0
  58. package/dist/sandbox-profile.js +43 -2
  59. package/dist/state-explosion/format.js +159 -0
  60. package/dist/state-explosion/helpers.js +82 -0
  61. package/dist/state-explosion.js +165 -304
  62. package/dist/state-node.js +19 -4
  63. package/dist/telemetry-attestation.js +55 -0
  64. package/dist/telemetry-demo.js +15 -3
  65. package/dist/telemetry-ledger.js +60 -15
  66. package/dist/topology.js +25 -8
  67. package/dist/triggers.js +33 -14
  68. package/dist/trust-audit.js +145 -33
  69. package/dist/version.js +1 -1
  70. package/dist/worker-isolation/helpers.js +51 -0
  71. package/dist/worker-isolation/paths.js +46 -0
  72. package/dist/worker-isolation.js +39 -115
  73. package/docs/agent-delegation-drive.7.md +71 -0
  74. package/docs/canonical-workflow-apps.7.md +37 -0
  75. package/docs/cli-mcp-parity.7.md +16 -0
  76. package/docs/contract-migration-tooling.7.md +6 -0
  77. package/docs/control-plane-scheduling.7.md +6 -0
  78. package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +40 -0
  79. package/docs/durable-state-and-locking.7.md +8 -0
  80. package/docs/evidence-adoption-reasoning-chain.7.md +6 -0
  81. package/docs/execution-backends.7.md +6 -0
  82. package/docs/index.md +2 -0
  83. package/docs/launch/demo.tape +28 -0
  84. package/docs/launch/launch-kit.md +96 -17
  85. package/docs/launch/pre-launch-checklist.md +53 -0
  86. package/docs/multi-agent-cli-mcp-surface.7.md +8 -0
  87. package/docs/multi-agent-eval-replay-harness.7.md +6 -0
  88. package/docs/multi-agent-operator-ux.7.md +6 -0
  89. package/docs/multi-agent-trust-policy-audit.7.md +27 -0
  90. package/docs/node-snapshot-diff-replay.7.md +6 -0
  91. package/docs/observability-cost-accounting.7.md +6 -0
  92. package/docs/project-index.md +27 -6
  93. package/docs/real-execution-backends.7.md +6 -0
  94. package/docs/release-and-migration.7.md +8 -0
  95. package/docs/release-tooling.7.md +6 -0
  96. package/docs/routines.md +23 -0
  97. package/docs/run-registry-control-plane.7.md +89 -2
  98. package/docs/run-retention-reclamation.7.md +8 -0
  99. package/docs/source-context-profiles.7.md +119 -0
  100. package/docs/state-explosion-management.7.md +13 -0
  101. package/docs/team-collaboration.7.md +6 -0
  102. package/docs/trust-model.md +267 -0
  103. package/docs/unix-principles.md +49 -1
  104. package/docs/vendor-manifest-loadability.7.md +43 -0
  105. package/docs/web-desktop-workbench.7.md +6 -0
  106. package/manifest/plugin.manifest.json +1 -1
  107. package/manifest/source-context-profiles.json +142 -0
  108. package/package.json +4 -1
  109. package/scripts/agents/builtin-templates.json +7 -0
  110. package/scripts/agents/claude-p-agent.js +129 -43
  111. package/scripts/architecture-review-fast.js +362 -0
  112. package/scripts/bump-version.js +5 -10
  113. package/scripts/canonical-apps-list.js +64 -0
  114. package/scripts/canonical-apps.js +36 -4
  115. package/scripts/coverage-gate.js +211 -0
  116. package/scripts/dogfood-release.js +1 -1
  117. package/scripts/golden-path.js +4 -4
  118. package/scripts/parity-check.js +5 -0
  119. package/scripts/release-check.js +5 -1
  120. package/scripts/source-context.js +291 -0
  121. package/scripts/version-sync-check.js +5 -7
  122. package/skills/ci-triage/SKILL.md +50 -0
  123. package/skills/ci-triage/agents/openai.yaml +4 -0
  124. package/skills/cool-workflow/SKILL.md +4 -1
  125. package/skills/deploy-check/SKILL.md +55 -0
  126. package/skills/deploy-check/agents/openai.yaml +4 -0
  127. package/skills/design-qa/SKILL.md +49 -0
  128. package/skills/design-qa/agents/openai.yaml +4 -0
  129. package/skills/pr-review/SKILL.md +45 -0
  130. package/skills/pr-review/agents/openai.yaml +4 -0
  131. package/dist/capability-dispatcher.js +0 -86
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: deploy-check
3
+ description: >-
4
+ Verify Cool Workflow release, publish, deploy, or package readiness. Use when
5
+ Codex must check build/test gates, generated manifests, project index sync,
6
+ dist/source contract, changelog/release notes, npm package contents, or
7
+ pre-tag risk before shipping.
8
+ ---
9
+
10
+ # Deploy Check
11
+
12
+ ## Overview
13
+
14
+ Deploy check is the verifier side of release work. It confirms the artifact a
15
+ user receives matches the source, docs, manifests, and stated capability.
16
+
17
+ ## Workflow
18
+
19
+ 1. Confirm the intended capability and release scope.
20
+ 2. Inspect branch status and generated artifact drift.
21
+ 3. Run the deterministic gates.
22
+ 4. Check docs/man-page coverage for shipped behavior.
23
+ 5. Check package contents and `dist/` policy.
24
+ 6. Report risk before any tag or publish step.
25
+
26
+ ## Commands
27
+
28
+ ```bash
29
+ npm run build
30
+ npm test
31
+ npm run gen:manifests -- --check
32
+ npm run index:check
33
+ npm run version:sync
34
+ npm run release:check
35
+ git diff --check
36
+ ```
37
+
38
+ For package inspection:
39
+
40
+ ```bash
41
+ npm pack --dry-run
42
+ ```
43
+
44
+ ## Red Lines
45
+
46
+ - Do not tag without test evidence.
47
+ - Do not write reviewer verdict files by hand.
48
+ - Do not silently skip `dist/` drift if the package still ships `dist/`.
49
+ - Do not publish undocumented behavior.
50
+ - Do not call a release ready if generated manifests or project index drift.
51
+
52
+ ## Output Rules
53
+
54
+ Return a ship/no-ship verdict, gate results, artifact risks, and the next
55
+ operator action.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Deploy Check"
3
+ short_description: "Verify release and deploy readiness."
4
+ default_prompt: "Use $deploy-check to verify deploy readiness."
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: design-qa
3
+ description: >-
4
+ Evaluate Cool Workflow architecture, product design, operator UX,
5
+ context-pack, workflow-app, MCP/CLI, or release-process proposals. Use when
6
+ Codex must decide whether a design respects FreeBSD/POLA,
7
+ mechanism-not-policy, stable JSON surfaces, evidence, and verifier boundaries
8
+ before implementation.
9
+ ---
10
+
11
+ # Design QA
12
+
13
+ ## Overview
14
+
15
+ Design QA checks whether a proposed capability belongs in the kernel,
16
+ userland, a manifest, a wrapper, a routine, or an eval before implementation.
17
+
18
+ ## Workflow
19
+
20
+ 1. State the user capability in one sentence.
21
+ 2. Identify the contract surface: CLI, MCP, `.cw/` state, file layout, docs,
22
+ package contents, or external wrapper.
23
+ 3. Separate mechanism from policy. Move policy into data, apps, wrappers, env,
24
+ or docs.
25
+ 4. Check POLA: existing outputs, flags, exit codes, and file layouts stay
26
+ byte-identical unless a new opt-in surface is used.
27
+ 5. Define verifier evidence: tests, manifests, screenshots for UI, replay, or
28
+ logs.
29
+ 6. Decide whether the work needs a new eval case or skill update.
30
+
31
+ ## Checks
32
+
33
+ - Does it preserve stdout-as-data?
34
+ - Does it fail closed instead of guessing?
35
+ - Does it avoid vendor-specific parsing in `src/`?
36
+ - Does it keep generated files verifiable?
37
+ - Does it have a man page or docs contract?
38
+ - Can maker and verifier run in separate worktrees?
39
+
40
+ ## Output Rules
41
+
42
+ Return:
43
+
44
+ 1. Verdict: acceptable, revise, or reject.
45
+ 2. Required contract shape.
46
+ 3. Verification plan.
47
+ 4. Risks and non-goals.
48
+
49
+ Do not turn design QA into implementation unless the user asks to proceed.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Design QA"
3
+ short_description: "Check architecture and UX design quality."
4
+ default_prompt: "Use $design-qa to evaluate this design."
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: pr-review
3
+ description: >-
4
+ Review Cool Workflow pull requests or branch diffs. Use when Codex must
5
+ inspect code changes for bugs, regressions, FreeBSD/POLA violations, missing
6
+ tests, generated artifact drift, release-contract risk, or CI implications,
7
+ and return findings first with file/line citations.
8
+ ---
9
+
10
+ # PR Review
11
+
12
+ ## Overview
13
+
14
+ Review for correctness and release risk before style. Findings lead; summaries
15
+ are secondary. Treat missing tests and POLA drift as real risks.
16
+
17
+ ## Workflow
18
+
19
+ 1. Read the diff and identify touched contracts: CLI, MCP, `.cw/` state, docs,
20
+ dist, manifests, tests, release flow, or public package files.
21
+ 2. Inspect the surrounding code for behavioral expectations.
22
+ 3. Check whether tests exercise the changed behavior and fail closed.
23
+ 4. Look for stdout chatter, silent fallback, hidden policy in core, untracked
24
+ generated drift, and accidental public-output changes.
25
+ 5. Report findings first, ordered by severity, with file and line references.
26
+ 6. Include open questions only when they block confidence.
27
+
28
+ ## Review Rules
29
+
30
+ - Do not request cosmetic rewrites unless they hide a bug.
31
+ - Do not approve undocumented shipped behavior.
32
+ - Do not accept type-only additions without runtime behavior.
33
+ - Do not accept `dist/` edits without matching `src/` changes.
34
+ - For UI work, require screenshots or browser verification.
35
+
36
+ ## Output Shape
37
+
38
+ Use this order:
39
+
40
+ 1. Findings
41
+ 2. Open questions
42
+ 3. Test gaps
43
+ 4. Short summary
44
+
45
+ If there are no findings, say so clearly and name residual risk.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "PR Review"
3
+ short_description: "Review pull requests with cited findings."
4
+ default_prompt: "Use $pr-review to review this pull request."
@@ -1,86 +0,0 @@
1
- "use strict";
2
- // Capability Dispatcher — the thin MECHANISM pipe that routes a capability id
3
- // to its registered handler function. It knows nothing about which capabilities
4
- // exist (that's POLICY, declared elsewhere via registerCapabilityHandler).
5
- //
6
- // BSD discipline:
7
- // - ONE THING: map (capability id, args, ctx) -> handler output.
8
- // - SEPARATE MECHANISM FROM POLICY. The Map is mechanism; which entries are
9
- // registered is policy (callers registerCapabilityHandler at import time).
10
- // - FAIL CLOSED. Unknown capability id -> CapabilityError with a named refusal.
11
- // - COMPOSABLE. The dispatcher is a pure router; CLI and MCP surfaces compose
12
- // their own formatting/protocol wrapping around it. No surface knows how to
13
- // format — the handler returns raw data, the surface renders it.
14
- // - NO HIDDEN STATE. The registry is a plain Map; no lazy loading, no magic.
15
- //
16
- // From v0.1.53: this replaces the "manual switch in cli.ts + mcp-server.ts"
17
- // anti-pattern for NEW capabilities. Existing hardcoded capabilities remain in
18
- // the switch until they are progressively migrated; the fallback path in both
19
- // surfaces first checks the switch, then falls through to this dispatcher.
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.registerCapabilityHandler = registerCapabilityHandler;
22
- exports.getCapabilityHandler = getCapabilityHandler;
23
- exports.dispatchCapability = dispatchCapability;
24
- exports.resolveCliPath = resolveCliPath;
25
- exports.resolveMcpTool = resolveMcpTool;
26
- exports.listCapabilityIds = listCapabilityIds;
27
- class CapabilityError extends Error {
28
- code;
29
- capabilityId;
30
- constructor(capabilityId, reason, code) {
31
- super(`Capability "${capabilityId}": ${reason}`);
32
- this.name = "CapabilityError";
33
- this.code = code;
34
- this.capabilityId = capabilityId;
35
- }
36
- }
37
- const _handlerRegistry = new Map();
38
- /** Register a capability handler. Later registrations with the same capability
39
- * id overwrite earlier ones (last-write-wins dedup). */
40
- function registerCapabilityHandler(handler) {
41
- _handlerRegistry.set(handler.descriptor.capability, handler);
42
- }
43
- /** Look up a handler by capability id. Returns undefined when not found. */
44
- function getCapabilityHandler(capabilityId) {
45
- return _handlerRegistry.get(capabilityId);
46
- }
47
- /** Dispatch a capability by id. Resolves the handler, invokes `run()`.
48
- * Fail-closed: throws CapabilityError when no handler is registered. */
49
- function dispatchCapability(capabilityId, args, ctx) {
50
- const handler = _handlerRegistry.get(capabilityId);
51
- if (!handler)
52
- throw new CapabilityError(capabilityId, "no handler registered", "not-found");
53
- return handler.run(args, ctx);
54
- }
55
- /** Resolve a CLI path (e.g. ["gc", "plan"]) to a capability id by matching
56
- * registered handlers' `cli.path` bindings. Returns undefined when no match. */
57
- function resolveCliPath(cliPath) {
58
- if (!cliPath.length)
59
- return undefined;
60
- for (const handler of _handlerRegistry.values()) {
61
- if (!handler.descriptor.cli)
62
- continue;
63
- const expected = handler.descriptor.cli.caseTokens || handler.descriptor.cli.path;
64
- if (pathsMatch(expected, cliPath))
65
- return handler.descriptor.capability;
66
- }
67
- return undefined;
68
- }
69
- /** Resolve an MCP tool name to a capability id by matching registered handlers'
70
- * `mcp.tool` bindings. Returns undefined when no match. */
71
- function resolveMcpTool(toolName) {
72
- for (const handler of _handlerRegistry.values()) {
73
- if (handler.descriptor.mcp?.tool === toolName)
74
- return handler.descriptor.capability;
75
- }
76
- return undefined;
77
- }
78
- /** List all registered capability ids. */
79
- function listCapabilityIds() {
80
- return [..._handlerRegistry.keys()].sort();
81
- }
82
- function pathsMatch(expected, actual) {
83
- if (expected.length !== actual.length)
84
- return false;
85
- return expected.every((token, i) => actual[i] === token);
86
- }