---
name: architect-audit
description: |
  Your enterprise AI architect, in audit mode. Maps an AI system, project, or
  proposal against the L0-L7 layered decision architecture. Identifies where
  decisions currently live, where they should live, and which upstream
  decisions are missing or misplaced (retrofit debt). Use when scoping a new
  AI workstream, evaluating an existing one, or diagnosing where a design
  decision belongs.
triggers:
  - map this to layers
  - where does this decision belong
  - what's the architecture posture
  - audit this AI project
  - is this L3 or L2
  - are we building bottom-up
  - architect review
  - review the architecture
  - layer audit
  - retrofit debt
---

<!-- MIRRORED FROM: AI-Architect/skills/architect-audit/SKILL.md -->
<!-- MIRRORED AT: 2026-04-28 -->

# AI Layer Mapper

Enterprise AI systems architecture layers, from business strategy down to cross-agent glue. The layers are preconditions: each one assumes the one above is locked. Skipping creates the retrofit trap (a later decision forces you to redo earlier work).

## The layers

| Layer | Scope | Example decisions |
|-------|-------|------------------|
| L0 Strategy | Why this capability exists | Build vs. buy; capability portfolio; risk appetite |
| L1 Brand / posture | How AI shows up to users | Voice; disclosure; attribution; trust framing |
| L2 AI philosophy | Promises and red lines across every agent | Grounded-only; human-final-approval; retention defaults; PII locality |
| L3 Framework contract | Interfaces every agent must implement | Eval thresholds; guardrail contract; telemetry schema; auth; per-call budget |
| L4 Platform kit | Shared SDK, prompt library, eval harness, guardrail runtime | One canonical implementation; consumers mirror |
| L5 Agent instance | Deployed agent / workflow / copilot | Built from the kit; product-team owned |
| L6 Per-instance refinement | Integration details inside one instance | UX; latency; voice tuning |
| L7 Cross-agent glue | Enterprise agent mesh | Shared memory; shared identity; handoff protocol |

## Procedure

When invoked:

1. **Elicit the subject.** Ask what is being mapped: a running system, a proposal, a capability, a cross-team program. Get one sentence.
2. **Walk the layers top-down.** For each layer, ask a single diagnostic question (list below). If the answer is "not decided" or "decided informally," mark the layer as unlocked.
3. **Identify misplaced decisions.** Decisions made at a lower layer that belong higher up are retrofit debt. Callout examples: a per-agent guardrail that actually restates an L2 red line; a per-product eval harness that is the nth variant.
4. **Produce the mapping table.** One row per layer. Columns: layer, current state, gap, retrofit risk if unaddressed.
5. **Recommend the next two moves.** The highest-leverage unlocked layer usually wins; tie-break by which unlock unblocks the most downstream work.

## Diagnostic questions per layer

- **L0:** Why does this capability exist in business terms? Who sponsors it?
- **L1:** How will users know this is AI? What tone and attribution does the enterprise promise?
- **L2:** What does every agent in this line of work promise? What does it never do?
- **L3:** What technical contract do all agents implement? Eval thresholds? Cost ceilings? Telemetry schema?
- **L4:** Is there a shared kit? What does it include? How do consumers adopt it?
- **L5:** How are product-specific instances built on the kit? Who owns them?
- **L6:** What polish concerns are isolated to one product? Latency? UX integration?
- **L7:** What crosses agents? Memory? Identity? Handoff protocol?

## Output template

```markdown
## AI Architecture Layer Mapping: {subject}

| Layer | Current state | Gap | Retrofit risk |
|-------|---------------|-----|---------------|
| L0 Strategy | ... | ... | low / medium / high |
| L1 Brand | ... | ... | ... |
| L2 Philosophy | ... | ... | ... |
| L3 Framework contract | ... | ... | ... |
| L4 Platform kit | ... | ... | ... |
| L5 Agent instance | ... | ... | ... |
| L6 Per-instance refinement | ... | ... | ... |
| L7 Cross-agent glue | ... | ... | ... |

## Retrofit debt callouts
- ...

## Recommended next moves
1. ...
2. ...
```

## When to skip

Skip this skill when the user is asking an L6 question ("why is this agent slow" / "this response sounds off"). Layer mapping is for scoping, not debugging.

## Related

- `../architect-adr/` - write an ADR once the layer decision is clear
- `../../fundamentals.md` > Section I - full layer definitions
