Treat the generated Agent Team as derived output. Rebuild managed components from current repository evidence; do not optimize or merge old Agent definitions.
.ai directory is suite-owned after initialization..agents/skills/<name> 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.AGENTS.md block between current markers is suite-owned.Current markers:
<!-- AI-AGENT-SYSTEM:START -->
<!-- AI-AGENT-SYSTEM:END -->
Recognize one legacy AI-AGENT-ROUTING block for migration. Block replacement when marker halves are missing, markers repeat, or current and legacy blocks coexist.
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..ai directory. Do not assume ownership from its name alone.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..ai entries are limited to agents, skills, workflows, orchestration, runs, and bootstrap-manifest.yaml.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.
.ai, manifest-listed repository Skills, and managed AGENTS.md block.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.
Write UTF-8 JSON to .ai/bootstrap-manifest.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/<generated-skill-name>"
],
"agents_md_managed_block": {
"start": "<!-- AI-AGENT-SYSTEM:START -->",
"end": "<!-- AI-AGENT-SYSTEM: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.