@miroshnik/elves 2026.1028.0 → 2026.1105.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 +3 -2
- package/bin/elves.ts +19 -4
- package/dist/github/scripts/github.js +25 -10
- package/dist/spec/scripts/architecture.js +2 -2
- package/dist/spec/scripts/{harness-yh09fn5z.js → harness-1rfkbdbn.js} +8 -8
- package/dist/spec/scripts/{harness-wcyv20e3.js → harness-dms3b7ke.js} +1 -1
- package/dist/spec/scripts/harness.js +1 -1
- package/docs/cloud-sessions.md +3 -2
- package/docs/testing.md +1 -1
- package/package.json +2 -2
- package/skills/github/SKILL.md +2 -2
- package/skills/github/locales/en.json +4 -4
- package/skills/github/locales/ru.json +4 -4
- package/skills/github/reference.md +23 -13
- package/skills/github/scripts/github.ts +48 -24
- package/skills/slot/SKILL.md +55 -4
- package/skills/slot/scripts/slot.ts +366 -20
package/AGENTS.md
CHANGED
|
@@ -123,8 +123,9 @@ done. The session can be closed.` · `All done, but there are questions: …` ·
|
|
|
123
123
|
(scope, not merges outside auto) — any session, its task stays; one started
|
|
124
124
|
for it — in the project folder, not a worktree: executors start from `main`.
|
|
125
125
|
`github task queue` prints executors' prompts; an executor — a background
|
|
126
|
-
subagent (own worktree) or a cloud session: at most
|
|
127
|
-
sessions at once, the owner's number replaces
|
|
126
|
+
subagent (own worktree) or a cloud session: at most the machine's executors
|
|
127
|
+
in subagents and 5 cloud sessions at once, the owner's number replaces
|
|
128
|
+
either (`task queue` names the executors, `slot`'s `machine.json` sets them); failed — a task
|
|
128
129
|
comment, no restart; an executor session whose task closed — the dispatcher
|
|
129
130
|
archives it in an auto project, not one still working in the background or
|
|
130
131
|
awaiting the owner's answer; outside auto the owner closes it. A batch
|
package/bin/elves.ts
CHANGED
|
@@ -84,6 +84,7 @@ import { fileURLToPath } from "node:url";
|
|
|
84
84
|
import { packageManager, specRoots } from "../skills/github/scripts/github.ts";
|
|
85
85
|
import locale from "../skills/github/scripts/locale.ts";
|
|
86
86
|
import { PACKAGE_BUNX, PACKAGE_RUN, packageRun } from "../skills/spec/scripts/package-run.ts";
|
|
87
|
+
import { machineCapacity } from "../skills/slot/scripts/slot.ts";
|
|
87
88
|
import { COMPOSE_FILES, proxyName } from "../skills/task-env/scripts/task-env.ts";
|
|
88
89
|
|
|
89
90
|
const SRC = fileURLToPath(new URL("..", import.meta.url)).replace(/\/$/, "");
|
|
@@ -2207,14 +2208,28 @@ function agentShellLines(): string[] {
|
|
|
2207
2208
|
}
|
|
2208
2209
|
|
|
2209
2210
|
/**
|
|
2210
|
-
* The
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2211
|
+
* The machine's capacity (the slot skill, #779): heavy runs at once and the dispatcher's executors, and where they come
|
|
2212
|
+
* from — machine.json of the personal configuration or the cores and memory; a value machine.json gets wrong — its line.
|
|
2213
|
+
* Information, not the flow falling behind: it doesn't change the check's code.
|
|
2214
|
+
*/
|
|
2215
|
+
function capacityLines(): string[] {
|
|
2216
|
+
const c = machineCapacity();
|
|
2217
|
+
const set = c.from.slots === "machine.json" || c.from.executors === "machine.json";
|
|
2218
|
+
return [
|
|
2219
|
+
` machine: slots ${c.slots} (${c.from.slots}), executors ${c.executors} (${c.from.executors})${set ? "" : " — ~/.config/elves/machine.json replaces them"}`,
|
|
2220
|
+
...c.warnings.map((w) => ` ${w}`),
|
|
2221
|
+
];
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* The check's result plus the machine's lines, installed or not, behind or not: the capacity (`capacityLines`), the
|
|
2226
|
+
* proxy (`proxyLines`), the agent's Bash environment — the hook passes what writing it gave, `check -g` asks
|
|
2227
|
+
* `agentShellLines` — and Claude Code's prompt cache TTL (`cacheTtlLines`).
|
|
2213
2228
|
*/
|
|
2214
2229
|
function withMachine(global: boolean, r: Result, shell = agentShellLines()): Result {
|
|
2215
2230
|
if (!global || r.absent) return r;
|
|
2216
2231
|
const ttl = cacheTtlLines(os.homedir());
|
|
2217
|
-
const lines = [...proxyLines(os.homedir()), ...shell, ...ttl];
|
|
2232
|
+
const lines = [...capacityLines(), ...proxyLines(os.homedir()), ...shell, ...ttl];
|
|
2218
2233
|
return lines.length ? { ...r, text: [r.text, ...lines].join("\n"), ...(ttl.length ? { ttl: true } : {}) } : r;
|
|
2219
2234
|
}
|
|
2220
2235
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import {
|
|
3
3
|
locale_default
|
|
4
|
-
} from "../../spec/scripts/harness-
|
|
4
|
+
} from "../../spec/scripts/harness-1rfkbdbn.js";
|
|
5
5
|
|
|
6
6
|
// skills/github/scripts/github.ts
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
@@ -1398,7 +1398,7 @@ function dispatcherBatch(io, slug, recent, file) {
|
|
|
1398
1398
|
io.out(`+ batch branch ${name} from origin/${base} (${sha.slice(0, 7)}) pushed${previous}: the executors branch from it and merge into it`);
|
|
1399
1399
|
return name;
|
|
1400
1400
|
};
|
|
1401
|
-
return
|
|
1401
|
+
return { batch: null, start };
|
|
1402
1402
|
}
|
|
1403
1403
|
function prRef(p) {
|
|
1404
1404
|
if (p.head && typeof p.head === "object") {
|
|
@@ -2149,6 +2149,20 @@ function cmdTaskEdit(io, slug, number, edits) {
|
|
|
2149
2149
|
return 0;
|
|
2150
2150
|
}
|
|
2151
2151
|
var QUEUE_EXECUTORS = 3;
|
|
2152
|
+
var slotScript = (io) => io.env["ELVES_SLOT_SCRIPT"] ?? path.resolve(import.meta.dir, "../../slot/scripts/slot.ts");
|
|
2153
|
+
function queueExecutors(io) {
|
|
2154
|
+
const script = slotScript(io);
|
|
2155
|
+
if (!existsSync(script))
|
|
2156
|
+
return { n: QUEUE_EXECUTORS, from: "no slot skill" };
|
|
2157
|
+
const env = Object.fromEntries(Object.entries(io.env).filter((e) => e[1] !== undefined));
|
|
2158
|
+
const r = (io.run ?? realRun)("bun", ["--no-env-file", script, "--capacity"], io.cwd, env);
|
|
2159
|
+
try {
|
|
2160
|
+
const c = JSON.parse(r.stdout);
|
|
2161
|
+
if (Number.isInteger(c.executors) && c.executors > 0)
|
|
2162
|
+
return { n: c.executors, from: c.from.executors };
|
|
2163
|
+
} catch {}
|
|
2164
|
+
return { n: QUEUE_EXECUTORS, from: `slot --capacity: ${why(r)}` };
|
|
2165
|
+
}
|
|
2152
2166
|
var priorityRank = (p) => PRIORITIES.indexOf(p ?? DEFAULT_PRIORITY);
|
|
2153
2167
|
function externalBlocker(io, slug, number, label) {
|
|
2154
2168
|
const marks = locale_default.every((n) => n.comments.externalBlocker);
|
|
@@ -2330,7 +2344,7 @@ function cmdTaskQueue(io, slug, o) {
|
|
|
2330
2344
|
if (ready.length)
|
|
2331
2345
|
batch = dispatched.start();
|
|
2332
2346
|
else
|
|
2333
|
-
io.out(`○ no new batch branch:
|
|
2347
|
+
io.out(`○ no new batch branch: nothing ready to hand out — a queue with a ready task starts it`);
|
|
2334
2348
|
}
|
|
2335
2349
|
if (file) {
|
|
2336
2350
|
mkdirSync(path.dirname(file), { recursive: true });
|
|
@@ -2368,7 +2382,8 @@ ${batches.map((b) => `batch ${b.repo} ${b.branch}
|
|
|
2368
2382
|
} else if (releasing !== null) {
|
|
2369
2383
|
io.out(`Next: the release of ${batch} is open — PR #${releasing} https://github.com/${slug}/pull/${releasing}: no new executors till its merge, ` + `the live executors' PRs into ${batch} wait for it (pr premerge refuses the merge); its steps — ${releaseCommand} prints them; ` + `after each executor's answer — task queue again; ${SESSION_ARCHIVE}.`);
|
|
2370
2384
|
} else if (ready.length) {
|
|
2371
|
-
|
|
2385
|
+
const executors = queueExecutors(io);
|
|
2386
|
+
io.out(`Next: each ready task above — a background subagent in its own worktree while fewer than ${executors.n} run (the machine's capacity: ${executors.from}; a number from the request replaces it); ` + `the indented line is its whole prompt. After each executor's answer — task queue again: new tasks get in${ask}; ${SESSION_ARCHIVE}${now}.`);
|
|
2372
2387
|
} else if (holding || !settled.length && running.length)
|
|
2373
2388
|
io.out(`Next: no ready tasks — wait for the executors' answers; after each — task queue again${ask}; ${SESSION_ARCHIVE}${now}.`);
|
|
2374
2389
|
else if (settled.length) {
|
|
@@ -4806,18 +4821,18 @@ waits for the task's closing (ci-wait issue N, background) and closes it locally
|
|
|
4806
4821
|
queue's = line names that wait. --session — printed by the dispatcher: the prompt of an app executor session
|
|
4807
4822
|
(start_session in the folder of another project, its own worktree) — a session by its project's canon and mode, named
|
|
4808
4823
|
by the task, waiting in the background, ending with the canon's last line — and how to start it; the hand-out has no
|
|
4809
|
-
worktree, the task is = in the queue. A batch project ("batch": true in .agents/elves.json): the first queue
|
|
4810
|
-
dispatcher's batch branch batch/<YYYY-MM-DD>-<k> from a fresh origin/<base> (+),
|
|
4811
|
-
kept in the marker; the assignment — the task branch from it and the PR
|
|
4812
|
-
commit and pr premerge: no CI wait (a PR into the batch runs no CI), no deploy, no epic refresh and no task close — the
|
|
4824
|
+
worktree, the task is = in the queue. A batch project ("batch": true in .agents/elves.json): the first queue with a ready
|
|
4825
|
+
task pushes the dispatcher's batch branch batch/<YYYY-MM-DD>-<k> from a fresh origin/<base> (+), nothing ready — no branch
|
|
4826
|
+
(○), the next ones take the same (○), it is kept in the marker; the assignment — the task branch from it and the PR
|
|
4827
|
+
into it, merged after the checks before a commit and pr premerge: no CI wait (a PR into the batch runs no CI), no deploy, no epic refresh and no task close — the
|
|
4813
4828
|
release's, the task closes with it; a task merged into it is = in the queue, a blocker merged into it doesn't hold; a
|
|
4814
4829
|
cloud executor isn't in the batch — its PR goes into the default branch. Nothing ready and every task of the batch
|
|
4815
4830
|
merged into it — Next: names batch release, a task past the batch (a PR into the default branch, a cloud executor)
|
|
4816
4831
|
doesn't hold it; its release PR open — ready tasks are held (○), no new executors; red —
|
|
4817
4832
|
Next: names its guilty task by the labels and the fix with its executor's prompt (otherwise batch release names it), the
|
|
4818
4833
|
assignment of a task in a red release — the fix's (a new branch from the batch, the PR into it with Refs #N; --cloud
|
|
4819
|
-
refused); released — a new batch, a released batch branch without an open PR into it is deleted (+).
|
|
4820
|
-
owner's word «past the batch»: the assignment as in a project without batches (the branch from origin/<base>, the PR
|
|
4834
|
+
refused); released — a new batch with a ready task, a released batch branch without an open PR into it is deleted (+).
|
|
4835
|
+
--main — the owner's word «past the batch»: the assignment as in a project without batches (the branch from origin/<base>, the PR
|
|
4821
4836
|
into it with the full CI, the deploy, the epic refresh, task close), the hand-out marked — a restart keeps it, task
|
|
4822
4837
|
finish opens the PR into the default branch, the queue's = line says «past the batch» and the release doesn't wait for
|
|
4823
4838
|
it; a task of a red release refuses it; with --cloud — the same, a cloud executor isn't in the batch anyway.
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
invariant2,
|
|
3
3
|
codeOnly2,
|
|
4
4
|
envNamesInCode2
|
|
5
|
-
} from "./harness-
|
|
5
|
+
} from "./harness-dms3b7ke.js";
|
|
6
6
|
import {
|
|
7
7
|
locale_default
|
|
8
|
-
} from "./harness-
|
|
8
|
+
} from "./harness-1rfkbdbn.js";
|
|
9
9
|
|
|
10
10
|
// skills/spec/scripts/architecture.ts
|
|
11
11
|
import { readdirSync, readFileSync } from "node:fs";
|
|
@@ -107,13 +107,13 @@ var en_default = {
|
|
|
107
107
|
subagents: "- writing subagents — launch as needed, no limit: each gets its own worktree and «{task} #{number}» at the start of its prompt (`est` links its work by it); bring their commits into your branch, remove their worktrees and branches yourself after the merge — what didn't go, name in the answer;",
|
|
108
108
|
live: "- while any of your subagents works, don't answer: wait for their answers — a background subagent wakes you with its answer; an answer with live subagents looks like a failure, and the dispatcher would give the task to a second executor next to you. Can't wait — answer `waits for subagents: <which and what they do>`: it isn't `failed`, there will be no second executor;",
|
|
109
109
|
refresh: '- the epic refresh — the subagent `task actualize` prints, without a worktree of its own (in yours) and not in the background (`run_in_background: false`): its answer — in the same turn, then `{script} task close {number}`, and only then the answer to the dispatcher: once you answer, a worktree without changes is removed, and a background subagent is left without a directory; a task without a PR (a data edit, a reconciliation, research) — first close the issue as completed with a result comment: `gh issue close {number} --repo {repo} --reason completed --comment "<result>"`;',
|
|
110
|
-
batchLead: "{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon, {mode}: `{script} task start {number} --branch
|
|
110
|
+
batchLead: "{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon, {mode}: `{script} task start {number} --branch exec/<type>/{number}-<slug>` (the task's questions and its parallel work — inside it), the branch from a fresh origin/{batch}, not from main (`git fetch origin {batch}`, then the task branch on `origin/{batch}`), code and tests, the checks before a commit, PR into the batch (`gh pr create --base {batch}`), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: the task stays «{inProgress}» till the batch's release — the dispatcher's, with one full CI run and one refresh per epic.",
|
|
111
111
|
batchWait: "- don't wait for CI: a PR into the batch runs none — its gate is the checks before a commit by the canon (`elves precommit --base origin/<batch branch>`: `lint`, `typecheck`, `test:spec`, the affected tests — `docs/testing.md`) and `pr premerge` (the fast checks on the merge, if the batch moved on); after its code 0 — `gh pr merge <PR> --rebase` without a CI wait; the full run and the deploy are the release's, nothing to wait for after the merge, but before the answer take the task's stacks down (`{taskEnv} down {number}`, unsandboxed: Docker): the task waits for the release, its stack would load the machine till then;",
|
|
112
112
|
batchRefresh: "- the epic refresh and `task close` aren't yours: both are the batch's release — one refresh per epic of its tasks, then `task close` of each, the dispatcher's; a task without a PR (a data edit, a reconciliation, research) isn't in the batch — close the issue as completed with a result comment: `gh issue close {number} --repo {repo} --reason completed --comment \"<result>\"`, then the epic refresh — the subagent `task actualize {number}` prints, without a worktree of its own (in yours) and not in the background (`run_in_background: false`): its answer — in the same turn, then `{script} task close {number}`, and only then the answer to the dispatcher: once you answer, a worktree without changes is removed, and a background subagent is left without a directory;",
|
|
113
113
|
bypass: "- the task goes past the dispatcher's batch `{batch}` — the owner's word: the task branch from a fresh origin/main, not from the batch, the PR into the default branch (not `--base {batch}`) with the full CI, the deploy, the epic refresh and `task close` — yours, as in a project without batches; the batch's release doesn't wait for you;",
|
|
114
|
-
fixLead: '{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon, {mode}: `{script} task status {number} "{inProgress}" --branch fix/{number}-<slug>`, a new branch from a fresh origin/{batch} (`git fetch origin {batch}`, then the branch on `origin/{batch}`){previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge` (it lets the guilty task\'s PR through the open release), merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.',
|
|
114
|
+
fixLead: '{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon, {mode}: `{script} task status {number} "{inProgress}" --branch exec/fix/{number}-<slug>`, a new branch from a fresh origin/{batch} (`git fetch origin {batch}`, then the branch on `origin/{batch}`){previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge` (it lets the guilty task\'s PR through the open release), merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.',
|
|
115
115
|
fixPrevious: ", not the task's earlier branch {branches} — it is in the batch already, merged by a rebase",
|
|
116
|
-
sessionFixLead: '{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner\'s «yes»): `{script} task status {number} "{inProgress}" --branch fix/{number}-<slug>`, a new branch from a fresh origin/{batch}{previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.',
|
|
116
|
+
sessionFixLead: '{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner\'s «yes»): `{script} task status {number} "{inProgress}" --branch exec/fix/{number}-<slug>`, a new branch from a fresh origin/{batch}{previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.',
|
|
117
117
|
repeats: "- before the PR — repeats in the files the task changes anyway: fix them in the same PR, don't file a task for them; a repeat outside the task's files is the epic refresh's;",
|
|
118
118
|
found: "- work found outside the task — `{script} task new …` (work of the task's epic — with `--epic`: the dispatcher picks it up) — name it in the answer: whether to queue it is the owner's call;",
|
|
119
119
|
question: "- a question without a clear recommendation — into «{questions}» of the task; don't start the code that depends on it and answer the dispatcher: the owner's answer comes back here.",
|
|
@@ -127,7 +127,7 @@ var en_default = {
|
|
|
127
127
|
cloudDispatcher: "- the dispatcher waits for the task to close and closes it locally — the actual, the status, the merged branch, archiving this session: don't message it, don't archive the session;",
|
|
128
128
|
cloudQuestion: "- a question without a clear recommendation — into «{questions}» of the task and to the owner in this session, don't start the code that depends on it; stopped (a question, a failure, a limit) — a «{state}» comment into the task.",
|
|
129
129
|
sessionLead: "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session — do the task whole by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task start {number} --branch <type>/{number}-<slug>` (the task's questions and its parallel work — inside it), the branch from a fresh origin/main, code and tests, PR, green CI, `pr premerge`, merge, deploy, the epic refresh, `{script} task close {number}`.",
|
|
130
|
-
sessionBatchLead: "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task start {number} --branch
|
|
130
|
+
sessionBatchLead: "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task start {number} --branch exec/<type>/{number}-<slug>` (the task's questions and its parallel work — inside it), the branch from a fresh origin/{batch}, not from main, code and tests, the checks before a commit, PR into the batch (`gh pr create --base {batch}`), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: the task stays «{inProgress}» till the batch's release — the dispatcher's, with one full CI run and one refresh per epic.",
|
|
131
131
|
sessionIs: "You are a session, not a subagent:",
|
|
132
132
|
sessionName: "- name the session `#{number} {title}` (`set_session_title`) once the task is taken — `est` links the session to the task by it;",
|
|
133
133
|
sessionWait: "- wait for CI and the deploy with a background command — `{waitCi} pr <PR>` (after the merge — `merged <PR>`): its completion wakes the session; no `Monitor`, watcher loop or `ScheduleWakeup` on top;",
|
|
@@ -587,13 +587,13 @@ var ru_default = {
|
|
|
587
587
|
subagents: "- пишущих субагентов запускай по необходимости, без лимита: каждому — свой worktree и «{task} #{number}» в начале промпта (по нему `est` привяжет его работу); их коммиты перенеси в свою ветку, их worktree и ветки после мержа убери сам — что не убралось, назови в ответе;",
|
|
588
588
|
live: "- пока работает хоть один твой субагент, ответ не отдавай: жди их ответов — фоновый субагент будит тебя своим ответом; ответ при живых субагентах выглядит провалом, и диспетчер отдал бы задачу второму исполнителю рядом с тобой. Ждать нельзя — ответь `ждёт субагентов: <какие и что делают>`: это не «сломалось», второго исполнителя не будет;",
|
|
589
589
|
refresh: '- актуализация эпика — субагент, которого печатает `task actualize`, без своего worktree (в твоём) и не в фоне (`run_in_background: false`): его ответ — в том же ходе, затем `{script} task close {number}`, и только потом ответ диспетчеру: стоит тебе ответить, worktree без изменений убирают, и фоновый субагент остаётся без каталога; у задачи без PR (правка данных, сверка, исследование) — сначала закрой issue как выполненную с итоговым комментарием: `gh issue close {number} --repo {repo} --reason completed --comment "<итог>"`;',
|
|
590
|
-
batchLead: "{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону, {mode}: `{script} task start {number} --branch
|
|
590
|
+
batchLead: "{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону, {mode}: `{script} task start {number} --branch exec/<тип>/{number}-<slug>` (вопросы задачи и её параллельная работа — в нём), ветка от свежего origin/{batch}, а не от main (`git fetch origin {batch}`, затем ветка задачи на `origin/{batch}`), код и тесты, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: задача — «{inProgress}» до выпуска пачки, его делает диспетчер — с одним полным прогоном CI и одной актуализацией на эпик.",
|
|
591
591
|
batchWait: "- CI не жди: PR в пачку его не запускает — его ворота — проверки перед коммитом по канону (`elves precommit --base origin/<ветка пачки>`: `lint`, `typecheck`, `test:spec`, затронутые тесты — `docs/testing.md`) и `pr premerge` (быстрые проверки на слиянии, если пачка ушла вперёд); после его кода 0 — `gh pr merge <PR> --rebase` без ожидания CI; полный прогон и деплой — у выпуска, после мержа ждать нечего, но до ответа сними стеки задачи (`{taskEnv} down {number}`, вне песочницы: Docker): задача ждёт выпуска, а её стек до него грузил бы машину;",
|
|
592
592
|
batchRefresh: '- актуализация эпика и `task close` — не твои: обе — у выпуска пачки, одна актуализация на каждый эпик её задач, затем `task close` каждой, их делает диспетчер; задача без PR (правка данных, сверка, исследование) в пачку не идёт — закрой issue как выполненную с итоговым комментарием: `gh issue close {number} --repo {repo} --reason completed --comment "<итог>"`, затем актуализация эпика — субагент, которого печатает `task actualize {number}`, без своего worktree (в твоём) и не в фоне (`run_in_background: false`): его ответ — в том же ходе, затем `{script} task close {number}`, и только потом ответ диспетчеру: стоит тебе ответить, worktree без изменений убирают, и фоновый субагент остаётся без каталога;',
|
|
593
593
|
bypass: "- задача идёт мимо пачки диспетчера `{batch}` — слово владельца: ветка задачи от свежего origin/main, а не от пачки, PR в ветку по умолчанию (не `--base {batch}`) с полным CI, деплой, актуализация эпика и `task close` — твои, как в проекте без пачек; выпуск пачки тебя не ждёт;",
|
|
594
|
-
fixLead: '{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону, {mode}: `{script} task status {number} "{inProgress}" --branch fix/{number}-<slug>`, новая ветка от свежего origin/{batch} (`git fetch origin {batch}`, затем ветка на `origin/{batch}`){previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge` (PR виновной задачи он пропускает при открытом выпуске), мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.',
|
|
594
|
+
fixLead: '{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону, {mode}: `{script} task status {number} "{inProgress}" --branch exec/fix/{number}-<slug>`, новая ветка от свежего origin/{batch} (`git fetch origin {batch}`, затем ветка на `origin/{batch}`){previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge` (PR виновной задачи он пропускает при открытом выпуске), мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.',
|
|
595
595
|
fixPrevious: ", а не от прежней ветки задачи {branches} — она уже в пачке, влита rebase-мержем",
|
|
596
|
-
sessionFixLead: '{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task status {number} "{inProgress}" --branch fix/{number}-<slug>`, новая ветка от свежего origin/{batch}{previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.',
|
|
596
|
+
sessionFixLead: '{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task status {number} "{inProgress}" --branch exec/fix/{number}-<slug>`, новая ветка от свежего origin/{batch}{previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.',
|
|
597
597
|
repeats: "- перед PR — повторы в файлах, которые задача и так правит: исправь в том же PR, новую задачу на них не заводи; повтор вне файлов задачи — дело актуализации эпика;",
|
|
598
598
|
found: "- найденная работа вне задачи — `{script} task new …` (работа эпика задачи — с `--epic`: диспетчер её подхватит) — назови её в ответе: ставить ли её в очередь, решает владелец;",
|
|
599
599
|
question: "- вопрос без ясной рекомендации — в «{questions}» задачи; код, который от него зависит, не начинай и ответь диспетчеру: ответ владельца придёт сюда же.",
|
|
@@ -607,7 +607,7 @@ var ru_default = {
|
|
|
607
607
|
cloudDispatcher: "- диспетчер ждёт закрытия задачи и закрывает её локально — факт, статус, влитая ветка, архив этой сессии: сообщать ему не нужно, сессию не архивируй;",
|
|
608
608
|
cloudQuestion: "- вопрос без ясной рекомендации — в «{questions}» задачи и владельцу в этой сессии, код, который от него зависит, не начинай; остановился (вопрос, сбой, лимит) — комментарий «{state}» в задачу.",
|
|
609
609
|
sessionLead: "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера — сделай задачу целиком по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task start {number} --branch <тип>/{number}-<slug>` (вопросы задачи и её параллельная работа — в нём), ветка от свежего origin/main, код и тесты, PR, зелёный CI, `pr premerge`, мерж, деплой, актуализация эпика, `{script} task close {number}`.",
|
|
610
|
-
sessionBatchLead: "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task start {number} --branch
|
|
610
|
+
sessionBatchLead: "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task start {number} --branch exec/<тип>/{number}-<slug>` (вопросы задачи и её параллельная работа — в нём), ветка от свежего origin/{batch}, а не от main, код и тесты, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: задача — «{inProgress}» до выпуска пачки, его делает диспетчер — с одним полным прогоном CI и одной актуализацией на эпик.",
|
|
611
611
|
sessionIs: "Ты сессия, а не субагент:",
|
|
612
612
|
sessionName: "- назови сессию `#{number} {title}` (`set_session_title`), как только взял задачу, — по имени `est` привяжет сессию к задаче;",
|
|
613
613
|
sessionWait: "- CI и деплой жди фоновой командой — `{waitCi} pr <PR>` (после мержа — `merged <PR>`): её завершение будит сессию; без `Monitor`, цикла-наблюдателя и `ScheduleWakeup` поверх;",
|
package/docs/cloud-sessions.md
CHANGED
|
@@ -4,8 +4,9 @@ Reference for the cloud-session line in `AGENTS.md`. A cloud session is
|
|
|
4
4
|
Claude Code on claude.ai/code, including one started from the phone app: a
|
|
5
5
|
temporary container into which only the project repository is cloned.
|
|
6
6
|
A dispatcher's executor can be one (`AGENTS.md`, "Session and branch — one
|
|
7
|
-
task"): at most
|
|
8
|
-
replaces either — a cloud session's container doesn't
|
|
7
|
+
task"): at most the machine's executors in subagents and 5 cloud sessions at
|
|
8
|
+
once, the owner's number replaces either — a cloud session's container doesn't
|
|
9
|
+
load the machine.
|
|
9
10
|
|
|
10
11
|
## What it sees
|
|
11
12
|
|
package/docs/testing.md
CHANGED
|
@@ -24,7 +24,7 @@ against the Playwright, Next.js, Vite, SvelteKit and Nuxt documentation.
|
|
|
24
24
|
and print whom they wait for (the `slot` skill). Without the queue,
|
|
25
25
|
neighboring sessions, the linter and another worktree's e2e share the cores —
|
|
26
26
|
timeouts and flakes that aren't about the code. Runner workers come from
|
|
27
|
-
`ELVES_SLOT_CPUS` (
|
|
27
|
+
`ELVES_SLOT_CPUS` (its slot's share of half of the cores); CI has its own:
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
30
|
maxWorkers: Number(process.env.ELVES_SLOT_CPUS) || undefined, // vitest.config.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miroshnik/elves",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1105.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Elves — a development flow with AI agents: shared rules and skills for any agent; install — bunx @miroshnik/elves install -g; the installer and skill scripts — TypeScript under Bun, tests — bun test in tests/",
|
|
6
6
|
"repository": {
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"eslint-plugin-boundaries": "^7.2.0",
|
|
73
73
|
"knip": "^6.41.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "85291db95dd59132267a5adc93ca6dfad3b00861"
|
|
76
76
|
}
|
package/skills/github/SKILL.md
CHANGED
|
@@ -148,8 +148,8 @@ folder, not a worktree: executors (subagents, cloud sessions) start from
|
|
|
148
148
|
`main`. `task queue` prints ready
|
|
149
149
|
tasks, each with an indented line — its executor's prompt. In Claude Code: an executor — `Agent` with
|
|
150
150
|
`isolation: "worktree"` and `run_in_background: true`, the prompt — as
|
|
151
|
-
is; at most
|
|
152
|
-
owner's number replaces either; another project's task — an app session in
|
|
151
|
+
is; at most the machine's executors in subagents and 5 cloud sessions at
|
|
152
|
+
once, the owner's number replaces either; another project's task — an app session in
|
|
153
153
|
its folder (`start_session`, own worktree);
|
|
154
154
|
`=` — a task in work, its line says why, not launched again. A batch project
|
|
155
155
|
(`"batch": true` in `.agents/elves.json`) — executors merge into the batch
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
"subagents": "- writing subagents — launch as needed, no limit: each gets its own worktree and «{task} #{number}» at the start of its prompt (`est` links its work by it); bring their commits into your branch, remove their worktrees and branches yourself after the merge — what didn't go, name in the answer;",
|
|
104
104
|
"live": "- while any of your subagents works, don't answer: wait for their answers — a background subagent wakes you with its answer; an answer with live subagents looks like a failure, and the dispatcher would give the task to a second executor next to you. Can't wait — answer `waits for subagents: <which and what they do>`: it isn't `failed`, there will be no second executor;",
|
|
105
105
|
"refresh": "- the epic refresh — the subagent `task actualize` prints, without a worktree of its own (in yours) and not in the background (`run_in_background: false`): its answer — in the same turn, then `{script} task close {number}`, and only then the answer to the dispatcher: once you answer, a worktree without changes is removed, and a background subagent is left without a directory; a task without a PR (a data edit, a reconciliation, research) — first close the issue as completed with a result comment: `gh issue close {number} --repo {repo} --reason completed --comment \"<result>\"`;",
|
|
106
|
-
"batchLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon, {mode}: `{script} task start {number} --branch
|
|
106
|
+
"batchLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon, {mode}: `{script} task start {number} --branch exec/<type>/{number}-<slug>` (the task's questions and its parallel work — inside it), the branch from a fresh origin/{batch}, not from main (`git fetch origin {batch}`, then the task branch on `origin/{batch}`), code and tests, the checks before a commit, PR into the batch (`gh pr create --base {batch}`), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: the task stays «{inProgress}» till the batch's release — the dispatcher's, with one full CI run and one refresh per epic.",
|
|
107
107
|
"batchWait": "- don't wait for CI: a PR into the batch runs none — its gate is the checks before a commit by the canon (`elves precommit --base origin/<batch branch>`: `lint`, `typecheck`, `test:spec`, the affected tests — `docs/testing.md`) and `pr premerge` (the fast checks on the merge, if the batch moved on); after its code 0 — `gh pr merge <PR> --rebase` without a CI wait; the full run and the deploy are the release's, nothing to wait for after the merge, but before the answer take the task's stacks down (`{taskEnv} down {number}`, unsandboxed: Docker): the task waits for the release, its stack would load the machine till then;",
|
|
108
108
|
"batchRefresh": "- the epic refresh and `task close` aren't yours: both are the batch's release — one refresh per epic of its tasks, then `task close` of each, the dispatcher's; a task without a PR (a data edit, a reconciliation, research) isn't in the batch — close the issue as completed with a result comment: `gh issue close {number} --repo {repo} --reason completed --comment \"<result>\"`, then the epic refresh — the subagent `task actualize {number}` prints, without a worktree of its own (in yours) and not in the background (`run_in_background: false`): its answer — in the same turn, then `{script} task close {number}`, and only then the answer to the dispatcher: once you answer, a worktree without changes is removed, and a background subagent is left without a directory;",
|
|
109
109
|
"bypass": "- the task goes past the dispatcher's batch `{batch}` — the owner's word: the task branch from a fresh origin/main, not from the batch, the PR into the default branch (not `--base {batch}`) with the full CI, the deploy, the epic refresh and `task close` — yours, as in a project without batches; the batch's release doesn't wait for you;",
|
|
110
|
-
"fixLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon, {mode}: `{script} task status {number} \"{inProgress}\" --branch fix/{number}-<slug>`, a new branch from a fresh origin/{batch} (`git fetch origin {batch}`, then the branch on `origin/{batch}`){previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge` (it lets the guilty task's PR through the open release), merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.",
|
|
110
|
+
"fixLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon, {mode}: `{script} task status {number} \"{inProgress}\" --branch exec/fix/{number}-<slug>`, a new branch from a fresh origin/{batch} (`git fetch origin {batch}`, then the branch on `origin/{batch}`){previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge` (it lets the guilty task's PR through the open release), merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.",
|
|
111
111
|
"fixPrevious": ", not the task's earlier branch {branches} — it is in the batch already, merged by a rebase",
|
|
112
|
-
"sessionFixLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task status {number} \"{inProgress}\" --branch fix/{number}-<slug>`, a new branch from a fresh origin/{batch}{previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.",
|
|
112
|
+
"sessionFixLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session — a fix in the batch `{batch}`: its release PR #{release} is red ({checks}), and the task, merged into the batch already, is named guilty — fix it in the batch by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task status {number} \"{inProgress}\" --branch exec/fix/{number}-<slug>`, a new branch from a fresh origin/{batch}{previous}, the cause by the failed checks (`gh pr checks {release}`, their logs), the fix and its test, commits with `Refs #{number}`, the checks before a commit, PR into the batch (`gh pr create --base {batch}`, `Refs #{number}` in the body), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: after the merge the dispatcher runs the release again — the full run on the same PR #{release}.",
|
|
113
113
|
"repeats": "- before the PR — repeats in the files the task changes anyway: fix them in the same PR, don't file a task for them; a repeat outside the task's files is the epic refresh's;",
|
|
114
114
|
"found": "- work found outside the task — `{script} task new …` (work of the task's epic — with `--epic`: the dispatcher picks it up) — name it in the answer: whether to queue it is the owner's call;",
|
|
115
115
|
"question": "- a question without a clear recommendation — into «{questions}» of the task; don't start the code that depends on it and answer the dispatcher: the owner's answer comes back here.",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"cloudDispatcher": "- the dispatcher waits for the task to close and closes it locally — the actual, the status, the merged branch, archiving this session: don't message it, don't archive the session;",
|
|
124
124
|
"cloudQuestion": "- a question without a clear recommendation — into «{questions}» of the task and to the owner in this session, don't start the code that depends on it; stopped (a question, a failure, a limit) — a «{state}» comment into the task.",
|
|
125
125
|
"sessionLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session — do the task whole by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task start {number} --branch <type>/{number}-<slug>` (the task's questions and its parallel work — inside it), the branch from a fresh origin/main, code and tests, PR, green CI, `pr premerge`, merge, deploy, the epic refresh, `{script} task close {number}`.",
|
|
126
|
-
"sessionBatchLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task start {number} --branch
|
|
126
|
+
"sessionBatchLead": "{task} #{number} «{title}» in {repo}{epic}: you are an executor session of the dispatcher session, the task goes into the batch `{batch}` — do the task whole by the canon of this project, in its mode (`check` prints it; outside auto — commit, push and merge on the owner's «yes»): `{script} task start {number} --branch exec/<type>/{number}-<slug>` (the task's questions and its parallel work — inside it), the branch from a fresh origin/{batch}, not from main, code and tests, the checks before a commit, PR into the batch (`gh pr create --base {batch}`), `pr premerge`, merge. No CI wait, no deploy, no epic refresh and no `task close`: the task stays «{inProgress}» till the batch's release — the dispatcher's, with one full CI run and one refresh per epic.",
|
|
127
127
|
"sessionIs": "You are a session, not a subagent:",
|
|
128
128
|
"sessionName": "- name the session `#{number} {title}` (`set_session_title`) once the task is taken — `est` links the session to the task by it;",
|
|
129
129
|
"sessionWait": "- wait for CI and the deploy with a background command — `{waitCi} pr <PR>` (after the merge — `merged <PR>`): its completion wakes the session; no `Monitor`, watcher loop or `ScheduleWakeup` on top;",
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
"subagents": "- пишущих субагентов запускай по необходимости, без лимита: каждому — свой worktree и «{task} #{number}» в начале промпта (по нему `est` привяжет его работу); их коммиты перенеси в свою ветку, их worktree и ветки после мержа убери сам — что не убралось, назови в ответе;",
|
|
104
104
|
"live": "- пока работает хоть один твой субагент, ответ не отдавай: жди их ответов — фоновый субагент будит тебя своим ответом; ответ при живых субагентах выглядит провалом, и диспетчер отдал бы задачу второму исполнителю рядом с тобой. Ждать нельзя — ответь `ждёт субагентов: <какие и что делают>`: это не «сломалось», второго исполнителя не будет;",
|
|
105
105
|
"refresh": "- актуализация эпика — субагент, которого печатает `task actualize`, без своего worktree (в твоём) и не в фоне (`run_in_background: false`): его ответ — в том же ходе, затем `{script} task close {number}`, и только потом ответ диспетчеру: стоит тебе ответить, worktree без изменений убирают, и фоновый субагент остаётся без каталога; у задачи без PR (правка данных, сверка, исследование) — сначала закрой issue как выполненную с итоговым комментарием: `gh issue close {number} --repo {repo} --reason completed --comment \"<итог>\"`;",
|
|
106
|
-
"batchLead": "{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону, {mode}: `{script} task start {number} --branch
|
|
106
|
+
"batchLead": "{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону, {mode}: `{script} task start {number} --branch exec/<тип>/{number}-<slug>` (вопросы задачи и её параллельная работа — в нём), ветка от свежего origin/{batch}, а не от main (`git fetch origin {batch}`, затем ветка задачи на `origin/{batch}`), код и тесты, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: задача — «{inProgress}» до выпуска пачки, его делает диспетчер — с одним полным прогоном CI и одной актуализацией на эпик.",
|
|
107
107
|
"batchWait": "- CI не жди: PR в пачку его не запускает — его ворота — проверки перед коммитом по канону (`elves precommit --base origin/<ветка пачки>`: `lint`, `typecheck`, `test:spec`, затронутые тесты — `docs/testing.md`) и `pr premerge` (быстрые проверки на слиянии, если пачка ушла вперёд); после его кода 0 — `gh pr merge <PR> --rebase` без ожидания CI; полный прогон и деплой — у выпуска, после мержа ждать нечего, но до ответа сними стеки задачи (`{taskEnv} down {number}`, вне песочницы: Docker): задача ждёт выпуска, а её стек до него грузил бы машину;",
|
|
108
108
|
"batchRefresh": "- актуализация эпика и `task close` — не твои: обе — у выпуска пачки, одна актуализация на каждый эпик её задач, затем `task close` каждой, их делает диспетчер; задача без PR (правка данных, сверка, исследование) в пачку не идёт — закрой issue как выполненную с итоговым комментарием: `gh issue close {number} --repo {repo} --reason completed --comment \"<итог>\"`, затем актуализация эпика — субагент, которого печатает `task actualize {number}`, без своего worktree (в твоём) и не в фоне (`run_in_background: false`): его ответ — в том же ходе, затем `{script} task close {number}`, и только потом ответ диспетчеру: стоит тебе ответить, worktree без изменений убирают, и фоновый субагент остаётся без каталога;",
|
|
109
109
|
"bypass": "- задача идёт мимо пачки диспетчера `{batch}` — слово владельца: ветка задачи от свежего origin/main, а не от пачки, PR в ветку по умолчанию (не `--base {batch}`) с полным CI, деплой, актуализация эпика и `task close` — твои, как в проекте без пачек; выпуск пачки тебя не ждёт;",
|
|
110
|
-
"fixLead": "{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону, {mode}: `{script} task status {number} \"{inProgress}\" --branch fix/{number}-<slug>`, новая ветка от свежего origin/{batch} (`git fetch origin {batch}`, затем ветка на `origin/{batch}`){previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge` (PR виновной задачи он пропускает при открытом выпуске), мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.",
|
|
110
|
+
"fixLead": "{task} #{number} «{title}» в {repo}{epic}: ты исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону, {mode}: `{script} task status {number} \"{inProgress}\" --branch exec/fix/{number}-<slug>`, новая ветка от свежего origin/{batch} (`git fetch origin {batch}`, затем ветка на `origin/{batch}`){previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge` (PR виновной задачи он пропускает при открытом выпуске), мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.",
|
|
111
111
|
"fixPrevious": ", а не от прежней ветки задачи {branches} — она уже в пачке, влита rebase-мержем",
|
|
112
|
-
"sessionFixLead": "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task status {number} \"{inProgress}\" --branch fix/{number}-<slug>`, новая ветка от свежего origin/{batch}{previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.",
|
|
112
|
+
"sessionFixLead": "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера — починка в пачке `{batch}`: её PR выпуска #{release} красный ({checks}), а задача, уже влитая в пачку, названа виновной — почини её в пачке по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task status {number} \"{inProgress}\" --branch exec/fix/{number}-<slug>`, новая ветка от свежего origin/{batch}{previous}, причина — по упавшим проверкам (`gh pr checks {release}`, их логи), починка и её тест, коммиты с `Refs #{number}`, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`, в теле `Refs #{number}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: после мержа диспетчер гонит выпуск заново — полный прогон на том же PR #{release}.",
|
|
113
113
|
"repeats": "- перед PR — повторы в файлах, которые задача и так правит: исправь в том же PR, новую задачу на них не заводи; повтор вне файлов задачи — дело актуализации эпика;",
|
|
114
114
|
"found": "- найденная работа вне задачи — `{script} task new …` (работа эпика задачи — с `--epic`: диспетчер её подхватит) — назови её в ответе: ставить ли её в очередь, решает владелец;",
|
|
115
115
|
"question": "- вопрос без ясной рекомендации — в «{questions}» задачи; код, который от него зависит, не начинай и ответь диспетчеру: ответ владельца придёт сюда же.",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"cloudDispatcher": "- диспетчер ждёт закрытия задачи и закрывает её локально — факт, статус, влитая ветка, архив этой сессии: сообщать ему не нужно, сессию не архивируй;",
|
|
124
124
|
"cloudQuestion": "- вопрос без ясной рекомендации — в «{questions}» задачи и владельцу в этой сессии, код, который от него зависит, не начинай; остановился (вопрос, сбой, лимит) — комментарий «{state}» в задачу.",
|
|
125
125
|
"sessionLead": "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера — сделай задачу целиком по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task start {number} --branch <тип>/{number}-<slug>` (вопросы задачи и её параллельная работа — в нём), ветка от свежего origin/main, код и тесты, PR, зелёный CI, `pr premerge`, мерж, деплой, актуализация эпика, `{script} task close {number}`.",
|
|
126
|
-
"sessionBatchLead": "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task start {number} --branch
|
|
126
|
+
"sessionBatchLead": "{task} #{number} «{title}» в {repo}{epic}: ты сессия-исполнитель сессии-диспетчера, задача идёт в пачку `{batch}` — сделай задачу целиком по канону этого проекта, в его режиме (его печатает `check`; не в auto — коммит, пуш и мерж по «да» владельца): `{script} task start {number} --branch exec/<тип>/{number}-<slug>` (вопросы задачи и её параллельная работа — в нём), ветка от свежего origin/{batch}, а не от main, код и тесты, проверки перед коммитом, PR в пачку (`gh pr create --base {batch}`), `pr premerge`, мерж. Ожидания CI, деплоя, актуализации эпика и `task close` нет: задача — «{inProgress}» до выпуска пачки, его делает диспетчер — с одним полным прогоном CI и одной актуализацией на эпик.",
|
|
127
127
|
"sessionIs": "Ты сессия, а не субагент:",
|
|
128
128
|
"sessionName": "- назови сессию `#{number} {title}` (`set_session_title`), как только взял задачу, — по имени `est` привяжет сессию к задаче;",
|
|
129
129
|
"sessionWait": "- CI и деплой жди фоновой командой — `{waitCi} pr <PR>` (после мержа — `merged <PR>`): её завершение будит сессию; без `Monitor`, цикла-наблюдателя и `ScheduleWakeup` поверх;",
|
|
@@ -1028,10 +1028,11 @@ after its answer, and the woken executor of #545 worked unlocked; the wait for C
|
|
|
1028
1028
|
is a Bash call of up to 9 minutes without commits.
|
|
1029
1029
|
|
|
1030
1030
|
In Claude Code: an executor — `Agent` with `isolation: "worktree"` and
|
|
1031
|
-
`run_in_background: true`, the prompt — the indented line as is; at most
|
|
1032
|
-
subagents and 5 cloud sessions at once, the owner's
|
|
1033
|
-
(subagents share the machine
|
|
1034
|
-
|
|
1031
|
+
`run_in_background: true`, the prompt — the indented line as is; at most the
|
|
1032
|
+
machine's executors in subagents and 5 cloud sessions at once, the owner's
|
|
1033
|
+
number replaces either (subagents share the machine: `Next:` names the
|
|
1034
|
+
executors of its capacity — `slot --capacity`, `machine.json` or the cores and
|
|
1035
|
+
memory, without the slot skill — 3; a cloud session has its own container); a task in work (`=`) isn't launched again.
|
|
1035
1036
|
Before each launch — `get_usage`: the 5-hour limit at 85% and more — no new
|
|
1036
1037
|
executors, the running ones finish, then `Remaining: N tasks, the limit`. An
|
|
1037
1038
|
answer arrives as the subagent's notification; after each — `task queue`
|
|
@@ -1094,13 +1095,14 @@ dispatcher's checkout (`install` and `update` carry it over): the dispatcher's
|
|
|
1094
1095
|
tasks go into the default branch with one release — one full CI run and one
|
|
1095
1096
|
deploy — instead of each its own, and a task PR into the batch runs no CI
|
|
1096
1097
|
(`skills/spec/ci.md`, "Batches").
|
|
1097
|
-
The first `task queue` creates the batch branch
|
|
1098
|
+
The first `task queue` with a ready task creates the batch branch
|
|
1098
1099
|
`batch/<YYYY-MM-DD>-<k>` (not `release/*`: git-flow projects have it) from a
|
|
1099
1100
|
fresh `origin/<base>`, `k` — the first free number of the day, and pushes it
|
|
1100
|
-
without a local branch — a `+` line;
|
|
1101
|
-
line: the marker keeps it as
|
|
1102
|
-
command (`task resume` reads only
|
|
1103
|
-
|
|
1101
|
+
without a local branch — a `+` line; nothing ready — no branch, an `○` line
|
|
1102
|
+
(#787). The next ones take the same — an `○` line: the marker keeps it as
|
|
1103
|
+
`batch <owner/repo> <branch>` after the queue command (`task resume` reads only
|
|
1104
|
+
the command). Gone from origin — released or deleted — a new one, with a ready
|
|
1105
|
+
task too. No session id, not a checkout of the repository, git
|
|
1104
1106
|
failed — an `○`/`!` line, no batch: executors go into the default branch.
|
|
1105
1107
|
GitHub links a PR to a task and closes it only by a merge into the default
|
|
1106
1108
|
branch, so the script finds a batch PR itself, by the task branch or `Closes
|
|
@@ -1109,7 +1111,13 @@ PR till the release — open and In progress (question 1 of the epic); a blocker
|
|
|
1109
1111
|
merged into it doesn't hold a task of the same batch, one outside it — merged
|
|
1110
1112
|
into another batch or not merged — holds. The assignment (`--assignment`,
|
|
1111
1113
|
`--session`) reads the batch from the marker — a subagent shares the session's
|
|
1112
|
-
id: the task branch from `origin/<batch
|
|
1114
|
+
id: the task branch from `origin/<batch>` in the area `exec` —
|
|
1115
|
+
`exec/<type>/<N>-<slug>`, a fix of a red release `exec/fix/<N>-<slug>`
|
|
1116
|
+
(#785): a preview host builds every pushed branch and comments on its PR, one
|
|
1117
|
+
notification per batch task, and decides by the branch's name, not the PR's
|
|
1118
|
+
base — Vercel: `"git": {"deploymentEnabled": {"exec/**": false}}` in
|
|
1119
|
+
`vercel.json` skips them, the release PR keeps its preview; past the batch
|
|
1120
|
+
(`--main`) and outside it — no area. Then the checks before a commit, the PR
|
|
1113
1121
|
`--base <batch>`, `pr premerge` (it checks against the PR's base: by git, #676),
|
|
1114
1122
|
the merge at once — no CI wait (the PR runs none: the slot is free at the
|
|
1115
1123
|
merge, #676), no deploy wait, no epic refresh (the release's, one per epic)
|
|
@@ -1158,9 +1166,11 @@ task's earlier branch (rebase-merged into the batch already, so no restart
|
|
|
1158
1166
|
line), the commits and the PR body with `Refs #N`; `--cloud` — refused: a
|
|
1159
1167
|
cloud executor isn't in the batch. Released — its release PR merged,
|
|
1160
1168
|
the branch maybe still on origin — the next batch starts only with a ready
|
|
1161
|
-
task to hand out (`○ no new batch branch` otherwise)
|
|
1162
|
-
|
|
1163
|
-
|
|
1169
|
+
task to hand out (`○ no new batch branch` otherwise), like the first one: a
|
|
1170
|
+
dispatcher with nothing to hand out leaves no empty batch branch on origin, and
|
|
1171
|
+
the marker drops the batch line. Nothing is merged into a new batch yet, so
|
|
1172
|
+
starting it after the readiness check changes no blocker's reading. A released
|
|
1173
|
+
batch branch still on origin without an open PR into it is
|
|
1164
1174
|
deleted (`+`), with one — kept (`○`) till its executor moves the PR (`pr
|
|
1165
1175
|
premerge`); a new batch's `k` skips the names of the recent PRs' branches too:
|
|
1166
1176
|
a released name taken again would read as released at once.
|