devlyn-cli 4.2.10 → 4.2.12

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.
@@ -151,6 +151,7 @@
151
151
  "f12077a8c5f5b6f08c1e220b6f4a191eca8de0daf35fd8ce060ec7a45bb700ff",
152
152
  "f133dd1c3c40f6b4cf6879285cf282dcac436a99479717d8cb6968ad885ce0a2",
153
153
  "f1b0f66a2079af7423e0889435dc3bc1e5e14c20e7d29d4d55a56217cdb036ee",
154
+ "f1b9e7216e6ba6cd39999326239c7e4ba96d0339beb4b68579800f11b1b28954",
154
155
  "f22d5b4ebe5f973cbbd5a1fc747c068915e0b4a5b0326754f6a750065091853c",
155
156
  "f2bcfa0471aba81a10e3d0e6fd43bd6ec670601a4ba3a7d719e595edf9ab032a",
156
157
  "f958bfabd2e056fea911526fba2196d2ed5a48828f576e5ce1657100b466db20",
@@ -301,6 +302,7 @@
301
302
  "0098d266ee9d7c79c0c0a0c30474e9bf13fa0c76911668b79206985136c94f80",
302
303
  "0122885c08069474ca4a0a5825f885364a62938885f0e501c09242d176c34b08",
303
304
  "05e824f63a6381e02042afb1df0f1437584e25a80de8e9db0bd9456aaeb7aab8",
305
+ "0601ee535419b7039d5da34bd9c8e1c2b3631307214e4afaf394dd47494090c7",
304
306
  "0cef055580e00f9ed439eacb2dff9d238bb11619457472016095a8915162fa4b",
305
307
  "0dc69c20434966015176d83baa6f95b3421f9e13d0b1bd608a22f0560eae1049",
306
308
  "0fe9b270d670f70da9d2535969b6117684b7c1517806b3029ebaf9624da8006c",
@@ -311,6 +313,7 @@
311
313
  "33cf196ba7dd2d96df119707d874317e6005f1323fc2cae677c53e2f134f9ff4",
312
314
  "36b58dbdc26e51abc05a60872c4582faeebd67e9fe5626a3933467ba07c68dc4",
313
315
  "40237cd5259dbcf7c490f130e844a9e32eea48a8edabd50800edee5029bf95a4",
316
+ "49d6e024b343dd77e4c0cea0e513e40fe679a7a8192953190d042b3a21bbf69c",
314
317
  "5536f8391ec4442f1b793dba8dd5d7820d45f4b6dadf1111cbac9d54469a01ca",
315
318
  "573a6059a7383b37affd9c2e8bc6c88a4fb54117628a5a0746406cc32111e9aa",
316
319
  "5824f07e455fe1c3942bf595a12e935258d4c0a851ca1bf741db915603d1c4e0",
@@ -159,12 +159,6 @@ resume its delivery. Allocate a replacement from the current remote base,
159
159
  include only the still-needed task changes and correction, and verify and
160
160
  accept it anew. If the predecessor has merged, make a new follow-up instead.
161
161
 
162
- Queue drains follow ideate's loop protocol
163
- (`../devlyn-ideate/references/loop.md`): its evidence-derived `loop` result is
164
- bound with `accept` before the queue-only terminal commit is attached with
165
- `attach`, and dependent local tasks allocate from the accepted predecessor's
166
- source. Failed results keep custody and a recovery ref but are never published.
167
-
168
162
  ## Deliver and resume
169
163
 
170
164
  Wait for your children, stop your dev servers and task writers, then leave the
@@ -92,7 +92,7 @@ A removed flag stops with its instruction and selects no other behavior.
92
92
 
93
93
  ## add
94
94
 
95
- An absolute path to a package's `meta.md` is added as it is; anything else is planned first. Add with `python3 "$DEVLYN_SKILL_DIR/scripts/queue.py" add '<absolute meta.md>'`, the only writer of a loop's queue file `docs/specs/<loop-id>/queue.md`; never edit one by hand. In every delivery mode add makes no commit on the checked-out branch and leaves the branch, the index and tracked files as they are: it holds the package and its rows at `refs/devlyn/captures/<loop-id>`, records the add and removes the package copies equal to that capture. Report the capture ref and its `git show` command, any `cleanup` entry, and that a revision needs a new loop id. It refuses package changes staged in the index (unstage them and add again), and a retry of the same add reports it as added, also once the copies are gone. Tasks start from committed state, a local loop from the branch it was added on and `auto`/`pr` from the remote base, so commit, and for `auto`/`pr` push, whatever the plan depends on. A pending legacy raw-intent row of `docs/specs/queue.md` is replaced in place by a package whose `## Intent` reproduces the row verbatim, added with `--materialize <line>`.
95
+ An absolute path to a package's `meta.md` is added as it is; anything else is planned first. Add with `python3 "$DEVLYN_SKILL_DIR/scripts/queue.py" add '<absolute meta.md>'`, the only writer of a loop's queue file `docs/specs/<loop-id>/queue.md`; never edit one by hand. In every delivery mode add makes no commit on the checked-out branch and leaves the branch, the index and tracked files as they are: it holds the package and its rows at `refs/devlyn/captures/<loop-id>`, records the add and removes the package copies equal to that capture. Report the capture ref and its `git show` command, any `cleanup` entry, and that a revision needs a new loop id. A retry of the same add reports it as added, also once the copies are gone. Tasks start from committed state, a local loop from the branch it was added on and `auto`/`pr` from the remote base, so commit, and for `auto`/`pr` push, whatever the plan depends on. A pending legacy raw-intent row of `docs/specs/queue.md` is replaced in place by a package whose `## Intent` reproduces the row verbatim, added with `--materialize <line>`.
96
96
 
97
97
  ## status
98
98
 
@@ -1,6 +1,6 @@
1
1
  # Loop protocol
2
2
 
3
- `drain` runs the queue serially. Each eligible task gets an owned worktree, committed inputs, one executor exchange, evidence-derived acceptance, a queue-only terminal commit and delivery. The executor works under the installed methodology (the CLAUDE.md/AGENTS.md instruction block); the loop adds no phase graph, reviewer quota, engine router or restart cycle. Formats: [package-format.md](package-format.md). Allocation, custody, delivery and cleanup follow the completion contract in `$DEVLYN_SHARED_DIR/task-completion.md`.
3
+ `drain` runs the queue serially. Each eligible task gets an owned worktree, committed inputs, one executor exchange, evidence-derived acceptance, a queue-only terminal commit and delivery. The executor works under the installed methodology (the CLAUDE.md/AGENTS.md instruction block). Formats: [package-format.md](package-format.md).
4
4
 
5
5
  ## Commands
6
6
 
@@ -11,7 +11,7 @@ python3 "$DEVLYN_SKILL_DIR/scripts/queue.py" drain --repo . [--local-only] [--wo
11
11
 
12
12
  Both print one JSON object; exit 1 is `BLOCKED` with a `reason`.
13
13
 
14
- - `status` takes `queue.lock` in the repository's Git directory and finishes `add`'s cleanup (step 1); it reports reconciled counts (`pending`, `active`, `accepted`, `failed`, `blocked`, `legacy_pending`), the `next` task, `blockers`, deliveries still pending with their resume (drain again until the terminal commit is attached, then `task-complete.py complete --receipt <receipt>`), and under `cleanup` the package copies `add` kept or could not remove.
14
+ - `status` takes `queue.lock` in the repository's Git directory and finishes `add`'s cleanup (step 1); it reports reconciled counts (`pending`, `active`, `accepted`, `failed`, `blocked`, `legacy_pending`), the `next` task, `blockers`, deliveries still pending with their resume (drain again until the terminal commit is attached, then the printed completion command; add `--writers-stopped` only after stopping the task's writers), and under `cleanup` the package copies `add` kept or could not remove.
15
15
  - `drain` ends `DRAINED` (no runnable task remains; open deliveries show per task), `WAITING` (a task waits with its reason, or legacy rows need planning) or `BLOCKED` (unreadable or ambiguous authoritative queue, invalid invocation, preflight refusal or held drain lock). Progress lines `devlyn-loop: <task>: <event>` go to stderr.
16
16
  - `--local-only` (alias `--no-push`) keeps the loop local. A manifest `delivery: local-only` and any earlier local receipt of the loop keep that restriction for later drains. A local loop needs no remote; nothing is fetched or pushed. An `auto`/`pr` loop none of whose tasks has a pushed PR runs as a local loop from its capture and the branch it was added on. Once one has, that PR is never rewritten to local and the loop is never run locally: its tasks wait, naming the PR, while other work continues.
17
17
  - Worktrees default to `<repo parent>/<repo name>.devlyn/<loop-id>/<task-id>`.
@@ -32,7 +32,7 @@ The host supplies the executor and maps its configured engine to the argv; the l
32
32
  6. **Derive acceptance** with `acceptance.py accept`. It binds the committed contract to the packet digests; requires the candidate to be the owned branch head with HEAD checked out on that branch, to descend from the inputs, to leave the package (its queue file included) and `docs/specs/queue.md` untouched and to have a clean worktree; executes each declared command on that source, recording raw stdout/stderr and exit, timeout or spawn outcomes (a runner result is reused only when it is wholly clean — no reasons, so no failed check and no source change during its checks — for the same source and contract digests, with unchanged streams); evaluates the file and diff guards against the inputs; confirms the source is unchanged; checks review records; and writes `.devlyn/loop/acceptance.json`. Missing checks, missing review coverage and open binding findings cannot produce `[x]`, and acceptance weakening is not repair. This establishes command outcomes and evidence completeness, not a reviewer's semantic judgment; deliberate evidence forgery is outside the trust model.
33
33
  7. **Bind before terminal metadata.** `task-complete.py accept --receipt <receipt> --acceptance <worktree>/.devlyn/loop/acceptance.json` takes evidence custody and points the recovery ref at the source. Failed results are bound the same way; they never become a frontier or a publishable product.
34
34
  8. **Commit the terminal transition** under the queue lock: one commit whose sole parent is the bound source and whose only change is this task's row in `docs/specs/<loop-id>/queue.md` (`[x]`, or `[F] — <first reason> (receipt <id>)`), validated as the only legal transition. Then `task-complete.py attach --receipt <receipt> --commit <terminal> --file docs/specs/<loop-id>/queue.md` records it separately from the source and moves the recovery ref to it.
35
- 9. **Deliver** with `task-complete.py complete --receipt <receipt> --writers-stopped`, plus `--local-only` or, until the receipt records a mode, the manifest's `--mode auto|pr`, so a per-task `--mode` persists. Local-only keeps source, custody and the recovery ref with no remote effect. `auto`/`pr` publish the terminal commit under the completion contract; a pending or refused delivery keeps product acceptance, resources and a resume command. Where writer cessation cannot be observed, or a process still uses the tree, a merged delivery settles (`COMPLETE`) with its workspace, task ref and custody retained and reported under workspace cleanup; retained cleanup never blocks the queue. Failed products are never published. The receipt's `delivery` field checkpoints the latest outcome. A local chain is never turned into stacked PRs; publishing it requires integrated acceptance of the actual publication candidate.
35
+ 9. **Deliver** after waiting for the executor, with `task-complete.py complete --receipt <receipt> --writers-stopped`, plus `--local-only` or, until the receipt records a mode, the packet's `--mode auto|pr`, so a per-task `--mode` persists. Local-only keeps source, custody and the recovery ref with no remote effect. `auto`/`pr` publish the terminal commit under the completion contract; a pending or refused delivery keeps product acceptance, resources and a resume command. Where writer cessation cannot be observed, or a process still uses the tree, a merged delivery settles (`COMPLETE`) with its workspace, task ref and custody retained and reported under workspace cleanup; retained cleanup never blocks the queue. Failed products are never published. The receipt's `delivery` field checkpoints the latest outcome. A local chain is never turned into stacked PRs; publishing it requires integrated acceptance of the actual publication candidate.
36
36
  10. **Recover** from durable state only:
37
37
 
38
38
  | Interrupted | Resume |
@@ -82,16 +82,12 @@ Run `runner` (`acceptance.py run --packet <packet>`) on the committed candidate
82
82
  "source_sha": "<candidate commit on the owned branch>",
83
83
  "runner_results": ["<worktree>/.devlyn/loop/runs/<n>/result.json"],
84
84
  "reviews": ["<worktree>/.devlyn/reviews/<name>.json"],
85
- "findings": [{"id": "F1", "disposition": "resolved", "evidence": "<what changed>"}],
86
- "cleanup": "<residue removed, output retained>",
87
- "handoff": "<state a successor needs>",
88
85
  "assumptions": ["<each assumption, recorded once>"],
89
- "blockers": [],
90
- "summary": "<informational only>"
86
+ "blockers": []
91
87
  }
92
88
  ```
93
89
 
94
- `schema_version`, `task` and `source_sha` are required. A blocker `{"kind": "failed" | "needs-review" | "blocked-infrastructure", "detail": "<concrete question or cause>"}` records `[F]` with that reason and runs no checks; material ambiguity becomes `needs-review`, never a weakened acceptance. The summary is never evidence.
90
+ `schema_version`, `task` and `source_sha` are required. A blocker `{"kind": "failed" | "needs-review" | "blocked-infrastructure", "detail": "<concrete question or cause>"}` records `[F]` with that reason and runs no checks; material ambiguity becomes `needs-review`, never a weakened acceptance.
95
91
 
96
92
  ## Review records
97
93
 
@@ -31,6 +31,7 @@ SHA_RE = re.compile(r"[0-9a-f]{40}|[0-9a-f]{64}")
31
31
  BLOCKERS = ("failed", "needs-review", "blocked-infrastructure")
32
32
  REVIEW_KEYS = {"schema_version", "kind", "task", "engine", "model", "source_sha", "contract_sha256",
33
33
  "expected_sha256", "requirements", "findings"}
34
+ # findings, cleanup, handoff and summary are unread; allow them so earlier-template submissions validate.
34
35
  SUBMISSION_KEYS = {"schema_version", "task", "source_sha", "runner_results", "reviews", "findings", "cleanup",
35
36
  "handoff", "assumptions", "blockers", "summary"}
36
37
  PACKET_KEYS = {"task", "worktree", "branch", "inputs_sha", "allocation_base", "contract", "expected", "meta",
@@ -1238,11 +1238,21 @@ def summary(v, row):
1238
1238
  item["reason"] = reason
1239
1239
  if receipt:
1240
1240
  acceptance_record = receipt.get("acceptance") or {}
1241
- branch, worktree = None, None
1241
+ branch, worktree, resume = None, None, None
1242
1242
  try:
1243
1243
  worktree = receipt["worktree"] if receipt.get("worktree") and Path(receipt["worktree"]).exists() else None
1244
1244
  if receipt.get("branch") and ref_value(v["anchor"], "refs/heads/" + receipt["branch"]):
1245
1245
  branch = receipt["branch"]
1246
+ if receipt.get("acceptance") and receipt.get("delivery") not in SETTLED:
1247
+ if receipt.get("queue"):
1248
+ argv = [sys.executable, str(SKILLS / "_shared/task-complete.py"), "complete", "--receipt", str(state["path"])]
1249
+ if receipt.get("writers_released"):
1250
+ argv.append("--writers-stopped")
1251
+ if not receipt.get("local_only") and not receipt.get("mode_override"):
1252
+ argv += ["--mode", read_json(state["path"].parent / "packet.json")["delivery"]]
1253
+ resume = shlex.join(argv)
1254
+ else:
1255
+ resume = "drain again: the terminal commit is not attached yet"
1246
1256
  except (LoopError, OSError) as exc:
1247
1257
  diagnostic = (f"task summary unavailable: {row['identity']} worktree {receipt.get('worktree')}, "
1248
1258
  f"branch {receipt.get('branch')}: {exc}; repair access and drain again")
@@ -1250,9 +1260,7 @@ def summary(v, row):
1250
1260
  v["cleanup"].append(diagnostic)
1251
1261
  item.update(allocation_base=receipt.get("baseline"), **{"source" if state["kind"] == "accepted" else "candidate": receipt.get("source_sha")},
1252
1262
  terminal=(receipt.get("queue") or {}).get("commit"), delivery=receipt.get("delivery"), pr=receipt.get("pr_url"),
1253
- resume=None if not receipt.get("acceptance") or receipt.get("delivery") in SETTLED
1254
- else shlex.join([sys.executable, str(SKILLS / "_shared/task-complete.py"), "complete", "--receipt", str(state["path"])])
1255
- if receipt.get("queue") else "drain again: the terminal commit is not attached yet",
1263
+ resume=resume,
1256
1264
  assumptions=acceptance_record.get("assumptions", []),
1257
1265
  questions=[r.removeprefix("needs-review: ") for r in acceptance_record.get("reasons", []) if r.startswith("needs-review: ")],
1258
1266
  worktree=worktree,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlyn-cli",
3
- "version": "4.2.10",
3
+ "version": "4.2.12",
4
4
  "description": "Loop & harness engineering for AI coding agents (Claude Code, Codex, and any AGENTS.md-driven agent) — core engineering principles for CLAUDE.md/AGENTS.md and a loop designer that splits one intent into tasks agents drain hands-free",
5
5
  "homepage": "https://github.com/fysoul17/devlyn-cli#readme",
6
6
  "bin": {