For detailed project documentation, coding guidelines, architecture, and build instructions, see CLAUDE.md.
- Language: Python ≥ 3.11
- Dependency manager: uv (Astral)
- Transport: MCP stdio
- Distribution: Claude Code plugin (git-based; PyPI deferred to Phase 2)
- License: MIT
- Maintainer: OPENSPHERE Inc.
pyproject.toml— Python package definition (Hatchling backend, name =agent-sequencer).src/agent_sequencer/__main__.py— CLI entry point (agent-sequencercommand) + search-path resolution.src/agent_sequencer/api.py— Yield types:Instruction/Done/Abort/Progress/Context/StepFailed.src/agent_sequencer/runtime.py—Driver: generator runtime + jsonschema validation + on_invalid retry/abort.src/agent_sequencer/instance.py—Instance+InstanceStore(per-instanceasyncio.Lock).src/agent_sequencer/registry.py—ProgramRegistry: program discovery,compile() + exec()loader, hot-reloadrescan().src/agent_sequencer/persistence.py—EventLog(JSONL), deterministic replay, disk-TTL prune.src/agent_sequencer/tools.py— The 7 MCP tools (sequencer_list_programs/start/current/next/resume/close/list).tests/— pytest suite (Driver / registry / persistence / bundled review-rounds)..claude-plugin/plugin.json— Claude Code plugin manifest..claude-plugin/marketplace.json— Marketplace listing (the repo registers itself)..mcp.json— Plugin-bundled MCP server registration (uses${CLAUDE_PLUGIN_ROOT}).skills/agent-sequencer/SKILL.md— Driving rules loaded into agent context (kept short).skills/agent-sequencer/docs/authoring-programs.md— Sequencer-program author's guide.skills/agent-sequencer/programs/review_rounds.py— Bundled review-rounds program.skills/agent-sequencer/programs/review_rounds/— Self-contained bundle (skills, agents, scripts)..github/workflows/ci.yml— pytest matrix (3 OS × 3 Python) +uv tool installsmoke test.README.md/README_ja.md— English README + its Japanese translation.
- Comments, docstrings, prompts, and READMEs are English. Only
README_ja.mdmay contain Japanese. - Sequencer programs must be deterministic — no
time.time()/random/ I/O insiderun(). Delegate to the agent via anInstructionif a value is needed. - Use
ctx.params.get(key, default), neverctx.params.get(key) or default(theorform treats[],0,""as missing). - Every
Instructionmust specifyexpect_schemawith at leasttypeandrequired. - Never write to stdout from the server — stdio is reserved for JSON-RPC. Logging goes to stderr.
sequencer_nextmust run insideinstance.lock; re-checkis_terminal()andfor_step_noafter acquiring.- Persistence ordering: write the
resultevent beforeDriver.send, write the resultingyieldevent after — even ifsendraises. - Do not pickle generators. State recovery is via deterministic JSONL replay.
- Use
compile() + exec()for program loading, notimportlib's loader (its pyc cache silently runs stale code on same-size hot edits). ${CLAUDE_PLUGIN_ROOT}only resolves under Claude Code plugin install; in hand-written.mcp.jsonuse absolute paths.${workspaceFolder}is not a Claude Code substitution.- Code style: PEP 8, type hints on public APIs,
from __future__ import annotationsat top of every module, Google-style docstrings.
For full details on architecture, lifecycle, MCP tool contracts, coding guidelines, CI/CD, and common tasks, refer to CLAUDE.md.