Files
gh-onezerocompany-claude-pr…/skills/spec-author/templates/component.md
2025-11-30 08:45:31 +08:00

191 lines
4.5 KiB
Markdown

### Component
# <!-- TODO: Component title and ID, e.g., #[CMP-001] User Authentication Service -->
Type: <!-- TODO: app | service | library -->
Priority: <!-- TODO: critical | high | medium | low -->
## Overview
<!-- TODO: Describe what this component does, why it exists, and who depends on it -->
### Component Details
- **Type**: <!-- TODO: app | service | library -->
- **Purpose**: <!-- TODO: single sentence describing primary purpose -->
- **Owner/Team**: <!-- TODO: team responsible for maintenance -->
- **Repository**: <!-- TODO: URL or path -->
- **Production URL**: <!-- TODO: endpoint or access point (if applicable) -->
## Technology Stack
<!-- TODO: Document core technologies. Example:
```yaml
language:
name: JavaScript/Node.js
version: 18 LTS
purpose: Runtime environment
framework:
name: Express
version: 4.18.2
purpose: Web framework
database:
name: PostgreSQL
version: 14
purpose: Primary data store
```
-->
## Scope
### Responsibilities
<!-- TODO: What this component IS responsible for (bullet points) -->
### Exclusions
<!-- TODO: What this component is NOT responsible for (bullet points) -->
## Dependencies
### Internal Dependencies
<!-- TODO: Other components this depends on. Format:
- **Component Name** (Hard/Soft/Messaging)
**Purpose**: Why needed
**Criticality**: Critical/High/Medium/Low
-->
### External Dependencies
<!-- TODO: Third-party services and libraries. Format:
**Services**:
- **Service Name** (Version)
**Purpose**: Why needed
**Criticality**: Critical/High/Medium/Low
**Libraries**:
- **Library Name** (Version)
**Purpose**: Why needed
**Criticality**: Critical/High/Medium/Low
-->
## API & Interface
<!-- TODO: Public endpoints, methods, or interfaces exposed. Format:
- **Endpoint/Method**: <name>
**Description**: <what it does>
**Parameters**: <input>
**Response**: <output>
-->
**API Documentation**: <!-- TODO: link to detailed API docs -->
## Configuration
<!-- TODO: Document key configuration areas and reference full configuration spec
Key areas:
- Database connection settings
- Authentication and security
- Third-party integrations
- Performance tuning
See [Configuration Schema](#) for complete environment variables and settings.
-->
### Secrets Management
<!-- TODO: Required secrets (no actual values). Format:
- **SECRET_NAME**
**Purpose**: What it's used for
**Rotation Policy**: Frequency
-->
## Deployment
**Platform**: <!-- TODO: AWS/GCP/Azure/Docker/Kubernetes/etc -->
**Environment**: <!-- TODO: dev/staging/production setup -->
**Deployment Strategy**: <!-- TODO: blue-green/canary/rolling -->
**Build Command**: <!-- TODO: command to build -->
**Deploy Command**: <!-- TODO: command to deploy -->
**Build Artifacts**: <!-- TODO: what gets produced -->
### Deployment Notes
<!-- TODO: Special considerations:
- Database migrations required
- Backward compatibility
- Health check endpoints
- Rollback procedures
-->
For complete deployment procedures, see [Deployment Procedure Specification](#).
## Monitoring
**Logs Location**: <!-- TODO: where logs are stored -->
**Log Aggregation**: <!-- TODO: Datadog/CloudWatch/ELK/etc -->
**Dashboard**: <!-- TODO: link to monitoring dashboard -->
### Key Metrics
<!-- TODO: Metrics to monitor. Format:
**Response time (p95)**
- **Target**: <100ms
- **Alert Threshold**: >500ms
**Error rate**
- **Target**: <0.1%
- **Alert Threshold**: >1%
-->
### Health Checks
**Health Check Endpoint**: <!-- TODO: URL or command -->
<!-- TODO: Alerts. Format:
- **Alert**: <condition>
**Threshold**: <when to trigger>
**Action**: <response procedure>
-->
## Testing
**Test Coverage**: <!-- TODO: percentage -->
**Test Command**: <!-- TODO: command to run tests -->
**Testing Strategy**: <!-- TODO: unit/integration/e2e approach -->
**E2E Tests**: <!-- TODO: link to tests -->
## Development
**Local Setup**: <!-- TODO: steps for dev environment -->
**Development Port**: <!-- TODO: port number -->
**Code Style**: <!-- TODO: linting/formatting tools -->
**Contributing Guide**: <!-- TODO: link to guidelines -->
## Known Issues
<!-- TODO: Document known issues. OPTIONAL: Remove if none. Format:
- **Issue**: <description>
**Impact**: <what's affected>
**Workaround**: <mitigation>
**Status**: Open/In Progress/Planned/Won't Fix
-->
## Future Considerations
<!-- TODO: Planned improvements. OPTIONAL: Remove if none.
- Planned features or enhancements
- Technical debt to address
- Scaling considerations
- Technology upgrades
- Performance optimizations
-->