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

---
name: ai-agent-system-design

description: Internal design phase for ai-agent-system-bootstrap that converts an immutable ProjectSnapshot into a complete SystemBlueprint for a minimal repository Agent Team. Use only when a bootstrap run supplies the snapshot and requests Agent, local Skill, workflow DAG, and selective SubAgent orchestration design.

AI Agent System Design

Convert one accepted ProjectSnapshot, including its immutable request block, into one complete SystemBlueprint. Perform no file writes and do not inspect the old Agent Team as a design source.

This phase is orchestrator-gated. If a complete accepted ProjectSnapshot with run ID, request, ownership classification, and evidence is not supplied, return blocked without reading unrelated repository state or writing files. Explicit direct invocation does not bypass this input gate.

Required suite material

Read all of the following before designing:

Design

1. Establish design facts

Accept only snapshot facts backed by evidence and snapshot assumptions explicitly carried forward. Block on unresolved ownership conflicts or missing facts that would materially change the generated system.

Completion criterion: every design input is classified as evidence, approved assumption, or blocker.

2. Define the minimal Agent and Skill set

Create an Agent only when it owns a distinct recurring decision or output. Create a project-local Skill only for a repeated executable procedure. Choose one default primary implementation Agent; identify supporting Agents without equating a role to a thread.

Completion criterion: every Agent and Skill has a distinct responsibility, trigger surface, required inputs, output contract, and concrete repository basis.

3. Define workflows and execution

Express each lifecycle as a dependency DAG. For every step declare the Agent, local Skill or none, stable prerequisites, execution mode, read scope, write scope, output, verification, and next gate.

Apply the selective SubAgent policy. Default to inline; assign read-only isolation to independent exploration and review; assign worktree execution only to stable non-overlapping writers. Resolve every write-scope overlap before completing the blueprint.

Completion criterion: all workflow dependencies are acyclic, each parallel group is dependency-independent, and each writable path has one owner per phase.

4. Define generated runtime and ownership

Generate the root routing block, execution policy, SubAgent contract, context policy, and merge policy. Scope global-Skill opt-in rules to the generated repository Agent Team. Declare the complete .ai directory suite-owned, only manifest-listed .agents/skills suite-owned, and only the marked root AGENTS.md block suite-owned.

Completion criterion: the blueprint fully describes all rendered files and contains no implicit ownership or routing rule.

5. Return the blueprint

Populate every SystemBlueprint field, including traceability from generated components to snapshot evidence and the complete managed path set. Do not add or alter warning acceptance; that authority remains in BootstrapRun.allowed_warning_codes.

Completion criterion: render and validation can proceed without rereading the repository or making a new design decision.