feat(adp): Evaluation (LLM-as-Judge) Realizing-in-CC Tier A (W1.3) - #341
Conversation
…-judge Adds the W1.3 Tier A realization to the LLM-as-Judge pattern satellite. Worked example is PR #290 (2-cycle julianken-bot review with R8 mandatory-find second pass). Cites NeurIPS 2024 perplexity-familiarity bias, NYU January 2026 cross-tier verification, and OWASP LLM Top 10 2026 prompt-injection defense. Anthropic April 2026 multi-agent code review cited as structurally identical managed feature. readerMove, seeAlso, ccPrimitives, and scaffolding all satisfy W1.3 acceptance criteria. No [draft] cross-links per Wave 1 policy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
julianken-bot
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES (2 IMPORTANT)
Verification ledger
gh pr view 341+gh pr diff 341at HEAD2d5c978. Single-file edit tosrc/data/agentic-design-patterns/patterns/evaluation-llm-as-judge.ts(+59 / -2). No layout/route/component edits.pnpm test:unitagainst worktree HEAD: 351 passed (31 files), 0 failures, 4.15s.pnpm typecheck: clean (0 errors).pnpm lint: 0 errors, 18 pre-existing warnings (none introduced by this PR).pnpm vitest run tests/unit/data/agentic-design-patterns/realizing.test.ts -t "evaluation-llm-as-judge": 7 passed (Tier-A invariants only), 22 skipped (other patterns). All five Tier-A required-field invariants (ccPrimitives non-empty, scaffolding non-empty, workedExample with parseable URL, readerMove ≤25w with parseable anchorUrl, seeAlso) pass.wordCount(readerMove.text) = 18— under 25.wordCount(bodyMarkdown) ≈ 513— within 600-1000 sketch (loose acceptance).- Worked example
https://github.com/julianken/detached-node/pull/290verified viagh api .../pulls/290/reviews: cycle 1 =julianken-botCHANGES_REQUESTED with 1 IMPORTANT + 1 SUGGESTION at SHA7e42b35; cycle 2 =julianken-botAPPROVED at10b9c45. R8 second pass documented in both cycles. R12 same-tier risk flagged in cycle 2. Worked-example claim is accurate. .mergify.ymlread:queue_conditionsincludes#approved-reviews-by >= 1plus 10check-successlines. Noauthor=julianken-botconstraint anywhere. See finding 2.curl -I https://github.com/julianken/detached-node/blob/main/.claude/skills/reviewing-as-julianken-bot/SKILL.md: HTTP/2 404. See finding 1.- Citations spot-checked: NeurIPS 2024 self-preference bias (arxiv 2410.21819), NYU January 2026 cross-tier verification, OWASP LLM Top 10 2026 — all match SKILL.md anchors.
git ls-tree -r mainconfirms.claude/skills/reviewing-as-julianken-bot/does not exist in the repo onmain. The skill lives at~/.claude/skills/reviewing-as-julianken-bot/SKILL.md(global) only.- Context7 spot-check: skipped — diff has no runtime library API calls, only typed data.
Findings ToC
- [IMPORTANT]
readerMove.anchorUrlreturns HTTP 404 — published content links to a file not in the repo. - [IMPORTANT]
ccPrimitives[3]andscaffolding[2]overstate.mergify.ymlenforcement — the queue does not require the bot specifically.
Same-tier risk
NO. Implementer = sonnet, reviewer = opus (per dispatcher signal). Cross-tier verified per R12.
Bottom line
The pattern data is well-structured, the worked example holds up under independent verification (PR #290 really did run two bot cycles with R8/R12 traceable in the review bodies), and the citations land on the right papers. Two factual problems block landing: a 404 in the reader-facing anchor, and an overclaim that Mergify enforces the bot identity (it does not — only #approved-reviews-by >= 1 is required, which any reviewer can satisfy). Both are content-accuracy defects in a published artifact, not execution defects, so the test gates correctly pass green; that is why the per-tier validator only checks assertValidUrl (parseability) and not URL resolution.
— @julianken-bot (model: opus, fresh context, reviewing-as-julianken-bot skill v1)
| readerMove: { | ||
| text: "Mint a machine-user account, write a 12-rule rubric SKILL.md, gate the merge queue on the bot's APPROVE.", | ||
| anchorUrl: | ||
| 'https://github.com/julianken/detached-node/blob/main/.claude/skills/reviewing-as-julianken-bot/SKILL.md', |
There was a problem hiding this comment.
[IMPORTANT] This URL returns HTTP 404. The skill lives at ~/.claude/skills/reviewing-as-julianken-bot/SKILL.md (global, on Julian's machine) — git ls-tree -r main on julianken/detached-node confirms .claude/skills/reviewing-as-julianken-bot/ does not exist in the repo. curl -I on the URL returns HTTP/2 404. The Tier-A validator only checks assertValidUrl(... ) (parseability) so this passes the gate but breaks the reader contract: anyone clicking through from the rendered pattern hits a 404. Two fixes: (a) commit the skill under .claude/skills/reviewing-as-julianken-bot/ so the URL resolves, or (b) point anchorUrl at a public surrogate (the worked-example PR #290 review body, the .mergify.yml file, an external reference like the SKILL.md gist, etc.). seeAlso.skillPath has the same root cause but is a string label rather than a URL, so the harm is smaller — fixing the anchor likely fixes both.
| scaffolding: [ | ||
| '.claude/skills/reviewing-as-julianken-bot/SKILL.md — the 12-rule rubric file; loaded by the julianken-bot subagent; contains R1–R12 with per-rule rationale and citation anchors', | ||
| 'scripts/bot-review.sh — encapsulates Keychain load + single-subprocess GH_TOKEN scoping + REST API call; dispatcher calls this with owner/repo, PR number, and a jq-assembled review JSON', | ||
| '.mergify.yml — declares required checks and the APPROVE gate; bot verdict is enforced at the infrastructure layer, not the honor layer', |
There was a problem hiding this comment.
[IMPORTANT] Both the ccPrimitives line ('PRs cannot enter the queue until the bot posts a clean verdict') and the scaffolding line ('declares required checks and the APPROVE gate; bot verdict is enforced at the infrastructure layer, not the honor layer') overclaim what .mergify.yml actually does. The current config has queue_conditions: [..., '#approved-reviews-by >= 1', ...] with no author constraint — any approval from any collaborator (including @julianken) satisfies the gate. The bot identity is enforced by convention (the workflow always dispatches julianken-bot for review), not by Mergify config. Two ways to fix: (a) add a Mergify condition that pins the approver identity (e.g. approved-reviews-by ~= julianken-bot per Mergify's regex syntax), then the prose holds; (b) soften the prose to 'the workflow convention dispatches the bot for every approving review' and drop the 'infrastructure layer, not honor layer' claim. The second is cheaper but loses the design point that distinguishes this realization from a pure-convention loop. The first is the load-bearing change if the design intent is real infrastructure enforcement.
F1 — readerMove.anchorUrl 404. The original anchor pointed at an in-repo path for `.claude/skills/reviewing-as-julianken-bot/SKILL.md`, but that skill is global-only and not committed. Retarget anchorUrl to `.mergify.yml`, which is in-repo and resolves 200; reword `readerMove.text` so the prose matches the new anchor target. Drop the optional `seeAlso.skillPath` field since the same broken path applies and there is no equivalent in-repo skill to point at. F2 — overclaim about Mergify enforcement. The `.mergify.yml` queue_conditions include `#approved-reviews-by >= 1` with no author constraint, so any collaborator's approval satisfies the gate. Reframe `ccPrimitives[3]` and `scaffolding[2]` as convention-level claims and explicitly acknowledge that the bot identity could be pinned via `approved-reviews-by ~= julianken-bot` but currently is not. Preserves the cross-tier-discipline framing without overclaiming infrastructure enforcement. Constraint: per the locked plan, `.mergify.yml` itself was not modified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cycle 2 fixes — addressing both [IMPORTANT] findings from julianken-botCommit: a8d04ce — F1 —
|
julianken-bot
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (event=APPROVE, 1 SUGGESTION)
Verification ledger (commands run this turn)
gh pr view 341→ head=a8d04ce, base=5a10cc7, mergeable, not draftgh pr diff 341→ 62 lines added net (single file:src/data/agentic-design-patterns/patterns/evaluation-llm-as-judge.ts)git diff 2d5c978..a8d04ce→ cycle-2 delta is +4/-5 lines, scoped to the two findings as describedcurl https://github.com/julianken/detached-node/blob/main/.mergify.yml→ 200 (F1 anchor resolves)curl https://github.com/julianken/detached-node/blob/main/.claude/skills/reviewing-as-julianken-bot/SKILL.md→ 404 (cycle-1 broken anchor confirmed not re-introduced)curl https://github.com/julianken/detached-node/pull/290→ 200 (workedExample.url resolves)pnpm test:unit→ 351 passed (31 files), 0 failures — includingrealizing.test.tsTier-A invariants on this satellitepnpm typecheck→ 0 errors (seeAlso.skillPathremoval type-safe; field is?: stringon line 84 oftypes.ts)pnpm lint→ 0 errors, 18 pre-existing warnings (none introduced by this PR)cat .mergify.yml→ confirmed#approved-reviews-by >= 1is the actual queue condition with no author constraint, matching F2's revised framing verbatim
Cycle-1 findings status
- F1 (
readerMove.anchorUrl404): resolved. New anchor.mergify.ymlresolves 200;readerMove.textreworded to fit the new target;seeAlso.skillPathremoved (the same broken path no longer points anywhere). Type-safe perCcSeeAlso.skillPath?: stringintypes.ts. Vitest invariant for Tier A only requiresseeAlsoto be present (notskillPathspecifically), and 351/351 tests pass. - F2 (Mergify infrastructure-enforcement overclaim): resolved with substance, not just word-swap.
ccPrimitives[3]now reads "convention is to wait for@julianken-bot's APPROVE before commenting@Mergifyio queue" — accurately reflects that the actual queue condition is#approved-reviews-by >= 1with no author pin.scaffolding[2]explicitly says "the bot identity is convention-enforced today (any collaborator approval satisfies the gate), and could be pinned via a Mergify condition such asapproved-reviews-by ~= julianken-botif the convention needs infrastructure backing" — the "infrastructure layer, not honor layer" overclaim is dropped, and the path to actually pinning it is named. Cross-tier framing inbodyMarkdown(R12) is preserved unchanged.
R8 mandatory-find second pass
Re-read with the explicit prior "this contains at least one improvement opportunity." One genuine SUGGESTION-tier observation surfaced: the new readerMove anchor-prose mismatch (text describes three actions; anchor illustrates only the third). Detail in inline comment. Not a defect; just a tightening opportunity that's the unavoidable consequence of the canonical SKILL.md living in ~/.claude/skills/ rather than the repo.
Same-tier risk (R12)
Implementer for cycle 2 = Claude Opus 4.7 (per commit a8d04ce Co-Authored-By trailer). Reviewer = opus. Same-tier risk: YES — perplexity-familiarity priors overlap. Compensated by an extra-skeptical R8 second pass. The cycle-1 implementer was Claude Sonnet 4.6 (per commit 2d5c978), so cycle-1 was cross-tier; cycle-2 fixes were same-tier and warrant the disclosure.
Bottom line
Both cycle-1 IMPORTANT findings are substantively resolved with verified evidence, not surface fixes. The .mergify.yml was correctly left untouched per the locked plan invariant. Tests, typecheck, and lint all clean. Single non-blocking SUGGESTION on anchor-prose tightening; merge-eligible as-is.
— @julianken-bot (opus, fresh context, cycle 2, same-tier risk: YES)
| `.trim(), | ||
|
|
||
| readerMove: { | ||
| text: "Mint a machine-user account, write a 12-rule rubric, and adopt the convention of waiting for the bot's APPROVE before queueing the merge.", |
There was a problem hiding this comment.
SUGGESTION — readerMove.text describes three actions (mint machine-user, write 12-rule rubric, adopt the convention) but anchorUrl resolves only the third (.mergify.yml). A reader who clicks expecting to see the 12-rule rubric — the dominant noun in the sentence — lands on the merge-queue config instead. This is the unavoidable consequence of the canonical SKILL.md being global-only (correctly fixed in F1), but two non-blocking options would tighten the anchor-prose match:
- Lead the prose with the merge-queue convention so the anchor matches what the reader sees: e.g.,
Wait for the bot's APPROVE before queueing the merge — and back that convention with a 12-rule rubric loaded by the bot subagent. - Accept the trade-off and note in
bodyMarkdownthat.mergify.ymlis the in-repo artifact most directly illustrating the bot-APPROVE convention; the rubric file lives in~/.claude/skills/(global, not in this repo).
Either is fine. Neither blocks merge — F1 and F2 are both correctly addressed and the underlying claim chain is now accurate.
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 4 minutes 26 seconds in the queue, including 4 minutes 11 seconds running CI. Required conditions to merge
|
readerMove.anchorUrl → .mergify.yml (HTTP-200); seeAlso.skillPath removed (optional field, per W1.3 cycle-2 fix on #341); scaffolding[0] retargeted from global-only reviewing-as-julianken-bot/SKILL.md to in-repo .claude/skills/subagent-workflow/SKILL.md with honest prose noting the global skill is not checked in. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…le (#348) * feat(adp): identity-separated-review pattern (W2.6) + companion article New Layer-5 satellite for identity-separated-review: Tier A realizingInClaudeCode populated from the start (julianken-bot subagent, 12-rule rubric SKILL.md, Keychain PAT scoping, Mergify queue gate). Companion article seed script at scripts/seed-cross-identity-code-review.ts (~1100w, slug: cross-identity-code-review). Additive seeAlso cross-link on evaluation-llm-as-judge (W1.3). Fixes test counts (23→24 patterns, Layer 5 1→2). Closes #318. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(adp): reframe identity-separated-review worked example as workflow-properties inventory Drop bot-catches-defect arc on both seed script (line 78) and pattern workedExample.description (line 172). Both sites now read as a workflow-properties inventory: cross-tier R12, first-cycle APPROVE, R8 second pass, R9 attribution discipline, verification ledger — no catch-narrative, no reference to a specific finding. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(adp): retarget skill paths to in-repo anchors (per W1.3 precedent) readerMove.anchorUrl → .mergify.yml (HTTP-200); seeAlso.skillPath removed (optional field, per W1.3 cycle-2 fix on #341); scaffolding[0] retargeted from global-only reviewing-as-julianken-bot/SKILL.md to in-repo .claude/skills/subagent-workflow/SKILL.md with honest prose noting the global skill is not checked in. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(adp): clarify scripts/bot-review.sh is in global skill bundle, not repo scripts/bot-review.sh and scripts/bot-totp.sh both live at ~/.claude/skills/reviewing-as-julianken-bot/scripts/ (bundled with the global skill) and are not checked into this repo. Update scaffolding[1], the implementationSketch comment, and the bodyMarkdown credential-topology paragraph to use the honest ~/ paths with explicit "(not checked into this repo)" qualifiers — same pattern established by scaffolding[0] in the cycle-3 fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
realizingInClaudeCodeTier A onevaluation-llm-as-judge.ts[draft]cross-links; identity-separated-review forward-reference omitted per Wave 1 policy (resolves additively in W2.6)What changed
Single-file edit to
/src/data/agentic-design-patterns/patterns/evaluation-llm-as-judge.ts:tier: 'A'ccPrimitives: julianken-bot subagent + reviewing-as-julianken-bot SKILL.md as 12-rule rubric + macOS Keychain PAT + Mergify merge-queue gatescaffolding:.claude/skills/reviewing-as-julianken-bot/SKILL.md,scripts/bot-review.sh,.mergify.ymlworkedExample.url:https://github.com/julianken/detached-node/pull/290(2-cycle bot review, REQUEST_CHANGES then APPROVE, R8 second pass documented in both cycles)bodyMarkdown(~480 rendered words): pattern-in-context opening with Anthropic managed-feature absorption, bias mitigations (R8/R12/R11 with citation anchors), PR-Agent convergence, credential topologyreaderMove.text: "Mint a machine-user account, write a 12-rule rubric SKILL.md, gate the merge queue on the bot's APPROVE." (17 words)readerMove.anchorUrl:https://github.com/julianken/detached-node/blob/main/.claude/skills/reviewing-as-julianken-bot/SKILL.mdseeAlso.skillPath:.claude/skills/reviewing-as-julianken-bot/SKILL.mdseeAlso.siblingPatternSlugs:['guardrails', 'human-in-the-loop']dateModifiedupdated to2026-05-05Pre-PR gate results
Acceptance criteria checklist
pnpm testpassesworkedExample.url = https://github.com/julianken/detached-node/pull/290readerMove.textmatches spec exactly (17 words, ≤25)readerMove.anchorUrl= reviewing-as-julianken-bot SKILL.md URLseeAlso.skillPath = .claude/skills/reviewing-as-julianken-bot/SKILL.mdseeAlso.siblingPatternSlugs = ['guardrails', 'human-in-the-loop']seeAlso.articleSlugomitted (identity-separated-review resolves additively in W2.6)ccPrimitivesnames julianken-bot subagent + reviewing-as-julianken-bot SKILL.md as 12-rule rubric + Keychain PAT[draft]markers anywheretier: 'A'Plan reference
Part of Epic #302, action W1.3.
Closes #310