mcpField
N
ns-judge

ns-judge

github.com/nextstage-brasilTesting & quality069 installsUpdated 6d ago
Repository

About ns-judge

ns-judge is an in-session skill for checking whether a delivered code diff satisfies acceptance criteria after code review approval. It combines scripted checks with residual LLM assessment and applies a score-based verdict gate.

Key features

  1. 01Acceptance-criteria token proof
  2. 02Diff bypass scanning
  3. 03Residual LLM assessment
  4. 04Score-gated delivery verdict
  5. 05Structured findings and fix map

Use cases

  1. 01Verify closure against project requirements
  2. 02Check issue acceptance criteria from a synthesis file
  3. 03Assess an ad hoc change with optional requirements
  4. 04Identify leftover concerns not caught by tests

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/nextstage-brasil/skills --skill ns-judge

After installing, type/ns-judgein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
evals.json
references/
workflow.md
scripts/
mutate_prove_ac.py
prove_ac.py
review_gate.py
scan_bypasses.py
test_prove_ac.py

Details

From the project README

Delivery Judge

Proof that shipped diff matches input ACs. Not SOLID. Not security. Code quality already passed ns-reviewer.

Shape (not a vendor copy): the-judge SKILL.md v1.4.0. Reimplement here. Do not paste that file. No GitHub APPROVE, emoji, banned-word gate, six LLM passes, post_review.py.

When

Parent already holds Code Review: Approved from ns-reviewer / reviewer-agent. Same parent then reads this SKILL.md in-session. No judge-agent in v1. Human /ns-judge = session face only.

ParentModeAC source
run-implementation Step 5closuresdd/requirements.md
ns-autonomous standalone closeclosuresame
ns-coder ad-hoc / C2adhoc--requirements / --ac-file if present; else skip AC proof
ns-execution-gitlab-issue Phase 4issue--ac-file from synthesis (Python never calls GitLab)

ns-reviewer MUST NOT dispatch this skill.

No Code Review: Approved → stop. Do not judge. Tell parent run reviewer first.

Session boot

See ../../ns-harness/references/session-boot.md. Cold start this judge run: Session boot 1–6 before probe. Never tool-Read AGENTS.md.

Probe (Python optional)

command -v python3. Missing or any script exit 1 → preflight skipped. Residual LLM still runs. Never Blocked because Python absent.

Details + CLI: references/workflow.md. Token regex lives in scripts/prove_ac.py only — not this body.

Workflow

  1. Confirm last code verdict is Code Review: Approved. Else stop.
  2. Probe Python. If present:
    • prove_ac.py for active mode
    • git diff \| python3 scripts/scan_bypasses.py (always exit 0)
  3. prove_ac.py exit 2 → format fix map (../ns-reviewer/references/review-fix-map.template.md), last line Delivery Review: Rejected. No residual LLM.
  4. Residual LLM (scripts skipped or prove exit 0): leftover that tests did not already catch. Do not restate phpunit/lint. Naked suppressions from scan_bypasses.py = judge in residual. Claim needs evidence (Pass E, stricter: AC tokens).
  5. Write findings.json. Run review_gate.py. Gate fail → edit JSON, re-run. Not product Blocked.
  6. Last line: Delivery Review: {Approved|Rejected|Blocked}. Score in Executive Summary.

Score gate (same table as ns-reviewer)

Copy. Do not invent second rubric. Approved = zero Criticals and score = 10. Score 9 = Rejected (Lift).

ScoreMeaningVerdict impact
10Ship as-isApproved (only eligible score)
9Near-bar leftover on AC/ledger/ui-contract itemRejected — Lift
≤8Below bar / missing AC token / unmet ledgerRejected

Approved only when all true:

  1. Zero Critical findings
  2. Overall score = 10/10
  3. Every scored AC token hit in repo (when AC source present)

Missing AC token / unmet ledger / missing testid → Critical or cap ≤8 → cannot be 10.

Skip-Python residual: same 10-only rule. LLM still emits score + verdict.

review_gate.py rejects JSON that claims Approved with score ≠ 10 or with P0 findings.

Modes

closure

prove_ac.py --mode closure [--repo .] [--version VERSION_SAN] [--requirements PATH]

Law: #### Acceptance criteria: checkbox lines. Tokens: backticks, quoted strings, data-testid, HTTP \b[1-5][0-9]{2}\b (in script). ≥1 token and zero repo hits → P0 Rejected. Zero tokens on a line → unscored (residual). Script does not claim the feature works.

Also: ledger missing / unmapped; ui-contract testid/copy; visual checklist literals. Same Rejected bar.

issue

--mode issue --ac-file PATH. Synthesis file. No GitLab in Python.

adhoc

Skip AC proof unless --requirements or --ac-file. Residual still runs. Parent report may mark AC proof n/a.

Required output

Approved
Executive Summary
  • Score 10
  • One sentence vs rubric
  • Two-line assessment
  • AC proof: pass | n/a (adhoc, no source)

Then: Delivery Review: Approved

Rejected / Blocked
Executive Summary
  • Score 1–10
  • One sentence
  • Two-line assessment
Fix map (agent)

../ns-reviewer/references/review-fix-map.template.md

Then: Delivery Review: Rejected or Delivery Review: Blocked

Constraints

  • Read-only on product files
  • No dispatch from ns-reviewer
  • No GitHub review API
  • Findings need evidence: [{type:internal,ref:path:line}] for P0/P1
  • Residual does not restate what tests already catch

References

FileWhen
references/workflow.mdProbe, skip, CLI, findings.json
../ns-reviewer/references/review-gate-workflow.mdParent sequence (code then judge)
../ns-reviewer/references/review-fix-map.template.mdRejected body
scripts/prove_ac.pyAC / ledger / ui-contract / visual law
scripts/scan_bypasses.pyDiff stdin candidates
scripts/review_gate.pyfindings.json gate

Comments

Markdown supported