Skip to content

feat: add Codex native grilling adapter - #8

Merged
kossoy merged 3 commits into
mainfrom
issue-1-codex-adapter
Aug 31, 2026
Merged

kossoy merged 3 commits into
mainfrom
issue-1-codex-adapter

Conversation

@kossoy

@kossoy kossoy commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • define the canonical design-tree and immutable frontier-round contract
  • generate a thin user-invoked grill-me wrapper over the model-invoked grilling primitive
  • use the real Codex request_user_input surface only when exposed and mode-permitted, with a truthful text fallback
  • snapshot and chunk frontiers larger than three questions before recomputation
  • enforce one short prompt sentence, one short option-description sentence, and explicit mutually-exclusive-choice guidance
  • normalize native and fallback recommendation labels plus free-form Other answers and appended notes
  • gate action on explicit Confirmed; Reopen and custom concerns continue and extend the tree
  • provide a documented dependency-aware isolated selector that retains manifest and upstream MIT notice
  • add deterministic generation, skill validation, fixtures, CI, and scripts/verify-outcome.sh

Verification

  • uv run --python 3.11 -- ./scripts/verify-outcome.sh — 22 tests passed
  • quick_validate.py harnesses/codex/skills/grill-me — Skill is valid
  • quick_validate.py harnesses/codex/skills/grilling — Skill is valid
  • shellcheck scripts/verify-outcome.sh — passed
  • git diff --check — passed

Scope

Codex adapter only. No Claude or OpenCode adapter implementation and no live installation or delivery. The selector is exercised only against isolated temporary roots.

Closes #1


Note

Low Risk
New library, generated skills, and CI gates; no runtime auth, payments, or live harness installation in this PR.

Overview
Introduces the Codex-first path for native questionnaire grilling: a documented grilling v1 contract, Python types for design-tree frontiers and immutable round snapshots, and a Codex adapter that maps those snapshots to request_user_input (or an explicit text fallback) with chunking, schema validation, answer normalization, and shared-understanding confirmation gating.

Adds a deterministically generated harnesses/codex/ bundle (grill-me → grilling), dependency-aware select_codex_skills.py materialization (upstream MIT notice + manifest), and verify-outcome.sh plus GitHub CI to compile, check generation drift, validate skills, and run unit tests.

Reviewed by Cursor Bugbot for commit 04237fc. Bugbot is set up for automated code reviews on this repo. Configure here.

Greptile Summary

This change adds the Codex grilling workflow, including questionnaire serialization, fallback rendering, generated skills, and dependency-aware bundle selection.

The reported custom-answer suffix issue was disproved by committing free-form answers ending in both (Recommended) and (recommended): each retained its complete text and was recorded as a custom answer. Copying a recommended choice from the fallback prompt also stored the canonical option rather than a custom value.

Confidence Score: 5/5

No blocking failure remains.

No accepted P0 or P1 findings remain after exercising answer commitment and fallback-label handling.

T-Rex T-Rex Logs

What T-Rex did

  • Ran a deterministic Python probe against the snapshot-commit path using two custom answers ending with ' (Recommended)' and ' (recommended)'; both custom answers retained their values and were recorded as custom=True, while known recommended option labels were canonicalized as custom=False.
  • Rendered the fallback prompt, copied its displayed recommended option into the commit path, and observed the canonical known option recorded.
  • Repeated the probe and ran the Codex adapter and grilling contract regression suites; all runs completed successfully.
  • Observed the custom upper suffix: value 'A free-form Other answer (Recommended)', custom=True; the lowercase equivalent was preserved.
  • Observed known suffixes canonicalized to 'Known choice' (custom=False), and observed that the fallback display 'Known choice (Recommended)' was committed as 'Known choice'.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix: preserve native questionnaire notes" | Re-trigger Greptile

Comment thread dev_workflow/codex.py Resolved
@kossoy

kossoy commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Independent P1 review found three blocking acceptance gaps at 0968278:

  1. Selective materialization copies the linked skills but drops UPSTREAM_LICENSE/bundle metadata and is fixture-only, so the installed artifact loses attribution and has no usable entrypoint.
  2. The Codex adapter does not enforce the current single-sentence request_user_input.questions[].question contract.
  3. The final-confirmation fixture checks payload shape only; it does not prove that Reopen/custom continues and only explicit Confirmed ends the interview.

All three remain within issue #1 and are being corrected in the same lane.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0968278. Configure here.

Comment thread dev_workflow/codex.py Resolved
Comment thread dev_workflow/codex.py Resolved
@kossoy
kossoy merged commit 92a8803 into main Aug 31, 2026
4 checks passed
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.

Implement the canonical linked grilling flow and Codex adapter

1 participant