# Capability Spec: overview **Package**: `@suaveplan/overview` **Version**: 0.0.0 (genesis) **Status**: ADDED --- ## ADDED Requirements ### OVR-01 — Manifest schema `ManifestSchema` MUST validate `{ generatedAt: ISO-8601 string, version: semver, categories: Category[], packages: Package[] }`. Every `Package.dependsOn` entry MUST reference an existing `Package.name`. Duplicate names MUST be rejected with `OVERVIEW.MANIFEST_INVALID`. ### OVR-02 — Topological layers `layerFor(name, manifest)` MUST return a non-negative integer such that a package with `dependsOn = []` has layer 0, and every other package's layer is one more than the max of its dependencies' layers. If a cycle is detected, `layerFor` MUST throw `OVERVIEW.CYCLE_DETECTED`. ### OVR-03 — Graph walkers `dependenciesOf(name, manifest)` MUST return the transitive closure of a package's `dependsOn` edges. `dependentsOf(name, manifest)` MUST return the transitive closure of the reverse edges. Both MUST throw `OVERVIEW.PACKAGE_NOT_FOUND` for unknown names. ### OVR-04 — Generator contract The generator script MUST scan every workspace `package.json`, merge with `FOLDERS.yml`, and produce a deterministic `manifest.json` at the repo root. Output MUST be stable: re-running the generator with no workspace changes MUST produce byte-identical output. ### OVR-05 — Validation at the boundary `loadManifest(path?)` MUST read and `ManifestSchema.parse` the file. Malformed JSON MUST surface as `OVERVIEW.MANIFEST_INVALID` with the path and parser reason in context.