zirkel-decompose-chain
Breaks a scoped problem or selected approach into a 2-5 stage pipeline, each stage with an explicit input contract, output contract, and dependsOn list, and derives the parallel-safe wave grouping from the dependency graph. Use when a task is big enough to need staging with clear hand-offs between steps: "break this into steps", "what's the pipeline here", "map the stages", "what depends on what", or the Decompose phase of zirkel-solve.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- zirkel-decompose-chain
- description
- Breaks a scoped problem or selected approach into a 2-5 stage pipeline, each stage with an explicit input contract, output contract, and dependsOn list, and derives the parallel-safe wave grouping from the dependency graph. Use when a task is big enough to need staging with clear hand-offs between steps: "break this into steps", "what's the pipeline here", "map the stages", "what depends on what", or the Decompose phase of zirkel-solve.
03 SKILL.md 正文
zirkel-decompose-chain
Design the stages, then validate the graph with the guard. The guard enforces every structural rule in code and returns the topological waves.
The guard is python3 -B "${CLAUDE_PLUGIN_ROOT}/scripts/zirkel.py", typed in full in each command below.
Design
Produce a table with columns: id, name, input contract, output contract,
dependsOn. dependsOn is an array of stage ids. Each of these is a first-class
field the executor branches on — none may live in a prose sentence.
The rules (enforced in code)
- Between 2 and 5 stages inclusive. Fewer than 2 means it didn't need decomposing; more than 5 means the task itself needs re-scoping.
- Every stage MUST define input contract, output contract, and a dependsOn array.
- At least one stage MUST have
dependsOn: []— the entry point. - No dependsOn may reference a non-existent stage id.
- The graph MUST be acyclic — no stage transitively depends on itself.
Validate
echo '{"stages":[
{"id":"gather","name":"Gather","input_contract":"raw task","output_contract":"sources","dependsOn":[]},
{"id":"draft","name":"Draft","input_contract":"sources","output_contract":"draft","dependsOn":["gather"]},
{"id":"check","name":"Check","input_contract":"sources","output_contract":"issues","dependsOn":["gather"]}
]}' | python3 -B "${CLAUDE_PLUGIN_ROOT}/scripts/zirkel.py" decompose -
On success the guard returns entry_points and waves (the parallel-safe
grouping via Kahn's algorithm). A non-zero exit means a bound, a dangling
reference, or a cycle was violated — fix the plan; do not proceed with an invalid
graph.
Output
- the stage table
- the parallel-safe wave grouping (from the guard's
waves)
This stage/wave output is not separately persisted by this skill — it is captured only inside zirkel-solve's single end-of-pipeline state write. Unlike Clarify and Explore, zirkel-solve's Decompose step performs no prior-run reuse check, so a prior Decompose pass cannot be resumed the way Clarify or Explore can.
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.