Repository navigation
feat: add Claude native grilling adapter - #10
Conversation
| ) | ||
| elif freeform and len(questions) == 1: | ||
| answer = _append_distinct(answer, freeform) | ||
| answer = _append_distinct(answer, notes) |
There was a problem hiding this comment.
Annotation notes turn selected options into custom answers
When Claude returns a recognized option together with annotation notes, normalization appends the notes to the answer string. DesignTree.commit_snapshot then compares that decorated value to the option labels and marks it custom=True, so downstream interview logic loses the fact that the user chose a defined option. Preserve the option identity separately from annotation text, or strip and retain the annotation before known-option matching.
Artifacts
Review-authored Claude adapter runtime check source
- Python source that exercises Other/free-form preservation, ambiguity rejection, annotation handling, and atomic snapshot commits; it is the exact executed review check.
Claude adapter runtime check output
- Captured output from the adapter review check showing preserved Other text, ambiguity rejection, the annotated-selection custom classification, and rejected partial commit; it demonstrates the P1 defect and the passing atomicity behavior.
Review-authored Claude bundle generation check source
- Python source that runs freshness and validator commands then compares two generated bundles byte-for-byte; it is the exact executed review check.
Claude bundle generation and validator output
- Captured output showing the committed bundle is current, the Claude validator passes, and two generated bundles are byte-identical; it disproves the bundle hypotheses.
- Captured output for the focused Claude adapter and generation test modules, with 16 tests passing; it confirms the focused suite executed successfully.
Base revision Claude feature inventory
- Captured base-revision tree query showing no Claude adapter or Claude generated-bundle paths existed at the compared base; it establishes the before condition.
New Claude implementation end-to-end review output
- Captured combined execution of the review-authored adapter and bundle checks against the PR revision; it shows the after behavior and the identified classification defect.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: dev_workflow/claude.py
Line: 225
Comment:
**Annotation notes turn selected options into custom answers**
When Claude returns a recognized option together with annotation notes, normalization appends the notes to the answer string. `DesignTree.commit_snapshot` then compares that decorated value to the option labels and marks it `custom=True`, so downstream interview logic loses the fact that the user chose a defined option. Preserve the option identity separately from annotation text, or strip and retain the annotation before known-option matching.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a08a597. Configure here.
| def _append_distinct(value: str, addition: str | None) -> str: | ||
| if addition is None or addition == value or addition in value: | ||
| return value | ||
| return f"{value} — {addition}" |
There was a problem hiding this comment.
Substring check drops user notes
Medium Severity
_append_distinct treats a note or free-form response as already present when it is only a substring of the selected answer, so normalize_native_response drops that user-authored text instead of appending it.
Reviewed by Cursor Bugbot for commit a08a597. Configure here.
| ) | ||
| elif freeform and len(questions) == 1: | ||
| answer = _append_distinct(answer, freeform) | ||
| answer = _append_distinct(answer, notes) |
There was a problem hiding this comment.
Multi-select keeps Other sentinel
Medium Severity
normalize_native_response recognizes Other only when the entire answer is a sentinel, so a comma-separated multi-select value that includes Other keeps the sentinel and never substitutes the custom response or notes for that choice.
Reviewed by Cursor Bugbot for commit a08a597. Configure here.
| return ConfirmationResult(ConfirmationDisposition.CONFIRMED) | ||
| if canonical == "Reopen": | ||
| return ConfirmationResult(ConfirmationDisposition.REOPEN) | ||
| return ConfirmationResult(ConfirmationDisposition.EXTEND, concern=answer) |
There was a problem hiding this comment.
Notes block interview confirmation
Medium Severity
resolve_confirmation accepts only an exact Confirmed label after stripping a recommended suffix, so a confirmation that normalize_native_response enriched with annotation notes or free-form text is treated as EXTEND and the interview does not finish.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a08a597. Configure here.


Summary
AskUserQuestionschema and four-question limitExitPlanModeplan approvalAskUserQuestionis absent or denied, including mid-snapshot denial guidancegrill-meandgrillingClaude bundle with retained upstream MIT attributiondisable-model-invocation: trueon the user-only wrapper anduser-invocable: falseon the model-only primitiveVerification
./scripts/verify-outcome.sh— 38 tests passedpython3 -m unittest tests.test_claude_adapter tests.test_claude_generation -v— 16 Claude tests passedpython3 scripts/generate_claude_skills.py --check— passedpython3 scripts/validate_claude_skills.py harnesses/claude— passedpython3 -m compileall -q dev_workflow scripts tests— passedgit diff --check— passedThe Codex
skill-creatorquick validator is intentionally not a Claude gate: it rejects the Claude Code-onlydisable-model-invocationanduser-invocablekeys. The Claude-specific validator requires those runtime keys so validation cannot weaken actual harness behavior.Scope
Claude Code adapter only. Shared contract and Codex paths are unchanged. No installation, delivery, or runtime mutation.
Closes #2
Note
Low Risk
New Claude-only module and generated artifacts; shared grilling contract and Codex paths are untouched, with heavy test coverage around serialization and bundle checks.
Overview
Adds a Claude Code–only path that maps the shared grilling interview contract onto
AskUserQuestion, without changing the canonicalgrillingmodel or existing Codex harness.dev_workflow/claude.pyintroduces capability detection (native vs text fallback), four-question chunking, strict payload validation for the native schema, response normalization (multi-select, Other/free-form, annotations), explicit fallback copy when the tool is missing or denied, and a shared-understanding confirmation flow that is separate from plan execution approval.dev_workflow/generated_claude.pyplusharnesses/claude/ship a linkedgrill-me(user-only,disable-model-invocation) andgrilling(model-only,user-invocable: false) bundle with upstream MIT attribution inbundle.json.scripts/generate_claude_skills.pyandscripts/validate_claude_skills.pykeep the bundle byte-deterministic and enforce Claude-specific frontmatter that generic validators would reject.Unit tests cover adapter behavior and generation/validation gates.
Reviewed by Cursor Bugbot for commit a08a597. Bugbot is set up for automated code reviews on this repo. Configure here.
Greptile Summary
Adds a Claude Code grilling adapter and a deterministic paired skill bundle for native interview flows.
A reproduced failure remains: when a user selects a predefined option and supplies annotation notes, the adapter stores the combined text as a custom answer instead of retaining the selected option identity. This affects downstream logic that distinguishes known decisions from custom responses.
Checks disproved concerns that single-question Other responses lose free-form text or notes, ambiguous multi-question free-form responses are accepted, partial snapshot commits expose dependent decisions, or the generated bundle is stale, invalid, or nondeterministic. The focused Claude adapter and generation tests completed successfully.
Confidence Score: 4/5
Not ready to merge until annotated selected options retain their known-option identity when committed.
The affected behavior was reproduced through the public normalization and snapshot-commit flow with captured execution output. The remaining exercised response-handling, snapshot atomicity, bundle validation, and deterministic generation behaviors completed as expected.
Files Needing Attention: dev_workflow/claude.py and dev_workflow/grilling.py need coordinated handling of annotation text and known-option matching.
What T-Rex did
Comments Outside Diff (1)
General comment
DesignTree.commit_snapshotcompares the entire decorated string against option labels, so it records the selected answer as a custom answer rather than the chosen option.normalize_native_responsepreserves annotations by concatenating them into the canonical string at line 225, butcommit_snapshotonly recognizes an exact option label after removing the recommendation suffix.commit_snapshotrecognize and separate the annotation suffix before option matching while retaining the note.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat: add Claude native grilling adapter" | Re-trigger Greptile