--- name: ai-agent-system-validate description: Validate a staged or installed repository Agent Team against the suite contracts, schemas, runtime policies, ownership rules, and project evidence. Use as the read-only validation phase of ai-agent-system-bootstrap or standalone to report structural and semantic defects without repairing files. --- # AI Agent System Validate Validate rendered output without changing it. Return evidence, not repairs. ## Required suite material Read: - [`../../shared/contracts/bootstrap-run.md`](../../shared/contracts/bootstrap-run.md) for bootstrap-candidate scope - [`../../shared/contracts/project-snapshot.md`](../../shared/contracts/project-snapshot.md) for bootstrap-candidate scope - [`../../shared/contracts/system-blueprint.md`](../../shared/contracts/system-blueprint.md) when a blueprint is available - [`../../shared/contracts/render-result.md`](../../shared/contracts/render-result.md) when validating staging - [`../../shared/contracts/validation-report.md`](../../shared/contracts/validation-report.md) - [`../../shared/policies/generated-team-runtime.md`](../../shared/policies/generated-team-runtime.md) - [`../../shared/policies/ownership-and-rebuild.md`](../../shared/policies/ownership-and-rebuild.md) - [`../../shared/policies/subagent-execution.md`](../../shared/policies/subagent-execution.md) - [`../../shared/schemas/agents-md.md`](../../shared/schemas/agents-md.md) - [`../../shared/schemas/agent-definition.md`](../../shared/schemas/agent-definition.md) - [`../../shared/schemas/skill-definition.md`](../../shared/schemas/skill-definition.md) - [`../../shared/schemas/workflow-definition.md`](../../shared/schemas/workflow-definition.md) - [`../../shared/schemas/orchestration-definition.md`](../../shared/schemas/orchestration-definition.md) ## Validation Resolve `` from this `SKILL.md` location and invoke the resulting absolute script path. The target repository working directory is not the suite root. For `bootstrap-candidate` scope, require the BootstrapRun, ProjectSnapshot, SystemBlueprint, RenderResult, and staging root with matching IDs. Return `blocked` without replacement authority when any input is absent or inconsistent. ### 1. Run structural validation Run: ```text python /shared/scripts/validate-structure.py --root --json ``` Account for every reported error and warning. Structural errors block replacement. Completion criterion: the script exits and its complete result is captured in the report. ### 2. Validate semantics Check all of these surfaces: - generated components trace to current `ProjectSnapshot` evidence or declared assumptions - the Agent set is minimal and responsibilities do not overlap - exactly one primary Agent owns integration and completion - role selection and execution-thread selection are separate decisions - workflow graphs are acyclic and gates protect stable inputs, integration, and final review - concurrent writers have disjoint scopes and shared files have one owner - SubAgents are used only for bounded work with structured returns - review, QA, security, and exploration Agents are read-only by default - sequential inline fallback exists when SubAgents or worktrees are unavailable - global-Skill opt-in language is scoped to the generated team runtime - the complete `.ai` ownership rule and managed `AGENTS.md` markers are consistent - every RenderResult file and hash matches the staged tree Completion criterion: every semantic check has a pass, warning, or error with file/path evidence. ### 3. Decide status Use only: - `passed`: no errors or warnings - `passed-with-warnings`: no errors and at least one warning - `blocked`: required evidence or safe ownership is unavailable - `failed`: structural or semantic requirements are violated Return a `ValidationReport` with a final decision. Do not edit files, invoke Render, or silently waive warnings. Completion criterion: the report accounts for every finding and identifies the exact gate that permits or blocks replacement. For standalone installed-team validation, set report scope to `installed-standalone`, allow absent input blueprint and render-result IDs, derive validated IDs from the strict installed manifest, and use `final_decision: report-only`. Skip only traceability checks that require unavailable bootstrap artifacts; mark each skipped check `not-applicable`. Standalone validation never authorizes replacement.