Skip to content

Commit f9590cb

Browse files
committed
constitution: ask questions one at a time for guided UX
1 parent afd08c0 commit f9590cb

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

templates/commands/constitution.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,35 @@ You **MUST** consider the user input before proceeding (if not empty).
1818

1919
You are updating the project research constitution at `/memory/constitution.md`. This file defines the scientific context, core principles, and standards for the project. Your job is to collect concrete details from the user and fill in the template.
2020

21+
## Interaction Style
22+
23+
**IMPORTANT**: Ask questions ONE AT A TIME. Do not dump all questions at once.
24+
25+
- After asking a question, STOP and wait for the user's response.
26+
- Once they answer, update `/memory/constitution.md` with that section, then ask the next question.
27+
- This creates a guided conversation rather than an overwhelming list.
28+
29+
**Exception**: If the user provides substantial context in their initial input (after the command), use it to pre-fill what you can. Then only ask about gaps, still one question at a time.
30+
31+
**Progress saving**: After each answer, write the updated section to the file so progress is saved even if the conversation is interrupted.
32+
2133
Follow this execution flow:
2234

2335
1. Load the existing constitution at `/memory/constitution.md`.
2436
- Identify placeholder tokens in square brackets (e.g., `[PROJECT_NAME]`, `[DATA_SOURCES]`).
37+
- Check what's already filled in vs. what needs input.
38+
39+
2. If user provided context upfront:
40+
- Pre-fill as many sections as possible from their input.
41+
- Write the partial constitution to the file.
42+
- Identify remaining gaps and ask about them ONE AT A TIME.
2543

26-
2. Collect values for each section:
27-
- If user input supplies details, use them.
28-
- Otherwise, infer from existing repo context (README, existing scripts, data files).
29-
- For sections the user hasn't addressed, ask focused questions or mark as `[TODO: description]`.
44+
3. If user provided no context (or minimal):
45+
- Start with the first section (Research Context).
46+
- Ask ONE focused question about that section.
47+
- Wait for response, update file, then move to next section.
3048

31-
3. Section-specific guidance:
49+
4. Section-specific guidance:
3250

3351
**Research Context**: Get the big picture - what questions, why this matters, who uses the outputs.
3452

@@ -44,19 +62,19 @@ Follow this execution flow:
4462

4563
**Project Notes**: Probe for constraints that might not be obvious - data embargoes, collaborator agreements, deadlines.
4664

47-
4. Draft the completed constitution:
65+
5. Draft the completed constitution:
4866
- Replace placeholders with concrete text.
4967
- Keep HTML comments as guidance unless the user asks to remove them.
5068
- Use clear, direct language - this is a working document, not a legal contract.
5169

52-
5. Consistency check:
70+
6. Consistency check:
5371
- If `/memory/spec.md` exists, verify data sources and scope align.
5472
- If analysis scripts exist, verify stated environment matches actual dependencies.
5573
- Flag any inconsistencies to the user.
5674

57-
6. Write the completed constitution to `/memory/constitution.md`.
75+
7. Write the completed constitution to `/memory/constitution.md`.
5876

59-
7. Summarize for the user:
77+
8. Summarize for the user:
6078
- What sections are complete vs. marked TODO.
6179
- Any inconsistencies found.
6280
- Suggested next steps (e.g., "Run `speckit specify` to create your first analysis spec").

0 commit comments

Comments
 (0)