Can I add Coding OS to an existing production repo, or only new projects?

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:

  1. Let the knowledge graph index the codebase first, then ask structural questions (cos_graph_communities for a subsystem map) — it’s the fastest onboarding tool you have.
  2. Adopt gradually: the gates apply to new agent work; you don’t need to retrofit anything.