/sdlc-documentation:14-ai-agent-architecture-specfrom sdlc-documentation
Specifies runtime loop, state machine, memory tiers, planner, dispatcher, durability, kill switch, and tenant isolation for approved tool-using AI agents. Use when designing agent architecture with adaptive planning and bounded tool actions.
Ships in sdlc-documentation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Artefact | Source or provider | Required? | Missing behaviour |
|---|---|---|---|
| Approved agent feature, action catalogue and AI architecture | Phase 01-03 artefacts | Required | Stop if actions, authority or autonomy level are undefined. |
| Durability, tenancy, audit, cost and safety constraints | Platform, security, finance and operations owners | Required | Default to lower autonomy and narrower actions when evidence is incomplete. |
| Artefact | Consumer | Observable acceptance condition |
|---|---|---|
| AI Agent Architecture Specification and ADR seeds | Agent, platform, security, test and operations teams | State is durable; every action passes dispatcher policy and audit; budgets, approval, recovery, kill switch and tenant isolation have deterministic tests. |
| Evidence | Consumer | Acceptance condition |
|---|---|---|
| Source and decision trace | Reviewer and downstream owner | Each material statement cites an approved input, named decision or qualified open issue. |
| Completed verification record | Release or phase gate owner | Every applicable check records pass/fail; unavailable checks remain not assessed. |
Read-only is the default for analysis, review, evaluation and planning. Read and search access to authorised project artefacts are required. Editing is limited to an explicitly requested project deliverable. Execution may run document, syntax or validation checks. Network access is used only for facts that require current verification. Do not publish, spend, change production, approve policy, or claim certification without explicit authority.
If any required capability is unavailable, return the narrowest useful qualified AI Agent Architecture Specification and ADR seeds draft plus a gap register showing the missing item, affected sections, risk and owner. Never convert an unassessed check into a pass.
| Choice | Action | Failure or risk avoided |
|---|---|---|
| Action has material external effect | Require policy check and explicit approval per strategy | Agent cannot exceed delegated authority |
| Run is long-lived or retriable | Persist state and idempotency keys | Resume does not duplicate action |
The agent-distinctive architecture artefact. Sits alongside the AI Architecture Spec and the multi-tenancy spec. Captures the runtime loop, the state machine, the memory tiers, the planner, the dispatcher (the gate that enforces the action catalogue, the audit log, the rate limits, and the kill-switch), the supervisor (for multi-agent topologies), and the per-tenant isolation contract.
Read the AI architecture spec, the agent feature PRD, the action catalogue, the multi-tenancy spec. Identify in-scope agent features, autonomy levels, and the action catalogue scope per feature.
The agent runtime sits inside the AI plane and contains:
Diagram in Mermaid; place every service.
Standard loop: observe → plan → act → observe → ... until terminal state. State machine states: pending, planning, awaiting-approval, executing-tool, awaiting-tool-result, intervened, aborted, completed-success, completed-abstain, completed-failed. Define transitions and the durability point at every transition.
For each tier:
(tenant_id, agent_run_id); never crosses run boundaries.(tenant_id, user_id); access requires tenant claim.(tenant_id); access requires both the tenant claim and the per-tenant opt-in flag.State the encryption posture, key management, and the redaction rule at write time.
State whether the planner is ReAct, Plan-and-execute, Tree-of-thought, Function-calling-loop, or custom. State the prompt template source (prompt registry). State the budget hooks — the planner shall halt when max-step or max-cost is reached. State the abstain payload — the planner emits a structured abstain when no plan satisfies the policy envelope.
The dispatcher is the gate. For every tool call:
If multi-agent, cross-link to 15-ai-agent-multi-agent-coordination-spec and place the supervisor in the diagram. State the supervision policy (review-before-act / review-after-act / sample-review).
The orchestrator persists state at every transition. After a process crash or planned restart, the orchestrator shall resume in-flight runs from the last durable state. State the storage technology, the serialisation format, and the resume SLA (e.g. < 30 s after restart). State the idempotency contract — every tool call carries an idempotency key derived from (agent_run_id, step_index).
State the kill-switch surface (operator API + ops console UI). State the propagation SLA — global kill-switch shall halt every dispatcher within 5 seconds. State the rehearsal cadence — kill-switch is rehearsed monthly in staging.
State the enforcement points: planner (no cross-tenant retrieval), dispatcher (tenant claim re-validated per call), memory tiers (isolation keys above), audit log (per-tenant partitioning).
ADR seeds: planner choice per feature, memory store technology, durable state store, supervisor topology, kill-switch propagation SLA, irreversibility-gating policy, tool-call audit log retention.
For a design that stores summaries, include one worked correction in the Memory Tiers section. Identify the source record, summary, dependent index or cache, the actor allowed to correct it and what a reader sees during propagation. Specify the observable result after correction and after access revocation. A test can warm the cache with a permitted answer, revoke the reader's access, then repeat the same question in the same session and in a fresh one. State which component enforces the decision in each path.
Concept source: Labaschin et al. (2025), Managing Memory for AI Agents, chapters 1 and 5, on lossy summaries and versioned collective memory.
AI_Agent_Architecture_Spec.md sections: 1) Agent Runtime Diagram, 2) Loop & State Machine, 3) Memory Tiers, 4) Planner, 5) Tool Dispatcher, 6) Supervisor (if applicable), 7) Durability & Resumability, 8) Kill-switch Wiring, 9) Per-Tenant Isolation, 10) ADR Seed Index, 11) Traceability.
05-ai-red-team-test-plan/references/red-team-scenario-library.md)logic.prompt, README.md, references/ai-agent-architecture-spec-template.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
agent-architecture, state-machine, runtime-loop, multi-agent, adr
Other plugins' skills for the same job
160 skills in this plugin
/01-deployment-guideUse when producing or updating deployment guide for release prerequisites, migration choreography, verification, rollback, and ownership. Use runbook for the neighbouring concern; this skill owns the named document contract and its acceptance evidence./01-high-level-designUse when approved requirements need a system-level architecture with boundaries, components, critical flows, deployment topology and ADRs, or an as-built design must be recovered from existing code; use system-overview for orientation, low-level-design for module internals, and infrastructure-design for infrastructure depth./01-initialize-srsUse when writing a new SRS (software requirements specification) for a business system or module: create the Waterfall SRS workspace, IEEE structure, identifiers and source context; use context-engineering next for boundaries and actors./01-prd-generationUse when converting approved discovery evidence into a traceable PRD with objectives, prioritised features, success measures, constraints, and release scope; use vision-statement for the strategic north star and lean-canvas while assumptions still need testing./01-sprint-planningUse when preparing a sprint goal, evidence-based team capacity, selected backlog, task breakdown, and delivery risks. Use definition-of-ready to admit individual items and definition-of-done to judge completed increments./01-stakeholder-analysisUse when identifying and classifying stakeholders, influence, interests, decision rights, and communication needs before elicitation; use elicitation-toolkit to gather requirements from them.npx claudepluginhub peterbamuhigire/chwezi-sdlc-documentation --plugin sdlc-documentation