|
| 1 | +# Rule: Generating a Tech Stack Documentation |
| 2 | + |
| 3 | +> $ARGUMENTS |
| 4 | +
|
| 5 | +## Goal |
| 6 | + |
| 7 | +To guide an AI assistant in creating a comprehensive Tech Stack Documentation in Markdown format, based on deep analysis of an existing codebase and user input. The document should provide detailed technical information about technologies, frameworks, libraries, development tools, and implementation patterns used in the project. |
| 8 | + |
| 9 | +## Process |
| 10 | + |
| 11 | +1. **Receive Initial Prompt:** The user requests tech stack documentation for their existing project. |
| 12 | +2. **Deep Technical Analysis:** Thoroughly analyze the codebase to understand: |
| 13 | + - Package.json dependencies and their purposes |
| 14 | + - Framework and library versions |
| 15 | + - Database schema and ORM usage |
| 16 | + - Build tools and development workflow |
| 17 | + - Deployment and infrastructure setup |
| 18 | + - Code organization and architecture patterns |
| 19 | + - Testing frameworks and quality tools |
| 20 | + - CI/CD and development processes |
| 21 | +3. **Ask Clarifying Questions:** Before writing the document, ask 4-6 targeted questions based on the technical analysis. Focus on deployment, hosting, development workflow, and technical decisions. Provide lettered/numbered options for easy response. |
| 22 | +4. **Generate Documentation:** Create a comprehensive tech stack document using the structure outlined below. |
| 23 | +5. **Save Documentation:** Save as `tech-stack.md` in the `.taskmaster/docs/` directory. |
| 24 | + |
| 25 | +## Clarifying Questions (Examples) |
| 26 | + |
| 27 | +Adapt these questions based on the technical analysis: |
| 28 | + |
| 29 | +- **Hosting & Deployment:** "Where is this application deployed? (e.g., Vercel, AWS, self-hosted)" or "What deployment strategy do you use?" |
| 30 | +- **Database & Storage:** "What database are you using and how is it hosted?" or "Do you use any external storage services?" |
| 31 | +- **Development Workflow:** "What's your preferred development workflow? (e.g., feature branches, trunk-based development)" |
| 32 | +- **Environment Management:** "How do you handle different environments (dev, staging, prod)?" |
| 33 | +- **Performance & Monitoring:** "What tools do you use for monitoring, logging, or error tracking?" |
| 34 | +- **Team Collaboration:** "What tools does your team use for collaboration and project management?" |
| 35 | +- **Quality Assurance:** "What's your testing strategy and what tools do you use for code quality?" |
| 36 | +- **Third-Party Services:** "What external APIs or services does your application integrate with?" |
| 37 | + |
| 38 | +## Document Structure |
| 39 | + |
| 40 | +The generated document must follow this technical structure: |
| 41 | + |
| 42 | +### **Overview** |
| 43 | + |
| 44 | +- Brief description of the application's technical nature |
| 45 | +- Technology stack summary |
| 46 | +- Architecture approach (monolith, microservices, etc.) |
| 47 | + |
| 48 | +### **Programming Language & Runtime** |
| 49 | + |
| 50 | +- Primary programming language and version |
| 51 | +- Runtime environment and version |
| 52 | +- Type system and language features used |
| 53 | + |
| 54 | +### **Frontend** |
| 55 | + |
| 56 | +- UI Framework/Library and version |
| 57 | +- Styling approach and frameworks |
| 58 | +- Component libraries and design systems |
| 59 | +- State management solutions |
| 60 | +- Build tools and bundlers |
| 61 | +- Browser support and compatibility |
| 62 | + |
| 63 | +### **Backend** |
| 64 | + |
| 65 | +- Backend framework and architecture |
| 66 | +- API design (REST, GraphQL, tRPC, etc.) |
| 67 | +- Authentication and authorization |
| 68 | +- Middleware and security |
| 69 | +- File handling and uploads |
| 70 | + |
| 71 | +### **Database & Storage** |
| 72 | + |
| 73 | +- Database type and version |
| 74 | +- ORM/Query builder |
| 75 | +- Schema management and migrations |
| 76 | +- Caching solutions |
| 77 | +- File storage solutions |
| 78 | +- Data backup and recovery |
| 79 | + |
| 80 | +### **Development Tools & Workflow** |
| 81 | + |
| 82 | +- Package manager |
| 83 | +- Code formatting and linting |
| 84 | +- Type checking and compilation |
| 85 | +- Testing frameworks and strategies |
| 86 | +- Development server and hot reload |
| 87 | +- Version control workflow |
| 88 | + |
| 89 | +### **Deployment & Infrastructure** |
| 90 | + |
| 91 | +- Hosting platform and services |
| 92 | +- Build and deployment pipeline |
| 93 | +- Environment configuration |
| 94 | +- Domain and DNS management |
| 95 | +- SSL/TLS and security |
| 96 | +- Monitoring and logging |
| 97 | + |
| 98 | +### **External Integrations** |
| 99 | + |
| 100 | +- Third-party APIs and services |
| 101 | +- Payment processing |
| 102 | +- Email services |
| 103 | +- Analytics and tracking |
| 104 | +- Error monitoring |
| 105 | +- Performance monitoring |
| 106 | + |
| 107 | +### **Quality Assurance & Testing** |
| 108 | + |
| 109 | +- Testing strategy and frameworks |
| 110 | +- Code coverage tools |
| 111 | +- End-to-end testing |
| 112 | +- Performance testing |
| 113 | +- Security testing |
| 114 | +- Code review process |
| 115 | + |
| 116 | +### **Project Structure** |
| 117 | + |
| 118 | +- Folder organization and conventions |
| 119 | +- Module system and imports |
| 120 | +- Configuration files |
| 121 | +- Environment variables |
| 122 | +- Build artifacts and outputs |
| 123 | + |
| 124 | +### **Schemas & Data Models** |
| 125 | + |
| 126 | +- Database schema (if applicable) |
| 127 | +- API schemas and validation |
| 128 | +- Type definitions and interfaces |
| 129 | +- Data relationships and constraints |
| 130 | + |
| 131 | +## Target Audience |
| 132 | + |
| 133 | +The document should serve: |
| 134 | + |
| 135 | +- **Developers** joining the project who need technical onboarding |
| 136 | +- **DevOps engineers** setting up infrastructure and deployment |
| 137 | +- **Technical architects** evaluating or improving the tech stack |
| 138 | +- **Security teams** understanding the technical landscape |
| 139 | +- **Future maintainers** who need to understand technical decisions |
| 140 | + |
| 141 | +The language should be technical, precise, and include specific version numbers and configuration details. |
| 142 | + |
| 143 | +## Key Principles |
| 144 | + |
| 145 | +1. **Technical Specificity:** Include exact versions, configuration details, and implementation specifics |
| 146 | +2. **Completeness:** Cover all major technical components and dependencies |
| 147 | +3. **Developer-Focused:** Emphasize how technologies are used and why they were chosen |
| 148 | +4. **Actionable:** Provide enough detail for setup, development, and deployment |
| 149 | +5. **Current:** Reflect the actual current state of the codebase |
| 150 | + |
| 151 | +## Output |
| 152 | + |
| 153 | +- **Format:** Markdown (`.md`) |
| 154 | +- **Location:** `.taskmaster/docs/` |
| 155 | +- **Filename:** `tech-stack.md` |
| 156 | + |
| 157 | +## Final Instructions |
| 158 | + |
| 159 | +1. Do NOT start implementing the document immediately |
| 160 | +2. First analyze the codebase thoroughly, examining package.json, config files, and code structure |
| 161 | +3. Ask clarifying questions with lettered/numbered options for easy selection |
| 162 | +4. Generate a complete technical document following the structure above |
| 163 | +5. Include specific versions, configuration examples, and technical details |
| 164 | +6. Focus on HOW things are implemented, complementing the high-level app-design-document |
| 165 | +7. After saving, suggest creating a complementary app-design-document if one doesn't exist |
0 commit comments