Read a specific idea from changes/<feature-name>/ideas.md, research solution variants for it, and write or update changes/<feature-name>/<NUMBER-idea-name>/variants.md.
Input: The argument after /variants should include both:
- A feature or change folder name
- An idea number or idea title from
changes/<feature-name>/ideas.md
Examples:
/variants 712-composite-foreign-keys 2
/variants row-level-security-integration "Policy-aware query configuration"
/variants composite-foreign-keys-in-relations 3
Goal
Produce a document that explains the goal of one specific idea and proposes one or more genuinely different user-facing solutions for achieving it.
This command is about solution design, not implementation planning. The output should help a human compare approaches, and it should also be clear enough that a later AI can use it as a reliable basis for a more detailed proposal.
The existing research.md is background context, but it is usually not enough on its own. Unless the idea is trivial and the solution space is obvious, do fresh idea-specific research to:
- Discover distinct viable ways the idea could be implemented
- Understand the trade-offs of those approaches well enough to propose high-quality solutions
- Ground the proposed solutions in Postgres behavior, existing ecosystem patterns, and orchid-orm's current user-facing design
Steps
Identify the target change folder
Search changes/ for the folder that best matches the user's feature input.
Prefer:
- An exact folder-name match
- A folder whose name clearly matches the described feature
- A folder that already contains both
research.md and ideas.md
If multiple folders are plausible, stop and ask the user which one to use.
Do not guess when the match is ambiguous.
If no relevant change folder exists, tell the user that no matching researched change was found.
Do not create a new change folder here.
Resolve the target idea
Read the full changes/<feature-name>/ideas.md.
Match the requested idea by:
- Exact idea number from headings like
### 2. <Idea title>
- Or exact / clearly intended idea title
If the title match is ambiguous, stop and ask one focused clarifying question.
Do not guess between similarly named ideas.
Record:
- The exact numbered idea heading
- The idea title
- Its
Why, Adds, How, Depends on, and any use cases that help clarify the idea
Read existing research for idea-specific context
Read changes/<feature-name>/research.md after identifying the idea.
Use it to understand:
- The broader feature context
- Requirements and edge cases that affect this idea
- Existing orchid-orm support that may constrain or shape solutions
- References already collected that may be relevant to this idea
Ignore research sections that do not materially affect the selected idea.
The purpose of this step is to narrow the problem before doing variant research.
Decide how much new research is needed
Make an explicit judgment:
- If the idea is trivial and the solution space is obvious, proceed with only:
ideas.md
- the idea-relevant parts of
research.md
- relevant orchid-orm docs
- any obviously relevant references already listed in
research.md
- Otherwise, do fresh idea-specific research before drafting solutions
Bias toward doing fresh research unless the idea is truly simple.
This command should usually perform broader solution-oriented research than ideas.md already contains.
Research solution variants
When fresh research is needed, research specifically for this idea rather than the whole feature.
Prioritize:
- Official Postgres docs when the idea touches Postgres capabilities or limitations
- Mature existing tools and libraries to learn how different user-facing approaches are exposed
- Existing discussions or community references when they reveal user pain points, confusing trade-offs, or useful ergonomics
Research goals:
- Find distinct approaches, not just one preferred approach
- Understand enough detail to explain each proposed solution clearly and accurately
- Avoid proposing solutions that conflict with Postgres realities or well-established user expectations
Do not do generic background research that does not affect the proposed variants.
Keep the research focused on how the idea could be expressed to users.
Inspect relevant orchid-orm documentation
Read docs/src/.vitepress/dist/llms.txt, but only the sections that are relevant to the selected idea or its candidate solutions.
Use the docs to understand:
- How similar existing features are explained to users
- Which naming or API patterns already exist
- How this idea could integrate naturally into orchid-orm from a user's perspective
Read relevant references from research.md
At the end of research.md, review the reference list.
Read only the references that appear relevant to:
- The selected idea
- A candidate solution
- A trade-off that needs stronger grounding
It is not necessary to read every reference.
Prefer the sources that materially improve solution quality.
Derive the solution variants
Propose one or more solutions that are genuinely different ways to achieve the idea's goal.
Good solution differences include:
- Different public interfaces
- Different user workflows
- Different levels of explicitness vs automation
- Different ways responsibility is split between user configuration and framework behavior
Bad solution differences include:
- Minor naming changes
- Slightly different method signatures with the same overall workflow
- Variants that are effectively the same approach with small ergonomic tweaks
If the idea only supports one serious solution, that is acceptable.
Do not invent weak alternatives just to produce multiple options.
Write or update variants.md
The output path must be:
changes/<feature-name>/<NUMBER-idea-name>/variants.md
Where:
NUMBER is the idea number from ideas.md
idea-name is a short kebab-case form of the idea title
If the idea folder does not exist yet, create it.
If variants.md already exists, read it now, preserve useful content, remove stale or unsupported claims, and reconcile it with the current idea and research.
Use this structure:
# <Idea Title>
## Goal
<Explain what this idea is trying to achieve for users and why it matters.>
## Context from existing research
<Brief summary of the relevant context from `research.md`, orchid-orm docs, and any prior references that materially shape the solution space.>
## Solution 1: <Solution name>
- Summary: <One paragraph describing the solution at a user-facing level.>
- User-facing interface: <Describe the public API, configuration, methods, or other visible surface users would work with.>
- How it works: <Explain the principles clearly enough that both a human reader and a later AI can understand the exact intended behavior without guessing. Stay out of implementation internals, but remove ambiguity about what the solution means.>
- Workflow: <Describe the sequence of what a user does and what they get. Use a short list if it is clearer.>
- Pros: <Benefits of this solution.>
- Cons: <Limitations, awkwardness, or trade-offs of this solution.>
#### Example use case
- <Brief scenario showing when a user would choose this solution and what result they get.>
<Optional minimal code example when it materially improves clarity.>
## Solution 2: <Solution name> <!-- optional -->
- Summary: <One paragraph describing the solution at a user-facing level.>
- User-facing interface: <Describe the public API, configuration, methods, or other visible surface users would work with.>
- How it works: <Explain the principles clearly enough that both a human reader and a later AI can understand the exact intended behavior without guessing. Stay out of implementation internals, but remove ambiguity about what the solution means.>
- Workflow: <Describe the sequence of what a user does and what they get. Use a short list if it is clearer.>
- Pros: <Benefits of this solution.>
- Cons: <Limitations, awkwardness, or trade-offs of this solution.>
#### Example use case
- <Brief scenario showing when a user would choose this solution and what result they get.>
<Optional minimal code example when it materially improves clarity.>
## Comparison <!-- optional: only when there are multiple solutions -->
- <How solution 1 is better than solution 2 for certain users or priorities.>
- <How solution 2 is better than solution 1 for certain users or priorities.>
- <Which solution seems most natural for orchid-orm users, if that conclusion is justified.>
## References
- <Relevant source and why it matters to this idea or a proposed solution.>
Document guidance:
- Stay strictly at the user-facing or product-design level
- Describe visible behavior, public interfaces, workflows, and trade-offs
- Do not write implementation plans, internal architecture, or low-level mechanics
How it works must be concrete and unambiguous enough that a later AI can use it for a more detailed proposal without inventing missing behavior
- Prefer short clear prose over dense shorthand
- Add inline source references when a claim, constraint, or solution idea comes from a specific source
- Include a
Comparison section only when there is more than one real solution
- If there is only one serious solution, explain it well instead of padding the document
Source handling
The resulting solution descriptions should reference relevant sources when they are based on those sources.
Source expectations:
- Cite official Postgres docs when they shape what is possible or desirable
- Cite mature existing tools when they inspire a user-facing approach or reveal a trade-off
- Cite orchid-orm docs when they influence naming, workflow, or integration expectations
- Cite community sources only when they add meaningful insight into user needs or pain points
Do not add references that were not actually used.
Do not dump a large bibliography just because it exists.
- Quality check
Before finishing, verify:
- The file was written to the correct
changes/<feature-name>/<NUMBER-idea-name>/variants.md path
- The selected feature folder is the best match for the user's input
- The selected idea is the correct numbered heading or title from
ideas.md
- The proposed solutions are genuinely different, unless only one serious solution exists
- The command did enough fresh research to justify the proposed variants, unless the idea was clearly trivial
- Relevant parts of
research.md were used, and irrelevant parts were ignored
- Relevant orchid-orm docs were consulted
- Relevant references from
research.md were read when they helped the idea
- Each solution is described clearly enough for both a human reader and a later AI to understand the intended user-facing behavior without guessing
Pros and Cons reflect real trade-offs rather than filler
- The document stays at the user-facing level and does not drift into implementation planning
- Source references appear where they materially support a solution or claim
Guardrails
- Do not create a new change folder
- Do not skip reading
ideas.md before reading research.md
- Do not treat the old
research.md as sufficient by default for solution quality
- Do not propose shallow variants that are the same idea with small wording changes
- Do not write implementation tasks, internal architecture, or code-generation guidance
- Do not read all of
docs/src/.vitepress/dist/llms.txt or all references blindly; stay selective and relevant
- Do not guess when the feature folder or idea match is ambiguous
- Ask one focused clarifying question if the target folder or idea cannot be identified confidently
1---2name: variants3description: Use when the user prompts "make variants".4---56Read a specific idea from `changes/<feature-name>/ideas.md`, research solution variants for it, and write or update `changes/<feature-name>/<NUMBER-idea-name>/variants.md`.78**Input**: The argument after `/variants` should include both:910- A feature or change folder name11- An idea number or idea title from `changes/<feature-name>/ideas.md`1213Examples:1415- `/variants 712-composite-foreign-keys 2`16- `/variants row-level-security-integration "Policy-aware query configuration"`17- `/variants composite-foreign-keys-in-relations 3`1819**Goal**2021Produce a document that explains the goal of one specific idea and proposes one or more genuinely different user-facing solutions for achieving it.2223This command is about solution design, not implementation planning. The output should help a human compare approaches, and it should also be clear enough that a later AI can use it as a reliable basis for a more detailed proposal.2425The existing `research.md` is background context, but it is usually not enough on its own. Unless the idea is trivial and the solution space is obvious, do fresh idea-specific research to:2627- Discover distinct viable ways the idea could be implemented28- Understand the trade-offs of those approaches well enough to propose high-quality solutions29- Ground the proposed solutions in Postgres behavior, existing ecosystem patterns, and orchid-orm's current user-facing design3031**Steps**32331. **Identify the target change folder**3435 Search `changes/` for the folder that best matches the user's feature input.3637 Prefer:38 - An exact folder-name match39 - A folder whose name clearly matches the described feature40 - A folder that already contains both `research.md` and `ideas.md`4142 If multiple folders are plausible, stop and ask the user which one to use.43 Do not guess when the match is ambiguous.4445 If no relevant change folder exists, tell the user that no matching researched change was found.46 Do not create a new change folder here.47482. **Resolve the target idea**4950 Read the full `changes/<feature-name>/ideas.md`.5152 Match the requested idea by:53 - Exact idea number from headings like `### 2. <Idea title>`54 - Or exact / clearly intended idea title5556 If the title match is ambiguous, stop and ask one focused clarifying question.57 Do not guess between similarly named ideas.5859 Record:60 - The exact numbered idea heading61 - The idea title62 - Its `Why`, `Adds`, `How`, `Depends on`, and any use cases that help clarify the idea63643. **Read existing research for idea-specific context**6566 Read `changes/<feature-name>/research.md` after identifying the idea.6768 Use it to understand:69 - The broader feature context70 - Requirements and edge cases that affect this idea71 - Existing orchid-orm support that may constrain or shape solutions72 - References already collected that may be relevant to this idea7374 Ignore research sections that do not materially affect the selected idea.75 The purpose of this step is to narrow the problem before doing variant research.76774. **Decide how much new research is needed**7879 Make an explicit judgment:80 - If the idea is trivial and the solution space is obvious, proceed with only:81 - `ideas.md`82 - the idea-relevant parts of `research.md`83 - relevant orchid-orm docs84 - any obviously relevant references already listed in `research.md`85 - Otherwise, do fresh idea-specific research before drafting solutions8687 Bias toward doing fresh research unless the idea is truly simple.88 This command should usually perform broader solution-oriented research than `ideas.md` already contains.89905. **Research solution variants**9192 When fresh research is needed, research specifically for this idea rather than the whole feature.9394 Prioritize:95 - Official Postgres docs when the idea touches Postgres capabilities or limitations96 - Mature existing tools and libraries to learn how different user-facing approaches are exposed97 - Existing discussions or community references when they reveal user pain points, confusing trade-offs, or useful ergonomics9899 Research goals:100 - Find distinct approaches, not just one preferred approach101 - Understand enough detail to explain each proposed solution clearly and accurately102 - Avoid proposing solutions that conflict with Postgres realities or well-established user expectations103104 Do not do generic background research that does not affect the proposed variants.105 Keep the research focused on how the idea could be expressed to users.1061076. **Inspect relevant orchid-orm documentation**108109 Read `docs/src/.vitepress/dist/llms.txt`, but only the sections that are relevant to the selected idea or its candidate solutions.110111 Use the docs to understand:112 - How similar existing features are explained to users113 - Which naming or API patterns already exist114 - How this idea could integrate naturally into orchid-orm from a user's perspective1151167. **Read relevant references from `research.md`**117118 At the end of `research.md`, review the reference list.119120 Read only the references that appear relevant to:121 - The selected idea122 - A candidate solution123 - A trade-off that needs stronger grounding124125 It is not necessary to read every reference.126 Prefer the sources that materially improve solution quality.1271288. **Derive the solution variants**129130 Propose one or more solutions that are genuinely different ways to achieve the idea's goal.131132 Good solution differences include:133 - Different public interfaces134 - Different user workflows135 - Different levels of explicitness vs automation136 - Different ways responsibility is split between user configuration and framework behavior137138 Bad solution differences include:139 - Minor naming changes140 - Slightly different method signatures with the same overall workflow141 - Variants that are effectively the same approach with small ergonomic tweaks142143 If the idea only supports one serious solution, that is acceptable.144 Do not invent weak alternatives just to produce multiple options.1451469. **Write or update `variants.md`**147148 The output path must be:149150 `changes/<feature-name>/<NUMBER-idea-name>/variants.md`151152 Where:153 - `NUMBER` is the idea number from `ideas.md`154 - `idea-name` is a short kebab-case form of the idea title155156 If the idea folder does not exist yet, create it.157158 If `variants.md` already exists, read it now, preserve useful content, remove stale or unsupported claims, and reconcile it with the current idea and research.159160 Use this structure:161162 ```md163 # <Idea Title>164165 ## Goal166167 <Explain what this idea is trying to achieve for users and why it matters.>168169 ## Context from existing research170171 <Brief summary of the relevant context from `research.md`, orchid-orm docs, and any prior references that materially shape the solution space.>172173 ## Solution 1: <Solution name>174175 - Summary: <One paragraph describing the solution at a user-facing level.>176 - User-facing interface: <Describe the public API, configuration, methods, or other visible surface users would work with.>177 - How it works: <Explain the principles clearly enough that both a human reader and a later AI can understand the exact intended behavior without guessing. Stay out of implementation internals, but remove ambiguity about what the solution means.>178 - Workflow: <Describe the sequence of what a user does and what they get. Use a short list if it is clearer.>179 - Pros: <Benefits of this solution.>180 - Cons: <Limitations, awkwardness, or trade-offs of this solution.>181182 #### Example use case183184 - <Brief scenario showing when a user would choose this solution and what result they get.>185 <Optional minimal code example when it materially improves clarity.>186187 ## Solution 2: <Solution name> <!-- optional -->188189 - Summary: <One paragraph describing the solution at a user-facing level.>190 - User-facing interface: <Describe the public API, configuration, methods, or other visible surface users would work with.>191 - How it works: <Explain the principles clearly enough that both a human reader and a later AI can understand the exact intended behavior without guessing. Stay out of implementation internals, but remove ambiguity about what the solution means.>192 - Workflow: <Describe the sequence of what a user does and what they get. Use a short list if it is clearer.>193 - Pros: <Benefits of this solution.>194 - Cons: <Limitations, awkwardness, or trade-offs of this solution.>195196 #### Example use case197198 - <Brief scenario showing when a user would choose this solution and what result they get.>199 <Optional minimal code example when it materially improves clarity.>200201 ## Comparison <!-- optional: only when there are multiple solutions -->202203 - <How solution 1 is better than solution 2 for certain users or priorities.>204 - <How solution 2 is better than solution 1 for certain users or priorities.>205 - <Which solution seems most natural for orchid-orm users, if that conclusion is justified.>206207 ## References208209 - <Relevant source and why it matters to this idea or a proposed solution.>210 ```211212 Document guidance:213 - Stay strictly at the user-facing or product-design level214 - Describe visible behavior, public interfaces, workflows, and trade-offs215 - Do not write implementation plans, internal architecture, or low-level mechanics216 - `How it works` must be concrete and unambiguous enough that a later AI can use it for a more detailed proposal without inventing missing behavior217 - Prefer short clear prose over dense shorthand218 - Add inline source references when a claim, constraint, or solution idea comes from a specific source219 - Include a `Comparison` section only when there is more than one real solution220 - If there is only one serious solution, explain it well instead of padding the document22122210. **Source handling**223224The resulting solution descriptions should reference relevant sources when they are based on those sources.225226Source expectations:227228- Cite official Postgres docs when they shape what is possible or desirable229- Cite mature existing tools when they inspire a user-facing approach or reveal a trade-off230- Cite orchid-orm docs when they influence naming, workflow, or integration expectations231- Cite community sources only when they add meaningful insight into user needs or pain points232233Do not add references that were not actually used.234Do not dump a large bibliography just because it exists.23523611. **Quality check**237238Before finishing, verify:239240- The file was written to the correct `changes/<feature-name>/<NUMBER-idea-name>/variants.md` path241- The selected feature folder is the best match for the user's input242- The selected idea is the correct numbered heading or title from `ideas.md`243- The proposed solutions are genuinely different, unless only one serious solution exists244- The command did enough fresh research to justify the proposed variants, unless the idea was clearly trivial245- Relevant parts of `research.md` were used, and irrelevant parts were ignored246- Relevant orchid-orm docs were consulted247- Relevant references from `research.md` were read when they helped the idea248- Each solution is described clearly enough for both a human reader and a later AI to understand the intended user-facing behavior without guessing249- `Pros` and `Cons` reflect real trade-offs rather than filler250- The document stays at the user-facing level and does not drift into implementation planning251- Source references appear where they materially support a solution or claim252253**Guardrails**254255- Do not create a new change folder256- Do not skip reading `ideas.md` before reading `research.md`257- Do not treat the old `research.md` as sufficient by default for solution quality258- Do not propose shallow variants that are the same idea with small wording changes259- Do not write implementation tasks, internal architecture, or code-generation guidance260- Do not read all of `docs/src/.vitepress/dist/llms.txt` or all references blindly; stay selective and relevant261- Do not guess when the feature folder or idea match is ambiguous262- Ask one focused clarifying question if the target folder or idea cannot be identified confidently