devlyn-cli 4.2.26 → 4.3.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/bin/devlyn.js +510 -0
- package/bin/engines.js +20 -15
- package/bin/harness-activation.js +1 -2
- package/bin/release.js +16 -3
- package/bin/skill-history.json +5 -0
- package/config/skills/_shared/harness-store.py +202 -0
- package/config/skills/_shared/task-completion.md +6 -3
- package/config/skills/_shared/warm-build-dirs.py +97 -2
- package/config/skills/devlyn-ideate/SKILL.md +5 -1
- package/config/skills/devlyn-ideate/references/loop.md +12 -2
- package/config/skills/devlyn-ideate/references/plan-add.md +12 -0
- package/config/skills/devlyn-ideate/scripts/acceptance.py +5 -0
- package/config/skills/devlyn-ideate/scripts/queue.py +165 -15
- package/harness/AGENTS.md +37 -0
- package/harness/CLAUDE.md +37 -0
- package/native/claude/.claude-plugin/plugin.json +6 -0
- package/native/claude/skills/_shared/.ruff.toml +2 -0
- package/native/claude/skills/_shared/adapters/claude.md +15 -0
- package/native/claude/skills/_shared/adapters/codex.md +14 -0
- package/native/claude/skills/_shared/adapters/omp.md +6 -0
- package/native/claude/skills/_shared/codex-monitored.sh +263 -0
- package/native/claude/skills/_shared/engine-doctor.sh +70 -0
- package/native/claude/skills/_shared/engine-preflight.md +29 -0
- package/native/claude/skills/_shared/expected-contract.py +242 -0
- package/native/claude/skills/_shared/expected.schema.json +120 -0
- package/native/claude/skills/_shared/harness-store.py +202 -0
- package/native/claude/skills/_shared/invocation-receipt.py +499 -0
- package/native/claude/skills/_shared/platform-support.py +395 -0
- package/native/claude/skills/_shared/role-config.py +247 -0
- package/native/claude/skills/_shared/runtime-principles.md +35 -0
- package/native/claude/skills/_shared/task-complete.py +2865 -0
- package/native/claude/skills/_shared/task-completion.md +249 -0
- package/native/claude/skills/_shared/warm-build-dirs.py +1065 -0
- package/native/claude/skills/devlyn-engines/SKILL.md +63 -0
- package/native/claude/skills/devlyn-ideate/SKILL.md +132 -0
- package/native/claude/skills/devlyn-ideate/references/elicitation.md +29 -0
- package/native/claude/skills/devlyn-ideate/references/loop.md +123 -0
- package/native/claude/skills/devlyn-ideate/references/package-format.md +128 -0
- package/native/claude/skills/devlyn-ideate/references/plan-add.md +12 -0
- package/native/claude/skills/devlyn-ideate/scripts/acceptance.py +882 -0
- package/native/claude/skills/devlyn-ideate/scripts/queue.py +2191 -0
- package/native/codex/.agents/plugins/marketplace.json +12 -0
- package/native/codex/plugins/devlyn/.codex-plugin/plugin.json +6 -0
- package/native/codex/plugins/devlyn/skills/_shared/.ruff.toml +2 -0
- package/native/codex/plugins/devlyn/skills/_shared/adapters/claude.md +15 -0
- package/native/codex/plugins/devlyn/skills/_shared/adapters/codex.md +14 -0
- package/native/codex/plugins/devlyn/skills/_shared/adapters/omp.md +6 -0
- package/native/codex/plugins/devlyn/skills/_shared/codex-monitored.sh +263 -0
- package/native/codex/plugins/devlyn/skills/_shared/engine-doctor.sh +70 -0
- package/native/codex/plugins/devlyn/skills/_shared/engine-preflight.md +29 -0
- package/native/codex/plugins/devlyn/skills/_shared/expected-contract.py +242 -0
- package/native/codex/plugins/devlyn/skills/_shared/expected.schema.json +120 -0
- package/native/codex/plugins/devlyn/skills/_shared/harness-store.py +202 -0
- package/native/codex/plugins/devlyn/skills/_shared/invocation-receipt.py +499 -0
- package/native/codex/plugins/devlyn/skills/_shared/platform-support.py +395 -0
- package/native/codex/plugins/devlyn/skills/_shared/role-config.py +247 -0
- package/native/codex/plugins/devlyn/skills/_shared/runtime-principles.md +35 -0
- package/native/codex/plugins/devlyn/skills/_shared/task-complete.py +2865 -0
- package/native/codex/plugins/devlyn/skills/_shared/task-completion.md +249 -0
- package/native/codex/plugins/devlyn/skills/_shared/warm-build-dirs.py +1065 -0
- package/native/codex/plugins/devlyn/skills/devlyn-engines/SKILL.md +63 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/SKILL.md +132 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/references/elicitation.md +29 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/references/loop.md +123 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/references/package-format.md +128 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/references/plan-add.md +12 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/scripts/acceptance.py +882 -0
- package/native/codex/plugins/devlyn/skills/devlyn-ideate/scripts/queue.py +2191 -0
- package/package.json +3 -2
- package/release.json +1630 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# Outer-owner task completion
|
|
2
|
+
|
|
3
|
+
Completion belongs to the outer task owner after source acceptance; it does not
|
|
4
|
+
change product verdicts or worker isolation. Direct work edits the current
|
|
5
|
+
checkout, then delivers each completed, verified request with attributable
|
|
6
|
+
changes. Finish the whole request, including steering received before acceptance;
|
|
7
|
+
internal subtasks, messages and conversation end are not delivery boundaries.
|
|
8
|
+
Honor explicit batching or delivery holds; otherwise deliver completed requests
|
|
9
|
+
without waiting for later requests.
|
|
10
|
+
|
|
11
|
+
Without a delivery instruction, use project policy below, default `auto`. A bare
|
|
12
|
+
commit request uses `--local-only`, a PR request `--mode pr`, and a merge request
|
|
13
|
+
`--mode auto`. Local-only/no-push restrictions prevent publication; no-commit or
|
|
14
|
+
just-edit instructions skip delivery. Existing session-wide restrictions remain
|
|
15
|
+
in force until changed. Read-only work, unchanged work and incidental generated
|
|
16
|
+
files do not trigger delivery.
|
|
17
|
+
|
|
18
|
+
Product file limits cover task edits, not delivery bookkeeping (worktree,
|
|
19
|
+
branch, receipt, uncommitted `.devlyn/` files); delivery restrictions still apply.
|
|
20
|
+
|
|
21
|
+
When delivery is implicit and no GitHub origin is configured, use the existing
|
|
22
|
+
local-only route and report `LOCAL_ONLY`, the commit and why no PR/merge occurred.
|
|
23
|
+
An explicit PR/merge request remains blocked. Authentication, network and
|
|
24
|
+
configuration failures are not grounds for this fallback.
|
|
25
|
+
|
|
26
|
+
## Concurrent writers
|
|
27
|
+
|
|
28
|
+
When other sessions or agents are known to write this checkout (the user says
|
|
29
|
+
so, or you see them), allocate a worktree below before editing. Changes present
|
|
30
|
+
at the start are the user's work in progress: preserve them, and continue unless
|
|
31
|
+
their ownership or the task's dependence on them is unclear. Re-read a file
|
|
32
|
+
before overwriting it, and check `git status` and the diff at verification and
|
|
33
|
+
commit points. On changes you cannot explain, stop writing to the shared
|
|
34
|
+
checkout and ask whether to continue there or isolate. With no one to ask, move
|
|
35
|
+
only your own edits, and only when the task's context can be rebuilt in the
|
|
36
|
+
worktree; otherwise leave the checkout as it is and report the task blocked.
|
|
37
|
+
Isolation changes the work location, not delivery scope. Allocate for the
|
|
38
|
+
resolved delivery policy and reuse that worktree when suitable. A local receipt remains local; later
|
|
39
|
+
publication requires a fresh publication allocation, candidate and acceptance.
|
|
40
|
+
|
|
41
|
+
## Allocate for delivery or isolation
|
|
42
|
+
|
|
43
|
+
Use the caller's DEVLYN_SHARED_DIR. When this reference is opened
|
|
44
|
+
directly, bind it to this reference's reader-supplied containing
|
|
45
|
+
directory, resolving directory symlinks first. Missing source identity is
|
|
46
|
+
BLOCKED:skill-source-unresolved; a missing task-complete.py is
|
|
47
|
+
BLOCKED:shared-dir-unresolved. Never select another installation.
|
|
48
|
+
|
|
49
|
+
For direct delivery, run the bound task-complete.py after completing the request's
|
|
50
|
+
edits and checks, before committing the delivery candidate. Allocate before
|
|
51
|
+
editing when concurrency requires isolation; if isolation is unavailable, do
|
|
52
|
+
not write to the shared checkout.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
python3 "$DEVLYN_SHARED_DIR/task-complete.py" allocate --repo . \
|
|
56
|
+
--task '<task identity>' --branch '<absent task branch>' \
|
|
57
|
+
--worktree '<repo parent>/<repo name>.devlyn.noindex/<task directory>' \
|
|
58
|
+
--repository '<owner/repo>' --remote origin --base main
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Every delivery allocation owns a linked worktree; `--worktree` is required and
|
|
62
|
+
must name an absent path.
|
|
63
|
+
A publication allocation normally starts at the exact fetched remote base,
|
|
64
|
+
independent of the anchor's branch or dirty state, and leaves the anchor's
|
|
65
|
+
HEAD, index and files untouched. For a commit request, local-only work or
|
|
66
|
+
isolation without publication, use `--local-base` with the exact current HEAD
|
|
67
|
+
and omit `--repository`/`--remote`. Nothing is fetched or pushed; complete with
|
|
68
|
+
`--local-only` only when committing is allowed.
|
|
69
|
+
|
|
70
|
+
After local completion or confirmed PR merge, reconcile the original checkout
|
|
71
|
+
only when its branch and changes remain understood and can be preserved.
|
|
72
|
+
After remote delivery, fetch first. If the branch can fast-forward to the
|
|
73
|
+
delivered result, recheck the copied edits' current ownership and contents,
|
|
74
|
+
then remove them: `git restore --source=HEAD --staged --worktree -- <paths>`
|
|
75
|
+
for tracked paths holding only your edits, and delete copied untracked files.
|
|
76
|
+
Then use `git merge --ff-only <task branch>` for local delivery, or
|
|
77
|
+
`git merge --ff-only <remote>/<base>` on the base branch after remote delivery;
|
|
78
|
+
a drain's `Bring into` command is its own. Once a local delivery is reconciled,
|
|
79
|
+
remove its worktree and task branch (`git worktree remove <worktree>`,
|
|
80
|
+
`git branch -d <task branch>`). Do not switch branches, create a reconciliation
|
|
81
|
+
merge commit or discard WIP to force this step. If reconciliation is unsafe,
|
|
82
|
+
retain and report the edits, delivered result and remaining bring-in action.
|
|
83
|
+
|
|
84
|
+
Save the returned receipt path under the common Gitdir. `reconciled` reports earlier accepted,
|
|
85
|
+
PR-delivered tasks whose merged resources were cleaned or retained; it is
|
|
86
|
+
informational, so never resume or release a receipt you do not own. Existing
|
|
87
|
+
branches/trees cannot be adopted, even when their names look generated. Nor
|
|
88
|
+
can a receipt that never reached `allocation: owned`: remove its worktree and
|
|
89
|
+
branch if present, delete its receipt directory, then allocate again.
|
|
90
|
+
Unreceipted tasks remain owner-managed.
|
|
91
|
+
|
|
92
|
+
Copy attributable task edits into the allocated worktree as a patch, never a
|
|
93
|
+
stash. Establish attribution from the pre-edit contents and starting Git state,
|
|
94
|
+
including staged, unstaged and untracked work. A path-scoped
|
|
95
|
+
`git diff --binary HEAD` (after `git add -N` for new files), applied with
|
|
96
|
+
`git -C <worktree> apply --3way`, is suitable only when every included change
|
|
97
|
+
belongs to this task and its prerequisites exist in the candidate baseline. Otherwise construct the task-only
|
|
98
|
+
delta; if attribution or independence from unshipped work is unclear, preserve
|
|
99
|
+
the checkout and report delivery blocked.
|
|
100
|
+
|
|
101
|
+
Review the resulting candidate diff and verify that candidate. Reuse prior
|
|
102
|
+
check evidence only when the checked source and relevant execution inputs are
|
|
103
|
+
unchanged; changed bases, conflict resolutions or other relevant differences
|
|
104
|
+
require the affected checks again.
|
|
105
|
+
|
|
106
|
+
Keep the original edits through pending or failed delivery; only reconciliation
|
|
107
|
+
removes them. Preserve all other work and report anything left behind.
|
|
108
|
+
|
|
109
|
+
Build in the task worktree's own default build directory, never in one
|
|
110
|
+
another checkout builds in, even one build at a time: tools such as Cargo take
|
|
111
|
+
one checkout's outputs as fresh for the other. When the shared repository-local
|
|
112
|
+
Git config `devlyn.warmBuildDirs` is true, or it is unset and the Cargo workspace's
|
|
113
|
+
Cargo.toml sets `[workspace.metadata.devlyn] warm-build-dirs = true`,
|
|
114
|
+
allocation seeds that directory from a built checkout of the repository, so
|
|
115
|
+
the first build does not rebuild every dependency; `build_dirs` in its result
|
|
116
|
+
and receipt says what it did, and a skip means an ordinary cold build. The
|
|
117
|
+
Git setting takes precedence on this machine: false disables and invalid values
|
|
118
|
+
skip; global, system, include and per-worktree values are not consulted. Seeding
|
|
119
|
+
keeps dependency outputs that may hold the other checkout's paths, and those
|
|
120
|
+
follow that checkout's later rebuilds. `warm-build-dirs.py <worktree>` does the same for a
|
|
121
|
+
worktree made without allocation. A warmed directory leaves with the worktree
|
|
122
|
+
after merge, so a pending, failed or local-only task keeps it.
|
|
123
|
+
|
|
124
|
+
Allocation also returns a receipt-owned `scratch` directory for other
|
|
125
|
+
disposable build files, such as writable tool caches. Keep source checkouts,
|
|
126
|
+
Git data, lockfiles, reports and restart evidence outside scratch. Do not create unowned
|
|
127
|
+
temporary build trees or preserve them by copying them into evidence custody.
|
|
128
|
+
Prefer `TemporaryDirectory`/`finally` for short-lived test fixtures.
|
|
129
|
+
|
|
130
|
+
After waiting for task writers, `complete --writers-stopped` empties this
|
|
131
|
+
scratch on delivery returns, including local-only and pending-PR routes. To
|
|
132
|
+
release build caches when parking or after a failed run, use:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
python3 "$DEVLYN_SHARED_DIR/task-complete.py" clean-scratch \
|
|
136
|
+
--receipt '<returned receipt.json>' --writers-stopped
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
This empties only the prospectively owned scratch, preserves its directory
|
|
140
|
+
identity for interrupted cleanup and later builds, checks live users and reports
|
|
141
|
+
the logical byte count separately from actual free disk space.
|
|
142
|
+
Unknown historical roots, source/recovery data, shared caches and terminal
|
|
143
|
+
history are never adopted or swept. A refused cleanup does not block source
|
|
144
|
+
delivery; it stays visible in the handoff with its receipt and retry command
|
|
145
|
+
(`CLEANUP_PENDING` after delivered source). No task is described as cleaned
|
|
146
|
+
while owned disposable files remain. On resumption, finish any pending scratch
|
|
147
|
+
cleanup before allocating more temporary storage; the next allocation also
|
|
148
|
+
retries it for completed deliveries with released writers. Rebuild from retained
|
|
149
|
+
inputs when needed; cleanup is not an instruction to restart parked work.
|
|
150
|
+
|
|
151
|
+
## Accept a scoped commit
|
|
152
|
+
|
|
153
|
+
In the allocated worktree, finish the candidate's decisive checks and diff
|
|
154
|
+
review, then stage and commit only accepted task changes. The helper never
|
|
155
|
+
stages product files. Write a
|
|
156
|
+
root acceptance file in the task worktree (`.devlyn/acceptance.json`):
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{"kind":"direct","task":"<task identity>","source_sha":"<full commit>","checks":[{"command":"<actual check>","evidence":".devlyn/checks.log"}]}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The owner accepts these checks; the helper preserves evidence bytes and does
|
|
163
|
+
not independently prove the assertions. Acceptance binds exact source and
|
|
164
|
+
evidence before publication. Direct `complete` binds acceptance itself; no
|
|
165
|
+
separate `accept` call is needed.
|
|
166
|
+
|
|
167
|
+
Changed accepted source or evidence requires a new accepted task, never implicit
|
|
168
|
+
descendant approval. Resume an existing receipt only for its unchanged candidate.
|
|
169
|
+
After merge, implement follow-ups from the updated base. An additive follow-up
|
|
170
|
+
depending on an open PR waits for that predecessor to merge.
|
|
171
|
+
|
|
172
|
+
If a correction invalidates an open candidate, run `complete --mode pr` against
|
|
173
|
+
its unchanged receipt, with its task tree clean, to cancel owned auto-merge, then
|
|
174
|
+
reobserve the PR. If it
|
|
175
|
+
remains open, close it as superseded and retain its receipt and custody; do not
|
|
176
|
+
resume its delivery. Allocate a replacement from the current remote base,
|
|
177
|
+
include only the still-needed task changes and correction, and verify and
|
|
178
|
+
accept it anew. If the predecessor has merged, make a new follow-up instead.
|
|
179
|
+
|
|
180
|
+
## Deliver and resume
|
|
181
|
+
|
|
182
|
+
Wait for your children, stop your dev servers and task writers, then leave the
|
|
183
|
+
task tree. Make the FIRST completion call from outside it with the installed
|
|
184
|
+
helper and `--writers-stopped`; this releases the tree for cleanup after merge:
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
python3 "$DEVLYN_SHARED_DIR/task-complete.py" complete \
|
|
188
|
+
--receipt '<returned receipt.json>' \
|
|
189
|
+
--acceptance '<task worktree>/.devlyn/acceptance.json' --writers-stopped
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Project policy is `git config --local devlyn.completionMode auto|pr`; absent means
|
|
193
|
+
`auto`. Invalid local values fail before external effects, even with an override.
|
|
194
|
+
Use `complete --mode auto|pr` for one task, or `--local-only`/`--no-push` to honor
|
|
195
|
+
the user's delivery restriction. These per-task choices persist in the receipt; `--local-only` is refused once the task ref is pushed.
|
|
196
|
+
|
|
197
|
+
`pr` pushes the exact accepted task ref and creates/reuses its exact repository,
|
|
198
|
+
head and base PR. While OPEN, it cancels owned auto-merge, reports `PR` with its URL
|
|
199
|
+
and retains the checkout. Once MERGED by any method, either mode cleans released
|
|
200
|
+
resources in that call, on resume or at the next allocation. Default `auto` also requests
|
|
201
|
+
a `--merge --match-head-commit <accepted SHA>` merge. Repository
|
|
202
|
+
checks/reviews and merge policy remain authoritative: no admin bypass, strategy
|
|
203
|
+
fallback or repository setting changes. When the repository disallows merge
|
|
204
|
+
commits or refuses the request, delivery reports `PR` with `merge_refused` and
|
|
205
|
+
the PR waits for a person. Command success alone never proves merge.
|
|
206
|
+
|
|
207
|
+
`PENDING` retains the workspace and reports a receipt-based resume command.
|
|
208
|
+
`BLOCKED` names the cause and retry action; repair that condition before retrying.
|
|
209
|
+
Resume reobserves Git/PR state under a per-receipt lock, reuses the original
|
|
210
|
+
acceptance and performs only missing eligible effects.
|
|
211
|
+
|
|
212
|
+
Verification and delivery obey the session's actual permissions. When an
|
|
213
|
+
operation needs unavailable approval, finish permitted work, preserve the edits
|
|
214
|
+
and evidence, and report that operation and its retry action. Before allocation,
|
|
215
|
+
identify the original checkout and outstanding operation; after allocation,
|
|
216
|
+
include the receipt-based resume command. Headless execution neither waives
|
|
217
|
+
permissions nor silently changes delivery policy.
|
|
218
|
+
|
|
219
|
+
Report verification, delivery and checkout reconciliation separately. A delivery
|
|
220
|
+
error does not rewrite an accepted product result; unperformed verification
|
|
221
|
+
must never be reported as accepted.
|
|
222
|
+
|
|
223
|
+
## Yield and retain recoverability
|
|
224
|
+
|
|
225
|
+
Cleanup requires actual matching MERGED evidence; linked-tree removal also
|
|
226
|
+
requires the owner's recorded release. OS observation supplements it; neither the receipt
|
|
227
|
+
nor a scan guarantees exclusion of future writers. Processes with cwd or open
|
|
228
|
+
files inside the tree, inaccessible process state (on Linux, other users'
|
|
229
|
+
processes unless run as root), caller cwd inside the tree, dirty/untracked files,
|
|
230
|
+
a nested repository or worktree, or changed refs/Gitdir/registration retain
|
|
231
|
+
affected resources. Use `git worktree lock` to keep a tree.
|
|
232
|
+
On native Windows, locking and file durability are supported, but the helper cannot prove writer cessation and reports `writer observation unsupported on this platform; retain workspace`. Even `--writers-stopped` cannot authorize deletion without that observation: retain the workspace, its task refs and external receipt/custody, report delivery separately, and preserve the receipt-based resume command. A merged delivery therefore reports `CLEANUP_PENDING` (delivery `COMPLETE`) with `workspace_cleanup` naming the reason and resume. Do not kill unknown processes or force worktree removal to make completion pass.
|
|
233
|
+
|
|
234
|
+
The receipt directory holds byte-verified `custody/`, `manifest.json` and a guarded
|
|
235
|
+
`refs/devlyn/completed/<id>` recovery ref. Check evidence is copied there
|
|
236
|
+
before publication; removal rechecks it, the recovery ref and the merge commit on base.
|
|
237
|
+
Ignored build output and other ignored files are disposable under native
|
|
238
|
+
non-force worktree removal. The tree's `.devlyn/` files are byte/mode-verified
|
|
239
|
+
and preserved as `<receipt dir>/records/.devlyn`; changes after an earlier copy
|
|
240
|
+
are preserved beside it as `records.<digest>/.devlyn`, never rewriting earlier copies.
|
|
241
|
+
Non-regular files or symlinks there, partial/corrupt custody, an unreadable
|
|
242
|
+
earlier copy or a mismatched `records.<digest>` copy retain the tree for repair.
|
|
243
|
+
|
|
244
|
+
Legacy in-place receipts retire refs only once their task branch is no longer
|
|
245
|
+
checked out; their checkout is never modified. Local ref deletion is guarded by
|
|
246
|
+
the expected SHA; remote deletion uses an exact force-with-lease solely as
|
|
247
|
+
compare-and-delete, never for product publication. A changed remote branch is
|
|
248
|
+
retained. Retry uses the external receipt/evidence after removal. Recovery
|
|
249
|
+
refs/evidence have no automatic expiry.
|