SuperAPI AI Directory

judgment-day

Agents & models

View repository

Updated 10-15 21:41

About this skill

Triggers: "judgment day", "judgment-day", "review adversarial", "dual review", "doble review", "juzgar", "que lo juzguen".



Claude execution wiring

These notes bind the tool-neutral logic above to the Claude Code harness. They are the EXECUTION layer that does not port to other tools.

Model routing for both judges and the fix agent follows the MODEL-ROUTING fence in core/agents/sdd-orchestrator/logic.md (balanced tier → fable).

Pattern 0: Skill Resolution (BEFORE launching judges)

Follow the Skill Resolver Protocol (_shared/skill-resolver.md) before launching ANY sub-agent:

  1. Obtain the skill registry: search engram (mem_search(query: "skill-registry", project: "{project}")) → fallback to .agent-config/skill-registry.md from the project root → skip if none
  2. Identify the target files/scope — what code will the judges review?
  3. Match relevant skills from the registry's Compact Rules by:
    • Code context: file extensions/paths of the target (e.g., .go → go-testing; .tsx → react-19, typescript)
    • Task context: "review code" → framework/language skills; "create PR" → branch-pr skill
  4. Build a ## Project Standards (auto-resolved) block with the matching compact rules
  5. Inject this block into BOTH Judge prompts AND the Fix Agent prompt (identical for all)

This ensures judges review against project-specific standards, not just generic best practices.

If no registry exists: warn the user ("No skill registry found — judges will review without project-specific standards. Run skill-registry to fix this.") and proceed with generic review only.

Verdict ledger persistence

The neutral "persist the final verdict to the prior-work storage" rule resolves to engram: mem_save with type decision, topic_key: judgment-day/{target-slug}/verdict, capture_prompt: false — on every run, including clean APPROVED verdicts.

Review receipt mint (after the verdict)

Once the final verdict is recorded, mint a review receipt attesting to the reviewed content. One Bash call from the repo root:

node core/hooks/_shared/receipt-mint.js --minter judgment-day --verdict <PASS|PASS_WITH_WARNINGS|FAIL>

Map the judgment verdict to the receipt verdict: an APPROVED verdict is PASS, an approval carrying unresolved warnings is PASS_WITH_WARNINGS, and a rejection is FAIL. Mint on every run — a FAIL receipt is evidence too, and the validator surfaces its verdict rather than assuming a review passed.

With no --files, the receipt attests to the currently staged paths; pass --files a.js,b.js when the reviewed set differs from what is staged. Best-effort: report a mint failure and proceed — it never changes the verdict.

Delegation mechanics

  • Launch judges as parallel sub-agents (async — the Agent tool, multiple calls in one message). Never sequential.
  • The orchestrator reads both results, then synthesizes per Pattern 2. Never review as the orchestrator.
  • The Fix Agent is a separate delegation — never reuse a judge as the fixer.

Skill Resolution Feedback

After every delegation that returns a result, check the **Skill Resolution** field in each judge/fix-agent response:

  • injected → skills were passed correctly ✅
  • fallback-registry, fallback-path, or none → skill cache was lost (likely compaction). Re-read the registry immediately and inject compact rules in all subsequent delegations.

This is a self-correction mechanism. Do NOT ignore fallback reports.