agentleFS
lowtidebuildlowtidebuild/second-review-agent/.claude/skills/quality-gate/SKILL.md

quality-gate

Skill1 starsChanged 7 months agoApache-2.0View on GitHub

Self-verification checklist for review outputs (WF1 Step 8). Primary script: scripts/run-quality-gate.py Usage: python3 run-quality-gate.py <working_dir> <deliverables_dir> <output_path> Run each check against the generated outputs. All must pass for clean delivery.

46 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deploy.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    deploy

    Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run each check against the generated outputs.

    line 10
  2. Distinctive:

    If a particular issue has no explicit textual correction, verify it is still represented by a comment in the redline DOCX

    line 16
  3. Distinctive:

    Verify: No review comment in the redline DOCX itself contains a hallucination or unsupported assertion.

    line 20
  4. Very specific:

    Read each comment → verify it is factually supportable from the document content or verification-audit.json

    line 21
  5. Distinctive:

    No finding in the memo that doesn't exist in issue-registry

    line 29
  6. Distinctive:

    No Critical/Major finding in issue-registry that's missing from the memo

    line 30
  7. Distinctive:

    No mathematical errors in scoring

    line 37
  8. Very specific:

    No citation in citation-list.json that's missing from verification-audit.json (at applicable depth)

    line 47
  9. Distinctive:

    No Suggestion-level changes accepted in clean version

    line 51
  10. Distinctive:

    No tracked changes remaining in clean DOCX

    line 52
  11. Distinctive:

    If recommendation is "Pass" or "Pass with Warnings" → verify no Critical Dim 1–3 finding exists

    line 63
  12. Distinctive:

    If recommendation is "Release Not Recommended" → verify at least one Critical Dim 1–3 finding or Nonexistent citation exists

    line 64
  13. Very specific:

    After self-verification completes (pass or partial pass), the main agent finalizes checkpoint.json:

    line 94

“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

quality-gate Skill

Self-verification checklist for review outputs (WF1 Step 8).

Primary script: scripts/run-quality-gate.py Usage: python3 run-quality-gate.py <working_dir> <deliverables_dir> <output_path>

8-Item Self-Verification Checklist

Run each check against the generated outputs. All must pass for clean delivery.

Check 1 — Redline Completeness

Verify: Redline DOCX contains tracked changes for ALL Critical and Major findings in issue-registry.json.

  • Count tracked changes in redline → count must match Critical + Major findings that have textual corrections
  • Missing tracked change for a Critical finding = self-check failure
  • If a particular issue has no explicit textual correction, verify it is still represented by a comment in the redline DOCX
  • Each comment must have the correct severity prefix per comment-format-guide.md

Check 2 — Review Comment Integrity

Verify: No review comment in the redline DOCX itself contains a hallucination or unsupported assertion.

  • Read each comment → verify it is factually supportable from the document content or verification-audit.json
  • A comment saying "이 판례는 존재하지 않습니다" must be backed by Nonexistent status in audit trail
  • A comment making a legal claim must be traceable to the document's own content

Check 3 — Cover Memo Accuracy

Verify: Cover Memo accurately reflects the issue-registry.json.

  • Release recommendation in memo matches review-scorecard.json
  • Critical findings listed in memo match issue-registry Critical entries
  • No finding in the memo that doesn't exist in issue-registry
  • No Critical/Major finding in issue-registry that's missing from the memo

Check 4 — Scorecard Consistency

Verify: Review scorecard scores are consistent with actual findings.

  • Dimension with 0 findings should score 9–10
  • Dimension with Critical finding should score 1–4
  • Overall grade computation matches the average
  • No mathematical errors in scoring
  • Release recommendation is exactly one of: "Pass", "Pass with Warnings", "Manual Review Required", "Release Not Recommended"
  • Grade is exactly one of: A, B, C, D (no plus/minus modifiers)
  • Skipped dimensions have score: null, skipped: true and are excluded from the average

Check 5 — Audit Trail Completeness

Verify: Verification audit trail is complete per review depth setting.

  • Quick Scan: all format-validation-escalated citations verified
  • Standard: all dispositive-conclusion citations verified
  • Deep Review: all citations verified
  • No citation in citation-list.json that's missing from verification-audit.json (at applicable depth)

Check 6 — Clean DOCX Correctness

Verify: Clean DOCX incorporates ONLY Critical/Major textual corrections.

  • No Suggestion-level changes accepted in clean version
  • No tracked changes remaining in clean DOCX
  • Original formatting preserved for non-corrected sections

Check 6A — Redline Mapping Report

Verify: working/redline-mapping-report.json accounts for every issue.

  • Critical/Major issues must not be unmapped
  • Deep Review target: Critical/Major exact mapping rate ≥90%
  • Missing report is a warning for backward compatibility, not a hard fail

Check 7 — Release Recommendation Consistency

Verify: Release recommendation follows the Release Recommendation Rules exactly.

  • If recommendation is "Pass" or "Pass with Warnings" → verify no Critical Dim 1–3 finding exists
  • If recommendation is "Release Not Recommended" → verify at least one Critical Dim 1–3 finding or Nonexistent citation exists
  • Cross-check against review-scorecard.json

Remediation Protocol

RoundAction
Round 1Fix all failing items. Re-run checks.
Round 2Patch only remaining failures. Re-run checks.
After Round 2Deliver with [Self-Check Warning] flags on unresolved items. Explicitly tell user which checks could not be passed.

Delivery Format

On pass:

✅ Self-verification complete. All 7 checks passed.
Deliverables saved to: $SECOND_REVIEW_PRIVATE_DIR/output/{matter_id}/round_{N}/deliverables/

On partial pass:

⚠️ Self-verification complete with warnings.
Passed: 5/8 checks
Failed: Check 2 (comment integrity), Check 6 (clean DOCX)
[Self-Check Warning] details attached.
Deliverables saved to: $SECOND_REVIEW_PRIVATE_DIR/output/{matter_id}/round_{N}/deliverables/

Checkpoint

After self-verification completes (pass or partial pass), the main agent finalizes checkpoint.json:

  • step_8.status → "completed"
  • step_8.output → "deliverables/quality-gate-report.json"
  • last_completed_step → 8
  • This marks the pipeline as fully complete.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.