/lane-stack:orchestrator-lanes [info]from lane-stack
Terminal harness for the dev-orchestrator lane stack. Manages run-controller, score, DAG, run-supervisor, L0/L1/L2, and wt-merge-main. Loads when the session runs this harness or when $ARGUMENTS is exactly 'info'. Skips Lane Pilot, BB chats, and non-orchestrator agents.
Ships in lane-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Inside a Lane Pilot chat (
LANE_PILOT_AGENT_TYPEset / toolslane_pilot_*present) do not follow this file: it is the terminal harness. Dispatch withlane_pilot_dispatch_writer(the whole plan at once, order throughdepends_on), poll withlane_pilot_wait_writer; Lane Pilot runs plan critique, acceptance and the merge into main itself, sorun-init,run-controller,run-supervisor,lane-ctl,wt-createandwt-merge-mainare not yours to call (the guard refuses them). Onlyreferences/decomposition.mdstill applies there.
If $ARGUMENTS is exactly info, print references/info.md verbatim (Russian), then stop. Do not score. Do not run-init.
Load: karpathy-guidelines, lane-contract, project-life, resume-project, project-design, ui-ux-pro-max.
Before filling tasks/*.yaml: Read this skill's references/task-yaml.md.
Docs: FILE-CONTRACT.md, ROUTING.md, SOLO-ORCHESTRATION.md,
PLATFORM-CAPABILITIES.md (Claude Code + Codex features we use),
docs/decisions/ADR-codex-effort.md under the lane-stack / ~/.agents/docs/.
You are the only person who merges to main. Human never merges.
If the user is in a planning session (project-life: «планируем /
не запускай / спланируй / обсудим / пока план») or has not said
«делай / реализуй / в работу / запускай ран»:
run-init, or dispatch writers..agents/plans/ only.artifacts/. Still no run.~/.claude/plans/.
If the host is in Plan mode, tell the user to switch to default.Phase 0 starts only after «делай / реализуй / в работу».
UI / visual initiative: root docs/DESIGN.md plus the full
apps/<name>/docs/DESIGN.md for every UI app you touch. If any of those
are missing, spawn design-lead before run-init. UI task read_first
lists both root and that app's DESIGN.md. Do not put them in writer
owns_paths unless the outcome is tokens/docs.
+2 multi-problem · +2 UI/state/auth/pay · +2 backend/API · +2 multi-surface · +2 needs verify · +3 prod/billing/security
| Score | Path |
|---|---|
| 0–2 | Micro: 1 short contract, commit main |
| 3–6 | Express: 1 task, dispatch, verify, commit/merge main |
| 7–8 | Brief: 2–4 tasks, filled PLAN + SPEC; workspace per adoc profile |
| 9–10 | Full: rich SPEC + DAG; workspace per adoc profile |
| 11+ | Split feature; ask user |
Writer source of truth = adoc / agents-doctor → .agents/routing.profile.yaml
(lanes.main_write, writer.model, writer.reasoning_effort, workspace.mode).
lane: <main_write> exactly (e.g. lane: codex).lane: kimi unless adoc says so. run-validate rejects mismatch.run-controller defaults --provider / model / effort from the same profile.in_place | worktree | auto — see Phase 2.Rules (one outcome per task, disjoint owns_paths, real depends_on only, size budgets) live in references/decomposition.md. Read it before run-init and before filling YAML; skipping it is how multi-task runs stall.
Not .agents/plans/ for coding execution. Strategy stays in .agents/plans/; promote to a run when implementing.
run-init "$(pwd)" <slug> --score <score>
# Fill PLAN.md, SPEC.md (required content when score≥7 or ≥2 tasks), tasks/*.yaml
# YAML is technical: objective=outcome, read_first=existing files,
# context_selectors=line windows, interfaces=signatures or [].
# Do not copy writer recovery (git checkout, edit tool, CONTINUATION) into the task.
plan-critique --run-dir "$(pwd)/.agents/runs/<slug>" # stages.plan_critique (adoc)
# Every error/warn id → artifacts/critique-reply.json (take | skip+note)
run-validate --run-dir "$(pwd)/.agents/runs/<slug>" --phase pre-dispatch
run-board "$(pwd)"
Plan critique (configure in adoc → Stages):
LanePlanCritique JSON schema).artifacts/critique.json + critique.md. Findings with error/warn are inbox.run-controller / writers (advisory and gate):{"schema_version":1,"items":[{"id":"structural:verify_heavy:003","verdict":"skip","note":"L1 is enough"}]}
verdict | Meaning |
|---|---|
take | You edited PLAN/SPEC/tasks for that id; re-run plan-critique |
skip | Leave as-is; note required |
Bulk skip: plan-critique --ack --note 'reason'.
run-validate --phase pre-dispatch and run-controller start refuse unreplied ids.
wiki/ TODO/ .agents/plans/ (and legacy docs/plans/) owns_gap is info — no reply.
DAG table, goals, out-of-scope, verification plan (L1 vs L2), risk notes.
Required when score ≥ 7 or ≥ 2 tasks. Must include, in English:
Reject template-only text (“Record interfaces, invariants…”). run-validate enforces this.
Before writing tasks/*.yaml, Read references/task-yaml.md in this skill.
That file is the field map + good/bad examples. lane-contract is the schema/gate
sibling; do not skip the reference and invent a novel in interfaces.
Where the TZ lives:
| Put here | Not here |
|---|---|
objective + acceptance | interfaces as a briefing |
read_first = existing files | section C4 / lines 10-20 ONLY |
context_selectors = line windows | notes inside read_first |
interfaces = signatures or [] | CONTINUATION / Gaps / git status |
invariants = product or [] | HARD RULE / edit tool / wc -l / checkout |
Immutable after first start. verification[] = L1 focused only (see below).
run-validate --phase pre-dispatch rejects the bad column.
Repeated correction rule: if you retype the same path/command fix twice in a project, persist it as a rule first (lane-memory lesson "<rule>" --for pm|writer|both, kept on the hub), then regenerate the plan.
This skill is Claude Code dev-orchestrator only. Codex / Grok / Kimi / Qwen / AGY
must not load it and must not wt-create / git worktree add.
Read .agents/routing.profile.yaml → workspace.mode (default auto if missing).
in_place wins over score, risk, and multi-write. Never override adoc In-place.
workspace.mode | Action |
|---|---|
| in_place | project_cwd = repo; no wt-create; PM commits main |
| worktree | always wt-create → project_cwd = .worktrees/<slug>; PM wt-merge-main |
| auto | worktree when score ≥ worktree_min_score (default 4) or (worktree_on_multi_write and ≥2 write tasks); else in-place |
Also: high-risk write → prefer worktree even under auto; avoid parallel writers on overlapping blast radius.
run-controller start → one run-supervisor watches
provider slots (default 5) release ready DAG tasks
complete → owns → L1 verify → accept (progressive)
retry once only if `recovery.retry_ok`; eligible 2nd failure → Codex Sol
trusted STATUS:partial / `provider_partial` → block + replace task (not retry, not Sol)
task blocked → siblings continue; dependents of blocked upstream cascade-blocked
Never one Claude subagent per writer. Writers = durable processes (kimi/…).
Never PM run-controller start|watch|status — only Agent(run-supervisor).
Never PM nohup/async ad-hoc monitors.
| Lane | Who |
|---|---|
| kimi / qwen / agy / grok / codex / cursor / opencode | process writer via controller (adoc main_write) |
| codex Sol fallback | one Sol high after two eligible writer availability failures |
emergency-writer | manual emergency after terminal block |
night-reviewer | nightly (sol high; xhigh only escalate) |
Claude agent names are roles, not brands. Daytime coder = process from adoc.
Roster: agents/claude/README.md.
| Tier | Owner | Scope | When |
|---|---|---|---|
| L0 | Writer | Code only; do not run tests/typecheck | During implement |
| L1 | Controller | Task verification[] — focused paths/suites only | After report → accept |
| L2 | PM pre-merge / CI | One full or affected suite for the whole run | After all accepted |
npm run test:unit -- path/to/spec --silent, single-package typecheck, path-scoped vitest/jest.npm run build / root npm test on every task when the run has ≥2 tasks — that is L2.run-validate warns or rejects (score≥7).verification[].cwd is almost always project_cwd (the worktree). Relative
script args resolve there, not in the main checkout.
| Wrong | Right |
|---|---|
cwd: worktree + python3 .agents/runs/X/artifacts/001/check.py when check exists only on main | Before run-controller start: copy check into worktree at that relative path (recovery lane / PM shell allowed paths), or |
Absolute path to main .agents/... | Forbidden (escapes worktree) |
“Writer will create check.py under .agents” | Forbidden — writers must not author .agents; pre-author checks |
Canonical patterns:
tests/test_foo.py +python3 -m unittest discover -s tests -p test_foo.py with cwd: project_cwd.worktree/.agents/runs/<slug>/artifacts/<id>/check.py exists on disk beforeWrite only basename check.py under.agents/runs/<slug>/[artifacts/<id>/]check.py (or under .worktrees/... same
shape) — not helper.py, not state.json / reports.adoc Work → In-place): one tree — main .agents/runs/... paths work.run-validate --phase pre-dispatch rejects missing script files under
verification cwd. Fix paths before first lane start (YAML is sha-pinned).
After all accepted: run-validate --phase pre-merge, then one build/test pass, then merge.
When A verifies while B runs: accept A now. Done only with acceptance.json.
No daytime LLM review; medium/high → nightly tier.
lane-stall-check "$(pwd)" --minutes 5
artifacts/<id>/owns-check.json (violations, foreign_ignored, baseline_used)..npm-cache, node_modules, .pnpm-store, …) → gate bug/noise: do not add caches to owns_paths. Re-run owns/verify after stack ignore fix / clean cache..npm-cache to owns_paths”.All accepted → pre-merge validate → L2 once → wt-merge-main or commit main → push if remote.
After ~6 tasks or heavy transcripts: handoff to PROGRESS; fresh orchestrator session if needed.
Before retry or fallback — re-check. Read lane-ctl status --json:
report.status, recovery.next, recovery.retry_ok, recovery.fallback_ok,
provider.fallback_eligible. Two same last_failure_class values are not
enough. Trusted STATUS: partial / provider_partial is a contract or
sandbox block (often .agents in owns), not a writer crash.
report.md STATUSrecovery.retry_ok (controller / lane-ctl retry via lane-supervisor)recovery.fallback_ok and fallback_eligiblerecovery.next: replace_task → replacement YAML (drop .agents/** from owns; PM applies playbooks)lane-supervisor one-shot (status / retry / accept / verify — one typed action)emergency-writer after terminal block only (ADR-codex-effort)Silence protocol: UI «Teammate @rs-… finished» ≠ digest. Same turn: read
controller.json. No DONE accepted|blocked|failed + stage still live →
re-dispatch one run-supervisor. Stage already blocked/failed → recover
now; do not wait for the human. Host hook pm_stop_sentinel pokes the PM
if it tries to idle mid-run or after a fresh terminal stage. Host hook pm_stop_sentinel pokes the PM
if it tries to idle mid-run or after a fresh terminal stage.
| Mode | For | Not for |
|---|---|---|
| TEAM | Research/audit teammates | Same-goal product write via run-supervisor |
| WRITE | run-supervisor + durable writer | Same-goal research team spawn |
Close TEAM before WRITE (and vice versa) on one human goal. Announce «режим: TEAM|WRITE».
| State | Meaning |
|---|---|
| working | Still running a turn |
| done | One-shot Agent finished with a final result |
| idle | Parked for resume — normal after DONE/FAILED/WAIT; not a failure |
| Mode | Rule |
|---|---|
| Agent team teammate | Each turn ends with DONE <path> / FAILED <reason> / WAIT <why> (TeammateIdle hook). Report under .agents/team/…. Idle = read last message + file. Next ask = SendMessage. No nag «you went idle» |
Stack one-shot (run-supervisor, …) | One job → DONE/FAILED + evidence → end as done. Next action = new Agent(...), not SendMessage-resume after DONE |
Also:
lane-bg), not a teammate that only tails deploy.acceptance.json / controller stage; idle chips are not stage.TaskStop — hung working Agents or intentional abort; not the happy path after DONE.run-supervisor / lane-supervisor (teams ≠ writers).SendMessage / ListAgentsClaude Code ≥ 2.1.224 (Remote Control start-by-name in 2.1.225).
| Where | What |
|---|---|
| Lead ↔ teammate | Normal team dialogue (questions, clarifications, final ask) |
run-supervisor → PM | Mid-run SendMessage to the unique session --name (<4chars>-<folder>-DD-MM-YYYY). Never bare dev-orchestrator |
| PM → operator Remote Control (optional) | On terminal blocked/failed or ship: ListAgents → SendMessage to name [ref] |
| Not for | Writer start/accept/verify, replacing controller.json, secrets in peer text, accusing idle teammates of failure |
Control plane stays file-based. Peer messages are short status + paths only.
While a run has controller.json stage in running / degraded / dispatching
or a live run-controller process:
| Forbidden for PM | Do instead |
|---|---|
Run task verification[] yourself in Bash and call it accept | Let controller L1 run; or lane-supervisor typed verify/accept |
Hand-write acceptance.json / report.md / forge receipts | lane-ctl accept only after owns+verify evidence |
emergency-writer to “just finish” a still-runnable lane | Only after terminal blocked/failed with no retry left |
| Parallel Claude coder subagents for the same task | One durable writer via controller |
Restart controller mid-flight without reading runtime.json | Diagnose protocol/owns first; fix stack or retry typed |
Done for a task = artifacts/<id>/acceptance.json from the control plane — not
“tests green in chat”. Product may be correct and still not shipped until accept.
Protocol failures (protocol_error in runtime.json, e.g. report envelope): treat
as provider protocol, not “rewrite product”. Prefer retry after stack fix;
do not re-implement the feature as Claude.
.agents/** (plans, decisions drafts, research, reports), PROGRESS, and dotenv (.env, .env.*) for secrets (keep keys out of writer prompts).acceptance.json.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub vkirill/claude-lane-stack --plugin lane-stack48 skills in this plugin
/ai-detectДетекция и коррекция AI-сгенерированного текста по методике DrMax LinguaForensic v3.9.4 (284 лингвистических признака + 16 структурных маркеров + knockoff + fluency F1–F7 + GEO G0–G5 + adversarial humanization + Programmatic/Affiliate SEO domain + alignment-style proxies). 5 режимов: быстрая детекция, полная детекция, стратегический рерайт, сравнительный анализ, циклический рерайт. Use when: проверь текст на AI, роботность, AI-детект, детекция текста, похоже на нейросеть, гуманизация, очеловечить текст, рерайт под человека, снизить детектируемость, цитируемость в AI Overview, GEO-оптимизация текста, LinguaForensic, knockoff, fluency. SKIP: написание с нуля (→drmax-cocoon-engine-x4); типографика (→ru-text); редактура без детекта (→drmax-text-humanization)./app-architectOwner-facing architect for a new app or service. Plain-language chat; living plan artifacts on disk. Use when user says архитектор, новое приложение, новый сервис, спроектируем, как устроить продукт, app-architect, lane-stack:app-architect; `$ARGUMENTS` exactly info prints the card. Not a run. Not onboard./browser-qaLive browser QA + Playwright-compatible replay. Disk .agents/qa/. Use when (terminal Lane Stack): проверь в браузере, кликни сценарий, вёрстка 375, screenshot QA. SKIP: Lane Pilot chats (PM calls `lane_pilot_browser_qa`); DESIGN.md taste (design-lead); product Vue/CSS (writer lane); L0/L1 unit/API (lane-contract)./bulk-readerDelegate fat file reads to the project's pm_read worker. Use when a Read/cat/head/tail/sed of a file over pm_read.min_lines was blocked, or you must map a large file without ingesting it./cocoon-chainsmithDrMax COCOON CHAINSMITH v3 — fills 9 YAML vars and emits a verified CP-Navigator command sequence for Cocoon Engine X4. Does not run research. Use when: Chainsmith, связка команд, пошаговый план кокона, сгенерируй команды X4, маршрут /исследование. SKIP: executing the cocoon (→drmax-cocoon-engine-x4 / cocoon-pilot); one-query intent (→drmax-latent-intent); live URL experiment (→drmax-signalforge)./copy-project-lifeКарта файлов копирайта в .agents/copy/: шаблоны, статусы, цепочка audience→headlines→ux. Use when seeding or navigating that folder. SKIP: writing copy in chat (copywriter); SEO-ключи; код и DESIGN.md.Other plugins' skills for the same job