P2 arch design policy

From babyworm/rtl-agent-team · View interactive version

P2 arch design policy is an AI agent skill from the GitHub repository babyworm/rtl-agent-team. Internal reference: p2 arch design policy (agent-loaded; do not invoke).

How to use this skill

Skill file

Phase 2 Architecture Design Policy

P1 Algorithm Candidate HW Review Criteria

For each functional area's candidates from P1's domain-analysis.md, evaluate:

Architecture Review Criteria (Dynamic Convergence Protocol)

Dynamic convergence review (min 2, max 5 rounds), coordinated by rtl-architect:

(a) rtl-architect: spec compliance (Feature Coverage Checklist) + structural review

(b) vcodec-architecture-expert: memory access patterns, performance analysis

(c) ref-model-dev: architecture ↔ C model consistency (block mapping, data flow, interfaces)

(d) ref-model-reviewer: independent C model quality gate (algorithm fidelity, numerical precision,

undefined behavior/build warning risk) when ref model is newly created or substantially revised

>30% of source lines changed from prior version. Both sequential and team orchestrators

use this same threshold. Skip review tasks when ref model is unchanged.

Architecture Naming Conventions

HW Candidate Review Format

docs/phase-2-architecture/hw-candidate-review.md must contain:

  1. Per functional area: candidate list with algorithm description
  2. Comparison matrix columns: gate count, critical path depth, SRAM requirements,

external memory BW, throughput at target freq, memory latency impact, implementation risk

  1. Selected candidate per area with REQ-NNN justification
  2. User decision record (AskUserQuestion response summary)

Bandwidth Analysis Workflow

Memory Architecture Classification

Each block's storage elements must be classified at architecture level:

Architecture does NOT select wrapper types (that is Phase 3 μArch responsibility), but MUST identify:

Memory Access Latency Awareness

Architecture review must verify:

(prefetch, double buffering, pipelining, or accepted latency penalty with justification)

Wonder Log (Required)

Each review round MUST produce a wonder-log entry:

Review Convergence Criteria

Review rounds use dynamic convergence instead of fixed 3 rounds:

| Parameter | Value | Rationale |

|-----------|-------|-----------|

| min_rounds | 2 | Minimum for meaningful review |

| max_rounds | 5 | Prevent infinite loops |

| finding_delta_threshold | 0.1 | < 10% new findings = stable |

| critical_resolution | ALL | All Critical/High must be resolved |

| wonder_stability | true | No new High-risk assumptions |

Early exit (round 2): When findings converge quickly (simple designs)

Extended review (rounds 4-5): For complex designs with emergent issues

This is inspired by Ouroboros's ConvergenceCriteria:

Escalation & Stop Conditions

Architecture Feature Completeness Gate

Phase 2 architecture review MUST verify that ALL spec features flow through to the design:

  1. Spec-to-architecture mapping: Every REQ-F-* from P1 must map to an architecture block
  1. Ref model-to-architecture alignment: When C reference model exists:
  1. Omission justification: Spec features omitted from architecture require:
  1. Impact quantification (domain-specific):

Open Resolution Protocol

Phase 2 receives docs/phase-1-research/open-requirements.json containing OPEN-1-* research topics.

For each OPEN-1-* item, the architecture team must:

  1. Conduct architecture research using the item's candidates and evaluation_criteria
  2. Select a winner with quantitative justification (gate count, throughput, area, etc.)
  3. Record the decision in docs/phase-2-architecture/iron-requirements.json (REQ-A-*) with:
  1. Verify: ALL OPEN-1-* items must be resolved before Phase 2 exit

Phase 2 may also produce docs/phase-2-architecture/open-requirements.json (OPEN-2-*) for

research topics to be resolved by Phase 3 (e.g., micro-architecture choices).

Compliance Check Procedure

After docs/phase-2-architecture/iron-requirements.json (REQ-A-*) is finalized:

  1. Invoke compliance-checker agent with:
  1. Gate: compliance-report.json verdict must be PASS
  2. On VIOLATION: enter authority-differentiated escalation ladder

Upstream Challenge Protocol

If compliance VIOLATION persists after Primary stage and is technically infeasible:

  1. Orchestrator produces infeasibility assessment with quantitative evidence
  2. Compliance-checker validates the infeasibility claim
  3. If validated: produce upstream challenge report with PPA estimates
  1. Present challenge to user via AskUserQuestion with comparison table

Ambiguity Gate (Phase 2)

Apply ambiguity scoring to all new REQ-A-* decisions:

Final Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.