st
SKILL.md
st
Overview
Maintain a durable task inventory in the repo (default: .step/st-plan.jsonl) using in-place JSONL v3 persistence with dual lanes:
eventlane for mutationscheckpointlane for periodic full-state snapshots
Items use typed dependency edges (deps: [{id,type}]) plus notes, comments, in_plan, and optional execution metadata (related_to, scope, location, validation, source, claim, runtime, proof).
in_plan=true projects an item into the mirrored Codex/OpenCode plan; in_plan=false keeps it on disk as durable backlog only.
Zig CLI Iteration Repos
When iterating on the Zig-backed st helper CLI path, use these two repos:
skills-zig(/Users/tk/workspace/tk/skills-zig): source for thestZig binary, build/test wiring, and release tags.homebrew-tap(/Users/tk/workspace/tk/homebrew-tap): Homebrew formula updates/checksum bumps for releasedstbinaries.
Quick Start (Zig CLI Bootstrap)
run_st_tool() {
install_st_direct() {
local repo="${SKILLS_ZIG_REPO:-$HOME/workspace/tk/skills-zig}"
if ! command -v zig >/dev/null 2>&1; then
echo "zig not found. Install Zig from https://ziglang.org/download/ and retry." >&2
return 1
fi
if [ ! -d "$repo" ]; then
echo "skills-zig repo not found at $repo." >&2
echo "clone it with: git clone https://github.com/tkersey/skills-zig \"$repo\"" >&2
return 1
fi
if ! (cd "$repo" && zig build -Doptimize=ReleaseSafe); then
echo "direct Zig build failed in $repo." >&2
return 1
fi
if [ ! -x "$repo/zig-out/bin/st" ]; then
echo "direct Zig build did not produce $repo/zig-out/bin/st." >&2
return 1
fi
mkdir -p "$HOME/.local/bin"
install -m 0755 "$repo/zig-out/bin/st" "$HOME/.local/bin/st"
}
local os="$(uname -s)"
if command -v st >/dev/null 2>&1 && st --help 2>&1 | grep -q "st.zig"; then
st "$@"
return
fi
if [ "$os" = "Darwin" ]; then
if ! command -v brew >/dev/null 2>&1; then
echo "homebrew is required on macOS: https://brew.sh/" >&2
return 1
fi
if ! brew install tkersey/tap/st; then
echo "brew install tkersey/tap/st failed." >&2
return 1
fi
elif ! (command -v st >/dev/null 2>&1 && st --help 2>&1 | grep -q "st.zig"); then
if ! install_st_direct; then
return 1
fi
fi
if command -v st >/dev/null 2>&1 && st --help 2>&1 | grep -q "st.zig"; then
st "$@"
return
fi
echo "st binary missing or incompatible after install attempt." >&2
if [ "$os" = "Darwin" ]; then
echo "expected install path: brew install tkersey/tap/st" >&2
else
echo "expected direct path: SKILLS_ZIG_REPO=<skills-zig-path> zig build -Doptimize=ReleaseSafe" >&2
fi
return 1
}
run_st_tool --help
Workflow
- Define
run_st_toolonce per shell session to bootstrap/installst. - If the run has 3+ dependent steps, likely spans turns, or already uses a native task surface (
update_planin Codex orTodoWritein OpenCode), adopt$stas the durable source of truth before editing. - If the plan came from
$select, import the OrchPlan into$stand claim the first safe wave before execution starts.st import-orchplan --file .step/st-plan.jsonl --input .step/orchplan.yamlst claim --file .step/st-plan.jsonl --ids "cfg,ui" --executor teams --wave w1
- Initialize plan storage with
st initif missing. - Rehydrate current state with
st show(or focused views viaready/blocked).- Default surface is
plan. - Use
--surface allto inspect the full durable inventory. - Use
--surface backlogto inspect durable tasks not currently mirrored into the plan.
- Default surface is
- Run
doctorwhen ingesting an existing plan file or when integrity is in doubt. - Apply plan mutations through subcommands (
add,select,deselect,set-status,set-deps,set-notes,add-comment,remove,import-plan,import-orchplan,claim,heartbeat,set-runtime,set-proof,release,reclaim-stale,import-mesh-results); do not hand-edit existing JSONL lines.- Use
add --backlog-onlyorimport-plan --backlog-onlyto update the durable inventory without loading those items into the mirrored plan yet. - Use
selectto add backlog items into the mirrored plan. - Use
deselectto remove items from the mirrored plan without deleting them from disk.
- Use
- After each mutation command, consume the emitted
plan_sync: {...}payload and mirror it into the native runtime tool in the same turn. - Use
emit-plan-syncto regenerate the payload from durable state when needed. - If
emit-plan-syncis unavailable because the installed binary is older, fall back:
- Codex: use
emit-update-plan. - OpenCode: use
show --format json, mapcontent=item.step, normalizeblocked/deferredtopending, normalizecanceledtocancelled, and default missing priority tomedium.
- Export/import snapshots when cross-session handoff is needed.
Commands
Run commands from the target repository root. Commands below use st directly; use run_st_tool first when bootstrapping.
st init --file .step/st-plan.jsonl
st add --file .step/st-plan.jsonl --id st-001 --step "Reproduce failing test" --priority high --deps ""
st add --file .step/st-plan.jsonl --id st-002 --step "Investigate optional follow-up" --deps "" --backlog-only
st select --file .step/st-plan.jsonl --ids "st-002"
st add --file .step/st-plan.jsonl --id st-003 --step "Patch core logic" --deps "st-001"
st set-status --file .step/st-plan.jsonl --id st-001 --status in_progress
st set-priority --file .step/st-plan.jsonl --id st-003 --priority medium
st set-deps --file .step/st-plan.jsonl --id st-003 --deps "st-001:blocks"
st set-notes --file .step/st-plan.jsonl --id st-003 --notes "Need benchmark evidence"
st add-comment --file .step/st-plan.jsonl --id st-003 --text "Pausing until CI clears" --author tk
st ready --file .step/st-plan.jsonl --format markdown
st show --file .step/st-plan.jsonl --surface all --format json
st blocked --file .step/st-plan.jsonl --surface backlog --format json
st show --file .step/st-plan.jsonl --format markdown
st doctor --file .step/st-plan.jsonl
st doctor --file .step/st-plan.jsonl --repair-seq
st emit-plan-sync --file .step/st-plan.jsonl
st emit-update-plan --file .step/st-plan.jsonl
st export --file .step/st-plan.jsonl --output .step/st-plan.snapshot.json
st import-plan --file .step/st-plan.jsonl --input .step/st-plan.snapshot.json --replace
st import-orchplan --file .step/st-plan.jsonl --input .step/orchplan.yaml --replace
st claim --file .step/st-plan.jsonl --ids "st-001,st-002" --executor teams --wave w1
st heartbeat --file .step/st-plan.jsonl --id st-001
st set-runtime --file .step/st-plan.jsonl --id st-001 --substrate spawn_agent --thread-id thread-123 --agent-id agent-1
st set-proof --file .step/st-plan.jsonl --id st-001 --proof-state pass --command "zig build test-st" --evidence-ref .step/proof.log
st release --file .step/st-plan.jsonl --id st-001 --reason proof_complete
st reclaim-stale --file .step/st-plan.jsonl --now 2026-03-12T00:00:00Z
st import-mesh-results --file .step/st-plan.jsonl --input .step/mesh-output.csv
Operating Rules
- Keep exactly one
in_progressitem unless$stcan prove a safe parallel wave. - Safe parallel
in_progressis allowed automatically when every active item hasclaim.state=held, a non-emptyclaim.wave_id,claim.executor=teams|mesh, and pairwise non-overlappingclaim.lock_roots. in_plan=trueis the mirrored-plan membership flag. Missing legacy values normalize totrue.- Terminal statuses (
completed,deferred,canceled) auto-demote items out of the mirrored plan while keeping them on disk. - Track prerequisites in each item's typed
depsarray; dependencies are part of the canonical JSONL schema. - Priorities are canonical in
$st: allowed values arehigh,medium, andlow; missing legacy values normalize tomedium. - Parse CLI deps as comma-separated
idorid:typetokens; missing type normalizes toblocks, and type must be kebab-case. - Require dependency integrity:
- dependency IDs must exist in the current plan,
- no self-dependencies,
- no dependency cycles.
- Projected-plan integrity:
selectaccepts exact IDs (--ids) plus simple field filters (--status,--priority),- selecting an item auto-includes unresolved dependency closure,
- completed dependencies do not get pulled back into the mirrored plan,
deselectrejects if it would strand a still-selected dependent on a backlog-only unresolved task.
- Allow
in_progressandcompletedonly when all dependencies arecompleted. - Normalize user status terms before writing:
open,queued->pendingactive,doing->in_progressdone,closed->completed
- Mutation commands (
add,select,deselect,set-status,set-priority,set-deps,set-notes,add-comment,remove,import-plan,import-orchplan,claim,heartbeat,set-runtime,set-proof,release,reclaim-stale,import-mesh-results) automatically print a canonicalplan_sync:payload line plus a legacyupdate_plan:compatibility line after durable write. - Lock sidecar policy: mutating commands require the lock file (
<plan-file>.lock, for example.step/st-plan.jsonl.lock) to be gitignored when inside a git repo; add it to.gitignorebefore first mutation. - Storage model: not append-only growth. Mutations rewrite the JSONL file atomically (
temp+fsync+ replace) and compact to a canonicalreplaceevent plus checkpoint snapshot at the current seq watermark. doctoris the first-line integrity check for seq/checkpoint contract issues; usedoctor --repair-seqonly when repair is explicitly needed.import-plan --replaceatomically resets the full durable inventory in the same in-place write model.- Prefer concise, stable item IDs (
st-001,st-002, ...). - Prefer
show --format markdownfor execution: it groups tasks intoReady,Waiting on Dependencies,In Progress, and terminal/manual buckets for the selected surface.
Sync Checklist ($st -> native runtime tools)
- After each
$stmutation (add,select,deselect,set-status,set-priority,set-deps,set-notes,add-comment,remove,import-plan,import-orchplan,claim,heartbeat,set-runtime,set-proof,release,reclaim-stale,import-mesh-results), prefer the emittedplan_sync: {...}line. - If no emitted payload is available (for example after
initor shell piping), run:st emit-plan-sync --file .step/st-plan.jsonl
- Preserve full inventory order from
$stinplan_sync.items. - Codex:
- publish
plan_sync.codex.planviaupdate_plan. - if only a legacy payload is available, use
st emit-update-plan --file .step/st-plan.jsonl.
- publish
- OpenCode:
- publish
plan_sync.opencode.todosviaTodoWrite. - if only an older binary is available, use
st show --file .step/st-plan.jsonl --format jsonand mapcontent=item.step,status=in_progress|completed|pending|cancelled, andpriority=item.priorityormediumwhen missing.
- publish
plan_sync.itemsis the full durable inventory.plan_sync.codex.plan,plan_sync.opencode.todos, andemit-update-planemit only the selected mirrored-plan subset.- Keep dependency edges only in
$st(deps); do not encode dependencies inupdate_planorTodoWrite. - If an item has
dep_state=waiting_on_deps, never mirror that item asin_progress. - Before final response on turns that mutate
$st, re-check no drift by comparing:st show --file .step/st-plan.jsonl --format json- the latest emitted
plan_syncpayload.
Validation
- Run lightweight CLI sanity checks:
run_st_tool --helpst doctor --file .step/st-plan.jsonlst emit-plan-sync --file .step/st-plan.jsonlst emit-update-plan --file .step/st-plan.jsonlst show --file .step/st-plan.jsonl --surface all --format jsonst show --file .step/st-plan.jsonl --format json
References
- Read
references/jsonl-format.mdfor event schema, status/dependency state vocabulary, and snapshot import/export shapes.
Weekly Installs
16
Repository
tkersey/dotfilesGitHub Stars
43
First Seen
Feb 28, 2026
Security Audits
Installed on
opencode16
gemini-cli16
codebuddy16
github-copilot16
codex16
kimi-cli16