Skip to content

fix(aidd-refine): run the challenge report's check before answering - #1337

Draft
blafourcade wants to merge 5 commits into
nextfrom
fix/challenge-runs-its-check
Draft

blafourcade wants to merge 5 commits into
nextfrom
fix/challenge-runs-its-check

Conversation

@blafourcade

@blafourcade blafourcade commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🎯 What & why

aidd-refine:02-challenge wrote challenge.md and answered without running its contract check, so on a host without the turn-end hook (the skill copied alone, Codex, OpenCode) no report was ever validated. The action now runs validate-challenge.cjs before answering, as review, assert and audit already do.

🛠️ How it works

  • actions/01-challenge.md gets a step 8: run the linked validate-challenge.cjs on challenge.md, fix, repeat until it passes. The read-back and answer become step 9.
  • Step 3 links techniques.md where the techniques are applied, instead of naming it in backticks.
  • Cut what a link or the check already says: the techniques link in Input, "in its table order", the headings-and-order rule (CHALLENGE-01 refuses both). - None stays: the check accepts an empty section.
  • references/decision.md asks first whether a finding needs an input no user enters and no attacker gains from, and drops it; a deal breaker must break something the work was asked to do; a case real users hit that the request never covered goes to To decide. Before, an extreme value matching a rule's wording (Number.MAX_VALUE against "integer cents everywhere") or an unplanned case (a double checkout) became a deal breaker.
  • Step 9 is now "Answer with the report from challenge.md and its path.": the model wrote and fixed the file itself, so the read-back and the exact answer layout bought nothing a caller reads.

🧪 How to verify

  • node plugins/aidd-context/skills/04-skill-generate/scripts/validate-skill.cjs plugins/aidd-refine/skills/02-challenge exits 0.
  • Headless, one prompt ("challenge the last commit against its plan"), the plan in aidd_docs/tasks/<month>/<folder>/plan.md, clean and subtle fixtures:
Host / model Report next to the plan Passes the contract Check run by the model Subtle bug found Deal breaker on clean work
Claude Code haiku, plugin loaded 2/2 2/2 2/2 no no
Codex gpt-6-luna 2/2 2/2 2/2 yes no
OpenCode deepseek-v4.1-flash-free 2/2 2/2 2/2 yes no
  • After the cuts, isolated runs, one each: Codex gpt-6-luna and Claude Code haiku (plugin loaded) × subtle and clean. 4/4 reports pass the contract, 4/4 checks run by the model, the subtle bug found by both.
  • Classification, clean fixture, Codex gpt-6-luna and Claude Code haiku: deal breakers on correct work 6 of 8 runs with the old decision.md (before and after the cuts alike), 0 of 5 with the new one. Subtle fixture with the new one: the bug found as a deal breaker 4 of 4. A double checkout, an empty cart and an unknown discount code now land in To decide.
  • Interactive Claude Code haiku in tmux: the subtle bug found, the check run twice; asked to write a suggestion without its →, the Stop hook refused it on CHALLENGE-04 and the model added the change.

⚠️ Heads-up

  • Without "adding nothing before or after", 3 of 4 answers add a summary or notes, and Luna once answered with a summary instead of the report. The file stays right; no caller parses the answer.
  • A real bug the request never covered is a To decide question, not a deal breaker. In aidd-orchestrator:01-sdlc nothing changes: after the review clears, 03-check.md carries any finding that does not contradict the contract onto the pull request as a note, whatever its section.
  • The check guards the report's form, not its judgment: Haiku found the subtle bug in 2 earlier runs and missed it here, filing a different charge risk under To decide.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS

blafourcade and others added 5 commits November 24, 2026 06:25
The action wrote challenge.md and answered without the contract check, so a host without the turn-end hook never validated the report. It now runs validate-challenge.cjs, as review, assert and audit do, and links techniques.md where it is applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uthoring form

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
…ts check already say

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
…he read-back details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
…s before classifying the rest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant