chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: "[framework] | --c4-model | --arc42 | --adr | --plantuml | --full-suite"
|
||||
description: Generate comprehensive architecture documentation with diagrams, ADRs, and interactive visualization
|
||||
---
|
||||
|
||||
# Architecture Documentation Generator
|
||||
|
||||
Generate comprehensive architecture documentation: $ARGUMENTS
|
||||
|
||||
## Current Architecture Context
|
||||
|
||||
- Project structure: !`find . -type f -name "*.json" -o -name "*.yaml" -o -name "*.toml" | head -5`
|
||||
- Documentation exists: @docs/ or @README.md (if exists)
|
||||
- Architecture files: !`find . -name "*architecture*" -o -name "*design*" -o -name "*.puml" | head -3`
|
||||
- Services/containers: @docker-compose.yml or @k8s/ (if exists)
|
||||
- API definitions: !`find . -name "*api*" -o -name "*openapi*" -o -name "*swagger*" | head -3`
|
||||
|
||||
## Task
|
||||
|
||||
Generate comprehensive architecture documentation with modern tooling and best practices:
|
||||
|
||||
1. **Architecture Analysis and Discovery**
|
||||
- Analyze current system architecture and component relationships
|
||||
- Identify key architectural patterns and design decisions
|
||||
- Document system boundaries, interfaces, and dependencies
|
||||
- Assess data flow and communication patterns
|
||||
- Identify architectural debt and improvement opportunities
|
||||
|
||||
2. **Architecture Documentation Framework**
|
||||
- Choose appropriate documentation framework and tools:
|
||||
- **C4 Model**: Context, Containers, Components, Code diagrams
|
||||
- **Arc42**: Comprehensive architecture documentation template
|
||||
- **Architecture Decision Records (ADRs)**: Decision documentation
|
||||
- **PlantUML/Mermaid**: Diagram-as-code documentation
|
||||
- **Structurizr**: C4 model tooling and visualization
|
||||
- **Draw.io/Lucidchart**: Visual diagramming tools
|
||||
|
||||
3. **System Context Documentation**
|
||||
- Create high-level system context diagrams
|
||||
- Document external systems and integrations
|
||||
- Define system boundaries and responsibilities
|
||||
- Document user personas and stakeholders
|
||||
- Create system landscape and ecosystem overview
|
||||
|
||||
4. **Container and Service Architecture**
|
||||
- Document container/service architecture and deployment view
|
||||
- Create service dependency maps and communication patterns
|
||||
- Document deployment architecture and infrastructure
|
||||
- Define service boundaries and API contracts
|
||||
- Document data persistence and storage architecture
|
||||
|
||||
5. **Component and Module Documentation**
|
||||
- Create detailed component architecture diagrams
|
||||
- Document internal module structure and relationships
|
||||
- Define component responsibilities and interfaces
|
||||
- Document design patterns and architectural styles
|
||||
- Create code organization and package structure documentation
|
||||
|
||||
6. **Data Architecture Documentation**
|
||||
- Document data models and database schemas
|
||||
- Create data flow diagrams and processing pipelines
|
||||
- Document data storage strategies and technologies
|
||||
- Define data governance and lifecycle management
|
||||
- Create data integration and synchronization documentation
|
||||
|
||||
7. **Security and Compliance Architecture**
|
||||
- Document security architecture and threat model
|
||||
- Create authentication and authorization flow diagrams
|
||||
- Document compliance requirements and controls
|
||||
- Define security boundaries and trust zones
|
||||
- Create incident response and security monitoring documentation
|
||||
|
||||
8. **Quality Attributes and Cross-Cutting Concerns**
|
||||
- Document performance characteristics and scalability patterns
|
||||
- Create reliability and availability architecture documentation
|
||||
- Document monitoring and observability architecture
|
||||
- Define maintainability and evolution strategies
|
||||
- Create disaster recovery and business continuity documentation
|
||||
|
||||
9. **Architecture Decision Records (ADRs)**
|
||||
- Create comprehensive ADR template and process
|
||||
- Document historical architectural decisions and rationale
|
||||
- Create decision tracking and review process
|
||||
- Document trade-offs and alternatives considered
|
||||
- Set up ADR maintenance and evolution procedures
|
||||
|
||||
10. **Documentation Automation and Maintenance**
|
||||
- Set up automated diagram generation from code annotations
|
||||
- Configure documentation pipeline and publishing automation
|
||||
- Set up documentation validation and consistency checking
|
||||
- Create documentation review and approval process
|
||||
- Train team on architecture documentation practices and tools
|
||||
- Set up documentation versioning and change management
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [role-type] | --developer | --designer | --devops | --comprehensive | --interactive
|
||||
description: Create comprehensive developer onboarding guide with environment setup, workflows, and interactive tutorials
|
||||
---
|
||||
|
||||
# Developer Onboarding Guide Generator
|
||||
|
||||
Create developer onboarding guide: $ARGUMENTS
|
||||
|
||||
## Current Team Context
|
||||
|
||||
- Project setup: @package.json or @requirements.txt or @Cargo.toml (detect tech stack)
|
||||
- Existing docs: @docs/ or @README.md (if exists)
|
||||
- Development tools: !`find . -name ".env*" -o -name "docker-compose.yml" -o -name "Makefile" | head -3`
|
||||
- Team structure: @CODEOWNERS or @.github/ (if exists)
|
||||
- CI/CD setup: !`find .github/workflows -name "*.yml" 2>/dev/null | head -3`
|
||||
|
||||
## Task
|
||||
|
||||
Create comprehensive onboarding experience tailored to role and project needs:
|
||||
|
||||
1. **Onboarding Requirements Analysis**
|
||||
- Analyze current team structure and skill requirements
|
||||
- Identify key knowledge areas and learning objectives
|
||||
- Assess current onboarding challenges and pain points
|
||||
- Define onboarding timeline and milestone expectations
|
||||
- Document role-specific requirements and responsibilities
|
||||
|
||||
2. **Development Environment Setup Guide**
|
||||
- Create comprehensive development environment setup instructions
|
||||
- Document required tools, software, and system requirements
|
||||
- Provide step-by-step installation and configuration guides
|
||||
- Create environment validation and troubleshooting procedures
|
||||
- Set up automated environment setup scripts and tools
|
||||
|
||||
3. **Project and Codebase Overview**
|
||||
- Create high-level project overview and business context
|
||||
- Document system architecture and technology stack
|
||||
- Provide codebase structure and organization guide
|
||||
- Create code navigation and exploration guidelines
|
||||
- Document key modules, libraries, and frameworks used
|
||||
|
||||
4. **Development Workflow Documentation**
|
||||
- Document version control workflows and branching strategies
|
||||
- Create code review process and quality standards guide
|
||||
- Document testing practices and requirements
|
||||
- Provide deployment and release process overview
|
||||
- Create issue tracking and project management workflow guide
|
||||
|
||||
5. **Team Communication and Collaboration**
|
||||
- Document team communication channels and protocols
|
||||
- Create meeting schedules and participation guidelines
|
||||
- Provide team contact information and org chart
|
||||
- Document collaboration tools and access procedures
|
||||
- Create escalation procedures and support contacts
|
||||
|
||||
6. **Learning Resources and Training Materials**
|
||||
- Curate learning resources for project-specific technologies
|
||||
- Create hands-on tutorials and coding exercises
|
||||
- Provide links to documentation, wikis, and knowledge bases
|
||||
- Create video tutorials and screen recordings
|
||||
- Set up mentoring and buddy system procedures
|
||||
|
||||
7. **First Tasks and Milestones**
|
||||
- Create progressive difficulty task assignments
|
||||
- Define learning milestones and checkpoints
|
||||
- Provide "good first issues" and starter projects
|
||||
- Create hands-on coding challenges and exercises
|
||||
- Set up pair programming and shadowing opportunities
|
||||
|
||||
8. **Security and Compliance Training**
|
||||
- Document security policies and access controls
|
||||
- Create data handling and privacy guidelines
|
||||
- Provide compliance training and certification requirements
|
||||
- Document incident response and security procedures
|
||||
- Create security best practices and guidelines
|
||||
|
||||
9. **Tools and Resources Access**
|
||||
- Document required accounts and access requests
|
||||
- Create tool-specific setup and usage guides
|
||||
- Provide license and subscription information
|
||||
- Document VPN and network access procedures
|
||||
- Create troubleshooting guides for common access issues
|
||||
|
||||
10. **Feedback and Continuous Improvement**
|
||||
- Create onboarding feedback collection process
|
||||
- Set up regular check-ins and progress reviews
|
||||
- Document common questions and FAQ section
|
||||
- Create onboarding metrics and success tracking
|
||||
- Establish onboarding guide maintenance and update procedures
|
||||
- Set up new hire success monitoring and support systems
|
||||
@@ -0,0 +1,241 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [api-type] | --openapi | --graphql | --rest | --grpc | --interactive
|
||||
description: Generate comprehensive API documentation from code with interactive examples and testing capabilities
|
||||
---
|
||||
|
||||
# API Documentation Generator
|
||||
|
||||
Generate API documentation from code: $ARGUMENTS
|
||||
|
||||
## Current API Context
|
||||
|
||||
- API endpoints: !`find . -name "*route*" -o -name "*controller*" -o -name "*api*" | head -5`
|
||||
- API specs: !`find . -name "*openapi*" -o -name "*swagger*" -o -name "*.graphql" | head -3`
|
||||
- Server framework: @package.json or detect from imports
|
||||
- Existing docs: @docs/api/ or @api-docs/ (if exists)
|
||||
- Test files: !`find . -name "*test*" -path "*/api/*" | head -3`
|
||||
|
||||
## Task
|
||||
|
||||
Generate comprehensive API documentation with interactive features: $ARGUMENTS
|
||||
|
||||
1. **Code Analysis and Discovery**
|
||||
- Scan the codebase for API endpoints, routes, and handlers
|
||||
- Identify REST APIs, GraphQL schemas, and RPC services
|
||||
- Map out controller classes, route definitions, and middleware
|
||||
- Discover request/response models and data structures
|
||||
|
||||
2. **Documentation Tool Selection**
|
||||
- Choose appropriate documentation tools based on stack:
|
||||
- **OpenAPI/Swagger**: REST APIs with interactive documentation
|
||||
- **GraphQL**: GraphiQL, GraphQL Playground, or Apollo Studio
|
||||
- **Postman**: API collections and documentation
|
||||
- **Insomnia**: API design and documentation
|
||||
- **Redoc**: Alternative OpenAPI renderer
|
||||
- **API Blueprint**: Markdown-based API documentation
|
||||
|
||||
3. **API Specification Generation**
|
||||
|
||||
**For REST APIs with OpenAPI:**
|
||||
```yaml
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: $ARGUMENTS API
|
||||
version: 1.0.0
|
||||
description: Comprehensive API for $ARGUMENTS
|
||||
servers:
|
||||
- url: https://api.example.com/v1
|
||||
paths:
|
||||
/users:
|
||||
get:
|
||||
summary: List users
|
||||
parameters:
|
||||
- name: page
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/User'
|
||||
components:
|
||||
schemas:
|
||||
User:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
```
|
||||
|
||||
4. **Endpoint Documentation**
|
||||
- Document all HTTP methods (GET, POST, PUT, DELETE, PATCH)
|
||||
- Specify request parameters (path, query, header, body)
|
||||
- Define response schemas and status codes
|
||||
- Include error responses and error codes
|
||||
- Document authentication and authorization requirements
|
||||
|
||||
5. **Request/Response Examples**
|
||||
- Provide realistic request examples for each endpoint
|
||||
- Include sample response data with proper formatting
|
||||
- Show different response scenarios (success, error, edge cases)
|
||||
- Document content types and encoding
|
||||
|
||||
6. **Authentication Documentation**
|
||||
- Document authentication methods (API keys, JWT, OAuth)
|
||||
- Explain authorization scopes and permissions
|
||||
- Provide authentication examples and token formats
|
||||
- Document session management and refresh token flows
|
||||
|
||||
7. **Data Model Documentation**
|
||||
- Define all data schemas and models
|
||||
- Document field types, constraints, and validation rules
|
||||
- Include relationships between entities
|
||||
- Provide example data structures
|
||||
|
||||
8. **Error Handling Documentation**
|
||||
- Document all possible error responses
|
||||
- Explain error codes and their meanings
|
||||
- Provide troubleshooting guidance
|
||||
- Include rate limiting and throttling information
|
||||
|
||||
9. **Interactive Documentation Setup**
|
||||
|
||||
**Swagger UI Integration:**
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>API Documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="./swagger-ui-bundle.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
<script src="./swagger-ui-bundle.js"></script>
|
||||
<script>
|
||||
SwaggerUIBundle({
|
||||
url: './api-spec.yaml',
|
||||
dom_id: '#swagger-ui'
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
10. **Code Annotation and Comments**
|
||||
- Add inline documentation to API handlers
|
||||
- Use framework-specific annotation tools:
|
||||
- **Java**: @ApiOperation, @ApiParam (Swagger annotations)
|
||||
- **Python**: Docstrings with FastAPI or Flask-RESTX
|
||||
- **Node.js**: JSDoc comments with swagger-jsdoc
|
||||
- **C#**: XML documentation comments
|
||||
|
||||
11. **Automated Documentation Generation**
|
||||
|
||||
**For Node.js/Express:**
|
||||
```javascript
|
||||
const swaggerJsdoc = require('swagger-jsdoc');
|
||||
const swaggerUi = require('swagger-ui-express');
|
||||
|
||||
const options = {
|
||||
definition: {
|
||||
openapi: '3.0.0',
|
||||
info: {
|
||||
title: 'API Documentation',
|
||||
version: '1.0.0',
|
||||
},
|
||||
},
|
||||
apis: ['./routes/*.js'],
|
||||
};
|
||||
|
||||
const specs = swaggerJsdoc(options);
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(specs));
|
||||
```
|
||||
|
||||
12. **Testing Integration**
|
||||
- Generate API test collections from documentation
|
||||
- Include test scripts and validation rules
|
||||
- Set up automated API testing
|
||||
- Document test scenarios and expected outcomes
|
||||
|
||||
13. **Version Management**
|
||||
- Document API versioning strategy
|
||||
- Maintain documentation for multiple API versions
|
||||
- Document deprecation timelines and migration guides
|
||||
- Track breaking changes between versions
|
||||
|
||||
14. **Performance Documentation**
|
||||
- Document rate limits and throttling policies
|
||||
- Include performance benchmarks and SLAs
|
||||
- Document caching strategies and headers
|
||||
- Explain pagination and filtering options
|
||||
|
||||
15. **SDK and Client Library Documentation**
|
||||
- Generate client libraries from API specifications
|
||||
- Document SDK usage and examples
|
||||
- Provide quickstart guides for different languages
|
||||
- Include integration examples and best practices
|
||||
|
||||
16. **Environment-Specific Documentation**
|
||||
- Document different environments (dev, staging, prod)
|
||||
- Include environment-specific endpoints and configurations
|
||||
- Document deployment and configuration requirements
|
||||
- Provide environment setup instructions
|
||||
|
||||
17. **Security Documentation**
|
||||
- Document security best practices
|
||||
- Include CORS and CSP policies
|
||||
- Document input validation and sanitization
|
||||
- Explain security headers and their purposes
|
||||
|
||||
18. **Maintenance and Updates**
|
||||
- Set up automated documentation updates
|
||||
- Create processes for keeping documentation current
|
||||
- Review and validate documentation regularly
|
||||
- Integrate documentation reviews into development workflow
|
||||
|
||||
**Framework-Specific Examples:**
|
||||
|
||||
**FastAPI (Python):**
|
||||
```python
|
||||
from fastapi import FastAPI
|
||||
from pydantic import BaseModel
|
||||
|
||||
app = FastAPI(title="My API", version="1.0.0")
|
||||
|
||||
class User(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
email: str
|
||||
|
||||
@app.get("/users/{user_id}", response_model=User)
|
||||
async def get_user(user_id: int):
|
||||
"""Get a user by ID."""
|
||||
return {"id": user_id, "name": "John", "email": "john@example.com"}
|
||||
```
|
||||
|
||||
**Spring Boot (Java):**
|
||||
```java
|
||||
@RestController
|
||||
@Api(tags = "Users")
|
||||
public class UserController {
|
||||
|
||||
@GetMapping("/users/{id}")
|
||||
@ApiOperation(value = "Get user by ID")
|
||||
public ResponseEntity<User> getUser(
|
||||
@PathVariable @ApiParam("User ID") Long id) {
|
||||
// Implementation
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Remember to keep documentation up-to-date with code changes and make it easily accessible to both internal teams and external consumers.
|
||||
@@ -0,0 +1,118 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash, Grep
|
||||
argument-hint: [maintenance-type] | --audit | --update | --validate | --optimize | --comprehensive
|
||||
description: Use PROACTIVELY to implement comprehensive documentation maintenance systems with quality assurance, validation, and automated updates
|
||||
---
|
||||
|
||||
# Documentation Maintenance & Quality Assurance
|
||||
|
||||
Implement comprehensive documentation maintenance system: $ARGUMENTS
|
||||
|
||||
## Current Documentation Health
|
||||
|
||||
- Documentation files: !`find . -name "*.md" -o -name "*.mdx" | wc -l` files
|
||||
- Last updates: !`find . -name "*.md" -exec stat -f "%m %N" {} \; | sort -n | tail -5`
|
||||
- External links: !`grep -r "http" --include="*.md" . | wc -l` links to validate
|
||||
- Image references: !`grep -r "!\[.*\]" --include="*.md" . | wc -l` images to check
|
||||
- Documentation structure: @docs/ or detect documentation directories
|
||||
|
||||
## Task
|
||||
|
||||
Create systematic documentation maintenance framework with automated quality assurance, comprehensive validation, content optimization, and regular update procedures.
|
||||
|
||||
## Documentation Maintenance Framework
|
||||
|
||||
### 1. Content Quality Audit System
|
||||
- Comprehensive file discovery and categorization
|
||||
- Content freshness analysis and aging detection
|
||||
- Word count, readability, and structure assessment
|
||||
- Missing sections and incomplete documentation identification
|
||||
- TODO/FIXME marker tracking and resolution planning
|
||||
|
||||
### 2. Link and Reference Validation
|
||||
- External link health monitoring with retry logic
|
||||
- Internal link validation and broken reference detection
|
||||
- Image reference verification and missing asset identification
|
||||
- Cross-reference consistency checking
|
||||
- Automated link correction suggestions
|
||||
|
||||
### 3. Style and Consistency Checking
|
||||
- Markdown syntax validation and formatting standards
|
||||
- Heading hierarchy and structure consistency
|
||||
- List formatting and emphasis style uniformity
|
||||
- Code block formatting and language specification
|
||||
- Accessibility compliance (alt text, descriptive links)
|
||||
|
||||
### 4. Content Optimization and Enhancement
|
||||
- Table of contents generation for long documents
|
||||
- Metadata updating and frontmatter management
|
||||
- Common formatting issue correction
|
||||
- Spelling and grammar validation
|
||||
- Readability analysis and improvement suggestions
|
||||
|
||||
### 5. Automated Synchronization System
|
||||
- Git-based change tracking and documentation updates
|
||||
- Version control integration with branch management
|
||||
- Automated commit generation with detailed change logs
|
||||
- Merge conflict resolution strategies
|
||||
- Rollback procedures for failed updates
|
||||
|
||||
### 6. Quality Assurance Reporting
|
||||
- Comprehensive audit reports with severity classifications
|
||||
- Issue categorization and prioritization systems
|
||||
- Progress tracking and maintenance metrics
|
||||
- Automated notification systems for critical issues
|
||||
- Dashboard creation for ongoing monitoring
|
||||
|
||||
## Implementation Requirements
|
||||
|
||||
### Audit Configuration
|
||||
- Configurable quality thresholds and validation rules
|
||||
- Custom style guide integration and enforcement
|
||||
- Platform-specific optimization settings
|
||||
- Team collaboration workflow integration
|
||||
- Automated scheduling and recurring maintenance
|
||||
|
||||
### Validation Processes
|
||||
- Multi-level validation with error categorization
|
||||
- Batch processing for large documentation sets
|
||||
- Performance optimization for comprehensive scans
|
||||
- Integration with existing CI/CD pipelines
|
||||
- Real-time monitoring and alerting systems
|
||||
|
||||
### Reporting and Analytics
|
||||
- Detailed maintenance reports with actionable insights
|
||||
- Historical trend analysis and improvement tracking
|
||||
- Team productivity metrics and documentation health scores
|
||||
- Integration with project management tools
|
||||
- Automated stakeholder communication
|
||||
|
||||
## Deliverables
|
||||
|
||||
1. **Maintenance System Architecture**
|
||||
- Automated audit and validation framework
|
||||
- Content optimization and enhancement tools
|
||||
- Quality assurance reporting infrastructure
|
||||
- Version control integration and synchronization
|
||||
|
||||
2. **Validation and Quality Tools**
|
||||
- Link checking and reference validation systems
|
||||
- Style consistency and accessibility compliance tools
|
||||
- Content freshness and completeness analyzers
|
||||
- Automated correction and enhancement utilities
|
||||
|
||||
3. **Reporting and Monitoring**
|
||||
- Comprehensive audit reports with prioritized recommendations
|
||||
- Real-time monitoring dashboards and alert systems
|
||||
- Progress tracking and maintenance history documentation
|
||||
- Integration with team communication and project tools
|
||||
|
||||
4. **Documentation and Procedures**
|
||||
- Implementation guidelines and configuration instructions
|
||||
- Team workflow integration and collaboration procedures
|
||||
- Troubleshooting guides and maintenance best practices
|
||||
- Automated scheduling and recurring maintenance setup
|
||||
|
||||
## Integration Guidelines
|
||||
|
||||
Implement with existing documentation platforms and development workflows. Ensure scalability for large documentation sets and team collaboration while maintaining quality standards and accessibility compliance.
|
||||
@@ -0,0 +1,96 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [output-format] | --swagger-ui | --redoc | --postman | --insomnia | --multi-format
|
||||
description: Auto-generate API reference documentation with multiple output formats and automated deployment
|
||||
---
|
||||
|
||||
# Automated API Documentation Generator
|
||||
|
||||
Auto-generate API reference documentation: $ARGUMENTS
|
||||
|
||||
## Current API Infrastructure
|
||||
|
||||
- Code annotations: !`grep -r "@api\|@swagger\|@doc" src/ 2>/dev/null | wc -l` annotations found
|
||||
- API framework: @package.json or detect from imports
|
||||
- Existing specs: !`find . -name "*spec*.yaml" -o -name "*spec*.json" | head -3`
|
||||
- Documentation tools: !`grep -E "swagger|redoc|postman" package.json 2>/dev/null || echo "None detected"`
|
||||
- CI/CD pipeline: @.github/workflows/ (if exists)
|
||||
|
||||
## Task
|
||||
|
||||
Setup automated API documentation generation with modern tooling:
|
||||
|
||||
1. **API Documentation Strategy Analysis**
|
||||
- Analyze current API structure and endpoints
|
||||
- Identify documentation requirements (REST, GraphQL, gRPC, etc.)
|
||||
- Assess existing code annotations and documentation
|
||||
- Determine documentation output formats and hosting requirements
|
||||
- Plan documentation automation and maintenance strategy
|
||||
|
||||
2. **Documentation Tool Selection**
|
||||
- Choose appropriate API documentation tools:
|
||||
- **OpenAPI/Swagger**: REST API documentation with Swagger UI
|
||||
- **Redoc**: Modern OpenAPI documentation renderer
|
||||
- **GraphQL**: GraphiQL, Apollo Studio, GraphQL Playground
|
||||
- **Postman**: API documentation with collections
|
||||
- **Insomnia**: API documentation and testing
|
||||
- **API Blueprint**: Markdown-based API documentation
|
||||
- **JSDoc/TSDoc**: Code-first documentation generation
|
||||
- Consider factors: API type, team workflow, hosting, interactivity
|
||||
|
||||
3. **Code Annotation and Schema Definition**
|
||||
- Add comprehensive code annotations for API endpoints
|
||||
- Define request/response schemas and data models
|
||||
- Add parameter descriptions and validation rules
|
||||
- Document authentication and authorization requirements
|
||||
- Add example requests and responses
|
||||
|
||||
4. **API Specification Generation**
|
||||
- Set up automated API specification generation from code
|
||||
- Configure OpenAPI/Swagger specification generation
|
||||
- Set up schema validation and consistency checking
|
||||
- Configure API versioning and changelog generation
|
||||
- Set up specification file management and version control
|
||||
|
||||
5. **Interactive Documentation Setup**
|
||||
- Configure interactive API documentation with try-it-out functionality
|
||||
- Set up API testing and example execution
|
||||
- Configure authentication handling in documentation
|
||||
- Set up request/response validation and examples
|
||||
- Configure API endpoint categorization and organization
|
||||
|
||||
6. **Documentation Content Enhancement**
|
||||
- Add comprehensive API guides and tutorials
|
||||
- Create authentication and authorization documentation
|
||||
- Add error handling and status code documentation
|
||||
- Create SDK and client library documentation
|
||||
- Add rate limiting and usage guidelines
|
||||
|
||||
7. **Documentation Hosting and Deployment**
|
||||
- Set up documentation hosting and deployment
|
||||
- Configure documentation website generation and styling
|
||||
- Set up custom domain and SSL configuration
|
||||
- Configure documentation search and navigation
|
||||
- Set up documentation analytics and usage tracking
|
||||
|
||||
8. **Automation and CI/CD Integration**
|
||||
- Configure automated documentation generation in CI/CD pipeline
|
||||
- Set up documentation deployment automation
|
||||
- Configure documentation validation and quality checks
|
||||
- Set up documentation change detection and notifications
|
||||
- Configure documentation testing and link validation
|
||||
|
||||
9. **Multi-format Documentation Generation**
|
||||
- Generate documentation in multiple formats (HTML, PDF, Markdown)
|
||||
- Set up downloadable documentation packages
|
||||
- Configure offline documentation access
|
||||
- Set up documentation API for programmatic access
|
||||
- Configure documentation syndication and distribution
|
||||
|
||||
10. **Maintenance and Quality Assurance**
|
||||
- Set up documentation quality monitoring and validation
|
||||
- Configure documentation feedback and improvement workflows
|
||||
- Set up documentation analytics and usage metrics
|
||||
- Create documentation maintenance procedures and guidelines
|
||||
- Train team on documentation best practices and tools
|
||||
- Set up documentation review and approval processes
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [platform] | --docusaurus | --gitbook | --notion | --storybook | --jupyter | --comprehensive
|
||||
description: Use PROACTIVELY to create interactive documentation platforms with live examples, code playgrounds, and user engagement features
|
||||
---
|
||||
|
||||
# Interactive Documentation Platform
|
||||
|
||||
Create interactive documentation with live examples: $ARGUMENTS
|
||||
|
||||
## Current Documentation Infrastructure
|
||||
|
||||
- Static site generators: !`find . -name "docusaurus.config.js" -o -name "gatsby-config.js" -o -name "_config.yml" | head -3`
|
||||
- Documentation framework: @docs/ or @website/ (detect existing setup)
|
||||
- Component libraries: !`find . -name "*.stories.*" | head -5` (Storybook detection)
|
||||
- Interactive examples: !`find . -name "*.ipynb" -o -name "*playground*" | head -3`
|
||||
- Hosting setup: @vercel.json or @netlify.toml or @.github/workflows/ (if exists)
|
||||
|
||||
## Task
|
||||
|
||||
Build comprehensive interactive documentation platform with live code examples, user engagement features, and multi-platform integration capabilities.
|
||||
|
||||
## Interactive Documentation Architecture
|
||||
|
||||
### 1. Platform Foundation and Configuration
|
||||
- Documentation platform selection and optimization setup
|
||||
- Theme customization and branding configuration
|
||||
- Navigation structure and content organization
|
||||
- Multi-language support and internationalization
|
||||
- Search integration with advanced filtering and indexing
|
||||
|
||||
### 2. Live Code Playground Integration
|
||||
- Interactive code editor with syntax highlighting
|
||||
- Real-time code execution and preview capabilities
|
||||
- Multi-language support and framework integration
|
||||
- Error handling and debugging assistance
|
||||
- Code sharing and collaboration features
|
||||
|
||||
### 3. API Documentation and Testing
|
||||
- Interactive API endpoint exploration
|
||||
- Live request/response testing capabilities
|
||||
- Parameter validation and example generation
|
||||
- Authentication flow integration
|
||||
- Response schema visualization and validation
|
||||
|
||||
### 4. Interactive Tutorial System
|
||||
- Step-by-step guided learning experiences
|
||||
- Progress tracking and completion validation
|
||||
- Hands-on coding exercises with instant feedback
|
||||
- Adaptive learning paths based on user progress
|
||||
- Gamification elements and achievement systems
|
||||
|
||||
### 5. Component Documentation Integration
|
||||
- Live component playground with property controls
|
||||
- Visual component gallery with interactive examples
|
||||
- Design system integration and style guide generation
|
||||
- Accessibility testing and compliance validation
|
||||
- Cross-browser compatibility testing
|
||||
|
||||
### 6. User Engagement and Feedback Systems
|
||||
- Rating and review collection mechanisms
|
||||
- User feedback aggregation and analysis
|
||||
- Community discussion and Q&A integration
|
||||
- Usage analytics and behavior tracking
|
||||
- Personalization and recommendation systems
|
||||
|
||||
### 7. Content Management and Publishing
|
||||
- Version control integration with automated publishing
|
||||
- Content review and approval workflows
|
||||
- Multi-author collaboration and editing
|
||||
- Content scheduling and automated updates
|
||||
- SEO optimization and metadata management
|
||||
|
||||
### 8. Advanced Interactive Features
|
||||
- Advanced search with faceted filtering and suggestions
|
||||
- Interactive diagrams and visualization tools
|
||||
- Embedded video content and multimedia integration
|
||||
- Mobile-responsive design and offline capabilities
|
||||
- Progressive web app features and notifications
|
||||
|
||||
## Implementation Requirements
|
||||
|
||||
### Platform Integration
|
||||
- Multi-framework support (React, Vue, Angular, vanilla JS)
|
||||
- Build system integration with automated deployment
|
||||
- Content management system compatibility
|
||||
- Third-party service integration (analytics, feedback, search)
|
||||
- Performance optimization and bundle splitting
|
||||
|
||||
### User Experience Design
|
||||
- Responsive design across all device types
|
||||
- Accessibility compliance (WCAG 2.1 AA standards)
|
||||
- Progressive enhancement for feature degradation
|
||||
- Fast loading times and optimal Core Web Vitals
|
||||
- Intuitive navigation and content discovery
|
||||
|
||||
### Technical Infrastructure
|
||||
- Scalable hosting and CDN configuration
|
||||
- Database integration for user data and analytics
|
||||
- API design for external integrations
|
||||
- Security implementation and user authentication
|
||||
- Monitoring and error tracking systems
|
||||
|
||||
## Deliverables
|
||||
|
||||
1. **Interactive Platform Architecture**
|
||||
- Complete documentation platform setup and configuration
|
||||
- Live code playground and API testing integration
|
||||
- Interactive tutorial system with progress tracking
|
||||
- Component documentation with visual examples
|
||||
|
||||
2. **User Engagement Systems**
|
||||
- Feedback collection and analysis mechanisms
|
||||
- User analytics and behavior tracking implementation
|
||||
- Community features and discussion integration
|
||||
- Personalization and recommendation engines
|
||||
|
||||
3. **Content Management Framework**
|
||||
- Automated publishing and deployment pipelines
|
||||
- Multi-author collaboration and review workflows
|
||||
- Version control integration with change tracking
|
||||
- SEO optimization and metadata management
|
||||
|
||||
4. **Performance and Optimization**
|
||||
- Mobile-responsive design with offline capabilities
|
||||
- Performance monitoring and optimization implementation
|
||||
- Accessibility compliance and testing frameworks
|
||||
- Progressive web app features and service workers
|
||||
|
||||
## Integration Guidelines
|
||||
|
||||
Implement with modern documentation platforms and development workflows. Ensure scalability for large content repositories and team collaboration while maintaining optimal performance and user experience across all devices and platforms.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
allowed-tools: Bash, WebFetch
|
||||
argument-hint: [data-source] | --xatu | --custom-url | --validate
|
||||
description: Load and process external documentation context from llms.txt files or custom sources
|
||||
---
|
||||
|
||||
# External Documentation Context Loader
|
||||
|
||||
Load external documentation context: $ARGUMENTS
|
||||
|
||||
## Current Context Status
|
||||
|
||||
- Network access: !`curl -s --connect-timeout 5 https://httpbin.org/status/200 >/dev/null && echo "✅ Available" || echo "❌ Limited"`
|
||||
- Existing context: Check for local llms.txt or documentation cache
|
||||
- Project type: @package.json or @README.md (detect project context needs)
|
||||
|
||||
## Task
|
||||
|
||||
Load and process external documentation context from specified source.
|
||||
|
||||
### Default Action (Xatu Data)
|
||||
Load the llms.txt file from Xatu data repository:
|
||||
```bash
|
||||
curl -s https://raw.githubusercontent.com/ethpandaops/xatu-data/refs/heads/master/llms.txt
|
||||
```
|
||||
|
||||
### Custom Source Loading
|
||||
For custom URLs or alternative documentation sources:
|
||||
- Validate URL accessibility
|
||||
- Download and cache content
|
||||
- Process and structure information
|
||||
- Integration with project context
|
||||
|
||||
### Processing Options
|
||||
- **Raw loading**: Direct content retrieval
|
||||
- **Validation**: Check content format and structure
|
||||
- **Integration**: Merge with existing project documentation
|
||||
- **Caching**: Store locally for offline access
|
||||
@@ -0,0 +1,249 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [migration-type] | framework | database | cloud | architecture | --version-upgrade
|
||||
description: Create comprehensive migration guides with step-by-step procedures, validation, and rollback strategies
|
||||
---
|
||||
|
||||
# Migration Guide Generator
|
||||
|
||||
Create comprehensive migration guide: $ARGUMENTS
|
||||
|
||||
## Current System Analysis
|
||||
|
||||
- Current versions: @package.json or @requirements.txt or detect from lock files
|
||||
- Migration history: !`find . -name "*migration*" -o -name "*upgrade*" | head -5`
|
||||
- Database schema: !`find . -name "*schema*" -o -name "*.sql" | head -3`
|
||||
- Dependencies: !`grep -c "dependency\|require\|import" package.json requirements.txt 2>/dev/null || echo "0"`
|
||||
- Infrastructure: @docker-compose.yml or @k8s/ or @terraform/ (if exists)
|
||||
|
||||
## Task
|
||||
|
||||
Generate systematic migration guide with comprehensive safety measures: $ARGUMENTS
|
||||
|
||||
1. **Migration Scope Analysis**
|
||||
- Identify what is being migrated (framework, library, architecture, etc.)
|
||||
- Determine source and target versions or technologies
|
||||
- Assess the scale and complexity of the migration
|
||||
- Identify affected systems and components
|
||||
|
||||
2. **Impact Assessment**
|
||||
- Analyze breaking changes between versions
|
||||
- Identify deprecated features and APIs
|
||||
- Review new features and capabilities
|
||||
- Assess compatibility requirements and constraints
|
||||
- Evaluate performance and security implications
|
||||
|
||||
3. **Prerequisites and Requirements**
|
||||
- Document system requirements for the target version
|
||||
- List required tools and dependencies
|
||||
- Specify minimum versions and compatibility requirements
|
||||
- Identify necessary skills and team preparation
|
||||
- Outline infrastructure and environment needs
|
||||
|
||||
4. **Pre-Migration Preparation**
|
||||
- Create comprehensive backup strategies
|
||||
- Set up development and testing environments
|
||||
- Document current system state and configurations
|
||||
- Establish rollback procedures and contingency plans
|
||||
- Create migration timeline and milestones
|
||||
|
||||
5. **Step-by-Step Migration Process**
|
||||
|
||||
**Example for Framework Upgrade:**
|
||||
```markdown
|
||||
## Step 1: Environment Setup
|
||||
1. Update development environment
|
||||
2. Install new framework version
|
||||
3. Update build tools and dependencies
|
||||
4. Configure IDE and tooling
|
||||
|
||||
## Step 2: Dependencies Update
|
||||
1. Update package.json/requirements.txt
|
||||
2. Resolve dependency conflicts
|
||||
3. Update related libraries
|
||||
4. Test compatibility
|
||||
|
||||
## Step 3: Code Migration
|
||||
1. Update import statements
|
||||
2. Replace deprecated APIs
|
||||
3. Update configuration files
|
||||
4. Modify build scripts
|
||||
```
|
||||
|
||||
6. **Breaking Changes Documentation**
|
||||
- List all breaking changes with examples
|
||||
- Provide before/after code comparisons
|
||||
- Explain the rationale behind changes
|
||||
- Offer alternative approaches for removed features
|
||||
|
||||
**Example Breaking Change:**
|
||||
```markdown
|
||||
### Removed: `oldMethod()`
|
||||
**Before:**
|
||||
```javascript
|
||||
const result = library.oldMethod(param1, param2);
|
||||
```
|
||||
|
||||
**After:**
|
||||
```javascript
|
||||
const result = library.newMethod({
|
||||
param1: param1,
|
||||
param2: param2
|
||||
});
|
||||
```
|
||||
|
||||
**Rationale:** Improved type safety and extensibility
|
||||
```
|
||||
|
||||
7. **Configuration Changes**
|
||||
- Document configuration file updates
|
||||
- Explain new configuration options
|
||||
- Provide configuration migration scripts
|
||||
- Show environment-specific configurations
|
||||
|
||||
8. **Database Migration (if applicable)**
|
||||
- Create database schema migration scripts
|
||||
- Document data transformation requirements
|
||||
- Provide backup and restore procedures
|
||||
- Test migration with sample data
|
||||
- Plan for zero-downtime migrations
|
||||
|
||||
9. **Testing Strategy**
|
||||
- Update existing tests for new APIs
|
||||
- Create migration-specific test cases
|
||||
- Implement integration and E2E tests
|
||||
- Set up performance and load testing
|
||||
- Document test scenarios and expected outcomes
|
||||
|
||||
10. **Performance Considerations**
|
||||
- Document performance changes and optimizations
|
||||
- Provide benchmarking guidelines
|
||||
- Identify potential performance regressions
|
||||
- Suggest monitoring and alerting updates
|
||||
- Include memory and resource usage changes
|
||||
|
||||
11. **Security Updates**
|
||||
- Document security improvements and changes
|
||||
- Update authentication and authorization code
|
||||
- Review and update security configurations
|
||||
- Update dependency security scanning
|
||||
- Document new security best practices
|
||||
|
||||
12. **Deployment Strategy**
|
||||
- Plan phased rollout approach
|
||||
- Create deployment scripts and automation
|
||||
- Set up monitoring and health checks
|
||||
- Plan for blue-green or canary deployments
|
||||
- Document rollback procedures
|
||||
|
||||
13. **Common Issues and Troubleshooting**
|
||||
|
||||
```markdown
|
||||
## Common Migration Issues
|
||||
|
||||
### Issue: Import/Module Resolution Errors
|
||||
**Symptoms:** Cannot resolve module 'old-package'
|
||||
**Solution:**
|
||||
1. Update import statements to new package names
|
||||
2. Check package.json for correct dependencies
|
||||
3. Clear node_modules and reinstall
|
||||
|
||||
### Issue: API Method Not Found
|
||||
**Symptoms:** TypeError: oldMethod is not a function
|
||||
**Solution:** Replace with new API as documented in step 3
|
||||
```
|
||||
|
||||
14. **Team Communication and Training**
|
||||
- Create team training materials
|
||||
- Schedule knowledge sharing sessions
|
||||
- Document new development workflows
|
||||
- Update coding standards and guidelines
|
||||
- Create quick reference guides
|
||||
|
||||
15. **Tools and Automation**
|
||||
- Provide migration scripts and utilities
|
||||
- Create code transformation tools (codemods)
|
||||
- Set up automated compatibility checks
|
||||
- Implement CI/CD pipeline updates
|
||||
- Create validation and verification tools
|
||||
|
||||
16. **Timeline and Milestones**
|
||||
|
||||
```markdown
|
||||
## Migration Timeline
|
||||
|
||||
### Phase 1: Preparation (Week 1-2)
|
||||
- [ ] Environment setup
|
||||
- [ ] Team training
|
||||
- [ ] Development environment migration
|
||||
|
||||
### Phase 2: Development (Week 3-6)
|
||||
- [ ] Core application migration
|
||||
- [ ] Testing and validation
|
||||
- [ ] Performance optimization
|
||||
|
||||
### Phase 3: Deployment (Week 7-8)
|
||||
- [ ] Staging deployment
|
||||
- [ ] Production deployment
|
||||
- [ ] Monitoring and support
|
||||
```
|
||||
|
||||
17. **Risk Mitigation**
|
||||
- Identify potential migration risks
|
||||
- Create contingency plans for each risk
|
||||
- Document escalation procedures
|
||||
- Plan for extended timeline scenarios
|
||||
- Prepare communication for stakeholders
|
||||
|
||||
18. **Post-Migration Tasks**
|
||||
- Clean up deprecated code and configurations
|
||||
- Update documentation and README files
|
||||
- Review and optimize new implementation
|
||||
- Conduct post-migration retrospective
|
||||
- Plan for future maintenance and updates
|
||||
|
||||
19. **Validation and Testing**
|
||||
- Create comprehensive test plans
|
||||
- Document acceptance criteria
|
||||
- Set up automated regression testing
|
||||
- Plan user acceptance testing
|
||||
- Implement monitoring and alerting
|
||||
|
||||
20. **Documentation Updates**
|
||||
- Update API documentation
|
||||
- Revise development guides
|
||||
- Update deployment documentation
|
||||
- Create troubleshooting guides
|
||||
- Update team onboarding materials
|
||||
|
||||
**Migration Types and Specific Considerations:**
|
||||
|
||||
**Framework Migration (React 17 → 18):**
|
||||
- Update React and ReactDOM imports
|
||||
- Replace deprecated lifecycle methods
|
||||
- Update testing library methods
|
||||
- Handle concurrent features and Suspense
|
||||
|
||||
**Database Migration (MySQL → PostgreSQL):**
|
||||
- Convert SQL syntax differences
|
||||
- Update data types and constraints
|
||||
- Migrate stored procedures to functions
|
||||
- Update ORM configurations
|
||||
|
||||
**Cloud Migration (On-premise → AWS):**
|
||||
- Containerize applications
|
||||
- Update CI/CD pipelines
|
||||
- Configure cloud services
|
||||
- Implement infrastructure as code
|
||||
|
||||
**Architecture Migration (Monolith → Microservices):**
|
||||
- Identify service boundaries
|
||||
- Implement inter-service communication
|
||||
- Set up service discovery
|
||||
- Plan data consistency strategies
|
||||
|
||||
Remember to:
|
||||
- Test thoroughly in non-production environments first
|
||||
- Communicate progress and issues regularly
|
||||
- Document lessons learned for future migrations
|
||||
- Keep the migration guide updated based on real experiences
|
||||
@@ -0,0 +1,369 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [system-component] | --application | --database | --network | --deployment | --comprehensive
|
||||
description: Generate systematic troubleshooting documentation with diagnostic procedures, common issues, and automated solutions
|
||||
---
|
||||
|
||||
# Troubleshooting Guide Generator
|
||||
|
||||
Generate troubleshooting documentation: $ARGUMENTS
|
||||
|
||||
## Current System Context
|
||||
|
||||
- System architecture: @docker-compose.yml or @k8s/ or detect deployment type
|
||||
- Log locations: !`find . -name "*log*" -type d | head -3`
|
||||
- Monitoring setup: !`grep -r "prometheus\|grafana\|datadog" . 2>/dev/null | wc -l` monitoring references
|
||||
- Error patterns: !`find . -name "*.log" | head -3` recent logs
|
||||
- Health endpoints: !`grep -r "health\|status" src/ 2>/dev/null | head -3`
|
||||
|
||||
## Task
|
||||
|
||||
Create comprehensive troubleshooting guide with systematic diagnostic procedures: $ARGUMENTS
|
||||
|
||||
1. **System Overview and Architecture**
|
||||
- Document the system architecture and components
|
||||
- Map out dependencies and integrations
|
||||
- Identify critical paths and failure points
|
||||
- Create system topology diagrams
|
||||
- Document data flow and communication patterns
|
||||
|
||||
2. **Common Issues Identification**
|
||||
- Collect historical support tickets and issues
|
||||
- Interview team members about frequent problems
|
||||
- Analyze error logs and monitoring data
|
||||
- Review user feedback and complaints
|
||||
- Identify patterns in system failures
|
||||
|
||||
3. **Troubleshooting Framework**
|
||||
- Establish systematic diagnostic procedures
|
||||
- Create problem isolation methodologies
|
||||
- Document escalation paths and procedures
|
||||
- Set up logging and monitoring checkpoints
|
||||
- Define severity levels and response times
|
||||
|
||||
4. **Diagnostic Tools and Commands**
|
||||
|
||||
```markdown
|
||||
## Essential Diagnostic Commands
|
||||
|
||||
### System Health
|
||||
```bash
|
||||
# Check system resources
|
||||
top # CPU and memory usage
|
||||
df -h # Disk space
|
||||
free -m # Memory usage
|
||||
netstat -tuln # Network connections
|
||||
|
||||
# Application logs
|
||||
tail -f /var/log/app.log
|
||||
journalctl -u service-name -f
|
||||
|
||||
# Database connectivity
|
||||
mysql -u user -p -e "SELECT 1"
|
||||
psql -h host -U user -d db -c "SELECT 1"
|
||||
```
|
||||
```
|
||||
|
||||
5. **Issue Categories and Solutions**
|
||||
|
||||
**Performance Issues:**
|
||||
```markdown
|
||||
### Slow Response Times
|
||||
|
||||
**Symptoms:**
|
||||
- API responses > 5 seconds
|
||||
- User interface freezing
|
||||
- Database timeouts
|
||||
|
||||
**Diagnostic Steps:**
|
||||
1. Check system resources (CPU, memory, disk)
|
||||
2. Review application logs for errors
|
||||
3. Analyze database query performance
|
||||
4. Check network connectivity and latency
|
||||
|
||||
**Common Causes:**
|
||||
- Database connection pool exhaustion
|
||||
- Inefficient database queries
|
||||
- Memory leaks in application
|
||||
- Network bandwidth limitations
|
||||
|
||||
**Solutions:**
|
||||
- Restart application services
|
||||
- Optimize database queries
|
||||
- Increase connection pool size
|
||||
- Scale infrastructure resources
|
||||
```
|
||||
|
||||
6. **Error Code Documentation**
|
||||
|
||||
```markdown
|
||||
## Error Code Reference
|
||||
|
||||
### HTTP Status Codes
|
||||
- **500 Internal Server Error**
|
||||
- Check application logs for stack traces
|
||||
- Verify database connectivity
|
||||
- Check environment variables
|
||||
|
||||
- **404 Not Found**
|
||||
- Verify URL routing configuration
|
||||
- Check if resources exist
|
||||
- Review API endpoint documentation
|
||||
|
||||
- **503 Service Unavailable**
|
||||
- Check service health status
|
||||
- Verify load balancer configuration
|
||||
- Check for maintenance mode
|
||||
```
|
||||
|
||||
7. **Environment-Specific Issues**
|
||||
- Document development environment problems
|
||||
- Address staging/testing environment issues
|
||||
- Cover production-specific troubleshooting
|
||||
- Include local development setup problems
|
||||
|
||||
8. **Database Troubleshooting**
|
||||
|
||||
```markdown
|
||||
### Database Connection Issues
|
||||
|
||||
**Symptoms:**
|
||||
- "Connection refused" errors
|
||||
- "Too many connections" errors
|
||||
- Slow query performance
|
||||
|
||||
**Diagnostic Commands:**
|
||||
```sql
|
||||
-- Check active connections
|
||||
SHOW PROCESSLIST;
|
||||
|
||||
-- Check database size
|
||||
SELECT table_schema,
|
||||
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS 'DB Size in MB'
|
||||
FROM information_schema.tables
|
||||
GROUP BY table_schema;
|
||||
|
||||
-- Check slow queries
|
||||
SHOW VARIABLES LIKE 'slow_query_log';
|
||||
```
|
||||
```
|
||||
|
||||
9. **Network and Connectivity Issues**
|
||||
|
||||
```markdown
|
||||
### Network Troubleshooting
|
||||
|
||||
**Basic Connectivity:**
|
||||
```bash
|
||||
# Test basic connectivity
|
||||
ping example.com
|
||||
telnet host port
|
||||
curl -v https://api.example.com/health
|
||||
|
||||
# DNS resolution
|
||||
nslookup example.com
|
||||
dig example.com
|
||||
|
||||
# Network routing
|
||||
traceroute example.com
|
||||
```
|
||||
|
||||
**SSL/TLS Issues:**
|
||||
```bash
|
||||
# Check SSL certificate
|
||||
openssl s_client -connect example.com:443
|
||||
curl -vI https://example.com
|
||||
```
|
||||
```
|
||||
|
||||
10. **Application-Specific Troubleshooting**
|
||||
|
||||
**Memory Issues:**
|
||||
```markdown
|
||||
### Out of Memory Errors
|
||||
|
||||
**Java Applications:**
|
||||
```bash
|
||||
# Check heap usage
|
||||
jstat -gc [PID]
|
||||
jmap -dump:format=b,file=heapdump.hprof [PID]
|
||||
|
||||
# Analyze heap dump
|
||||
jhat heapdump.hprof
|
||||
```
|
||||
|
||||
**Node.js Applications:**
|
||||
```bash
|
||||
# Monitor memory usage
|
||||
node --inspect app.js
|
||||
# Use Chrome DevTools for memory profiling
|
||||
```
|
||||
```
|
||||
|
||||
11. **Security and Authentication Issues**
|
||||
|
||||
```markdown
|
||||
### Authentication Failures
|
||||
|
||||
**Symptoms:**
|
||||
- 401 Unauthorized responses
|
||||
- Token validation errors
|
||||
- Session timeout issues
|
||||
|
||||
**Diagnostic Steps:**
|
||||
1. Verify credentials and tokens
|
||||
2. Check token expiration
|
||||
3. Validate authentication service
|
||||
4. Review CORS configuration
|
||||
|
||||
**Common Solutions:**
|
||||
- Refresh authentication tokens
|
||||
- Clear browser cookies/cache
|
||||
- Verify CORS headers
|
||||
- Check API key permissions
|
||||
```
|
||||
|
||||
12. **Deployment and Configuration Issues**
|
||||
|
||||
```markdown
|
||||
### Deployment Failures
|
||||
|
||||
**Container Issues:**
|
||||
```bash
|
||||
# Check container status
|
||||
docker ps -a
|
||||
docker logs container-name
|
||||
|
||||
# Check resource limits
|
||||
docker stats
|
||||
|
||||
# Debug container
|
||||
docker exec -it container-name /bin/bash
|
||||
```
|
||||
|
||||
**Kubernetes Issues:**
|
||||
```bash
|
||||
# Check pod status
|
||||
kubectl get pods
|
||||
kubectl describe pod pod-name
|
||||
kubectl logs pod-name
|
||||
|
||||
# Check service connectivity
|
||||
kubectl get svc
|
||||
kubectl port-forward pod-name 8080:8080
|
||||
```
|
||||
```
|
||||
|
||||
13. **Monitoring and Alerting Setup**
|
||||
- Configure health checks and monitoring
|
||||
- Set up log aggregation and analysis
|
||||
- Implement alerting for critical issues
|
||||
- Create dashboards for system metrics
|
||||
- Document monitoring thresholds
|
||||
|
||||
14. **Escalation Procedures**
|
||||
|
||||
```markdown
|
||||
## Escalation Matrix
|
||||
|
||||
### Severity Levels
|
||||
|
||||
**Critical (P1):** System down, data loss
|
||||
- Immediate response required
|
||||
- Escalate to on-call engineer
|
||||
- Notify management within 30 minutes
|
||||
|
||||
**High (P2):** Major functionality impaired
|
||||
- Response within 2 hours
|
||||
- Escalate to senior engineer
|
||||
- Provide hourly updates
|
||||
|
||||
**Medium (P3):** Minor functionality issues
|
||||
- Response within 8 hours
|
||||
- Assign to appropriate team member
|
||||
- Provide daily updates
|
||||
```
|
||||
|
||||
15. **Recovery Procedures**
|
||||
- Document system recovery steps
|
||||
- Create data backup and restore procedures
|
||||
- Establish rollback procedures for deployments
|
||||
- Document disaster recovery processes
|
||||
- Test recovery procedures regularly
|
||||
|
||||
16. **Preventive Measures**
|
||||
- Implement monitoring and alerting
|
||||
- Set up automated health checks
|
||||
- Create deployment validation procedures
|
||||
- Establish code review processes
|
||||
- Document maintenance procedures
|
||||
|
||||
17. **Knowledge Base Integration**
|
||||
- Link to relevant documentation
|
||||
- Reference API documentation
|
||||
- Include links to monitoring dashboards
|
||||
- Connect to team communication channels
|
||||
- Integrate with ticketing systems
|
||||
|
||||
18. **Team Communication**
|
||||
|
||||
```markdown
|
||||
## Communication Channels
|
||||
|
||||
### Immediate Response
|
||||
- Slack: #incidents channel
|
||||
- Phone: On-call rotation
|
||||
- Email: alerts@company.com
|
||||
|
||||
### Status Updates
|
||||
- Status page: status.company.com
|
||||
- Twitter: @company_status
|
||||
- Internal wiki: troubleshooting section
|
||||
```
|
||||
|
||||
19. **Documentation Maintenance**
|
||||
- Regular review and updates
|
||||
- Version control for troubleshooting guides
|
||||
- Feedback collection from users
|
||||
- Integration with incident post-mortems
|
||||
- Continuous improvement processes
|
||||
|
||||
20. **Self-Service Tools**
|
||||
- Create diagnostic scripts and tools
|
||||
- Build automated recovery procedures
|
||||
- Implement self-healing systems
|
||||
- Provide user-friendly diagnostic interfaces
|
||||
- Create chatbot integration for common issues
|
||||
|
||||
**Advanced Troubleshooting Techniques:**
|
||||
|
||||
**Log Analysis:**
|
||||
```bash
|
||||
# Search for specific errors
|
||||
grep -i "error" /var/log/app.log | tail -50
|
||||
|
||||
# Analyze log patterns
|
||||
awk '{print $1}' access.log | sort | uniq -c | sort -nr
|
||||
|
||||
# Monitor logs in real-time
|
||||
tail -f /var/log/app.log | grep -i "exception"
|
||||
```
|
||||
|
||||
**Performance Profiling:**
|
||||
```bash
|
||||
# System performance
|
||||
iostat -x 1
|
||||
sar -u 1 10
|
||||
vmstat 1 10
|
||||
|
||||
# Application profiling
|
||||
strace -p [PID]
|
||||
perf record -p [PID]
|
||||
```
|
||||
|
||||
Remember to:
|
||||
- Keep troubleshooting guides up-to-date
|
||||
- Test all documented procedures regularly
|
||||
- Collect feedback from users and improve guides
|
||||
- Include screenshots and visual aids where helpful
|
||||
- Make guides searchable and well-organized
|
||||
@@ -0,0 +1,106 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [doc-type] | --implementation | --api | --architecture | --sync | --validate
|
||||
description: Systematically update project documentation with implementation status, API changes, and synchronized content
|
||||
---
|
||||
|
||||
# Documentation Update & Synchronization
|
||||
|
||||
Update project documentation systematically: $ARGUMENTS
|
||||
|
||||
## Current Documentation State
|
||||
|
||||
- Documentation structure: !`find . -name "*.md" | head -10`
|
||||
- Specs directory: @specs/ (if exists)
|
||||
- Implementation status: !`grep -r "✅\|❌\|⚠️" docs/ specs/ 2>/dev/null | wc -l` status indicators
|
||||
- Recent changes: !`git log --oneline --since="1 week ago" -- "*.md" | head -5`
|
||||
- Project progress: @CLAUDE.md or @README.md (if exists)
|
||||
|
||||
## Task
|
||||
|
||||
## Documentation Analysis
|
||||
|
||||
1. Review current documentation status:
|
||||
- Check `specs/implementation_status.md` for overall project status
|
||||
- Review implemented phase document (`specs/phase{N}_implementation_plan.md`)
|
||||
- Review `specs/flutter_structurizr_implementation_spec.md` and `specs/flutter_structurizr_implementation_spec_updated.md`
|
||||
- Review `specs/testing_plan.md` to ensure it is current given recent test passes, failures, and changes
|
||||
- Examine `CLAUDE.md` and `README.md` for project-wide documentation
|
||||
- Check for and document any new lessons learned or best practices in CLAUDE.md
|
||||
|
||||
2. Analyze implementation and testing results:
|
||||
- Review what was implemented in the last phase
|
||||
- Review testing results and coverage
|
||||
- Identify new best practices discovered during implementation
|
||||
- Note any implementation challenges and solutions
|
||||
- Cross-reference updated documentation with recent implementation and test results to ensure accuracy
|
||||
|
||||
## Documentation Updates
|
||||
|
||||
1. Update phase implementation document:
|
||||
- Mark completed tasks with ✅ status
|
||||
- Update implementation percentages
|
||||
- Add detailed notes on implementation approach
|
||||
- Document any deviations from original plan with justification
|
||||
- Add new sections if needed (lessons learned, best practices)
|
||||
- Document specific implementation details for complex components
|
||||
- Include a summary of any new troubleshooting tips or workflow improvements discovered during the phase
|
||||
|
||||
2. Update implementation status document:
|
||||
- Update phase completion percentages
|
||||
- Add or update implementation status for components
|
||||
- Add notes on implementation approach and decisions
|
||||
- Document best practices discovered during implementation
|
||||
- Note any challenges overcome and solutions implemented
|
||||
|
||||
3. Update implementation specification documents:
|
||||
- Mark completed items with ✅ or strikethrough but preserve original requirements
|
||||
- Add notes on implementation details where appropriate
|
||||
- Add references to implemented files and classes
|
||||
- Update any implementation guidance based on experience
|
||||
|
||||
4. Update CLAUDE.md and README.md if necessary:
|
||||
- Add new best practices
|
||||
- Update project status
|
||||
- Add new implementation guidance
|
||||
- Document known issues or limitations
|
||||
- Update usage examples to include new functionality
|
||||
|
||||
5. Document new testing procedures:
|
||||
- Add details on test files created
|
||||
- Include test running instructions
|
||||
- Document test coverage
|
||||
- Explain testing approach for complex components
|
||||
|
||||
## Documentation Formatting and Structure
|
||||
|
||||
1. Maintain consistent documentation style:
|
||||
- Use clear headings and sections
|
||||
- Include code examples where helpful
|
||||
- Use status indicators (✅, ⚠️, ❌) consistently
|
||||
- Maintain proper Markdown formatting
|
||||
|
||||
2. Ensure documentation completeness:
|
||||
- Cover all implemented features
|
||||
- Include usage examples
|
||||
- Document API changes or additions
|
||||
- Include troubleshooting guidance for common issues
|
||||
|
||||
## Guidelines
|
||||
|
||||
- DO NOT CREATE new specification files
|
||||
- UPDATE existing files in the `specs/` directory
|
||||
- Maintain consistent documentation style
|
||||
- Include practical examples where appropriate
|
||||
- Cross-reference related documentation sections
|
||||
- Document best practices and lessons learned
|
||||
- Provide clear status updates on project progress
|
||||
- Update numerical completion percentages
|
||||
- Ensure documentation reflects actual implementation
|
||||
|
||||
Provide a summary of documentation updates after completion, including:
|
||||
1. Files updated
|
||||
2. Major changes to documentation
|
||||
3. Updated completion percentages
|
||||
4. New best practices documented
|
||||
5. Status of the overall project after this phase
|
||||
Reference in New Issue
Block a user