feat(question): free-form questions render as text cards (amicode#245) - #113
Merged
aarontrowbridge merged 9 commits intoAug 4, 2026
Merged
Conversation
…dock (amicode#245)
jeonghun-jj-lee
marked this pull request as ready for review
August 2, 2026 22:56
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs harmoniqs/amicode#245. Design of record:
docs/adr/0002-free-form-questions-render-as-text-cards.md(already onlocal/amicode).What
Promptand serverInfoboth carry it via the sharedbase): one new optionalkind—"choice"(default) |"text". An absent kind decodes as a choice question (back-compat); an unknown kind fails decoding loudly (Literal enum — never silently degrades). Legacy SDK +packages/clientregenerated;kind?: "choice" | "text"is the only generated diff.session-question-dock.tsx) — additionally now honors thecustomflag for choice cards (it previously appended the pseudo-option unconditionally; follows the TUI's flag check).routes/session/question.tsx) and CLI (cmd/run/question.shared.ts+ footer).session/prose-guard.ts): behavior unchanged — still forces prose questions in active interviews into cards, at most one nudge per assistant message, never after a question-tool call. The nudge text is now bilingual: choice questions re-ask with options (recommended first); free-form questions re-ask withkind: "text". No classification heuristics — the model picks the shape from the question it is re-asking.AMICODE-PATCHES.mdpatch 26 records the fork-surface changes with an upstream-sync watch note (the dock is a high-conflict file).Test evidence
packages/schema: 16/16 question tests (both shapes; absent→choice; explicit choice/text; unknown kind throws); typecheck clean. (Full suite has 2 pre-existing event-manifest failures that reproduce on a clean tree.)packages/opencode: CLI text-card 10/10, prose-guard 10/10, tool 4/4; wire-shape snapshot diff is exactly thekindfield. Full suite 3519 pass / 24 documented pre-existing fails (pasqal ×8, widgets ×15, flaky PTY ×1 — see AMICODE-PATCHES.md).packages/tui: new real render tests 5/5 (testRender+ stub server — typed answer submits through the custom path; empty Enter never submits;custom:falsehides the row). Full suite 196/196.packages/app: dock shape helpers 6/6; unit suite 783/783;tsgo -bclean.packages/core1081/1081 ·packages/protocol2/2 ·packages/client16/16 + generated-types check in sync ·packages/ui441/441.Ships
This is the engine half of amicode#245. The extension's contract-text changes ride the next engine pin cut from this merge — the companion extension PR stays draft until it picks up that pin bump + re-vendor, per the issue's Key Decisions.
Orchestrated via amicode
/develop(issue-DAG walk — single-slice unit, TDD per slice).