Capstan is an agent-first project. This repository should stay easy for coding agents to read, modify, verify, and operate.
- Prefer one obvious implementation path over flexible but ambiguous patterns.
- Keep files and folders predictable. Repo structure is part of the product.
- Make machine-readable contracts explicit instead of hiding behavior in prose.
- Favor deterministic flows over clever implicit behavior.
- Add documentation whenever a new core concept is introduced.
- Keep naming stable. Renames should be rare and intentional.
When adding or changing a feature, ask:
- How does an agent discover this?
- How does an agent execute this?
- How does an agent verify success or failure?
- How does an agent recover or retry?
- How does a human supervise or override it?
- Streaming SSR —
renderToReadableStream(React 18) viarenderPageStream()in@zauso-ai/capstan-react. Falls back to string-basedrenderPage(). - Module caching — dev server caches imported modules by mtime + generation counter; only re-evaluates on actual file changes.
- Parallel layout loading — all
_layout.tsxfiles in a route's hierarchy are loaded concurrently viaPromise.all(). - Multi-protocol — every
defineAPI()simultaneously exposes HTTP, MCP, A2A, and OpenAPI interfaces.
CLAUDE.md— contributor guide, package map, build/test commandsREADME.md— user-facing documentation- Scaffolded
AGENTS.md— generated bycreate-capstan-appfor each project
Keep these documents aligned as the project evolves.