Orch state
Reduce the event log to derived state. Provides reduce.py (full OrchState JSON), summary.py (compact summary), current_phase.py (active phase), and detect_mode.py (run mode). Single source of derived state for orchestrators (P1/P2 — log is the truth, state is derived). Not user-invocable — orchestrators run the scripts directly.From its SKILL.md
npx -y skills add zig999/siegard-code --skill orch-stateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 3 commands, including `python3 .claude/skills/orch-state/scripts/reduce.py` and 2 more.
SKILL.md
2.3 KB, 508 tokens by cl100k_base, as published. Nobody here has run it
orch-state
State inspection skill: reduce event log to OrchState, print summaries, query current phase.
scripts/reduce.py
Replays all events and prints the full OrchState as a JSON object. Exit 0 on success, 1 on error.
python3 .claude/skills/orch-state/scripts/reduce.py
Output schema (top-level keys):
| Key | Type | Description |
|---|---|---|
workflow_id | string|null | Workflow identifier |
run_status | string | active, escalated, etc. |
current_phase | string|null | Active phase name |
tasks | object | Map of task_id → TaskState |
phases | object | Map of phase name → PhaseState |
escalation | object|null | Escalation payload if present |
circuit_breaker | object|null | Circuit breaker state if present |
last_seq | int | Last event seq processed |
last_snapshot_seq | int | Seq of last snapshot event |
scripts/summary.py
Prints a human-readable summary to stdout. Not JSON — intended for operator inspection.
python3 .claude/skills/orch-state/scripts/summary.py
Example output:
Workflow : wf_001
Status : active
Phase : dev
Last seq : 42
Tasks
─────
pending ████████░░░░░░░░░░░░ 4 / 10
completed ██████████████░░░░░░ 7 / 10
Tasks by phase
──────────────
dev pending=4, completed=6
Phases
──────
▶ 1. dev active
2. qa pending
scripts/current_phase.py
Prints the current phase and its status as JSON. Exit 0 always (errors also JSON).
python3 .claude/skills/orch-state/scripts/current_phase.py
Output when a phase is active:
{"current_phase": "dev", "status": "active", "order": 1}
Output when no phase has been entered:
{"current_phase": null, "status": null}
What ships with it: 4 files
10.0 KB alongside SKILL.md, 4 of them executable
scripts/
- current_phase.pyruns2.8 KB
- detect_mode.pyruns2.4 KB
- reduce.pyruns1.5 KB
- summary.pyruns3.4 KB