Skip to content

Commit 62e319a

Browse files
committed
πŸ”§ chore(spec): add spec workflow management system
- Add comprehensive template system for specification documents - Include templates for requirements, design, tasks, and steering documents - Support custom user templates with override capability - Add approval and archive directories for workflow management The system provides structured templates for: - Requirements documents (business and technical requirements) - Design documents (technical design and architecture) - Tasks documents (implementation tasks breakdown) - Steering documents (product, tech, and structure guidance)
1 parent 989c00b commit 62e319a

File tree

7 files changed

+644
-0
lines changed

7 files changed

+644
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Design Document
2+
3+
## Overview
4+
5+
[High-level description of the feature and its place in the overall system]
6+
7+
## Steering Document Alignment
8+
9+
### Technical Standards (tech.md)
10+
[How the design follows documented technical patterns and standards]
11+
12+
### Project Structure (structure.md)
13+
[How the implementation will follow project organization conventions]
14+
15+
## Code Reuse Analysis
16+
[What existing code will be leveraged, extended, or integrated with this feature]
17+
18+
### Existing Components to Leverage
19+
- **[Component/Utility Name]**: [How it will be used]
20+
- **[Service/Helper Name]**: [How it will be extended]
21+
22+
### Integration Points
23+
- **[Existing System/API]**: [How the new feature will integrate]
24+
- **[Database/Storage]**: [How data will connect to existing schemas]
25+
26+
## Architecture
27+
28+
[Describe the overall architecture and design patterns used]
29+
30+
### Modular Design Principles
31+
- **Single File Responsibility**: Each file should handle one specific concern or domain
32+
- **Component Isolation**: Create small, focused components rather than large monolithic files
33+
- **Service Layer Separation**: Separate data access, business logic, and presentation layers
34+
- **Utility Modularity**: Break utilities into focused, single-purpose modules
35+
36+
```mermaid
37+
graph TD
38+
A[Component A] --> B[Component B]
39+
B --> C[Component C]
40+
```
41+
42+
## Components and Interfaces
43+
44+
### Component 1
45+
- **Purpose:** [What this component does]
46+
- **Interfaces:** [Public methods/APIs]
47+
- **Dependencies:** [What it depends on]
48+
- **Reuses:** [Existing components/utilities it builds upon]
49+
50+
### Component 2
51+
- **Purpose:** [What this component does]
52+
- **Interfaces:** [Public methods/APIs]
53+
- **Dependencies:** [What it depends on]
54+
- **Reuses:** [Existing components/utilities it builds upon]
55+
56+
## Data Models
57+
58+
### Model 1
59+
```
60+
[Define the structure of Model1 in your language]
61+
- id: [unique identifier type]
62+
- name: [string/text type]
63+
- [Additional properties as needed]
64+
```
65+
66+
### Model 2
67+
```
68+
[Define the structure of Model2 in your language]
69+
- id: [unique identifier type]
70+
- [Additional properties as needed]
71+
```
72+
73+
## Error Handling
74+
75+
### Error Scenarios
76+
1. **Scenario 1:** [Description]
77+
- **Handling:** [How to handle]
78+
- **User Impact:** [What user sees]
79+
80+
2. **Scenario 2:** [Description]
81+
- **Handling:** [How to handle]
82+
- **User Impact:** [What user sees]
83+
84+
## Testing Strategy
85+
86+
### Unit Testing
87+
- [Unit testing approach]
88+
- [Key components to test]
89+
90+
### Integration Testing
91+
- [Integration testing approach]
92+
- [Key flows to test]
93+
94+
### End-to-End Testing
95+
- [E2E testing approach]
96+
- [User scenarios to test]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Product Overview
2+
3+
## Product Purpose
4+
[Describe the core purpose of this product/project. What problem does it solve?]
5+
6+
## Target Users
7+
[Who are the primary users of this product? What are their needs and pain points?]
8+
9+
## Key Features
10+
[List the main features that deliver value to users]
11+
12+
1. **Feature 1**: [Description]
13+
2. **Feature 2**: [Description]
14+
3. **Feature 3**: [Description]
15+
16+
## Business Objectives
17+
[What are the business goals this product aims to achieve?]
18+
19+
- [Objective 1]
20+
- [Objective 2]
21+
- [Objective 3]
22+
23+
## Success Metrics
24+
[How will we measure the success of this product?]
25+
26+
- [Metric 1]: [Target]
27+
- [Metric 2]: [Target]
28+
- [Metric 3]: [Target]
29+
30+
## Product Principles
31+
[Core principles that guide product decisions]
32+
33+
1. **[Principle 1]**: [Explanation]
34+
2. **[Principle 2]**: [Explanation]
35+
3. **[Principle 3]**: [Explanation]
36+
37+
## Monitoring & Visibility (if applicable)
38+
[How do users track progress and monitor the system?]
39+
40+
- **Dashboard Type**: [e.g., Web-based, CLI, Desktop app]
41+
- **Real-time Updates**: [e.g., WebSocket, polling, push notifications]
42+
- **Key Metrics Displayed**: [What information is most important to surface]
43+
- **Sharing Capabilities**: [e.g., read-only links, exports, reports]
44+
45+
## Future Vision
46+
[Where do we see this product evolving in the future?]
47+
48+
### Potential Enhancements
49+
- **Remote Access**: [e.g., Tunnel features for sharing dashboards with stakeholders]
50+
- **Analytics**: [e.g., Historical trends, performance metrics]
51+
- **Collaboration**: [e.g., Multi-user support, commenting]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Requirements Document
2+
3+
## Introduction
4+
5+
[Provide a brief overview of the feature, its purpose, and its value to users]
6+
7+
## Alignment with Product Vision
8+
9+
[Explain how this feature supports the goals outlined in product.md]
10+
11+
## Requirements
12+
13+
### Requirement 1
14+
15+
**User Story:** As a [role], I want [feature], so that [benefit]
16+
17+
#### Acceptance Criteria
18+
19+
1. WHEN [event] THEN [system] SHALL [response]
20+
2. IF [precondition] THEN [system] SHALL [response]
21+
3. WHEN [event] AND [condition] THEN [system] SHALL [response]
22+
23+
### Requirement 2
24+
25+
**User Story:** As a [role], I want [feature], so that [benefit]
26+
27+
#### Acceptance Criteria
28+
29+
1. WHEN [event] THEN [system] SHALL [response]
30+
2. IF [precondition] THEN [system] SHALL [response]
31+
32+
## Non-Functional Requirements
33+
34+
### Code Architecture and Modularity
35+
- **Single Responsibility Principle**: Each file should have a single, well-defined purpose
36+
- **Modular Design**: Components, utilities, and services should be isolated and reusable
37+
- **Dependency Management**: Minimize interdependencies between modules
38+
- **Clear Interfaces**: Define clean contracts between components and layers
39+
40+
### Performance
41+
- [Performance requirements]
42+
43+
### Security
44+
- [Security requirements]
45+
46+
### Reliability
47+
- [Reliability requirements]
48+
49+
### Usability
50+
- [Usability requirements]
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Project Structure
2+
3+
## Directory Organization
4+
5+
```
6+
[Define your project's directory structure. Examples below - adapt to your project type]
7+
8+
Example for a library/package:
9+
project-root/
10+
β”œβ”€β”€ src/ # Source code
11+
β”œβ”€β”€ tests/ # Test files
12+
β”œβ”€β”€ docs/ # Documentation
13+
β”œβ”€β”€ examples/ # Usage examples
14+
└── [build/dist/out] # Build output
15+
16+
Example for an application:
17+
project-root/
18+
β”œβ”€β”€ [src/app/lib] # Main source code
19+
β”œβ”€β”€ [assets/resources] # Static resources
20+
β”œβ”€β”€ [config/settings] # Configuration
21+
β”œβ”€β”€ [scripts/tools] # Build/utility scripts
22+
└── [tests/spec] # Test files
23+
24+
Common patterns:
25+
- Group by feature/module
26+
- Group by layer (UI, business logic, data)
27+
- Group by type (models, controllers, views)
28+
- Flat structure for simple projects
29+
```
30+
31+
## Naming Conventions
32+
33+
### Files
34+
- **Components/Modules**: [e.g., `PascalCase`, `snake_case`, `kebab-case`]
35+
- **Services/Handlers**: [e.g., `UserService`, `user_service`, `user-service`]
36+
- **Utilities/Helpers**: [e.g., `dateUtils`, `date_utils`, `date-utils`]
37+
- **Tests**: [e.g., `[filename]_test`, `[filename].test`, `[filename]Test`]
38+
39+
### Code
40+
- **Classes/Types**: [e.g., `PascalCase`, `CamelCase`, `snake_case`]
41+
- **Functions/Methods**: [e.g., `camelCase`, `snake_case`, `PascalCase`]
42+
- **Constants**: [e.g., `UPPER_SNAKE_CASE`, `SCREAMING_CASE`, `PascalCase`]
43+
- **Variables**: [e.g., `camelCase`, `snake_case`, `lowercase`]
44+
45+
## Import Patterns
46+
47+
### Import Order
48+
1. External dependencies
49+
2. Internal modules
50+
3. Relative imports
51+
4. Style imports
52+
53+
### Module/Package Organization
54+
```
55+
[Describe your project's import/include patterns]
56+
Examples:
57+
- Absolute imports from project root
58+
- Relative imports within modules
59+
- Package/namespace organization
60+
- Dependency management approach
61+
```
62+
63+
## Code Structure Patterns
64+
65+
[Define common patterns for organizing code within files. Below are examples - choose what applies to your project]
66+
67+
### Module/Class Organization
68+
```
69+
Example patterns:
70+
1. Imports/includes/dependencies
71+
2. Constants and configuration
72+
3. Type/interface definitions
73+
4. Main implementation
74+
5. Helper/utility functions
75+
6. Exports/public API
76+
```
77+
78+
### Function/Method Organization
79+
```
80+
Example patterns:
81+
- Input validation first
82+
- Core logic in the middle
83+
- Error handling throughout
84+
- Clear return points
85+
```
86+
87+
### File Organization Principles
88+
```
89+
Choose what works for your project:
90+
- One class/module per file
91+
- Related functionality grouped together
92+
- Public API at the top/bottom
93+
- Implementation details hidden
94+
```
95+
96+
## Code Organization Principles
97+
98+
1. **Single Responsibility**: Each file should have one clear purpose
99+
2. **Modularity**: Code should be organized into reusable modules
100+
3. **Testability**: Structure code to be easily testable
101+
4. **Consistency**: Follow patterns established in the codebase
102+
103+
## Module Boundaries
104+
[Define how different parts of your project interact and maintain separation of concerns]
105+
106+
Examples of boundary patterns:
107+
- **Core vs Plugins**: Core functionality vs extensible plugins
108+
- **Public API vs Internal**: What's exposed vs implementation details
109+
- **Platform-specific vs Cross-platform**: OS-specific code isolation
110+
- **Stable vs Experimental**: Production code vs experimental features
111+
- **Dependencies direction**: Which modules can depend on which
112+
113+
## Code Size Guidelines
114+
[Define your project's guidelines for file and function sizes]
115+
116+
Suggested guidelines:
117+
- **File size**: [Define maximum lines per file]
118+
- **Function/Method size**: [Define maximum lines per function]
119+
- **Class/Module complexity**: [Define complexity limits]
120+
- **Nesting depth**: [Maximum nesting levels]
121+
122+
## Dashboard/Monitoring Structure (if applicable)
123+
[How dashboard or monitoring components are organized]
124+
125+
### Example Structure:
126+
```
127+
src/
128+
└── dashboard/ # Self-contained dashboard subsystem
129+
β”œβ”€β”€ server/ # Backend server components
130+
β”œβ”€β”€ client/ # Frontend assets
131+
β”œβ”€β”€ shared/ # Shared types/utilities
132+
└── public/ # Static assets
133+
```
134+
135+
### Separation of Concerns
136+
- Dashboard isolated from core business logic
137+
- Own CLI entry point for independent operation
138+
- Minimal dependencies on main application
139+
- Can be disabled without affecting core functionality
140+
141+
## Documentation Standards
142+
- All public APIs must have documentation
143+
- Complex logic should include inline comments
144+
- README files for major modules
145+
- Follow language-specific documentation conventions

0 commit comments

Comments
Β (0)