sdd-mcp-server 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -98
- package/agents/architect.md +107 -0
- package/agents/implementer.md +154 -0
- package/agents/planner.md +97 -0
- package/agents/reviewer.md +252 -0
- package/agents/security-auditor.md +127 -0
- package/agents/tdd-guide.md +241 -0
- package/contexts/dev.md +58 -0
- package/contexts/planning.md +79 -0
- package/contexts/research.md +93 -0
- package/contexts/review.md +73 -0
- package/contexts/security-audit.md +92 -0
- package/dist/cli/install-skills.js +29 -15
- package/dist/cli/install-skills.js.map +1 -1
- package/dist/cli/migrate-steering.d.ts +24 -0
- package/dist/cli/migrate-steering.js +308 -0
- package/dist/cli/migrate-steering.js.map +1 -0
- package/dist/cli/sdd-mcp-cli.js +9 -0
- package/dist/cli/sdd-mcp-cli.js.map +1 -1
- package/hooks/post-tool-use/log-tool-execution.md +51 -0
- package/hooks/post-tool-use/update-spec-status.md +50 -0
- package/hooks/pre-tool-use/check-test-coverage.md +51 -0
- package/hooks/pre-tool-use/validate-sdd-workflow.md +55 -0
- package/hooks/session-end/remind-uncommitted-changes.md +58 -0
- package/hooks/session-end/save-session-summary.md +72 -0
- package/hooks/session-start/load-project-context.md +62 -0
- package/package.json +5 -1
- package/rules/coding-style.md +97 -0
- package/rules/error-handling.md +134 -0
- package/rules/git-workflow.md +92 -0
- package/rules/sdd-workflow.md +116 -0
- package/rules/security.md +89 -0
- package/rules/testing.md +85 -0
- package/sdd-entry.js +1 -1
- package/skills/sdd-commit/SKILL.md +0 -14
- package/steering/product.md +29 -0
- package/steering/structure.md +60 -0
- package/steering/tech.md +52 -0
- package/steering/AGENTS.md +0 -281
- package/steering/commit.md +0 -59
- package/steering/linus-review.md +0 -153
- package/steering/owasp-top10-check.md +0 -49
- package/steering/principles.md +0 -639
- package/steering/tdd-guideline.md +0 -324
package/rules/testing.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testing
|
|
3
|
+
description: Testing requirements and best practices
|
|
4
|
+
priority: 95
|
|
5
|
+
alwaysActive: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Testing Rules
|
|
9
|
+
|
|
10
|
+
## Test-Driven Development (TDD)
|
|
11
|
+
|
|
12
|
+
Follow the Red-Green-Refactor cycle:
|
|
13
|
+
1. **RED**: Write a failing test that defines expected behavior
|
|
14
|
+
2. **GREEN**: Write minimum code to make the test pass
|
|
15
|
+
3. **REFACTOR**: Clean up code while keeping tests green
|
|
16
|
+
|
|
17
|
+
## Test Organization
|
|
18
|
+
|
|
19
|
+
### File Structure
|
|
20
|
+
- Test files should mirror source structure
|
|
21
|
+
- Name test files as `{source-file}.test.ts`
|
|
22
|
+
- Group tests in `__tests__` directories or alongside source files
|
|
23
|
+
|
|
24
|
+
### Test Structure
|
|
25
|
+
```typescript
|
|
26
|
+
describe('ComponentName', () => {
|
|
27
|
+
describe('methodName', () => {
|
|
28
|
+
it('should describe expected behavior', () => {
|
|
29
|
+
// Arrange - Set up test data
|
|
30
|
+
// Act - Execute the code
|
|
31
|
+
// Assert - Verify results
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Test Quality
|
|
38
|
+
|
|
39
|
+
### Test Naming
|
|
40
|
+
- Use descriptive names that explain the scenario
|
|
41
|
+
- Pattern: `should {expected behavior} when {condition}`
|
|
42
|
+
- Examples:
|
|
43
|
+
- `should return empty array when directory is empty`
|
|
44
|
+
- `should throw error for invalid input`
|
|
45
|
+
|
|
46
|
+
### Test Independence
|
|
47
|
+
- Each test should be independent and isolated
|
|
48
|
+
- Use `beforeEach` to reset state between tests
|
|
49
|
+
- Never rely on test execution order
|
|
50
|
+
|
|
51
|
+
### Assertions
|
|
52
|
+
- One logical assertion per test (can have multiple `expect` calls)
|
|
53
|
+
- Test behavior, not implementation
|
|
54
|
+
- Include both positive and negative test cases
|
|
55
|
+
|
|
56
|
+
## Coverage Requirements
|
|
57
|
+
|
|
58
|
+
### Minimum Coverage
|
|
59
|
+
- Aim for 80% code coverage for new code
|
|
60
|
+
- Critical paths require 100% coverage
|
|
61
|
+
- Cover edge cases and error conditions
|
|
62
|
+
|
|
63
|
+
### What to Test
|
|
64
|
+
- Public API methods
|
|
65
|
+
- Edge cases and boundary conditions
|
|
66
|
+
- Error handling paths
|
|
67
|
+
- Integration points
|
|
68
|
+
|
|
69
|
+
### What Not to Test
|
|
70
|
+
- Third-party library internals
|
|
71
|
+
- Simple getters/setters without logic
|
|
72
|
+
- Framework-generated code
|
|
73
|
+
|
|
74
|
+
## Mocking
|
|
75
|
+
|
|
76
|
+
### When to Mock
|
|
77
|
+
- External services and APIs
|
|
78
|
+
- File system operations
|
|
79
|
+
- Network requests
|
|
80
|
+
- Time-dependent code
|
|
81
|
+
|
|
82
|
+
### Mock Best Practices
|
|
83
|
+
- Mock at the boundary, not internal implementation
|
|
84
|
+
- Verify mock interactions when relevant
|
|
85
|
+
- Reset mocks in `beforeEach`
|
package/sdd-entry.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* npx sdd-mcp-server # MCP: Start MCP server
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
const CLI_COMMANDS = ['install', 'install-skills', 'migrate-kiro'];
|
|
15
|
+
const CLI_COMMANDS = ['install', 'install-skills', 'migrate-kiro', 'migrate-steering'];
|
|
16
16
|
const args = process.argv.slice(2);
|
|
17
17
|
const command = args[0];
|
|
18
18
|
|
|
@@ -271,20 +271,6 @@ git rebase origin/main
|
|
|
271
271
|
git push origin feature/AUTH-123-jwt-auth
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
-
## Steering Document References
|
|
275
|
-
|
|
276
|
-
Apply these steering documents for commits and PRs:
|
|
277
|
-
|
|
278
|
-
| Document | Purpose | Key Application |
|
|
279
|
-
|----------|---------|-----------------|
|
|
280
|
-
| `.spec/steering/commit.md` | Commit message conventions | Follow type prefixes, scope, and format guidelines |
|
|
281
|
-
|
|
282
|
-
**Key Commit Rules:**
|
|
283
|
-
1. Use type prefixes: `feat`, `fix`, `docs`, `refactor`, `test`, etc.
|
|
284
|
-
2. Keep subject line under 72 characters
|
|
285
|
-
3. Use imperative mood ("add" not "added")
|
|
286
|
-
4. Reference issues in footer
|
|
287
|
-
|
|
288
274
|
## Quality Checklist
|
|
289
275
|
|
|
290
276
|
- [ ] Commit message follows format
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Product Overview
|
|
2
|
+
|
|
3
|
+
## Product Description
|
|
4
|
+
<!-- Describe your product/project in 1-2 sentences -->
|
|
5
|
+
|
|
6
|
+
**Project**: <!-- project name -->
|
|
7
|
+
**Version**: <!-- current version -->
|
|
8
|
+
**Type**: <!-- Web App, CLI Tool, Library, API, etc. -->
|
|
9
|
+
|
|
10
|
+
## Core Features
|
|
11
|
+
<!-- List the main features of your product -->
|
|
12
|
+
- Feature 1
|
|
13
|
+
- Feature 2
|
|
14
|
+
- Feature 3
|
|
15
|
+
|
|
16
|
+
## Target Use Case
|
|
17
|
+
<!-- Describe the primary use case this product solves -->
|
|
18
|
+
|
|
19
|
+
## Key Value Proposition
|
|
20
|
+
<!-- What makes this product valuable? What problems does it solve? -->
|
|
21
|
+
|
|
22
|
+
## Target Users
|
|
23
|
+
<!-- Who are the primary users of this product? -->
|
|
24
|
+
|
|
25
|
+
## Success Metrics
|
|
26
|
+
<!-- How do you measure success for this product? -->
|
|
27
|
+
|
|
28
|
+
## Technical Advantages
|
|
29
|
+
<!-- What technical benefits does this architecture provide? -->
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Project Structure
|
|
2
|
+
|
|
3
|
+
## Directory Organization
|
|
4
|
+
```
|
|
5
|
+
├── src/ # Source code
|
|
6
|
+
│ ├── components/ # UI components (if applicable)
|
|
7
|
+
│ ├── services/ # Business logic services
|
|
8
|
+
│ ├── models/ # Data models
|
|
9
|
+
│ ├── utils/ # Utility functions
|
|
10
|
+
│ └── index.ts # Entry point
|
|
11
|
+
├── tests/ # Test files
|
|
12
|
+
│ ├── unit/ # Unit tests
|
|
13
|
+
│ └── integration/ # Integration tests
|
|
14
|
+
├── dist/ # Build output
|
|
15
|
+
├── docs/ # Documentation
|
|
16
|
+
├── .spec/ # SDD workflow files
|
|
17
|
+
│ ├── steering/ # Project steering documents
|
|
18
|
+
│ └── specs/ # Feature specifications
|
|
19
|
+
├── package.json # Project configuration
|
|
20
|
+
├── tsconfig.json # TypeScript configuration (if applicable)
|
|
21
|
+
└── README.md # Project documentation
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Key Directories
|
|
25
|
+
- **src/**: Main source code directory
|
|
26
|
+
- **tests/**: Test files organized by type
|
|
27
|
+
- **dist/**: Compiled/built output for production
|
|
28
|
+
- **docs/**: Project documentation
|
|
29
|
+
|
|
30
|
+
## Code Organization Patterns
|
|
31
|
+
<!-- Describe how code is organized -->
|
|
32
|
+
- Pattern 1
|
|
33
|
+
- Pattern 2
|
|
34
|
+
|
|
35
|
+
## File Naming Conventions
|
|
36
|
+
<!-- Define naming conventions for different file types -->
|
|
37
|
+
- **Source files**: <!-- e.g., kebab-case.ts -->
|
|
38
|
+
- **Test files**: <!-- e.g., *.test.ts or *.spec.ts -->
|
|
39
|
+
- **Configuration**: <!-- e.g., .json or .config.js -->
|
|
40
|
+
- **Constants**: UPPER_SNAKE_CASE
|
|
41
|
+
- **Functions/Variables**: camelCase
|
|
42
|
+
- **Classes/Types**: PascalCase
|
|
43
|
+
|
|
44
|
+
## Module Organization
|
|
45
|
+
<!-- Describe how modules are organized -->
|
|
46
|
+
|
|
47
|
+
## Architectural Principles
|
|
48
|
+
- **Separation of Concerns**: Each module handles a specific responsibility
|
|
49
|
+
- **Type Safety**: Use strong typing where applicable
|
|
50
|
+
- **Dependency Inversion**: Depend on abstractions, not concrete implementations
|
|
51
|
+
|
|
52
|
+
## Testing Structure
|
|
53
|
+
- **Unit tests**: Test individual functions/components in isolation
|
|
54
|
+
- **Integration tests**: Test interactions between modules
|
|
55
|
+
- **E2E tests**: Test complete user workflows
|
|
56
|
+
|
|
57
|
+
## Build Output
|
|
58
|
+
- **Command**: <!-- e.g., npm run build -->
|
|
59
|
+
- **Output directory**: <!-- e.g., dist/ -->
|
|
60
|
+
- **Artifacts**: <!-- What gets generated -->
|
package/steering/tech.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Technology Stack
|
|
2
|
+
|
|
3
|
+
## Architecture
|
|
4
|
+
**Type**: <!-- MVC, DDD, Clean Architecture, Microservices, etc. -->
|
|
5
|
+
**Language**: <!-- Primary language -->
|
|
6
|
+
**Module System**: <!-- CommonJS, ES Module, etc. -->
|
|
7
|
+
**Framework**: <!-- Main framework if any -->
|
|
8
|
+
**Build Tool**: <!-- Webpack, Vite, TypeScript Compiler, etc. -->
|
|
9
|
+
|
|
10
|
+
## Core Technologies
|
|
11
|
+
<!-- List main technologies used -->
|
|
12
|
+
- **Runtime**: <!-- Node.js, Python, Go, etc. -->
|
|
13
|
+
- **Language**: <!-- TypeScript, JavaScript, Python, etc. -->
|
|
14
|
+
- **Framework**: <!-- Express, FastAPI, Spring Boot, etc. -->
|
|
15
|
+
- **Testing**: <!-- Jest, pytest, JUnit, etc. -->
|
|
16
|
+
|
|
17
|
+
## Development Environment
|
|
18
|
+
- **Runtime Version**: <!-- e.g., Node.js >=18.0.0 -->
|
|
19
|
+
- **Package Manager**: <!-- npm, yarn, pip, etc. -->
|
|
20
|
+
- **Testing Framework**: <!-- Jest, pytest, etc. -->
|
|
21
|
+
|
|
22
|
+
## Dependencies
|
|
23
|
+
### Production Dependencies
|
|
24
|
+
<!-- List key production dependencies -->
|
|
25
|
+
|
|
26
|
+
### Development Dependencies
|
|
27
|
+
<!-- List key development dependencies -->
|
|
28
|
+
|
|
29
|
+
## Development Commands
|
|
30
|
+
```bash
|
|
31
|
+
# Start development server
|
|
32
|
+
npm run dev
|
|
33
|
+
|
|
34
|
+
# Build for production
|
|
35
|
+
npm run build
|
|
36
|
+
|
|
37
|
+
# Run tests
|
|
38
|
+
npm run test
|
|
39
|
+
|
|
40
|
+
# Lint code
|
|
41
|
+
npm run lint
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quality Assurance
|
|
45
|
+
- **Linting**: <!-- ESLint, Pylint, etc. -->
|
|
46
|
+
- **Type Checking**: <!-- TypeScript, mypy, etc. -->
|
|
47
|
+
- **Testing**: <!-- Coverage requirements, test types -->
|
|
48
|
+
|
|
49
|
+
## Deployment Configuration
|
|
50
|
+
- **Containerization**: <!-- Docker, Kubernetes, etc. -->
|
|
51
|
+
- **Build Process**: <!-- How to build for production -->
|
|
52
|
+
- **CI/CD**: <!-- GitHub Actions, GitLab CI, etc. -->
|
package/steering/AGENTS.md
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
# AI Agents Integration Guide
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
This document defines how AI agents should interact with the SDD workflow and provides guidelines for effective agent collaboration in spec-driven development.
|
|
5
|
-
|
|
6
|
-
## Agent Types and Roles
|
|
7
|
-
|
|
8
|
-
### Development Agents
|
|
9
|
-
AI agents that assist with code implementation, testing, and documentation.
|
|
10
|
-
|
|
11
|
-
**Primary Tools**: Claude Code, Cursor, GitHub Copilot, and similar AI development assistants.
|
|
12
|
-
|
|
13
|
-
**Responsibilities**:
|
|
14
|
-
- Follow SDD workflow phases strictly
|
|
15
|
-
- Generate code based on approved specifications
|
|
16
|
-
- Maintain consistency with project steering documents
|
|
17
|
-
- Ensure quality through automated testing
|
|
18
|
-
|
|
19
|
-
### Review Agents
|
|
20
|
-
AI agents specialized in code review, quality analysis, and security validation.
|
|
21
|
-
|
|
22
|
-
**Primary Focus**:
|
|
23
|
-
- Apply Linus-style code review principles
|
|
24
|
-
- Validate implementation against requirements
|
|
25
|
-
- Check for security vulnerabilities
|
|
26
|
-
- Ensure performance standards
|
|
27
|
-
|
|
28
|
-
### Planning Agents
|
|
29
|
-
AI agents that help with requirements gathering, design decisions, and task breakdown.
|
|
30
|
-
|
|
31
|
-
**Primary Activities**:
|
|
32
|
-
- Analyze project requirements using EARS format
|
|
33
|
-
- Generate technical design documents
|
|
34
|
-
- Create implementation task breakdowns
|
|
35
|
-
- Validate workflow phase transitions
|
|
36
|
-
|
|
37
|
-
## Agent Communication Protocol
|
|
38
|
-
|
|
39
|
-
### Context Sharing
|
|
40
|
-
All agents must:
|
|
41
|
-
1. Load project steering documents at interaction start:
|
|
42
|
-
- `product.md` - Product context and business objectives
|
|
43
|
-
- `tech.md` - Technology stack and architectural decisions
|
|
44
|
-
- `structure.md` - File organization and code patterns
|
|
45
|
-
- `linus-review.md` - Code quality review principles
|
|
46
|
-
- `commit.md` - Commit message standards
|
|
47
|
-
- **`owasp-top10-check.md` - OWASP Top 10 security checklist (REQUIRED for code generation and review)**
|
|
48
|
-
- **`tdd-guideline.md` - Test-Driven Development workflow (REQUIRED for all new features)**
|
|
49
|
-
- **`principles.md` - Core coding principles (SOLID, DRY, KISS, YAGNI, Separation of Concerns, Modularity)**
|
|
50
|
-
2. Check current workflow phase before proceeding
|
|
51
|
-
3. Validate approvals before phase transitions
|
|
52
|
-
4. Update spec.json with progress tracking
|
|
53
|
-
|
|
54
|
-
### Information Flow
|
|
55
|
-
```
|
|
56
|
-
User Request → Agent Analysis → SDD Tool Invocation → Result Validation → User Response
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### State Management
|
|
60
|
-
- Agents must maintain awareness of current project state
|
|
61
|
-
- Phase transitions require explicit approval tracking
|
|
62
|
-
- All changes must be logged in spec.json metadata
|
|
63
|
-
|
|
64
|
-
## Agent Tool Usage
|
|
65
|
-
|
|
66
|
-
### Required Tools for All Agents
|
|
67
|
-
- `sdd-status`: Check current workflow state
|
|
68
|
-
- `sdd-context-load`: Load project context
|
|
69
|
-
- `sdd-quality-check`: Validate code quality
|
|
70
|
-
|
|
71
|
-
### Phase-Specific Tools
|
|
72
|
-
|
|
73
|
-
**Initialization Phase**:
|
|
74
|
-
- `sdd-init`: Create new project structure
|
|
75
|
-
- `sdd-steering`: Generate steering documents
|
|
76
|
-
|
|
77
|
-
**Requirements Phase**:
|
|
78
|
-
- `sdd-requirements`: Generate requirements document
|
|
79
|
-
- `sdd-validate-gap`: Analyze implementation gaps
|
|
80
|
-
|
|
81
|
-
**Design Phase**:
|
|
82
|
-
- `sdd-design`: Create technical design
|
|
83
|
-
- `sdd-validate-design`: Review design quality
|
|
84
|
-
|
|
85
|
-
**Tasks Phase**:
|
|
86
|
-
- `sdd-tasks`: Generate task breakdown
|
|
87
|
-
- `sdd-spec-impl`: Execute tasks with TDD
|
|
88
|
-
|
|
89
|
-
**Implementation Phase**:
|
|
90
|
-
- `sdd-implement`: Get implementation guidelines
|
|
91
|
-
- `sdd-quality-check`: Continuous quality validation
|
|
92
|
-
|
|
93
|
-
## Agent Collaboration Patterns
|
|
94
|
-
|
|
95
|
-
### Sequential Collaboration
|
|
96
|
-
Agents work in sequence through workflow phases:
|
|
97
|
-
```
|
|
98
|
-
Planning Agent → Design Agent → Implementation Agent → Review Agent
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Parallel Collaboration
|
|
102
|
-
Multiple agents work on different aspects simultaneously:
|
|
103
|
-
- Frontend Agent handles UI tasks
|
|
104
|
-
- Backend Agent handles API tasks
|
|
105
|
-
- Test Agent creates test suites
|
|
106
|
-
- Documentation Agent updates docs
|
|
107
|
-
|
|
108
|
-
### Feedback Loops
|
|
109
|
-
Agents provide feedback to improve specifications:
|
|
110
|
-
- Implementation issues feed back to design
|
|
111
|
-
- Test failures inform requirement updates
|
|
112
|
-
- Performance problems trigger architecture reviews
|
|
113
|
-
|
|
114
|
-
## Quality Standards for Agents
|
|
115
|
-
|
|
116
|
-
### Code Generation Standards
|
|
117
|
-
- Follow project coding conventions from structure.md
|
|
118
|
-
- Implement comprehensive error handling
|
|
119
|
-
- Include appropriate logging and monitoring
|
|
120
|
-
- Write self-documenting code with clear naming
|
|
121
|
-
|
|
122
|
-
### Testing Requirements
|
|
123
|
-
- Generate unit tests for all new functions
|
|
124
|
-
- Create integration tests for workflows
|
|
125
|
-
- Implement performance benchmarks
|
|
126
|
-
- Ensure test coverage meets project standards
|
|
127
|
-
|
|
128
|
-
### Documentation Expectations
|
|
129
|
-
- Update relevant documentation with changes
|
|
130
|
-
- Maintain clear commit messages following commit.md
|
|
131
|
-
- Document design decisions and trade-offs
|
|
132
|
-
- Keep README and API docs current
|
|
133
|
-
|
|
134
|
-
## Agent Configuration
|
|
135
|
-
|
|
136
|
-
### Environment Setup
|
|
137
|
-
Agents should configure their environment with:
|
|
138
|
-
```bash
|
|
139
|
-
# Load SDD MCP server
|
|
140
|
-
npx sdd-mcp-server
|
|
141
|
-
|
|
142
|
-
# Initialize project context
|
|
143
|
-
sdd-context-load [feature-name]
|
|
144
|
-
|
|
145
|
-
# Check current status
|
|
146
|
-
sdd-status [feature-name]
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Steering Document Loading
|
|
150
|
-
Agents must respect steering document modes:
|
|
151
|
-
- **Always**: Load for every interaction
|
|
152
|
-
- **Conditional**: Load based on file patterns
|
|
153
|
-
- **Manual**: Load when explicitly requested
|
|
154
|
-
|
|
155
|
-
### Tool Invocation Patterns
|
|
156
|
-
```javascript
|
|
157
|
-
// Check phase before proceeding
|
|
158
|
-
const status = await sdd-status(featureName);
|
|
159
|
-
|
|
160
|
-
// Validate requirements exist
|
|
161
|
-
if (!status.requirements.generated) {
|
|
162
|
-
await sdd-requirements(featureName);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Proceed with implementation
|
|
166
|
-
await sdd-implement(featureName);
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Best Practices for AI Agents
|
|
170
|
-
|
|
171
|
-
### 1. Context Awareness
|
|
172
|
-
- Always load full project context before making changes
|
|
173
|
-
- Understand the current workflow phase and requirements
|
|
174
|
-
- Check for existing implementations before creating new ones
|
|
175
|
-
|
|
176
|
-
### 2. Incremental Progress
|
|
177
|
-
- Complete one task fully before moving to the next
|
|
178
|
-
- Update task checkboxes in tasks.md as work progresses
|
|
179
|
-
- Commit changes frequently with clear messages
|
|
180
|
-
|
|
181
|
-
### 3. Quality Focus
|
|
182
|
-
- Run quality checks after each significant change
|
|
183
|
-
- Address issues immediately rather than accumulating debt
|
|
184
|
-
- **Follow TDD principles strictly: Red → Green → Refactor**
|
|
185
|
-
- **RED**: Write failing tests BEFORE any implementation
|
|
186
|
-
- **GREEN**: Write minimal code to make tests pass
|
|
187
|
-
- **REFACTOR**: Improve code quality while keeping tests green
|
|
188
|
-
- Refer to `.spec/steering/tdd-guideline.md` for complete TDD workflow
|
|
189
|
-
|
|
190
|
-
### 4. Communication Clarity
|
|
191
|
-
- Provide clear explanations for design decisions
|
|
192
|
-
- Document assumptions and constraints
|
|
193
|
-
- Report blockers and issues promptly
|
|
194
|
-
|
|
195
|
-
### 5. Workflow Compliance
|
|
196
|
-
- Never skip workflow phases
|
|
197
|
-
- Ensure approvals are in place before proceeding
|
|
198
|
-
- Maintain traceability from requirements to implementation
|
|
199
|
-
|
|
200
|
-
## Error Handling for Agents
|
|
201
|
-
|
|
202
|
-
### Common Issues and Solutions
|
|
203
|
-
|
|
204
|
-
**Phase Violation**: Attempting to skip workflow phases
|
|
205
|
-
- Solution: Follow the prescribed phase sequence
|
|
206
|
-
- Use `sdd-status` to check current phase
|
|
207
|
-
|
|
208
|
-
**Missing Context**: Operating without project understanding
|
|
209
|
-
- Solution: Load context with `sdd-context-load`
|
|
210
|
-
- Review steering documents before proceeding
|
|
211
|
-
|
|
212
|
-
**Quality Failures**: Code doesn't meet standards
|
|
213
|
-
- Solution: Run `sdd-quality-check` regularly
|
|
214
|
-
- Apply Linus-style review principles
|
|
215
|
-
|
|
216
|
-
**Integration Conflicts**: Changes break existing functionality
|
|
217
|
-
- Solution: Run comprehensive tests before committing
|
|
218
|
-
- Ensure backward compatibility
|
|
219
|
-
|
|
220
|
-
## Performance Guidelines
|
|
221
|
-
|
|
222
|
-
### Efficiency Standards
|
|
223
|
-
- Minimize redundant tool invocations
|
|
224
|
-
- Cache project context when possible
|
|
225
|
-
- Batch related operations together
|
|
226
|
-
|
|
227
|
-
### Resource Management
|
|
228
|
-
- Clean up temporary files after operations
|
|
229
|
-
- Limit concurrent file operations
|
|
230
|
-
- Optimize for large codebases
|
|
231
|
-
|
|
232
|
-
## Security Considerations
|
|
233
|
-
|
|
234
|
-
### Code Review Security
|
|
235
|
-
- Check for credential exposure
|
|
236
|
-
- Validate input sanitization
|
|
237
|
-
- Review authentication/authorization logic
|
|
238
|
-
- Identify potential injection vulnerabilities
|
|
239
|
-
|
|
240
|
-
### Data Handling
|
|
241
|
-
- Never commit sensitive data
|
|
242
|
-
- Use environment variables for configuration
|
|
243
|
-
- Implement proper encryption for sensitive operations
|
|
244
|
-
- Follow least privilege principles
|
|
245
|
-
|
|
246
|
-
## Integration with CI/CD
|
|
247
|
-
|
|
248
|
-
### Automated Workflows
|
|
249
|
-
Agents should support CI/CD integration:
|
|
250
|
-
- Trigger quality checks on commits
|
|
251
|
-
- Validate phase requirements in pipelines
|
|
252
|
-
- Generate reports for review processes
|
|
253
|
-
- Update documentation automatically
|
|
254
|
-
|
|
255
|
-
### Deployment Readiness
|
|
256
|
-
Before deployment, agents must ensure:
|
|
257
|
-
- All tests pass successfully
|
|
258
|
-
- Documentation is complete and current
|
|
259
|
-
- Quality standards are met
|
|
260
|
-
- Security scans show no critical issues
|
|
261
|
-
|
|
262
|
-
## Continuous Improvement
|
|
263
|
-
|
|
264
|
-
### Learning from Feedback
|
|
265
|
-
- Analyze failed implementations
|
|
266
|
-
- Update patterns based on successes
|
|
267
|
-
- Refine task estimation accuracy
|
|
268
|
-
- Improve requirement interpretation
|
|
269
|
-
|
|
270
|
-
### Metrics and Monitoring
|
|
271
|
-
Track agent performance metrics:
|
|
272
|
-
- Task completion accuracy
|
|
273
|
-
- Code quality scores
|
|
274
|
-
- Time to implementation
|
|
275
|
-
- Defect rates post-deployment
|
|
276
|
-
|
|
277
|
-
## Conclusion
|
|
278
|
-
|
|
279
|
-
AI agents are integral to the SDD workflow, providing automation and intelligence throughout the development lifecycle. By following these guidelines, agents can effectively collaborate to deliver high-quality, specification-compliant software while maintaining the rigor and discipline of spec-driven development.
|
|
280
|
-
|
|
281
|
-
Remember: Agents augment human decision-making but don't replace it. Critical decisions, approvals, and architectural choices should always involve human oversight.
|
package/steering/commit.md
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Commit Message Guidelines
|
|
2
|
-
|
|
3
|
-
Commit messages should follow a consistent format to improve readability and provide clear context about changes. Each commit message should start with a type prefix that indicates the nature of the change.
|
|
4
|
-
|
|
5
|
-
## Format
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
<type>(<scope>): <subject>
|
|
9
|
-
|
|
10
|
-
<body>
|
|
11
|
-
|
|
12
|
-
<footer>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Type Prefixes
|
|
16
|
-
|
|
17
|
-
All commit messages must begin with one of these type prefixes:
|
|
18
|
-
|
|
19
|
-
- **docs**: Documentation changes (README, comments, etc.)
|
|
20
|
-
- **chore**: Maintenance tasks, dependency updates, etc.
|
|
21
|
-
- **feat**: New features or enhancements
|
|
22
|
-
- **fix**: Bug fixes
|
|
23
|
-
- **refactor**: Code changes that neither fix bugs nor add features
|
|
24
|
-
- **test**: Adding or modifying tests
|
|
25
|
-
- **style**: Changes that don't affect code functionality (formatting, whitespace)
|
|
26
|
-
- **perf**: Performance improvements
|
|
27
|
-
- **ci**: Changes to CI/CD configuration files and scripts
|
|
28
|
-
|
|
29
|
-
## Scope (Optional)
|
|
30
|
-
|
|
31
|
-
The scope provides additional context about which part of the codebase is affected:
|
|
32
|
-
|
|
33
|
-
- **cluster**: Changes to EKS cluster configuration
|
|
34
|
-
- **db**: Database-related changes
|
|
35
|
-
- **iam**: Identity and access management changes
|
|
36
|
-
- **net**: Networking changes (VPC, security groups, etc.)
|
|
37
|
-
- **k8s**: Kubernetes resource changes
|
|
38
|
-
- **module**: Changes to reusable Terraform modules
|
|
39
|
-
|
|
40
|
-
## Examples
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
feat(cluster): add node autoscaling for billing namespace
|
|
44
|
-
fix(db): correct MySQL parameter group settings
|
|
45
|
-
docs(k8s): update network policy documentation
|
|
46
|
-
chore: update terraform provider versions
|
|
47
|
-
refactor(module): simplify EKS node group module
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Best Practices
|
|
51
|
-
|
|
52
|
-
1. Keep the subject line under 72 characters
|
|
53
|
-
2. Use imperative mood in the subject line ("add" not "added")
|
|
54
|
-
3. Don't end the subject line with a period
|
|
55
|
-
4. Separate subject from body with a blank line
|
|
56
|
-
5. Use the body to explain what and why, not how
|
|
57
|
-
6. Reference issues and pull requests in the footer
|
|
58
|
-
|
|
59
|
-
These guidelines help maintain a clean and useful git history that makes it easier to track changes and understand the project's evolution.
|