Batch the conversation's unresolved decisions into one HTML form; consume the markdown answers it emits. The answers file is the alignment contract — every question comes back as answered, open, or skipped-by-branching; nothing is silently dropped.
Workflow
-
Mine the discussion, notes, and memory for decisions still open, not topics. Points already settled go into
introas a "current understanding" summary — add one leadingtextquestion asking what in it is wrong, instead of re-asking each settled point. -
Write
questions.json(schema below), then build:python3 scripts/build.py questions.json -o alignment.html -
Deliver: write the HTML somewhere the user can open it (project dir or scratchpad) and give them the path; in a remote/claude.ai session, publish it as an Artifact instead.
-
Consume: the page's Generate answers button emits markdown the user pastes back or downloads as
.md. Parse by the(`id`)keys, not question numbers or wording. Treatopen — no answer givenas still-undecided — never fill those in yourself. Record ruled decisions wherever the project keeps them (design doc, ADR, memory), quoting the answer.
questions.json
{
"title": "Mitate — design alignment",
"intro": "Current understanding (flag anything wrong in Q1):\n- ...",
"outro": "Closing instruction echoed to the agent under the answers.",
"questions": [
{
"id": "storage",
"label": "Storage layout",
"section": "Architecture",
"question": "One JSONB table, or normalized?",
"why": "What hangs on this decision, in the user's terms.",
"ref": "SPEC.md §3",
"type": "single",
"options": [
{"value": "Single JSONB table", "detail": "Consequence of picking this.", "recommended": true},
"Normalized from day one",
"Other — see note"
],
"note": true,
"optional": false,
"showIf": {"q": "earlier-id", "is": "that question's option value"}
}
]
}
type:single(default) |multi|text. Choice types need ≥2options(plain strings allowed);textrenders a textarea.note: trueadds an optional free-text field under the choices;optional: trueexcludes the question from the answered count;sectionrenders a heading when it changes;showIfsupportsisornotagainst an earlier question's option value.
Composing questions
- One decision per question. If a stem contains "and", split it.
- Options must be mutually exclusive and each
detailstates the consequence of picking it, not a restatement. Mark yourrecommendedpick — you have an opinion and hiding it wastes the user's time — and include an "Other / needs discussion" escape so no one is forced into a false choice. whysays what downstream work changes with the answer;refpoints at the file/line or note that proves the framing, so the user can check you.showIfonly for real dependencies (e.g. "what replaces the gate?" only if they skip the gate). Skipped questions still appear in the answers, marked skipped.- Keep decision alignment to ~15 questions or fewer. For large elicitation (requirements, preferences for a doc you'll draft), group with
section, mark nice-to-havesoptional, and tell the user they can answer in sittings — drafts autosave.
Notes
- The HTML is dependency-free and offline: strict CSP, no network, drafts in localStorage. When content is personal (finances, health), say so — answers never leave their machine until they hand them back.
- Storage key includes the question-id list, so regenerating with changed questions starts a clean draft rather than restoring stale answers.
- Build output like
alignment.html: 12 questions, 2 conditionalconfirms parse + validation; errors list the failingquestions[i]and exit non-zero.