devlyn-cli 3.0.1 → 3.1.0
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/AGENTS.md +1 -1
- package/CLAUDE.md +3 -3
- package/README.md +14 -2
- package/config/skills/_shared/task-complete.py +1169 -0
- package/config/skills/devlyn:queue/SKILL.md +3 -3
- package/config/skills/devlyn:resolve/SKILL.md +4 -0
- package/config/skills/devlyn:resolve/references/outer-loop.md +10 -2
- package/config/skills/devlyn:resolve/references/task-completion.md +117 -0
- package/package.json +1 -1
- package/scripts/lint-skills.sh +4 -1
|
@@ -31,11 +31,11 @@ Read `docs/specs/queue.md` (absent → report "queue empty — nothing staged" a
|
|
|
31
31
|
|
|
32
32
|
- `add <intent text>` — append `- [ ] <intent>` to `docs/specs/queue.md` (create the file with its header if missing). If the intent came out of a conversation that already produced a spec, link it: `- [ ] (spec: docs/specs/<id>/spec.md) <intent>`.
|
|
33
33
|
- `drain` — serial drain per the project-instructions contract. For each pending item, in order:
|
|
34
|
-
1.
|
|
34
|
+
1. Allocate the owner's absent task branch per `../devlyn:resolve/references/task-completion.md` (linked worktree optional), then spec it if unspecced (the queue entry is the user's go-ahead). Unattended assumptions may only take scope-narrowing, reversible, non-user-visible defaults; material ambiguity (user-visible behavior, data/state semantics, new files/scripts/flags, implementation surface) → mark `[F] needs-review: <question>`, commit that queue transition, and continue.
|
|
35
35
|
2. Commit the current queue-item delta and linked spec bundle as the scoped owner baseline, then run `/devlyn:resolve --spec <path>` hands-free.
|
|
36
36
|
After every resolve invocation, run `python3 "$DEVLYN_SHARED_DIR/terminal-claim-check.py" .`; exit 79 marks `[F] FAILED-INCOMPLETE` from the predicate, never from the session self-report.
|
|
37
37
|
3. Outer loop on the terminal verdict: PASS → mark `[x]`. Findings-backed verdicts (NEEDS_WORK, verify/build-gate exhaustion) → amend the spec, commit that scoped amendment, then re-run — at most 3 outer iterations. Infrastructure / invalid-input / engine-availability / implement-empty BLOCKED verdicts are not spec-amendable → mark `[F] <verdict>` immediately.
|
|
38
|
-
4. Commit each terminal `[x]` / `[F]` queue transition before advancing. A blocked item never halts the queue.
|
|
39
|
-
5. When the queue is drained (or the session must stop), emit the drain report: per-item verdict, every logged assumption, and the commit range produced.
|
|
38
|
+
4. Commit each terminal `[x]` / `[F]` queue transition before advancing. For successfully archived normal runs, invoke owner completion once after that declared queue-file-only commit; bind it separately from the verified source. Honor local-only/no-push. Failed products never publish. Retain PR/pending workspaces and use a separate owned branch from base for the next item; unavailable safe placement stops the drain with remaining items pending. A product-blocked item otherwise never halts the queue.
|
|
39
|
+
5. When the queue is drained (or the session must stop), emit the drain report: per-item product verdict and separate delivery status/URL/resume, every logged assumption, and the commit range produced.
|
|
40
40
|
|
|
41
41
|
Strictly SERIAL — one `/devlyn:resolve` run at a time, never parallel. Never invent queue items, never reorder them, and never delete an item — only mark `[x]` / `[F]`.
|
|
@@ -77,6 +77,8 @@ For every direct complete→spawn handoff, call `state-phase-write.py ... --phas
|
|
|
77
77
|
|
|
78
78
|
## PHASE 0: PARSE + CLASSIFY + ROUTE
|
|
79
79
|
|
|
80
|
+
Outer-owner boundary: before normal task writes, follow `references/task-completion.md` for prospective task-branch ownership (linked worktree optional) and `references/outer-loop.md` for owner-input commits. Existing branches cannot be retroactively adopted. Verify-only does not allocate or publish; phase workers never own delivery.
|
|
81
|
+
|
|
80
82
|
1. Run the bootstrap once with the exact tokenized `<pipeline_config>` and this orchestrator's default engine from `<engine_routing>`:
|
|
81
83
|
|
|
82
84
|
```bash
|
|
@@ -379,6 +381,8 @@ Open the `final_report` span through the predecessor's `state-phase-write.py --d
|
|
|
379
381
|
|
|
380
382
|
6. **Archive** — invoke the deterministic script: `python3 "$DEVLYN_SHARED_DIR/archive_run.py"`. The script reads `run_id` from `.devlyn/pipeline.state.json`, moves the static per-run artifact set (`PER_RUN_PATTERNS` remains the single ownership list) plus every state-bound process-evidence manifest/raw stream into `.devlyn/runs/<run_id>/`, preserves evidence-relative layout, and rehashes bound bytes before any move. An unsafe/missing/altered evidence path or destination collision reports archive failure without changing the already-derived product verdict. It then best-effort prunes to the last 10 completed runs. Archive must run; running this step as deterministic-script-not-prose ensures the move actually happens (iter-0033a Smoke 3 caught a case where the agent claimed archive ran without moving the files).
|
|
381
383
|
|
|
384
|
+
After successful normal-run archive, return to the outer owner for `references/task-completion.md`. A queue owner first commits its terminal queue transition, then completes once. Honor local-only/no-push; report delivery pending/failure separately from the archived product verdict. This is outside the phase graph.
|
|
385
|
+
|
|
382
386
|
## State management
|
|
383
387
|
|
|
384
388
|
`.devlyn/pipeline.state.json` is the single authoritative verdict source. Branch on `state.phases.<name>.verdict` directly; never parse `.devlyn/*.findings.jsonl` for routing decisions. Schema and write protocol: `references/state-schema.md`. Every "State write: `phases.X.{...}`" note above describes the resulting shape only — the orchestrator writes it via initial `spawn`, atomic `transition` for direct handoffs, or terminal `complete`; re-entry preserves the prior lifecycle in `history[]` (`references/state-schema.md#write-protocol`). Phase workers never edit `pipeline.state.json` directly.
|
|
@@ -3,13 +3,21 @@
|
|
|
3
3
|
A full `/devlyn:resolve` run starts only from committed owner inputs. Keep each
|
|
4
4
|
commit scoped: no unrelated paths or queue-item changes.
|
|
5
5
|
|
|
6
|
-
1. Before
|
|
6
|
+
1. Before task writes, the outer owner allocates an absent task branch per
|
|
7
|
+
[task completion](task-completion.md); linked worktree allocation is optional.
|
|
8
|
+
Never adopt a pre-existing task branch. Before an item's first full run, commit the current queue-item delta, when
|
|
7
9
|
applicable, together with its linked spec bundle. For conversational work,
|
|
8
10
|
commit the agreed spec bundle before the full run.
|
|
9
11
|
2. When findings require an accepted verification amendment, commit only that
|
|
10
12
|
linked spec-bundle amendment before rerunning the item.
|
|
11
13
|
3. After a terminal result, commit the current item's `[x]` or `[F]` queue
|
|
12
14
|
transition before starting the next pending item.
|
|
15
|
+
4. After mandatory successful normal-run archive and any terminal queue commit,
|
|
16
|
+
the outer owner completes delivery once per [task completion](task-completion.md).
|
|
17
|
+
Bind the verified source and declared queue-only commit separately. Failed or
|
|
18
|
+
verify-only runs do not publish; local-only/no-push wins. Pending delivery
|
|
19
|
+
retains its workspace and never changes the product verdict.
|
|
13
20
|
|
|
14
21
|
Drain strictly serially. Bootstrap and resolve never make these owner commits;
|
|
15
|
-
the outer-loop driver owns them.
|
|
22
|
+
the outer-loop driver owns them. Return queue custody before completion; never
|
|
23
|
+
advance onto a retained pending task branch.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Outer-owner task completion
|
|
2
|
+
|
|
3
|
+
Completion belongs to the outer task owner after source acceptance. It does not
|
|
4
|
+
add a phase or change product verdicts, finish-gate/archive authority or worker
|
|
5
|
+
isolation. Explicit local-only/no-push instructions win. Otherwise delivery is
|
|
6
|
+
authorized by the task scope; no additional approval ceremony is required.
|
|
7
|
+
|
|
8
|
+
## Allocate before work
|
|
9
|
+
|
|
10
|
+
Use the installed `_shared/task-complete.py` from the retained base checkout,
|
|
11
|
+
before committing owner inputs or starting direct/full work:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
python3 "$DEVLYN_SHARED_DIR/task-complete.py" allocate --repo . \
|
|
15
|
+
--task '<task identity>' --branch '<absent task branch>' \
|
|
16
|
+
--repository '<owner/repo>' --remote origin --base main
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This creates and switches to a native task branch. Add `--worktree <absent path>`
|
|
20
|
+
only when the owner explicitly chooses a linked checkout; allocation is optional
|
|
21
|
+
for worktrees. Save the returned receipt path, outside the task checkout under
|
|
22
|
+
the common Gitdir. Existing branches/trees cannot be adopted, even when their
|
|
23
|
+
names look generated. An interrupted allocation stays blocked for inspection;
|
|
24
|
+
do not delete its receipt and enroll the resulting branch. Pre-existing tasks
|
|
25
|
+
remain owner-managed and cannot use this helper retroactively.
|
|
26
|
+
|
|
27
|
+
## Accept a scoped commit
|
|
28
|
+
|
|
29
|
+
Direct work: finish actual decisive checks and diff review, stage only the
|
|
30
|
+
accepted paths and commit them. The helper never stages product files. Write a
|
|
31
|
+
root acceptance file in the checkout (usually ignored `.devlyn/acceptance.json`):
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{"kind":"direct","task":"<task identity>","source_sha":"<full commit>","checks":[{"command":"<actual check>","evidence":".devlyn/checks.log"}]}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The owner accepts these checks; the helper preserves evidence bytes and does not
|
|
38
|
+
claim to have independently proved the assertions. No synthetic pipeline state
|
|
39
|
+
or full resolve run is needed to deliver a direct task.
|
|
40
|
+
|
|
41
|
+
For full resolve, use only its intended successfully archived normal run:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{"kind":"pipeline","task":"<task identity>","source_sha":"<cleanup.post_sha>","run_id":"<exact archived run_id>"}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Terminal CLEAN alone is insufficient. Successful VERIFY and terminal precedence,
|
|
48
|
+
the run-bound report/digest, clean finish summary and required evidence must
|
|
49
|
+
agree. Failed, incomplete and verify-only runs are ineligible. Acceptance binds
|
|
50
|
+
exact bytes and source before push; changed acceptance/evidence or subsequent
|
|
51
|
+
product commits require a new accepted task, never implicit descendant approval.
|
|
52
|
+
|
|
53
|
+
For a queue drain, resolve returns the acceptance/archive to the queue owner.
|
|
54
|
+
Commit the terminal queue transition first, then add
|
|
55
|
+
`"queue":{"commit":"<full terminal commit>","file":"docs/specs/queue.md"}` to
|
|
56
|
+
acceptance. This commit must have only the verified source as parent and change
|
|
57
|
+
exactly the declared queue file. The owner reviews the transition; the helper
|
|
58
|
+
does not infer that arbitrary edits to that file are valid queue metadata.
|
|
59
|
+
Complete once per item after that commit. Failed items are never published.
|
|
60
|
+
|
|
61
|
+
## Deliver and resume
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
python3 "$DEVLYN_SHARED_DIR/task-complete.py" complete \
|
|
65
|
+
--receipt '<returned receipt.json>' --acceptance .devlyn/acceptance.json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Project policy is `git config --local devlyn.completionMode auto|pr`; absent means
|
|
69
|
+
`auto`. Invalid local values fail before external effects, even with an override.
|
|
70
|
+
Use `complete --mode auto|pr` for one task, or `--local-only`/`--no-push` to honor
|
|
71
|
+
the user's delivery restriction. These per-task choices persist in the receipt.
|
|
72
|
+
|
|
73
|
+
`pr` pushes the exact accepted task ref and creates/reuses its exact repository,
|
|
74
|
+
head and base PR, then reports `PR` with its URL and retains the checkout. `auto`
|
|
75
|
+
also requests `gh pr merge --auto --merge --match-head-commit <accepted SHA>`.
|
|
76
|
+
Repository checks/reviews and merge policy remain authoritative: no admin bypass,
|
|
77
|
+
strategy fallback or repository setting changes. A repository that disallows
|
|
78
|
+
merge commits fails visibly; disabled auto merge may also reject a pending
|
|
79
|
+
request. Command success alone never proves merge.
|
|
80
|
+
|
|
81
|
+
`PENDING` retains the workspace and reports a receipt-based resume command.
|
|
82
|
+
`BLOCKED` includes the cause and the same retry path; repair the reported condition
|
|
83
|
+
before retrying. Resume reobserves Git/PR state under a per-receipt lock, reuses
|
|
84
|
+
the original acceptance, and performs only missing eligible effects. Delivery results remain separate from the
|
|
85
|
+
immutable product result; do not rewrite an archived PASS for a delivery error.
|
|
86
|
+
|
|
87
|
+
## Yield and retain recoverability
|
|
88
|
+
|
|
89
|
+
After actual matching MERGED evidence, wait for the owner's actual children,
|
|
90
|
+
stop/yield known task writers, and invoke completion with `--writers-stopped`.
|
|
91
|
+
For a removable linked checkout, run from outside it using the installed helper
|
|
92
|
+
outside that checkout. An OS process observation supplements the owner assertion;
|
|
93
|
+
neither the receipt nor a scan guarantees exclusion of future writers. Unknown
|
|
94
|
+
writers, inaccessible process state, caller cwd inside the tree, dirty/untracked
|
|
95
|
+
files, changed refs/Gitdir/registration or locks retain the affected resources.
|
|
96
|
+
Do not kill unknown processes or force worktree removal to make completion pass.
|
|
97
|
+
|
|
98
|
+
The receipt directory holds byte-verified `custody/`, `manifest.json` and a guarded
|
|
99
|
+
`refs/devlyn/completed/<id>` recovery ref. Archive/check evidence is copied there
|
|
100
|
+
before publication; removal rechecks it and source reachability through the merge.
|
|
101
|
+
Ignored files in removable trees must be covered by that exact owned evidence
|
|
102
|
+
manifest. Unknown ignored data requires explicit owner custody outside the helper;
|
|
103
|
+
it never silently archives or deletes arbitrary user content. A partial/corrupt
|
|
104
|
+
custody copy blocks cleanup and retains the original for repair.
|
|
105
|
+
|
|
106
|
+
In-place completion retains the checkout and its ignored user data, switches
|
|
107
|
+
safely to updated base, then compare-deletes only its exact owned task refs.
|
|
108
|
+
Linked completion uses native non-force removal. Local ref deletion is guarded
|
|
109
|
+
by the expected SHA; remote deletion uses an exact force-with-lease solely as
|
|
110
|
+
compare-and-delete, never for product publication. A changed remote branch is
|
|
111
|
+
retained. Retry after removal uses the external receipt and evidence, so the
|
|
112
|
+
removed checkout is not needed. Recovery refs/evidence have no automatic expiry.
|
|
113
|
+
|
|
114
|
+
Queue drains remain serial. Record source verdict and delivery status separately;
|
|
115
|
+
retain pending/PR workspaces. Before advancing, use a separate owned branch from
|
|
116
|
+
base; do not put the next item's commits on a retained pending branch. If safe
|
|
117
|
+
placement is unavailable, report remaining items pending and stop the drain.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devlyn-cli",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Loop & harness engineering for AI coding agents (Claude Code, Codex, and any AGENTS.md-driven agent) — take intent to shipped, engineer-quality software hands-free with phase-gated pipelines and agent orchestration",
|
|
5
5
|
"homepage": "https://github.com/fysoul17/devlyn-cli#readme",
|
|
6
6
|
"bin": {
|
package/scripts/lint-skills.sh
CHANGED
|
@@ -66,6 +66,7 @@ _shared/judge-output-parser.py
|
|
|
66
66
|
_shared/collect-codex-findings.py
|
|
67
67
|
_shared/verify-merge-findings.py
|
|
68
68
|
_shared/archive_run.py
|
|
69
|
+
_shared/task-complete.py
|
|
69
70
|
_shared/state-phase-write.py
|
|
70
71
|
_shared/terminal-claim-check.py
|
|
71
72
|
_shared/resolve-stop-hook.py
|
|
@@ -79,6 +80,8 @@ devlyn:resolve/SKILL.md
|
|
|
79
80
|
devlyn:queue/SKILL.md
|
|
80
81
|
devlyn:engines/SKILL.md
|
|
81
82
|
devlyn:resolve/references/state-schema.md
|
|
83
|
+
devlyn:resolve/references/task-completion.md
|
|
84
|
+
devlyn:resolve/references/outer-loop.md
|
|
82
85
|
devlyn:resolve/references/free-form-mode.md
|
|
83
86
|
devlyn:resolve/references/phases/plan.md
|
|
84
87
|
devlyn:resolve/references/phases/probe-derive.md
|
|
@@ -401,7 +404,7 @@ check_skill_mirror_parity \
|
|
|
401
404
|
|
|
402
405
|
# ---------------------------------------------------------------------------
|
|
403
406
|
# 6b. VERIFY merge verdict binding self-test.
|
|
404
|
-
for helper in role-config judge-role-evidence; do
|
|
407
|
+
for helper in role-config judge-role-evidence task-complete; do
|
|
405
408
|
if python3 "config/skills/_shared/$helper.py" --self-test >/dev/null 2>&1; then
|
|
406
409
|
ok "$helper.py self-test passed"
|
|
407
410
|
else
|