Slugs, finalize, accept
Each cycle has a slug — a kebab-case identifier naming the facet that cycle answered. Rules:
- Descriptive of the facet, not the topic.
stats-per-language, notbasic-stats. - Unique within a worker —
acceptrefuses a slug already in.workers/<name>.json::cycles. - Don’t repeat the worker name in the slug.
stats/per-language, notstats/stats-per-language.
The cycle gating sequence has two gates — the supervisor’s quality gate, then the PI’s approval gate:
flowchart TD
W["<b>Worker</b><br/>reaches WAITING"]
SR["<b>Supervisor</b><br/>reads research_log.md + outputs/<slug>/<br/><i>compares against plan's Verification</i>"]
D1{<b>Supervisor</b><br/>meets brief?}
SM1["<b>Supervisor</b> → <b>Worker</b><br/>rs-worker message <name> '...correction...'"]
SF["<b>Supervisor</b><br/>rs-worker finalize --slug <slug><br/><i>creates staging symlink, asks PI</i>"]
PIR["<b>PI</b><br/>reviews staging/<name>/ in editor"]
D2{<b>PI</b><br/>approve?}
SA["<b>Supervisor</b><br/>rs-worker accept --slug <slug><br/><i>promotes to results/, snapshots plan, registers cycle</i>"]
SU["<b>Supervisor</b> → <b>Worker</b><br/>rs-worker unstage + message<br/><i>worker iterates with new slug</i>"]
W --> SR --> D1
D1 -->|no| SM1 --> W
D1 -->|yes| SF --> PIR --> D2
D2 -->|yes| SA
D2 -->|no| SU --> W
accept refuses on:
- worker not terminal (
doneorwaiting) - empty
outputs/<slug>/ research_log.mdunchanged from skeleton (first cycle only)- denied files present (
__pycache__,.ipynb_checkpoints,*.pyc,*.tmp) - slug already in the registry
accept --waived "<reason>" bypasses the shape gate; the reason is persisted in the cycle entry.