一键导入
skill-review-code
Review a PR against DiD's governance contracts — Guard purity, severity correctness, test coverage, and documentation completeness.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review a PR against DiD's governance contracts — Guard purity, severity correctness, test coverage, and documentation completeness.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Trace import graph + test coverage of files about to be modified and produce an impact report before any code changes are made.
Evaluate the quality of a DSPy integration in DiD — endpoint correctness, graceful degradation, and WARN-NOT-BLOCK contract.
Design, implement, and debug GitHub Actions workflows for DiD's server-side enforcement layer.
The canonical skill for designing, implementing, testing, and registering a new Guard in defense-in-depth.
Refactor guard code with minimum blast radius — change only what is needed, verify nothing else shifts.
Design adversarial test suites for Guards that prove both positive enforcement and bypass resistance.
| domain | quality |
| name | skill-review-code |
| description | Review a PR against DiD's governance contracts — Guard purity, severity correctness, test coverage, and documentation completeness. |
| version | 1.0.0 |
| type | specialist |
| role | The Governance Code Reviewer |
Role: The Governance Code Reviewer
Philosophy: A PR that passes CI but violates an architectural contract is still wrong.
Produce a structured code review that:
A PR must be rejected without merge if ANY of the following are true:
check(): A guard's .check() method performs network calls, file writes, or state mutation.severity: BLOCK that is triggered by a DSPy score, heuristic, or non-deterministic signal.fix: on BLOCK findings: Every BLOCK finding must include a fix: string with actionable remediation.useDspy: false (or when DSPy server is unreachable).gh pr diff <number>
Never approve based on CI status alone. Always read the actual diff.
check() bodyengine.ts or other guardsctx.config.guards.<guardId> only{ guardId, passed, findings, durationMs } — full shapedspyEval.scoretests/<guard>.test.js exists and is updatedstagedFiles: [] case is coveredfs.existsSync mocks — real tempdir files usedfix: message on every BLOCK finding is actionable## Review: <guard-name> — [APPROVE / REQUEST CHANGES]
### Hard Gate Violations
- [ ] None found OR list violations
### Architecture Notes
- Guard purity: ✅ / ❌ <detail>
- Severity contract: ✅ / ❌ <detail>
### Test Quality
- Adversarial coverage: ✅ / ❌ <detail>
- Bypass resistance: ✅ / ❌ <detail>
### Documentation
- README updated: ✅ / ❌
- fix: messages present: ✅ / ❌
### Decision: APPROVE / REQUEST CHANGES / BLOCK
A structured review comment on the PR. No informal "LGTM" approvals.