# Ownership and Rebuild Policy Treat the generated Agent Team as derived output. Rebuild managed components from current repository evidence; do not optimize or merge old Agent definitions. ## Managed surfaces - The complete `.ai` directory is suite-owned after initialization. - Only `.agents/skills/` directories listed in `.ai/bootstrap-manifest.json` are suite-owned. - `.agents/agent-system-runs/` is runtime-owned traceability data and is never listed as managed output or removed during rebuild. - Only the root `AGENTS.md` block between current markers is suite-owned. - Text outside the markers and unlisted repository Skills are human-owned. Current markers: ```text ``` Recognize one legacy `AI-AGENT-ROUTING` block for migration. Block replacement when marker halves are missing, markers repeat, or current and legacy blocks coexist. ## Ownership adoption - `initialize`: `.ai` is absent and no managed block exists. - `rebuild`: a strict current manifest whose declared inventory matches the installed managed tree, or an unambiguous legacy Agent Team, exists. - `.ai` absent with a current or legacy managed marker is an orphan ownership conflict. Inspect returns `blocked`; Bootstrap leaves mode pending; replacement refuses the target. - Block an unrelated or mixed `.ai` directory. Do not assume ownership from its name alone. - Use old generated paths only to identify replacement scope. Do not carry old roles, prompts, or workflows into Design. An unambiguous legacy Agent Team satisfies every condition below: - `.ai` and every descendant are real directories/files with no symlink or junction. - `.ai/agents` and `.ai/workflows` are directories. - Top-level `.ai` entries are limited to `agents`, `skills`, `workflows`, `orchestration`, `runs`, and `bootstrap-manifest.yaml`. - Root `AGENTS.md` contains exactly one ordered current marker pair or exactly one ordered legacy marker pair, never both. Inspect and replacement use this exact predicate. Any deviation is unrelated or mixed ownership and blocks adoption. ## Staged transaction 1. Render candidate output outside the repository on the same volume. 2. Validate structure, semantics, inventory, hashes, run ID, blueprint ID, and ownership before target writes. 3. Back up current managed paths. 4. Install the new `.ai`, manifest-listed repository Skills, and managed `AGENTS.md` block. 5. Run a fast structural check on installed output. 6. Commit and remove backup on success; restore backup on ordinary failure. The transaction spans multiple paths and cannot be a single filesystem rename. Call it a transactional rebuild with rollback; do not claim crash-proof atomicity unless a durable journal is implemented and tested. ## Target manifest Write UTF-8 JSON to `.ai/bootstrap-manifest.json`: ```json { "schema_version": 1, "generator": "ai-agent-system-bootstrap", "suite_version": 3, "run_id": "bootstrap-run-id", "blueprint_id": "system-blueprint-id", "generation_mode": "initialize", "generated_at": "ISO-8601 UTC", "managed_paths": [ ".ai", ".agents/skills/" ], "agents_md_managed_block": { "start": "", "end": "" }, "generated_files": [] } ``` Use `generation_mode: "rebuild"` for rebuilds. The manifest field set, value types, markers, managed paths, and file inventory are strict; an arbitrary JSON file does not establish suite ownership.