用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/babyworm/rtl-agent-team --skill rat-auto-design-policy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Initialize RTL project workspace: directory structure, coding rules, phase guides. Run once per project. Triggers: 'init project', 'new project'.
Internal reference: rtl p5 verify policy (agent-loaded; do not invoke).
P5 formal verification: SVA proof via SymbiYosys BMC/induction on lint-clean RTL. Triggers 'formal verification', 'prove property', 'SVA'.
基于 SOC 职业分类
正在显示 SKILL.md
| name | rat-auto-design-policy |
| description | Internal reference: rat auto design policy (agent-loaded; do not invoke). |
| user-invocable | false |
Lower phases MUST NOT violate upper phase specifications: Spec → Architecture → μArch → RTL → Verification Each phase strictly adheres to decisions made in all preceding phases. Deletion, reduction, or modification of features for convenience is FORBIDDEN. If a change is needed, control returns to the upper phase for approval.
Higher abstraction levels demand MORE iterative refinement because their quality cascades to ALL downstream phases. A defect at the architecture level costs orders of magnitude more to fix at RTL than if caught during architecture review.
Graduated iteration by abstraction level: Phase 1 (Research): 3 mandatory rounds (chief-coordinated) Phase 2 (Architecture): dynamic convergence review (min 2, max 5 rounds per p2-arch-design-policy) — memory, performance, ref model consistency Phase 3 (μArch): dynamic convergence review (min 2, max 5 rounds per rtl-p3-uarch-policy) — performance, interface, memory optimization Phase 4 (RTL): Wave-based lint+sim (implementation-level) Phase 5 (Verify): Sub-phase parallel (terminal verification)
Iteration count can be increased beyond 3 if convergence is not achieved. Principle: refine thoroughly at the top, execute efficiently at the bottom.
Design artifacts (docs/, reviews/) serve as persistent memory across phases and agents. Each phase reads upstream documents as input context and writes downstream documents as output. No agent needs to "remember" another agent's output — it reads the document.
Document flow: iron-requirements.json + open-requirements.json → arch-designer reads → architecture.md → uarch-designer reads → docs/phase-3-uarch/*.md → rtl-coder reads reviews/phase-N/ → Quality Gate reads → next phase proceeds or fails
State is persisted at .rat/state/rat-auto-design-state.json for resumability.
Every phase transition requires BOTH:
Quality Gate verdicts: PASS or FAIL + findings[]
Every active gate uses a per-gate retry budget N (retry_limit in state):
1..N with normal strategyN+1..2N with immediate strategy switch
2Nneeds_user_decision=true and stop for user directionState contract for hook enforcement lives in:
orchestration_control.active_gate_* (fast path for hooks)orchestration_control.gates.{gate_id} (per-gate detailed counters)When entering fallback or last-chance stages, orchestrator writes:
orchestration_control.dynamic_prompt_text (plain text, single-shot guidance)orchestration_control.dynamic_prompt metadata (source, strategy_tag, used)Fallback templates are available in:
${CLAUDE_PLUGIN_ROOT}/skills/rat-auto-design/templates/escalation-prompts.json (plugin runtime)skills/rat-auto-design/templates/escalation-prompts.json (development repo context)Use templates only when LLM-generated prompt text is unavailable.
If both paths are unreadable, orchestrator MUST use the built-in defaults below and still
write the chosen text into orchestration_control.dynamic_prompt_text with
orchestration_control.dynamic_prompt.source = "builtin":
primary: Continue current gate workflow, focus on pending criteria with existing agent assignment.fallback: Split failing scope by module/requirement, switch reviewer+solver pairing, rerun impacted checks only.last_chance: Apply one non-overlapping alternative strategy, record deltas, prepare escalation context.user_escalation: Retries exhausted; ask user with failure summary, attempted strategies, and recommended options.Before each phase, verify required upstream files exist:
Agents entering a phase MUST load required files first, then summaries. Specific file lists are defined inline in each orchestrator's phase steps.
During iterative review rounds, reviewers write findings to:
.rat/scratch/phase-{N}/round-{R}-{agent}.md
Coordinator reads all round files to aggregate:
.rat/scratch/phase-{N}/round-{R}-feedback.md
On phase gate PASS: consolidated review saved to reviews/phase-{N}-*/, scratch cleaned.
On phase gate FAIL + retry: scratch files preserved for next round.
Every transition = Artifact Gate + Quality Gate (see Dual-Layer Phase Gates). Quality-gate semantics — reviewer rosters, review rounds, rebuttal protocol, convergence, and detailed pass/fail criteria — are OWNED by the per-phase policies in the table below. This policy defines only the artifact/verdict contract the orchestrator checks.
| Gate | Artifact Gate (must exist) | Verdict File(s) | Verdict | Quality Gate |
|---|---|---|---|---|
| 1→2 | docs/phase-1-research/: iron-requirements.json + io_definition.json + timing_constraints.json + domain-analysis.md (open-requirements.json optional — absent if P1 had no open items) | reviews/phase-1-research/research-review.md + per-round research-review-r1..r3.md (mandatory) | verdict=PASS (3-round chief review converged, or gaps escalated and user-approved; all requirements clear, consistent, implementable) | quality gates per p1-spec-research-policy |
| 2→3 | docs/phase-2-architecture/architecture.md (with D2 block diagram) + iron-requirements.json (P2, REQ-A-*) + refc/*/*.c | reviews/phase-2-architecture/architecture-review.md + feature-coverage.md + per-round architecture-review-r{N}.md (min 2) | verdict=PASS AND 100% REQ coverage AND review converged | quality gates per p2-arch-design-policy |
| 3→4 | docs/phase-3-uarch/*.md + iron-requirements.json (P3, REQ-U-*) + bfm/ directory | reviews/phase-3-uarch/uarch-review.md + feature-preservation.md + per-round uarch-review-r{N}.md (min 2) | verdict=PASS AND 100% feature preservation AND review converged | quality gates per rtl-p3-uarch-policy |
| 4→5 | rtl/*/*.sv (all lint-clean) + sim/*/tb_*.sv + sim/*/*_results.txt (all PASS) + basic integration smoke PASS + Stream B artifacts (see Stream B Rules) | reviews/phase-4-rtl/functional-completeness.md + design-review.md + lint-report.md | verdict=PASS on all three (100% functional coverage, lint 0 errors) | quality gates per rtl-p4-implement-policy |
| 5 completion | all verification sub-phases (5a-5e) PASS | reviews/phase-5-verify/requirement-traceability.md + e2e-traceability.md + final-compliance.md | verdict=PASS (every requirement implemented, verified, passing) | quality gates per rtl-p5-verify-policy |
Phase 1 gate additions (owned by this policy): compliance-checker verifies iron requirements have no internal contradictions; arch-designer confirms implementation feasibility (every requirement realizable in RTL within reasonable area/timing).
Summary Validation (every P1-P5 gate): docs/phase-1-research/phase-1-summary.md,
docs/phase-2-architecture/phase-2-summary.md, docs/phase-3-uarch/phase-3-summary.md,
docs/phase-4-rtl/phase-4-summary.md, docs/phase-5-verify/phase-5-summary.md must exist
(format: max 1 page with tables for Key Decisions, Module Inventory, Interface Summary,
Quality Gate Results, Open Items, Document References)
ADR Recording (Phase 2→3 and 3→4 gates): 3-5 key decisions → docs/decisions/ADR-{NNN}.md
Phase 2 Iterative Review: reviewer roster, round semantics, rebuttal protocol, and convergence criteria are owned by p2-arch-design-policy (dynamic convergence: min 2, max 5 rounds; domain experts conditional on domain-package presence).
Phase 3 Iterative Review: reviewer roster (incl. BFM reviewer), round semantics, rebuttal protocol, and convergence criteria are owned by rtl-p3-uarch-policy (dynamic convergence: min 2, max 5 rounds; domain experts conditional on domain-package presence).
Stream B artifacts are generated concurrently with Stream A (RTL implementation):
docs/phase-4-rtl/stream-b-sva-skeletons.mddocs/phase-4-rtl/stream-b-cdc-preliminary.mddocs/phase-4-rtl/stream-b-tb-skeletons.mdTraceability Convention:
// Source: docs/phase-3-uarch/{module}.md, Section: {section}# REQ-{NNN}: {description}Content Quality Gate (prevents empty-skeleton artifacts from passing):
property or assert keyword per referenced moduledocs/phase-3-uarch/clock-domain-map.mdREQ- tag per module and contain at least one test function/taskMerge Point: Stream A (lint-clean + unit PASS) + Stream B artifacts ready (content quality verified) → Phase 4→5 Gate.
| Type | Scope | Handling | Re-verify |
|---|---|---|---|
| UNIT_FIX | Single module (SVA fail, assertion error) | rtl-p4s-bugfix (parallel across modules) | Only failed sub-phases |
| INTEGRATION_FIX | Cross-module interface | rtl-p4s-bugfix (sequential) | 5b + 5c |
| DESIGN_FIX | Architecture-level | IMMEDIATE STOP → user approval | All (5a-5e) after upper phase fix |
Batch UNIT_FIX across sub-phases:
Max 2 feedback loops per sub-phase. After loop 2 fails → escalate to user.
| Fix Type | Re-run Sub-phases | Condition |
|---|---|---|
| UNIT_FIX (SVA fail) | 5a only (formal) | SVA property affected |
| UNIT_FIX (sim fail) | 5c only (integration) | Testbench affected |
| INTEGRATION_FIX | 5b + 5c (CDC + integration) | Interface modified |
| DESIGN_FIX | All (5a-5e) after upper phase approval | Architecture changed |
{
"loop_count": 1,
"max_loops": 2,
"failures": [{
"sub_phase": "5a",
"type": "UNIT_FIX",
"module": "example_module",
"description": "SVA counterexample at cycle 42",
"fix_applied": "Added pipeline register",
"re_run_phases": ["5a"]
}],
"status": "in_progress"
}
After each successful feedback fix:
docs/lessons-learned.md with format: LL-{NNN} with sections: Symptom, Root Cause, Fix Applied, Prevention, Related (REQ IDs, module, fix commit, ADR, Phase 5 Sub-phase)N → 2N → last-chance) → set needs_user_decision=true, stop and ask user before any further retryAll phases must enforce:
i_, o_, io_ (NOT suffix). Clock/reset exemptclk (single) or {domain}_clk (multiple). Reset: rst_n or {domain}_rst_nsnake_case or ALL_CAPS onlyALL_CAPS, localparam L_ prefixlogic only (no reg/wire), always_ff/always_comb, ANSI port styleu_, generate prefix: gen_{plugin_root}/skills/rat-auto-design/references/review-checklist.md (26 mandatory files)| 5→6 | — (artifact-only gate) | reviews/phase-5-verify/final-compliance.md | verdict=PASS | — |
| 6 completion | reviews/phase-6-review/design-note.md (complete document) + improvements.md (recommendations produced) | reviews/phase-6-review/code-review.md + design-review.md | verdict=PASS on both; on FAIL iterate review → fix cycle (max 2 rounds) | quality gates per rtl-p6-design-review-policy |