--- name: ai-agent-system-render description: Internal render phase for ai-agent-system-bootstrap that materializes an accepted SystemBlueprint as the managed AGENTS.md block and a complete .ai tree directly in the target repository. Use only with a matching bootstrap run and blueprint. --- # AI Agent System Render Render the blueprint exactly into the target repository. Make no design decisions and write only the managed paths. This phase is orchestrator-gated. Require a matching BootstrapRun and complete SystemBlueprint. Without both inputs, return `blocked` and write nothing. Explicit direct invocation does not bypass this input gate. ## Required suite material Read: - [`../../shared/contracts/system-blueprint.md`](../../shared/contracts/system-blueprint.md) - [`../../shared/contracts/render-result.md`](../../shared/contracts/render-result.md) - [`../../shared/policies/ownership-and-rebuild.md`](../../shared/policies/ownership-and-rebuild.md) - [`../../shared/templates/AGENTS.md`](../../shared/templates/AGENTS.md) - [`../../shared/templates/agent.md`](../../shared/templates/agent.md) - [`../../shared/templates/skill.SKILL.md`](../../shared/templates/skill.SKILL.md) - [`../../shared/templates/workflow.md`](../../shared/templates/workflow.md) - [`../../shared/templates/execution-policy.md`](../../shared/templates/execution-policy.md) - [`../../shared/templates/subagent-contract.md`](../../shared/templates/subagent-contract.md) - [`../../shared/templates/context-policy.md`](../../shared/templates/context-policy.md) - [`../../shared/templates/merge-policy.md`](../../shared/templates/merge-policy.md) - [`../../shared/templates/bootstrap-manifest.json`](../../shared/templates/bootstrap-manifest.json) ## Rendering ### 1. Verify inputs Confirm that the BootstrapRun has a resolved initialize/rebuild mode, the blueprint is complete, the repository root matches the inspected project, and the ownership classification allows direct generation. Use `BootstrapRun.mode` as the manifest `generation_mode`. Completion criterion: all output paths resolve to `AGENTS.md` or `.ai` inside the repository and every blueprint component maps to one template/schema. ### 2. Materialize output Create only: ```text / AGENTS.md .ai/ bootstrap-manifest.json agents/ skills/ workflows/ orchestration/ # only when named by the blueprint ``` Render project-specific content; remove unused placeholders and example references. Write UTF-8 text. Preserve human-owned root `AGENTS.md` text outside the managed markers and replace only the single valid current or legacy managed block. Generate `.ai/orchestration` only when the blueprint names at least one policy. Generate a manifest that binds `run_id` and `blueprint_id`, declares only the complete `.ai` directory managed, then records every generated file path relative to the repository root. Completion criterion: every blueprint component has exactly one generated file and no generated file lacks a blueprint source. ### 3. Return the result Hash and list every generated file, record counts by component type, and return `RenderResult`. Report warnings without modifying the blueprint. Completion criterion: the manifest, file list, counts, and hashes agree with the repository's managed output. ## Guardrails - Keep the generated section of `AGENTS.md` limited to one managed block with current markers. - Keep project-local Skills valid Codex Skills with YAML frontmatter. - Never create `.agent`, `.agents`, or any project-Skill location outside `.ai/skills`. - Use the unified execution modes and return contract defined by the schemas. - Stop on missing blueprint data; do not fill gaps from the old Agent Team or generic boilerplate.