ovecc architecture init
Drafts .ovecc/architecture.toml from the graph you already have: one component per
detected module (narrowed to its common directory), depends_on set to exactly the
module-to-module imports that exist today, and a commented interface suggestion when
one file already receives at least 80% of a component's incoming imports.
Usage: ovecc architecture init [OPTIONS]
Because every entry mirrors a real import, the contract starts with zero violations. Governance from then on is deleting the entries you regret, and watching the check fail when somebody adds them back.
Example
$ ovecc architecture init
Wrote .ovecc/architecture.toml (13 components, 25 declared dependencies).
Every depends_on entry mirrors an import that exists today, so the
contract starts with zero violations. To govern:
1. Delete the entries you regret — each deletion becomes a divergence.
2. Uncomment an interface line to close a component's internals.
3. Run `ovecc architecture diff`, then wire `check` into CI.
Starting from a template
Usage: ovecc architecture init --template <name>
--template writes a built-in reference architecture instead of mirroring the graph,
and needs no index — the contract-first workflow starts on an empty repository.
$ ovecc architecture init --template fsd
Wrote .ovecc/architecture.toml from template "fsd" (JavaScript/TypeScript frontends).
A template is the target, not a mirror of today's code:
1. Rebind each component's paths if your layers live elsewhere.
2. `ovecc architecture diff` reports the gap — that is the migration plan.
3. Keep mode = "warn" while migrating; freeze and tighten once it settles.
A templated contract is the target, not a mirror. Divergences on day one are expected,
and the diff report is your migration plan:
ovecc architecture init --template fsd
ovecc index .
ovecc architecture diff # every edge you still need to fix
Templates ship with mode = "warn", so nothing gates while you rebind paths. Tighten to
new-violations plus check --freeze once the paths are
right, and let the ratchet shrink the rest.
Each component carries a role ("fsd/shared") naming its layer in the source
architecture, so paths can be rebound without losing the mapping.
See architecture templates for the catalog, or
architecture suggest to find out which one your repository
already resembles.
Options
| Option | Effect |
|---|---|
--force | Regenerate over an existing .ovecc/architecture.toml |
--template <name> | Write a built-in reference architecture instead of mirroring the graph (no index required) |
Plus the global options.
Related
- The contract — every field, and what it enforces
architecture diff— the contract against the real grapharchitecture check— the same report as a CI gate