stelow — Architecture

Skills-only, host-agnostic. The product is 30 portable agentskills-compatible skills plus one zero-dependency shell helper. There is no extension host code, no compiled plugin, and no per-host adapter in the repo — every agent that can read ~/.agents/skills/<name>/SKILL.md (the agentskills.io standard) runs the same workflow. Hosts only add an optional marker protocol (STELOW_WORKFLOW=1 + STELOW_STATE=<path>).

Top-level layout

PathPurpose
skills/All workflow skills (LLM-facing content). One directory per skill, each self-contained: SKILL.md + references/ + references/cli-tools/ + optional stages/ files.
skills/stelow-workflow-entry/Entry point. Classifies intent, scaffolds state.md, picks the first stage. Loaded when STELOW_WORKFLOW=1. Never runs stage logic.
skills/stelow-workflow-router/Router. Validates the next candidate against transitions.md, calls scripts/stelow advance, loads the next stage skill, appends the hand-off audit record.
skills/stelow-workflow-orchestrator/Orchestrator. Coordinates the 18-stage pipeline (Setup → Shape → Critique → Gate → Scope → Interface → Selection → Architecture → Planning → Execution → Verification → Audit).
skills/stelow-product-<area>/Product strategy playbooks + domain tactics (15 total, reference-only).
scripts/stelowPortable helper (bash + python3): status, advance, doctor, seed, schema, ask. Single source of runtime mechanics.
skills/stelow-workflow-orchestrator/references/cli-tools/Single source for shared tool references. Sub-skills link it via sibling-relative paths (../stelow-workflow-orchestrator/...) — no copies, no sync step.
install.shInstaller. Flattens skills/* into ~/.agents/skills/, prunes retired/orphaned skills, offers optional tooling (cymbal, sem, ctx7).
types/stages.tsShared TypeScript interfaces for the stages.yaml stage model (transitions, gates, supervisor).
stelow.schema.json / stelow.jsonWorkflow tracking JSON schema + per-project runtime tracking state.
tests/Vitest suite (unit/, integration/, skills/) + contract tests (skill-count, dual-mode, fs/e2e).
docs/design/, docs/agents-md-refs/Historical design docs / agent reference notes (EN artifacts, PT-BR discussion).
references/Canonical shared docs: host-levers.md (per-harness recipes) + cli-tools/stelow-helper.md (helper contract). Host integration contract: HOSTING.md (root).

Stage model (the 18-stage state machine)

(tools per stage, transitions, gates, supervisor activation).

(one file per stage, describing what happens in that stage).

— generated from stages.yaml; this is the file scripts/stelow advance and the router validate against. Do not edit by hand; edit stages.yaml and regen.

critique → gate → scope → interface → int-gate → selection → architecture → planning → plan-gate → execution → verification → diff-gate → audit.

conditional on review_mode — see stages.yaml.

Runtime state

PathContentsOwner
state.mdPer-workflow frontmatter at $STELOW_STATE (or <root>/state.md in standalone mode).entry/router skills + scripts/stelow advance
lock/Advisory lock inside $STELOW_STATEDIR (or <root>/.stelow) with TTL (STELOW_LOCK_TTL_SEC, default 120).scripts/stelow
invariants.jsonAppend-only advance history inside $STELOW_STATEDIR (or <root>/.stelow) written by scripts/stelow advance.scripts/stelow
stelow.jsonMulti-workflow tracking (schema stelow.schema.json): workflows[] with phases, scope sync from spec-tech.md.workflow skills (agent)
.stelow/{date}/{dirHash}/Per-workflow artifacts: specs/, interfaces/, plans/, critiques/, approvals/, execution/, verification/.workflow skills

Data flow

  1. Host sets STELOW_WORKFLOW=1; entry skill loads, classifies intent, scaffolds

state.md, and selects the first stage from transitions.md.

  1. Router validates the candidate stage against transitions.md, then

scripts/stelow advance <candidate> acquires .stelow/lock, checks the pre-condition (transitions.md presence) and stage-transition invariants, updates state.md frontmatter, appends .stelow/invariants.json, and releases the lock.

  1. Stage skill loads and runs, writing artifacts under .stelow/{date}/{dirHash}/.
  2. scripts/stelow doctor detects drift classes (stale-lock, missing-dir,

parallel-lock, state-transitions) across the workflow tree.

Portability rules

helper (bash + python3). No compile step at install time.

a portable vocabulary (ask_user_question, visual_review, subagent) and skills/stelow-workflow-orchestrator/references/cli-tools/*.md document the canonical shapes — hosts wrap them.

package.json and is pinned by the SW-034 trailer contract, enforced by scripts/check-version-coherence.sh (--hook=commit-msg mode for local commits; the .husky/commit-msg hook file was removed with the tooling-dirs cleanup).

How to extend

skills) or skills/stelow-product-<name>/SKILL.md (product strategy / domain libraries) with metadata.category matching the prefix (workflow / product); keep counts consistent (README contract test pins 32 / 17 workflow + 15 product skills).

directories and set the marker env vars. Host levers are documented in references/host-levers.md.