Pattern Review
Skill name: pattern-review
Run the pattern-review gate for agentic development work. Use before human review or at PR boundaries to review a repo branch diff against active .pattern-review rules, write a persisted pattern-review.md report, resolve findings, waivers, and manual review items, and rerun until the gate passes or is explicitly waived.
Use this as a gate, not a checklist. Review the current Git repository's branch diff against active pattern rules.
Deterministic helper:
python3 /Users/trent.brown/agentic-development-workflow/scripts/pattern_tool.py review-inputs --cwd <repo>
Workflow:
- Run the helper to collect repo context, base/head, changed files, rule sources, duplicate-ID overrides, and deterministic trigger results.
- If no applicable
.pattern-reviewdirectory is found after the normal scope walk, fail and tell the caller to run/pattern-init <intended-scope>. - Display the
.pattern-reviewdirectories found in the rule stack before evaluating rules so the caller can spot an unexpected scope. - If no active rules are found in an existing scope, write
PASS_WITH_WARNINGSand state that the gate is not meaningfully configured; recommendpattern-extract. - Evaluate rules whose trigger result is
true. - For
agentictriggers, decide whether the rule triggers and record a brief rationale whether it does or does not. - For triggered
agenticreviews, inspect the changed files and return one ofpass,fail,warning,not_applicable, orneeds_manual_review. Every non-passresult needs file/line evidence or a note explaining why evidence is not file-specific. - For triggered
manualreviews, block until a human disposition is recorded for the current merge-base/head context. - Treat
blockerfailures and unresolved manual items asFAIL. Treat warnings asPASS_WITH_WARNINGS. Explicit persisted waivers producePASS_WITH_WAIVERS, which is an acceptable passing verdict. - Write the final human-readable report before declaring the gate passed. For normal workflow branches, use
docs/issues/<branch>/pattern-review.md. Include review context, rule stack, triggered rules, findings, waivers, manual review dispositions, and final verdict. Reference rules by ID, title, source path, and hash; do not dump full rule text by default. - If the gate fails, fix the implementation or record a manual review/waiver, then rerun. Do not emit learning events for ordinary findings; emit them only when the gate exposes a rule-system weakness.