muse-crew 0.17.2 → 0.17.3
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/API.md +11 -0
- package/docs/decisions/composition-machinery.md +180 -0
- package/docs/decisions/publish-path.md +6 -0
- package/docs/decisions/workflow-core.md +5 -4
- package/lib/AGENTS.md +2 -1
- package/lib/bugfix/phases/build.js +168 -0
- package/lib/bugfix/phases/capture.js +170 -0
- package/lib/bugfix/phases/integrate.js +165 -0
- package/lib/bugfix/phases/map.js +129 -0
- package/lib/bugfix/phases/publish.js +592 -0
- package/lib/bugfix/phases/qa.js +356 -0
- package/lib/bugfix/phases/reproduce.js +254 -0
- package/lib/bugfix/phases/review.js +292 -0
- package/lib/bugfix/phases/triage.js +69 -0
- package/lib/chore/CONTRACT.md +181 -0
- package/lib/chore/DISPOSITION.md +98 -0
- package/lib/chore/extract.js +204 -0
- package/lib/chore/phase-lib.js +885 -0
- package/lib/chore/phases/build.js +110 -0
- package/lib/chore/phases/capture.js +82 -0
- package/lib/chore/phases/integrate.js +109 -0
- package/lib/chore/phases/map.js +81 -0
- package/lib/chore/phases/publish.js +543 -0
- package/lib/chore/phases/review.js +255 -0
- package/lib/chore/phases/triage.js +57 -0
- package/lib/chore/prompts/evidence-gatherer.js +41 -0
- package/lib/chore/prompts/evidence-gatherer.schema.json +1 -0
- package/lib/chore/prompts/tool-check.js +15 -0
- package/lib/chore/prompts/trailers.js +56 -0
- package/lib/chore/prompts/verdict-reask.js +28 -0
- package/lib/chore/prompts/verdict-reask.schema.json +1 -0
- package/lib/chore/prompts/work-agent.js +52 -0
- package/lib/chore/prompts/work-agent.schema.json +1 -0
- package/lib/chore/spawn-keys.js +44 -0
- package/lib/chore/spawn-vocab.js +87 -0
- package/lib/chore-run.js +538 -0
- package/lib/chore-tick.js +289 -0
- package/lib/crew-api.js +273 -0
- package/lib/crew-dispatch-worker.js +27 -7
- package/lib/crew-release.sh +7 -2
- package/lib/extract.js +252 -0
- package/lib/prompts/tool-check.js +18 -0
- package/lib/prompts/trailers.js +59 -0
- package/lib/prompts/verdict-reask.js +31 -0
- package/lib/prompts/verdict-reask.schema.json +1 -0
- package/lib/prompts/work-agent.js +56 -0
- package/lib/prompts/work-agent.schema.json +1 -0
- package/lib/reap-spawns.js +407 -0
- package/lib/schema.sql +12 -1
- package/lib/spawn-keys.js +47 -0
- package/lib/spawn-step.js +572 -0
- package/lib/standard/phases/build.js +120 -0
- package/lib/standard/phases/capture.js +163 -0
- package/lib/standard/phases/integrate.js +172 -0
- package/lib/standard/phases/map.js +119 -0
- package/lib/standard/phases/publish.js +565 -0
- package/lib/standard/phases/qa.js +399 -0
- package/lib/standard/phases/review.js +281 -0
- package/lib/standard/phases/triage.js +64 -0
- package/lib/test-detached-integrate.sh +47 -0
- package/lib/workflow-driver.js +605 -0
- package/lib/workflow-lib.js +1012 -0
- package/lib/workflow-spec.js +187 -0
- package/lib/worktree-lifecycle.sh +55 -3
- package/package.json +1 -1
- package/seed/cron-body-template.md +61 -9
- package/workflows/bugfix.js +17 -17
- package/workflows/chore.js +16 -16
- package/workflows/docs.js +14 -11
- package/workflows/standard.js +16 -16
package/workflows/standard.js
CHANGED
|
@@ -308,13 +308,17 @@ var TOOL_CHECK_PREAMBLE =
|
|
|
308
308
|
"Then do the assignment below.\n\n";
|
|
309
309
|
function buildTransportRetryTrailer(stepName, repoPath, taskId, attempt, reason) {
|
|
310
310
|
// reason: "discarded" (the runtime threw the output away — the JSON-candidate
|
|
311
|
-
// scan found {...}-shaped fragments it could not parse), "
|
|
312
|
-
//
|
|
313
|
-
//
|
|
314
|
-
// reported
|
|
311
|
+
// scan found {...}-shaped fragments it could not parse), "errored" (the
|
|
312
|
+
// attempt errored — not a brace discard), "empty" (agent() returned
|
|
313
|
+
// without throwing but produced nothing usable), "no-tools" (the
|
|
314
|
+
// worker's TOOL CHECK reported artifact_tools: missing), or
|
|
315
|
+
// "no-transport" (the worker's TOOL CHECK reported shell_transport:
|
|
316
|
+
// unavailable).
|
|
315
317
|
// The trailer tells the retry what to expect, not just to try again.
|
|
316
318
|
var why = reason === "empty"
|
|
317
319
|
? "your previous attempt returned no usable output"
|
|
320
|
+
: reason === "errored"
|
|
321
|
+
? "your previous attempt errored before producing a usable report (not a brace discard — diagnose the error and report the true state in plain prose)"
|
|
318
322
|
: reason === "no-tools"
|
|
319
323
|
? "your previous attempt's TOOL CHECK reported artifact_tools: missing (this is a fresh launch, so run the TOOL CHECK's load step again before the work)"
|
|
320
324
|
: reason === "no-transport"
|
|
@@ -482,12 +486,11 @@ function describeWorkAgentFailure(stepName, identity, attempts) {
|
|
|
482
486
|
// Honest classification of a work-agent call that yielded no usable
|
|
483
487
|
// report, with the per-attempt evidence preserved in the session notes.
|
|
484
488
|
// Two distinct cases:
|
|
485
|
-
// - agent() THREW: the runtime discarded output it could not
|
|
486
|
-
// (
|
|
487
|
-
//
|
|
488
|
-
//
|
|
489
|
-
//
|
|
490
|
-
// and the claim is removed.)
|
|
489
|
+
// - agent() THREW: either the runtime discarded output it could not
|
|
490
|
+
// machine-read (prose tripping the JSON-candidate heuristic), or the
|
|
491
|
+
// agent errored before producing a report. The raw output is gone —
|
|
492
|
+
// the workflow never received it — so the surviving error text is
|
|
493
|
+
// recorded here instead.
|
|
491
494
|
// - agent() RETURNED EMPTY without throwing: the child produced nothing
|
|
492
495
|
// usable. Each attempt's outcome is the evidence.
|
|
493
496
|
// attempts: [{threw, error, outcome}, ...], in order.
|
|
@@ -1928,13 +1931,10 @@ while (i < STEPS.length) {
|
|
|
1928
1931
|
// state agent steps were deleted — their outputs fed only the
|
|
1929
1932
|
// retired content-verdict/receipt-attribution machinery, and the
|
|
1930
1933
|
// toolcheck ran in a workflow child that cannot reach artifact_edit.
|
|
1931
|
-
// Issuance belongs to the session-carrying tick worker, which
|
|
1932
|
-
// handles tool-unavailability as inconclusive per the tick protocol.)
|
|
1933
|
-
// Publish at intent. Everything above — preflight, provenance base,
|
|
1934
|
-
// checksummed diff, toolcheck, pre-trigger baselines — is read-only.
|
|
1935
1934
|
// Issuance belongs to the session-carrying tick worker
|
|
1936
1935
|
// (scan-publish-intent's intent bucket), the only caller class that
|
|
1937
|
-
// can reach artifact_edit
|
|
1936
|
+
// can reach artifact_edit; it handles tool-unavailability as
|
|
1937
|
+
// inconclusive per the tick protocol. This entry is issuer-written BY THE
|
|
1938
1938
|
// WORKFLOW and names the intent: outcome "publish-intent", never
|
|
1939
1939
|
// "submitted" — the workflow issued nothing. The worker claims it
|
|
1940
1940
|
// via the park note below.
|
|
@@ -2218,7 +2218,7 @@ while (i < STEPS.length) {
|
|
|
2218
2218
|
for (var workAttempt = 0; workAttempt <= 2 && !mechanicalReviewFail; workAttempt++) {
|
|
2219
2219
|
var workKey = workAttempt === 0 ? workKeyBase : workRetryKey(step.name, (totalReworkCount > 0 ? "-r" + totalReworkCount : ""), workAttempt);
|
|
2220
2220
|
var prevAttempt = workAttempt === 0 ? null : workAttempts[workAttempt - 1];
|
|
2221
|
-
var retryReason = workAttempt === 0 ? null : (prevAttempt.threw ? "discarded" : (prevAttempt.outcome === "missing-artifact-tools" ? "no-tools" : (prevAttempt.outcome === "unavailable-shell-transport" ? "no-transport" : "empty")));
|
|
2221
|
+
var retryReason = workAttempt === 0 ? null : (prevAttempt.threw ? (/output was not JSON/.test(prevAttempt.error || "") ? "discarded" : "errored") : (prevAttempt.outcome === "missing-artifact-tools" ? "no-tools" : (prevAttempt.outcome === "unavailable-shell-transport" ? "no-transport" : "empty")));
|
|
2222
2222
|
try {
|
|
2223
2223
|
workerResult = await agent(
|
|
2224
2224
|
workPromptBase + (workAttempt === 0 ? "" : buildTransportRetryTrailer(step.name, REPO_PATH, taskId, workAttempt, retryReason)),
|