| name | doc-gen |
| description | Automatically generate or draft standards-compliant SRS (Software Requirements Specification)
and SDD (Software Design Document - IEEE-1016-2009) from source code and requirements.
Utilizes a multi-agent brainstorming model with Architect and BA roles to
cross-review and produce the documentation.
Use when the user requests "write SRS", "write SDD", "create IEEE-1016-2009 template",
"generate design document", "generate system design document".
|
Goal
Automatically publish standards-compliant SRS and IEEE-1016-2009 SDD documentation for the project, applying a multi-agent brainstorming mechanism to ensure system correctness and rigor.
Instructions
- Initial Prompts: When a user invokes Document Generation or Modification:
- Determine whether the user wants to create a new document or refine/update an existing document.
- If creating new: ask the user whether they want to write this for a specific local Module, or for the entire system.
- Load the relevant bundled skills from the
skills/ folder:
business-analyst
product-manager-toolkit
architect-review
software-architecture
- Phase 1: Knowledge Extraction
- Read through the provided existing document (if refining),
MASTER_INDEX, the JIRA tracking system, existing Use Cases, and source code to establish context.
- Phase 2: Multi-Agent Brainstorming
- Apply the
multi-agent-brainstorming skill documented in references/multi-agent-brainstorming.md.
- The agents will convene:
- Primary Designer: Draft the outline based on project needs. Use
references/srs-template.md or references/sdd-template.md as guidelines and references, not strict requirements.
- Skeptic / Challenger: Rigorously verify the design for gaps against the requirements (e.g., missing database fields that an API relies on).
- Constraint Guardian: Review NFRs (Non-Functional Requirements) and Architecture principles. Ensure the document makes logical sense for the system.
- Phase 3: Generation & Output (or Refinement)
- Resolve any vulnerabilities or gaps identified during the Multi-Agent brainstorming phase.
- Finalize the document and output it in markdown format.
- If generating anew: Save the file as
{MODULE_NAME}_SRS.md or {MODULE_NAME}_SDD.md.
- If refining: Overwrite or update the corresponding sections of the existing document.
Examples
Example 1: Writing an SDD for the AUTH Module
User Request: "Viết tài liệu SDD cho phân hệ AUTH"
AI Execution Process:
- Step 1: The AI references the template file (
references/sdd-template.md) for structural inspiration.
- Step 2: Context extraction (The Primary Designer reads the source code in
src/modules/auth to build a C4 Model and UML diagrams).
- Step 3: Review loop (The Skeptic Agent challenges the Authentication Flow: "What happens in the event of a brute force attack?").
- Step 4: Constraint Guardian adds an explicit Rate Limit into the documentation.
- Step 5: Output the final document in Vietnamese.
Example 2: Refining an existing SRS
User Request: "Cải thiện lại phần non-functional requirements trong tài liệu SRS của phân hệ PAYMENT"
AI Execution Process:
- Step 1: The AI reads the existing
PAYMENT_SRS.md.
- Step 2: The Architect reviews the current NFRs and identifies missing scalability metrics.
- Step 3: The AI rewrites and expands the NFR section directly in the existing document.
Constraints
- The provided templates (
references/srs-template.md, references/sdd-template.md) are REFERENCE GUIDELINES ONLY. You do NOT need to strictly adhere to every viewpoint. Adapt the structure to fit the actual needs of the project and the user's specific request.
- You MUST simulate a multi-dimensional review before outputting the final result.
- The output markdown file SHOULD use
mermaid syntax for all diagrams and charts where applicable.
- Explain the "Why" behind specific Architectural Patterns or Design Decisions.
- CRITICAL: The final document content MUST be in Vietnamese because stakeholders read Vietnamese, even though the AI logic instructions are in English. Use the provided Vietnamese templates as stylistic guides.