Update index.json status. Use for: upsert index.json, update status/last_flow/updated_at. Deterministic writes - stable diffs, no creation. Use only in run-prep and *-cleanup agents. Invoke via bash .
Deterministic updates to .runs/index.json. Write-bearing but with minimal surface.
Always invoke via the shim:
bash .claude/scripts/demoswarm.sh index upsert-status [options]
Do not set PATH or call helpers directly. The shim handles resolution.
This skill only updates:
statuslast_flowupdated_atOther fields (canonical_key, issue_number, pr_number, etc.) are owned by run-prep, signal-run-prep, and gh-issue-manager.
run_id (update in place, not append)Only these agents may use this skill:
run-prepsignal-run-prepsignal-cleanupplan-cleanupbuild-cleanupgate-cleanupdeploy-cleanupwisdom-cleanup| Command | Purpose |
|---|---|
index upsert-status |
Update run status in index.json |
# Update index after signal cleanup
bash .claude/scripts/demoswarm.sh index upsert-status \
--index ".runs/index.json" \
--run-id "feat-auth" \
--status "VERIFIED" \
--last-flow "signal" \
--updated-at "$(bash .claude/scripts/demoswarm.sh time now)"
# stdout: ok
ok on success, error message on failure0 on success, non-zero on failure.runs/index.json doesn't exist, fail (run-prep owns creation){
"version": 1,
"runs": [
{
"run_id": "feat-auth",
"canonical_key": "gh-456",
"task_key": "feat-auth",
"task_title": "Add OAuth2 login",
"issue_number": 456,
"pr_number": null,
"updated_at": "2025-12-11T22:15:00Z",
"status": "VERIFIED",
"last_flow": "signal"
}
]
}
This skill only updates: status, last_flow, updated_at.
In cleanup agents:
runs-index for index updates (no inline jq).runs/index.json is missing, add a blocker and do not create itruns-derive for reading — this skill is write-onlyExample pattern in cleanup agent:
# Get current timestamp
TIMESTAMP=$(bash .claude/scripts/demoswarm.sh time now)
# Update index
bash .claude/scripts/demoswarm.sh index upsert-status \
--index ".runs/index.json" \
--run-id "$RUN_ID" \
--status "$STATUS" \
--last-flow "signal" \
--updated-at "$TIMESTAMP"
The Rust implementation is preferred. Install to repo-local directory:
cargo install --path tools/demoswarm-runs-tools --root .demoswarm
The shim will automatically resolve in order:
.demoswarm/bin/demoswarm (repo-local install, preferred)demoswarm on PATH (global install)cargo run fallback (dev environments)