arbeitsplan-compile
Turns a stated problem into an executable, budgeted workflow spec plus the takt beats that enforce its order. Use when the user describes a change and wants it run as an agentic workflow, asks to plan or set up a swarm, says the advice they have is too vague to act on, or asks what shape a piece of work should be run in. Refuses and points at zirkel when the problem turns out to be a question rather than a change. Writes the run's workflow.json under analysis/arbeitsplan/ and, behind an approval gate, .claude/takt.local.md.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- arbeitsplan-compile
- description
- Turns a stated problem into an executable, budgeted workflow spec plus the takt beats that enforce its order. Use when the user describes a change and wants it run as an agentic workflow, asks to plan or set up a swarm, says the advice they have is too vague to act on, or asks what shape a piece of work should be run in. Refuses and points at zirkel when the problem turns out to be a question rather than a change. Writes the run's workflow.json under analysis/arbeitsplan/ and, behind an approval gate, .claude/takt.local.md.
- argument-hint
- <the problem, in a sentence or two>
03 SKILL.md 正文
Compile a problem into a workflow
Users are told to "use an agentic workflow" and don't, because the advice is too vague to act on. This skill takes that transformation as its own job: in, a problem in prose; out, a spec concrete enough that a machine runs it and a hook enforces it.
The spec is a coded handoff, not a description. This repository measured 9 of 11
skill-to-skill chains failing their handoff despite a schema existing upstream; the one that
worked copied its predecessor's JSON byte-for-byte into the next dispatch. So every later
phase reads workflow.json. Never paraphrase it into a prompt.
Steps
-
Read the schema first —
references/workflow-spec-schema.md. It is the authority on every key and on the rejections below. -
Decide the problem's shape. A change alters files and can be checked. A question wants an answer.
A question is a refusal, not a smaller workflow. Write an
out-of-scope-reasoningrecord namingzirkel:zirkel-solve, write no phases, and stop. Compiling a swarm for a question produces three confident answers and no way to tell which is right. -
Scope it. If the problem is vague, resolve it with the user before compiling — a spec compiled from a guess is precise about the wrong thing. When
zirkelis installed,zirkel:zirkel-clarify-scopedoes this well; when it is not, ask directly and say that zirkel is not installed. Never fabricate zirkel-shaped output. -
Derive acceptance criteria. Each is
{id, criterion, check}, andcheckisstring | string[] | null(#81): a single shell command, or a non-empty array of shell commands run independently, each exiting 0 on pass — a criterion with an arraycheckpasses only when every element does. At least one criterion must carry a real, runnable check. A spec whose every criterion is prose is a spec nothing can referee. Any other shape (a number, an object, an empty string, an empty list, or a list with a non-string element) is rejected asAP-CHECK-SHAPE. -
Get the write scope. Dispatch
arbeitsplan:scope-prover. An empty or underivable scope is a rejection — never read an absent scope as "anything". -
Choose patterns. Dispatch
arbeitsplan:pattern-researcher, or invokearbeitsplan-patterns. Everyphases[].patternmust be in the accepted list ofreferences/patterns.md's machine-readable index. An unknown id is rejected, never improvised.Give every phase
mode(auto, orplanfor a planning phase) andwrites(worktreefor builders,nonefor referees and extractors,sharedonly for an in-session landing), plus a namespacedagentType; all three are required: an inherited plan mode is how four builders became UNMEASURED in the run that added these keys.modelTieris recommended, not required: a phase that omits it inherits the session's model by design (#118); one that states it must name an alias or aclaude-...id. -
Choose the backend. Invoke
arbeitsplan-backend, which walksreferences/backend-selection.md's table and returns{kind, why[], acknowledgedGaps[]}. Never write a bare string and never a free-textwhy— both are rejected. -
Set the budget.
totalDispatchesmust be at least the sum of every phase'sfanOut. This is the ceiling the hook enforces; the run cannot raise it, only a re-compile can. -
Write the spec.
python3 -B "${CLAUDE_PLUGIN_ROOT}/scripts/compile_spec.py" --out analysis/arbeitsplan --writeIt validates before writing and names the offending key on refusal. To show the user the phases as a graph (each phase's pattern, fan-out and model tier, chained by
requires→marker), render the spec:python3 -B "${CLAUDE_PLUGIN_ROOT}/scripts/build_design_html.py" \ --workflow analysis/arbeitsplan/<runId>/workflow.json \ --out analysis/arbeitsplan/<runId>/design-report.html -
Emit the takt beats — behind an approval gate.
Ordering belongs to takt, not to this plugin's hook. But writing .claude/takt.local.md
makes takt live and fail-closed in this repository, so it is the user's decision, not
yours. Show the beats, say plainly that takt will begin denying out-of-order calls, and
write only on a yes.
python3 -B "${CLAUDE_PLUGIN_ROOT}/scripts/emit_beats.py" analysis/arbeitsplan/<runId>/workflow.json --write
python3 plugins/takt/scripts/validate_beats.py .claude/takt.local.md
If .claude/takt.local.md already exists without this plugin's provenance key, refuse
and surface it. takt reads only the first fenced block, so merging is not safe, and
silently replacing a hand-written declaration would disable rules somebody meant.
Rules
- Never infer a missing gating value. Reject and name it. A halt that depends on a value the compiler invented is not a halt.
- Never compile a phase whose pattern is in the rejected list, however the user phrases
the request.
serial-fix-loopin particular: say what the catalog measured about it and offerbest-of-ninstead. - Never widen
writeScopeto make a candidate fit. The scope is the contract. - Optional delegates (zirkel, andon) are compiled as beats, not as prose instructions. If the plugin is absent, drop the beat, use the bundled fallback, and say so plainly.
Output format
arbeitsplan compile — run ap-2026-09-12-a3f1
shape change
scope src/api/search.py, src/api/limits/**, tests/test_ratelimit.py
acceptance 3 criteria, 3 with runnable checks
budget 9 dispatches / 25 min
phases build (best-of-n, fanOut 3, sonnet, auto, writes worktree)
-> referee (blind-referee, 3, sonnet, auto, writes none)
-> land (select-then-synthesize, 1, sonnet, auto, writes shared)
delegates zirkel:zirkel-explore-branches (installed) -> beat branches-explored
backend in-session (why: writes-shared-tree)
wrote analysis/arbeitsplan/ap-2026-09-12-a3f1/workflow.json
takt beats NOT written — approval required. Writing them makes takt live and
fail-closed in this repository; it will deny a dispatch that runs ahead of its beat.
Next: arbeitsplan-run for the in-session swarm, or arbeitsplan-matrix for the
headless one (fresh process per candidate, real per-cell --model).
A refusal is an output, not an error:
arbeitsplan compile — REFUSED
shape question
reason "should we use Redis or Postgres for this" alters no files and has no
runnable check, so a swarm would return three confident answers and no
way to tell which is right.
route zirkel:zirkel-solve
wrote analysis/arbeitsplan/out-of-scope-reasoning.json
Resources
references/workflow-spec-schema.md— every key, and every compile-time rejection.references/patterns.md— the accepted patterns, and the rejected ones with the measurement that rejected them.references/candidate-contract.md— what the phases you compile will actually exchange.references/backend-selection.md— the backend decision table, viaarbeitsplan-backend.
04 同仓库更多 Skills
toy-check
A skill that checks things in the repository and reports what it finds.
demo-check
Reports which generated files changed since the last generation run. Use when the user asks what drifted. Read-only; never edits a file.
demo-check
Reports which generated files changed since the last generation run. Use when the user asks what drifted. Read-only; never edits a file.
demo-check
Reports which generated files changed since the last generation run. Use when the user asks what drifted. Read-only; never edits a file.
demo-check
Reports which generated files changed since the last generation run. Use when the user asks what drifted. Read-only; never edits a file.
zirkel-verify-assumptions
Checks exactly ONE named assumption against real evidence in at most 3 steps and reports one outcome: confidence raised (>=90), reading changed, or still unresolved. Use to resolve a single load-bearing uncertainty — typically a blocking entry surfaced by zirkel-clarify-scope: "verify this one assumption", "is it actually true that X", "check this before we rely on it". For multiple uncertainties, invoke once per uncertainty — the step budget is never shared.