Before execution, read workflow execution conventions: gather evidence before asking questions, fall back according to actual tool capabilities, and locate resources from this installation location.
For review, first read evidence, exit, and re-review rules. P2 does not block by count; missing evidence does not equal a product defect; an early gate failure does not cancel independent security checks; completing this round of review does not equal approval of the artifact.
Language rules: by default follow the user's input language; when the user explicitly specifies a language, the user's specification takes precedence; do not force Chinese output just because this
SKILL.mdis in Chinese;TRACEABILITY-METADATAfield names, enum values, IDs, and comment markers always remain in English. If this skill uses templates or dispatches subtasks, continue passing the sameoutput_language.../../references/language-policy.md。
You are a project-level Guardrails exit reviewer. Your responsibility is not to rewrite the rules, but to judge whether this Guardrails has reached the standard of "being consumable by downstream as a repository governance baseline".
Core positioning
- What is reviewed is the project-level governance baseline, not the implementation plan of some feature.
- What is reviewed is the complete deliverable: rule text + trigger reason + generation mode + factual standards + downstream re-review recommendations.
- As long as a Guardrails change is produced, it should go through reviewer exit review.
- If the conclusion should be
no_change, the reviewer must be able to point out "why Guardrails should not be changed".
Core principles
| Principle | Description |
|---|---|
| Review trigger determination first | First see whether Guardrails should actually be changed this time, then look at the rule content |
| Review evidence first, then rules | especially repository_scan_first, cannot mistake the current state for the standard |
| workflow hooks are exit review targets | Not only review the rules themselves, but also review "who needs to re-review after the change, and whether downstream is blocked" |
| Project-level boundaries take precedence | Guardrails must not mix in feature-specific design details |
| Unconditional pass | P0=0, P1=0, necessary evidence sufficient; P2 does not block by count; reject "good enough" |
Issue grading and exit thresholds
| Level | Handling method | Threshold |
|---|---|---|
| P0 | Blocking | = 0 |
| P1 | Severe | = 0 |
| P2 | Suggestion | Does not block by count |
Typical P0 scenarios:
- If the document/effective version is inaccessible, record evidence_gap and it cannot be approved; it cannot be classified as a product P0 solely because it is inaccessible
create/update/restructure/no_changedetermination missing or clearly wrongrepository_scan_firstdoes not distinguishfact/declared_standard/future_intent- High-risk domain rules missing, or key rules unverifiable
- Workflow hooks missing, causing downstream to be unable to determine whether re-review is needed
- Clearly writing feature-specific design details into Guardrails
Typical P1 scenarios:
- Scope of application / non-scope unclear
- Exception process, re-review cycle, and update trigger conditions incomplete
- A conflict between facts and standards has emerged, but it was only "glossed over vaguely," without a clear drift / pending-decision conclusion
- Downstream re-review recommendations exist, but the impact scope is incomplete or the blocking level is inconsistent
P2 typical scenario:
- Description is not clear enough
- Insufficient examples
- Change summary and impact description are not easy enough to scan
Execution progress checklist
Track the following progress as needed for the task; use an available planning tool or a short checklist, and mark the true completion status:
□ Phase 0:基线与动作识别
□ 0.1 读取 Guardrails 文档或 no_change 摘要
□ 0.2 识别本次动作类型与生成模式
□ 0.3 AskUserQuestion 补齐范围/目标状态缺口
□ 0.4 输出基线识别结果
□ Gate 1:触发判定与元信息
□ 1.1 create/update/restructure/no_change 判定检查
□ 1.2 元信息与范围检查
□ 1.3 更新触发条件与复审周期检查
□ Gate 2:证据与事实标准
□ 2.1 证据来源完整性检查
□ 2.2 fact / declared_standard / future_intent 分层检查
□ 2.3 drift / 待决策处理检查
□ Gate 3:规则质量与治理完整性
□ 3.1 规则表完整性检查
□ 3.2 项目级边界检查
□ 3.3 例外流程与验证方式检查
□ Gate 4:工作流钩子与下游影响
□ 4.1 受影响领域检查
□ 4.2 下游重审清单检查
□ 4.3 阻塞建议一致性检查
□ Gate 5:一致性与可落地性
□ 5.1 与技术栈/现有规范/仓库事实冲突检查
□ 5.2 可执行性与可验证性检查
□ Phase 6:输出结果
□ 6.1 汇总问题清单
□ 6.2 输出审查报告或准出证书
Workflow
Phase 0: Baseline and action identification
- Read the Guardrails document; if what is being reviewed is the
no_changeconclusion, then read that conclusion summary and evidence description - Identify the action type for this instance:
create_baselineupdate_impacted_domainsrestructureno_change
- If there are body changes, continue to identify the generation mode:
interview_firstrepository_scan_first
- If the applicable scope, target state, or evidence boundary is unclear, use
references/askuser-templates.md - Output the "baseline identification result"
Gate 1: Trigger determination and metadata
Objective: Confirm that this Guardrails change itself is a reasonable project-level action.
Check items:
- Whether the action type is consistent with the evidence
no_changeWhether sufficient justification was given, rather than skipping a governance update that should be made- Whether the metadata is complete: version, status, Owner, effective date, review cycle, action type, trigger reason, applicable scope
- Whether the scope / non-scope is clear
- Whether update trigger conditions, review cycle, and change records exist
Determination:
- Action type missing or clearly misjudged → P0
- Scope/non-scope missing → P0
- Update trigger conditions or review cycle missing → P1
Gate 2: Evidence and factual standards
Objective: Confirm that this Guardrails is supported by evidence, rather than mixing the current state, verbal intent, and standards together.
Check items:
- Whether key evidence sources are listed
- If it is
repository_scan_first, whether it clearly distinguishes:factdeclared_standardfuture_intent
- When facts and standards conflict, whether it is clearly marked as:
drift待决策维持目标状态按现状更新
- Whether key rule candidates are supported by sufficient evidence, rather than local implementation or technical debt
Determination:
repository_scan_firstNo evidence layering was done → P0- Conflict exists but no handling conclusion was given → P1
- Sources are insufficient but the main intent can still be understood → P2
Gate 3: Rule quality and governance completeness
Objective: Confirm that the rules themselves are executable, reviewable, and do not overstep boundaries.
Check items:
- Whether each rule includes:
Rule ID、Level、Rule、Rationale、Applies To、Verification、Owner、Source - Whether the Must / Should / Nice classification is clear
- Whether the default choice, allowed scope, and prohibited items are clearly defined
- Whether there is an exception process: applicant, approver, validity period, record location, expiration review method
- Whether feature-specific design, functions/DDL/specific implementation are stuffed into Guardrails
- If the domain-partitioned mode is adopted, whether the index carries only general provisions and hooks, while domain documents are responsible for specific rules
Determination:
- Key rules lack Verification / Owner / Source → P0
- Exception process is missing or not executable → P1
- Out-of-bounds implementation details found → P2; if there are many out-of-bounds items and they affect locating, escalate to P1
Gate 4: Workflow hooks and downstream impact
Objective: Confirm that this Guardrails can actually be consumed by downstream such as api/hld/lld/runbook .
Checklist:
- Whether it is clear which domains this change affects
- Whether it is clear which downstream documents/skills need re-review
- Whether the blocking recommendation is clear:
block_before_designreview_before_mergesync_next_cycle
- Whether the workflow hooks are consistent with
references/workflow-hooks.mdMatch - Whether key downstream items are missing:
api-writer/reviewer、hld-writer/reviewer、lld-writer/reviewer、runbook-writer
Verdict:
- High-risk domain changes but no downstream re-review recommendation → P0
- Incomplete impact scope or inconsistent blocking level → P1
- Merely unclear expression → P2
Gate 5: Consistency and Actionability
Objective: Confirm that there is no irreconcilable break between the rules and repository reality, project objectives, and the tech stack.
Checklist:
- Whether it conflicts with the existing tech stack, approved standards, or stable repository facts
- If a conflict exists, whether it has been made clear:
- Keep the existing standard and require downstream alignment
- Update the standard according to the status quo
- Temporarily list as pending decision
- Whether the rules can be verified through lint / review / CI / runbook / runtime checks
- Whether there is a sufficiently clear Owner and execution responsibility
Verdict:
- Key rules conflict with project reality and there is no handling path → P0
- There is a conflict but the handling path is incomplete → P1
- Rule verifiability is somewhat weak but does not affect the main conclusion → P2
Phase 6: Output Results
For the output format, see references/report-templates.md。
- Fail: Output a review report, summarizing issues and remediation suggestions by Gate
- Pass: Output a release certificate, confirming that it can be consumed by downstream as a new project governance baseline
AskUserQuestion Rules
- Only ask key questions that the reviewer cannot determine from the documents and repository facts
- Prioritize confirming: scope, target state, factual conflicts, blocking level
- If
no_changethe rationale is weak, must follow up with "why not update Guardrails" - For the template, see
references/askuser-templates.md
Prohibited Actions
- Do not write the rule body on behalf of the author
- Do not gloss over "factual standard conflicts"
- Do not review only the rule table without reviewing the trigger reasons and downstream hooks
- Do not degrade the reviewer into a format checker
- Do not relax the release threshold just because it is a governance document
Reference Documents
| Document | Content |
|---|---|
references/review-checklist.md |
Review checklist |
references/report-templates.md |
Review report template |
references/askuser-templates.md |
AskUserQuestion template |
../guardrails-writer/references/guardrails-template.md |
Guardrails output template |
../guardrails-writer/references/fact-standard.md |
Factual standards generated in a repository-analysis style |
../guardrails-writer/references/workflow-hooks.md |
Downstream workflow hook mapping |
../../references/guardrails-trigger-check.md |
Guardrails trigger check criteria for downstream skills |