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

---
name: ai-agent-system-inspect

description: Inspect a repository and produce the ProjectSnapshot required to initialize or rebuild its AI Agent Team. Use for standalone Agent Team discovery or as the read-only inspection phase of ai-agent-system-bootstrap; classify existing generated ownership without optimizing old Agent definitions.

AI Agent System Inspect

Inspect current repository truth and return one immutable ProjectSnapshot. Remain read-only.

Required suite material

Read:

Inspection

1. Confirm the boundary

Resolve the repository root and copy the user request, explicit constraints, explicit exclusions, and available runtime capabilities into the snapshot. Reject a missing or ambiguous root.

Completion criterion: every inspected path is inside the resolved repository root.

2. Read repository evidence

Inspect the smallest set of real files that establishes:

  • project and product purpose
  • languages, frameworks, runtimes, and build tools
  • modules and ownership boundaries
  • persistence, migrations, and external integrations
  • test, release, deployment, security, privacy, and compatibility constraints
  • recurring development activities that justify project-local Skills
  • runtime support for SubAgents, shared workspaces, and isolated worktrees

Record evidence paths beside conclusions. Mark absent evidence as an assumption rather than inventing detail.

Build the complete domain_assessment across product, architecture, frontend, backend, data, security, QA, DevOps, documentation, final review, and project-specific domains. Preserve module paths, raw evidence paths, risks, verification methods, and inference grounds.

Completion criterion: each populated snapshot field points to evidence or is explicitly marked assumed/unknown, and every responsibility domain has an explicit evidence-based assessment.

3. Classify existing Agent Team ownership

Read root AGENTS.md, .ai/bootstrap-manifest.json, and the structural shape of .ai when present. Recognize a legacy YAML manifest only as migration evidence.

  • Treat text outside managed markers as human-owned.
  • Recognize AI-AGENT-SYSTEM as the current marker and AI-AGENT-ROUTING as a legacy marker eligible for one-time migration.
  • Treat .ai as suite-owned only when a strict current manifest and its declared inventory match the installed managed tree, or when it is an unambiguous legacy Agent Team containing the expected Agent/workflow structure.
  • Report unrelated or mixed-ownership .ai content as a blocking ownership conflict.
  • Inventory old generated paths only to determine rebuild scope. Do not use old Agent roles, workflows, or Skills as design requirements.

Completion criterion: agents_md_marker, agents_md_human_content, ai_directory, legacy status, and every conflict are explicit.

4. Return the snapshot

Populate every required field in ProjectSnapshot, including evidence, assumptions, unknowns, managed paths, and blockers. Set status to blocked when ownership or target boundary is unsafe; otherwise set success.

Completion criterion: the output conforms to the contract and contains no unclassified existing generated surface.

Output

Return only the completed ProjectSnapshot plus a concise evidence summary. Do not write repository files.

For standalone invocation, accept an explicit repository root and user request, create an ephemeral read-only run ID, and populate the same snapshot request block. Standalone Inspect never selects a rebuild mode or writes a BootstrapRun.