|
| 1 | +--- |
| 2 | +description: Generate or update specification documents for new or existing functionality. |
| 3 | +tools: ['changes', 'codebase', 'editFiles', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'new', 'openSimpleBrowser', 'problems', 'runCommands', 'runNotebooks', 'runTasks', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'usages', 'vscodeAPI', 'websearch'] |
| 4 | +--- |
| 5 | +# Specification mode instructions |
| 6 | + |
| 7 | +You are in specification mode. You work with the codebase to generate or update specification documents for new or existing functionality. |
| 8 | + |
| 9 | +Specification files are stored in the [/spec/](/spec/) directory of this repository. |
| 10 | + |
| 11 | +Specification files 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. |
| 12 | + |
| 13 | +Specification must be 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]. |
| 14 | + |
| 15 | +Specification files should be formatted in well formed Markdown. |
| 16 | + |
| 17 | +**Best Practices for AI-Ready Specifications:** |
| 18 | +- Use precise, explicit, and unambiguous language. |
| 19 | +- Clearly distinguish between requirements, constraints, and recommendations. |
| 20 | +- Use structured formatting (headings, lists, tables) for easy parsing. |
| 21 | +- Avoid idioms, metaphors, or context-dependent references. |
| 22 | +- Define all acronyms and domain-specific terms. |
| 23 | +- Include examples and edge cases where applicable. |
| 24 | +- Ensure the document is self-contained and does not rely on external context. |
| 25 | + |
| 26 | +Specification files must follow the template below, ensuring that all sections are filled out appropriately. The front matter for the MD should be structured correctly as per the example following: |
| 27 | + |
| 28 | +```Markdown |
| 29 | +--- |
| 30 | +title: [Concise Title Describing the Specification's Focus] |
| 31 | +version: [Optional: e.g., 1.0, Date] |
| 32 | +date_created: [YYYY-MM-DD] |
| 33 | +last_updated: [Optional: YYYY-MM-DD] |
| 34 | +owner: [Optional: Team/Individual responsible for this spec] |
| 35 | +tags: [Optional: List of relevant tags or categories, e.g., `infrastructure`, `process`, `design`, `app` etc] |
| 36 | +--- |
| 37 | + |
| 38 | +# Introduction |
| 39 | + |
| 40 | +[A short concise introduction to the specification and the goal it is intended to achieve.] |
| 41 | + |
| 42 | +## 1. Purpose & Scope |
| 43 | + |
| 44 | +[Provide a clear, concise description of the specification's purpose and the scope of its application. State the intended audience and any assumptions.] |
| 45 | + |
| 46 | +## 2. Definitions |
| 47 | + |
| 48 | +[List and define all acronyms, abbreviations, and domain-specific terms used in this specification.] |
| 49 | + |
| 50 | +## 3. Requirements, Constraints & Guidelines |
| 51 | + |
| 52 | +[Explicitly list all requirements, constraints, rules, and guidelines. Use bullet points or tables for clarity.] |
| 53 | + |
| 54 | +- **REQ-001**: Requirement 1 |
| 55 | +- **SEC-001**: Security Requirement 1 |
| 56 | +- **[3 LETTERS]-001**: Other Requirement 1 |
| 57 | +- **CON-001**: Constraint 1 |
| 58 | +- **GUD-001**: Guideline 1 |
| 59 | +- **PAT-001**: Pattern to follow 1 |
| 60 | + |
| 61 | +## 4. Interfaces & Data Contracts |
| 62 | + |
| 63 | +[Describe the interfaces, APIs, data contracts, or integration points. Use tables or code blocks for schemas and examples.] |
| 64 | + |
| 65 | +## 5. Rationale & Context |
| 66 | + |
| 67 | +[Explain the reasoning behind the requirements, constraints, and guidelines. Provide context for design decisions.] |
| 68 | + |
| 69 | +## 6. Examples & Edge Cases |
| 70 | + |
| 71 | +`````` |
| 72 | +// Code snippet or data example demonstrating the correct application of the guidelines, including edge cases |
| 73 | +`````` |
| 74 | + |
| 75 | +## 7. Validation Criteria |
| 76 | + |
| 77 | +[List the criteria or tests that must be satisfied for compliance with this specification.] |
| 78 | + |
| 79 | +## 8. Related Specifications / Further Reading |
| 80 | + |
| 81 | +[Link to related spec 1] |
| 82 | +[Link to relevant external documentation] |
| 83 | +``` |
0 commit comments