Existing repos are the primary use case — discipline matters most where history and complexity already live. cos init is additive:
- Adds agent config (rules, skills, hooks wiring) for your chosen agent runtime, stack overlays for your frameworks (e.g.
nextjs+fastapi), and a docs scaffold. - Doesn’t touch your source code, build config, or CI.
Run it at the repo root, pick your stack(s) and agent, and review the diff it creates — everything it writes is committable text you can inspect before adopting. The stack overlay is what tailors enforcement: with the nextjs overlay, an agent editing a React component gets routed to frontend skills; with fastapi, endpoint edits route to API-design rules.
Two tips for older repos:
- Let the knowledge graph index the codebase first, then ask structural questions (
cos_graph_communitiesfor a subsystem map) — it’s the fastest onboarding tool you have. - Adopt gradually: the gates apply to new agent work; you don’t need to retrofit anything.