|
| 1 | +--- |
| 2 | +mode: 'agent' |
| 3 | +description: Update an existing specification file for the solution, optimized for Generative AI consumption based on new requirements or updates to any existing code. |
| 4 | +tools: ['changes', 'codebase', 'editFiles', 'extensions', 'fetch', 'githubRepo', 'openSimpleBrowser', 'problems', 'runTasks', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'usages', 'vscodeAPI'] |
| 5 | +--- |
| 6 | +## Update Specification Prompt |
| 7 | + |
| 8 | +Your goal is to update the existing specification file for `${input:SpecPurpose}` based on new requirements or updates to any existing code. |
| 9 | + |
| 10 | +The specification file must define the requirements, constraints, and interfaces for the solution components in a manner that is clear, unambiguous, and structured for effective use by Generative AIs. Follow established documentation standards and ensure the content is machine-readable and self-contained. |
| 11 | + |
| 12 | +**Best Practices for AI-Ready Specifications:** |
| 13 | +- Use precise, explicit, and unambiguous language. |
| 14 | +- Clearly distinguish between requirements, constraints, and recommendations. |
| 15 | +- Use structured formatting (headings, lists, tables) for easy parsing. |
| 16 | +- Avoid idioms, metaphors, or context-dependent references. |
| 17 | +- Define all acronyms and domain-specific terms. |
| 18 | +- Include examples and edge cases where applicable. |
| 19 | +- Ensure the document is self-contained and does not rely on external context. |
| 20 | + |
| 21 | +The specification should be saved in the [/spec/](/spec/) directory and named according to the following convention: `[a-z0-9-]+.md`, where the name should be descriptive of the specification's content and starting with the highlevel purpose, which is one of [schema, tool, data, infrastructure, process, architecture, or design]. |
| 22 | + |
| 23 | +The specification file must be formatted in well formed Markdown. |
| 24 | + |
| 25 | +Specification files must follow the template below, ensuring that all sections are filled out appropriately. The front matter for the markdown should be structured correctly as per the example following: |
| 26 | + |
| 27 | +```md |
| 28 | +--- |
| 29 | +title: [Concise Title Describing the Specification's Focus] |
| 30 | +version: [Optional: e.g., 1.0, Date] |
| 31 | +date_created: [YYYY-MM-DD] |
| 32 | +last_updated: [Optional: YYYY-MM-DD] |
| 33 | +owner: [Optional: Team/Individual responsible for this spec] |
| 34 | +tags: [Optional: List of relevant tags or categories, e.g., `infrastructure`, `process`, `design`, `app` etc] |
| 35 | +--- |
| 36 | + |
| 37 | +# Introduction |
| 38 | + |
| 39 | +[A short concise introduction to the specification and the goal it is intended to achieve.] |
| 40 | + |
| 41 | +## 1. Purpose & Scope |
| 42 | + |
| 43 | +[Provide a clear, concise description of the specification's purpose and the scope of its application. State the intended audience and any assumptions.] |
| 44 | + |
| 45 | +## 2. Definitions |
| 46 | + |
| 47 | +[List and define all acronyms, abbreviations, and domain-specific terms used in this specification.] |
| 48 | + |
| 49 | +## 3. Requirements, Constraints & Guidelines |
| 50 | + |
| 51 | +[Explicitly list all requirements, constraints, rules, and guidelines. Use bullet points or tables for clarity.] |
| 52 | + |
| 53 | +- **REQ-001**: Requirement 1 |
| 54 | +- **SEC-001**: Security Requirement 1 |
| 55 | +- **[3 LETTERS]-001**: Other Requirement 1 |
| 56 | +- **CON-001**: Constraint 1 |
| 57 | +- **GUD-001**: Guideline 1 |
| 58 | +- **PAT-001**: Pattern to follow 1 |
| 59 | + |
| 60 | +## 4. Interfaces & Data Contracts |
| 61 | + |
| 62 | +[Describe the interfaces, APIs, data contracts, or integration points. Use tables or code blocks for schemas and examples.] |
| 63 | + |
| 64 | +## 5. Acceptance Criteria |
| 65 | + |
| 66 | +[Define clear, testable acceptance criteria for each requirement using Given-When-Then format where appropriate.] |
| 67 | + |
| 68 | +- **AC-001**: Given [context], When [action], Then [expected outcome] |
| 69 | +- **AC-002**: The system shall [specific behavior] when [condition] |
| 70 | +- **AC-003**: [Additional acceptance criteria as needed] |
| 71 | + |
| 72 | +## 6. Test Automation Strategy |
| 73 | + |
| 74 | +[Define the testing approach, frameworks, and automation requirements.] |
| 75 | + |
| 76 | +- **Test Levels**: Unit, Integration, End-to-End |
| 77 | +- **Frameworks**: MSTest, FluentAssertions, Moq (for .NET applications) |
| 78 | +- **Test Data Management**: [approach for test data creation and cleanup] |
| 79 | +- **CI/CD Integration**: [automated testing in GitHub Actions pipelines] |
| 80 | +- **Coverage Requirements**: [minimum code coverage thresholds] |
| 81 | +- **Performance Testing**: [approach for load and performance testing] |
| 82 | + |
| 83 | +## 7. Rationale & Context |
| 84 | + |
| 85 | +[Explain the reasoning behind the requirements, constraints, and guidelines. Provide context for design decisions.] |
| 86 | + |
| 87 | +## 8. Examples & Edge Cases |
| 88 | + |
| 89 | +`````` |
| 90 | +// Code snippet or data example demonstrating the correct application of the guidelines, including edge cases |
| 91 | +`````` |
| 92 | + |
| 93 | +## 9. Validation Criteria |
| 94 | + |
| 95 | +[List the criteria or tests that must be satisfied for compliance with this specification.] |
| 96 | + |
| 97 | +## 10. Related Specifications / Further Reading |
| 98 | + |
| 99 | +[Link to related spec 1] |
| 100 | +[Link to relevant external documentation] |
| 101 | +``` |
0 commit comments