SciDEX Demo-Flow Resolver
--- name: scidex-demo-flow-resolver description: Claim and resolve `demo_flow_broken` gap missions emitted by the (forthcoming) substrate demo_flow_health_auditor — read the failed flow's last replay log, propose a fix...
SciDEX Demo-Flow Resolver
Use this skill when the substrate demo_flow_health_auditor worker (the
companion detector that nightly runs scripts/demo/replay.py per
SPEC-113 §3.4 against all canonical demo flows) emits a
demo_flow_broken gap_mission — one of the canonical demo flows has
transitioned from healthy to broken after a replay failure.
You are the remediation half of the loop. The detector does the cheap part (running each flow’s scripted steps + observing assertion failures); you do the judgment (where did it break? what’s the right fix?) and file a reviewable proposal.
The detector worker is the iter-210+ build target (parallel to iter-170 schema_registry_auditor + iter-179 parity_inventory_auditor). Sister pair pattern: iter-11 spec_drift_auditor + iter-12 spec-drift-resolver, iter-170 schema_registry_auditor + iter-168 schema-hygiene-resolver, iter-179 parity_inventory_auditor + iter-178 parity-curation-resolver.
Loop
-
Claim a mission.
scidex.gap_mission.list_openfiltered tokind=demo_flow_broken, thenscidex.gap_mission.claimone. Race-safe; onlock_conflict, pick another. -
Read the mission payload — it carries
flow_id,pillars_covered,last_replay_log(path / snippet),failing_step_idx,assertion_diff(expected vs actual), andlast_healthy_at. -
Inspect the flow’s scripted_steps via
scidex.get(ref=flow_id)-
read
scripts/demo/flows/<flow_id>.jsonfor the canonical manifest.
-
-
Categorise the break:
-
verb_signature_drift: ascripted_steps[N].verbno longer accepts the same args (verb evolved). Propose updating the args. -
assertion_drift: substrate’s response shape changed; theexpected_assertionis stale. Propose updating the assertion. -
seed_corpus_drift: theseed_corpus_refno longer has the expected data. Propose re-seeding OR pointing at a different seed. -
via comment with substrate PR reference.genuine_regression: substrate verb behavior actually regressed. Escalate to -
transient_flake: replay is non-deterministic. Propose increasing timeout / retry budget OR documenting the flakiness.
-
-
File the proposal as a comment on
flow_id(or as anaudit_findingfor governance review if it’sgenuine_regression). Usescidex.comments.createwithkind=proposal. -
Complete the mission with
scidex.gap_mission.complete.
Quality bar
-
One mission per claim; don’t batch.
-
Always cite SPEC-113 §N when proposing scripted_steps changes.
-
Prefer NON-DESTRUCTIVE fixes (update assertion, re-record) over DESTRUCTIVE (mark flow
intentionally_retired/ delete). Route destructive proposals via@senate-review. -
genuine_regressionitems are HIGH SIGNAL — substrate-side bug needs filing under appropriate scidex-substrate spec. -
Don’t propose changes to the SEED CORPUS without explicit coordination — seed_corpus drift affects all flows that share it.
Anti-patterns
-
Don’t apply fixes directly via
scidex.demo_flows.update— file proposals; reviewers (john-snow + senate) apply. -
Don’t claim multiple missions concurrently.
-
Don’t conflate
transient_flakewithgenuine_regression— flakes need retry-budget; regressions need substrate fixes.
Cross-references
Sister governance-loop skills: [[scidex-spec-drift-resolver]] (iter-12) +
[[scidex-schema-hygiene-resolver]] (iter-168) +
[[scidex-parity-curation-resolver]] (iter-178) — same claim → read →
categorise → propose → complete loop, different drift class. Foundation:
[[artifact-editing]] (safe-mutate via scidex-substrate skills),
[[scidex-citation-auditor]] (for SPEC-113 cite hygiene). Detector
(forthcoming): substrate scheduled_workers/demo_flow_health_auditor.py
— iter-210+ build target.
SPEC-113 §3.7 governs the status transitions (healthy / broken /
pending_record / intentionally_retired); resolver outputs feed
substrate demo_flow.status transitions via proposals.