Organize the oral requirements and context plan into a traceable raw requirements document. Reply in Chinese unless the user requests another language.
Basic Principles
- Treat the user's original words, the current conversation, local materials named by the user, and existing
REQUIREMENTS.mdas sources of truth. - Distinguish "what is to be implemented" from "referenceable implementation solutions." Do not automatically elevate reference architectures, competitor practices, or open-source project capabilities into requirements.
- Reorganizing and refining wording is allowed, but do not add features, technology choices, deliverables, competitors, or links.
- Must ask questions about missing, ambiguous, or mutually conflicting information. The user is allowed to explicitly answer "none," "not applicable," or "not sure yet"; do not answer on the user's behalf.
- Unless requested by the user, do not proactively conduct competitor research or technology selection; this skill is responsible for organizing and confirming, not for expanding the solution.
Before starting, read references/requirements-structure.md, and follow the sections, required information, and rendering rules in it.
Workflow
1. Determine Inputs and Goals
- Use the user message that triggered this skill and the context it explicitly references as the raw input.
- Locate the project root directory: prefer the Git root directory; when not in a Git repository, use the current working directory.
- The default target is
<项目根目录>/REQUIREMENTS.md. If the user specifies another path, follow the user. - If the target file already exists, first read it in full and determine whether the user intends to supplement, reorganize, or replace it. If the user's intent is unclear, confirm first; do not overwrite directly.
2. Extract and Categorize
First extract the following four categories of information in the work record; do not write the file immediately:
| Type | Content |
|---|---|
| Confirmed requirements | Goals, capabilities, deliverables, and boundaries explicitly requested by the user |
| Context plan | Technical ideas, product plans, integration methods, reference implementations |
| External references | Competitors, documents, open-source projects and their links and reference purposes |
| Items to be confirmed | Missing fields, ambiguities, conflicts, classifications that cannot be determined |
Preserve important qualifiers such as "only," "at least," "does not support," "as needed," "must," and "subsequently." Do not replace them with stronger or weaker words.
3. Map to the Fixed Skeleton
Map the information to the four sections according to the field list in the reference. When mapping, follow these rules:
- Place each fact in only the most appropriate place to avoid repeating it in four places.
- "Product Delivery Matrix" should describe delivery forms and usage/integration methods, and must not pass off an internal module list as deliverables.
- "Product Feature Research" should only record the subjects to be researched, links, and research goals, and must not pretend that the research has already been completed.
- "Technical Implementation Reference" must indicate that it is for reference only and does not represent copying, imitation, or a selected technology stack.
- When updating existing documents, retain the original information that the user has not overturned; when conflicts between old and new are found, list them as items to be confirmed.
4. Conduct a gap audit and interview
Check item by item the content marked as "must confirm" in the reference. Ask only questions that cannot be answered by the input and existing files.
- Ask at most 4 questions per round, and put related questions in the same round.
- For each question, first state the known information or the gap, then ask one question that can be answered directly.
- When there are reasonable candidates, provide them, but always allow the user to phrase things in their own words.
- When the user answers "not sure yet", continue to confirm whether the document should write "to be determined" or explicitly exclude it; do not choose on your own.
- If the interactive tool is unavailable, list the questions in the reply and stop to wait for the user to answer. Never answer on your own when the user cannot see the questions.
Only after all four sections have been covered, or the user has explicitly confirmed "none / not applicable / to be determined", may you enter the writing phase.
5. Write REQUIREMENTS.md
Render the full text according to the reference template:
- Use for the title
# <项目名称> - 产品原始需求。 - Retain the statement that "the original requirements may change with evolution, and the final implementation shall prevail".
- Always retain the four top-level numbered sections and the specified second-level structure.
- For sections confirmed as not applicable, write one clear conclusion; do not delete the section.
- For content confirmed as not sure yet, use
待定:...and clearly state before what decision it needs to be completed; do not leave empty headings,TODOor placeholders. - Use readable names and standard Markdown links for links; do not fabricate URLs.
If the target file already exists, modify it only within the scope confirmed by the user. After completion, re-read the file and check the actual content written to disk.
6. Validate and deliver
After saving, validate item by item:
- All four numbered sections are present, and the heading hierarchy matches the template.
- There are no empty sections,
TODO, template placeholders, or inferences not shown to the user. - Product requirements, delivery form, competitor research, and technical references are not mixed into the wrong columns.
- The user's explicit constraints, exclusions, and "for reference only" semantics are not lost.
- The same requirement is not duplicated or stated in contradictory ways.
- The file path is correct, and existing files have not been overwritten beyond authorization.
Finally, report the save path and briefly list the "none / not applicable / to be determined" items explicitly confirmed by the user. Do not continue to expand new requirements outside the file.