编辑 | blame | 历史 | 原始文档

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 generated .ai directory is suite-owned after initialization, including .ai/skills.
  • Durable run artifacts belong under .ai/runs only when the generated design includes them; a rebuild must explicitly preserve or regenerate them according to the blueprint.
  • Only the root AGENTS.md block between current markers is suite-owned.
  • Text outside the markers is human-owned.

Current markers:

<!-- AI-AGENT-SYSTEM:START -->
<!-- AI-AGENT-SYSTEM:END -->

Recognize one legacy AI-AGENT-ROUTING block for migration. Block generation 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; Render 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 rebuild 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 Render use this exact predicate. Any deviation is unrelated or mixed ownership and blocks adoption.

Direct rebuild

  1. Complete Inspect and Design before writing generated files.
  2. Recreate the suite-owned .ai directory directly under the repository root.
  3. Preserve human-owned root AGENTS.md text and update only its managed block.
  4. Validate structure, semantics, inventory, hashes, run ID, blueprint ID, and ownership against the repository after Render completes.
  5. Report any partial writes when Render or Validate fails.

Target manifest

Write UTF-8 JSON to .ai/bootstrap-manifest.json:

{
  "schema_version": 1,
  "generator": "ai-agent-system-bootstrap",
  "suite_version": 4,
  "run_id": "bootstrap-run-id",
  "blueprint_id": "system-blueprint-id",
  "generation_mode": "initialize",
  "generated_at": "ISO-8601 UTC",
  "managed_paths": [
    ".ai"
  ],
  "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.