sdd-mcp-server 3.0.2 → 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/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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning
|
|
3
|
+
description: Planning and architecture mode
|
|
4
|
+
mode: planning
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Planning Context
|
|
8
|
+
|
|
9
|
+
You are in **planning mode**, focused on designing solutions and creating specifications.
|
|
10
|
+
|
|
11
|
+
## Primary Objectives
|
|
12
|
+
|
|
13
|
+
1. **Understand Requirements Deeply**
|
|
14
|
+
- Ask clarifying questions before designing
|
|
15
|
+
- Identify implicit requirements
|
|
16
|
+
- Consider non-functional requirements
|
|
17
|
+
|
|
18
|
+
2. **Design Thoughtfully**
|
|
19
|
+
- Consider multiple approaches
|
|
20
|
+
- Evaluate trade-offs explicitly
|
|
21
|
+
- Document decisions and rationale
|
|
22
|
+
|
|
23
|
+
3. **Plan Incrementally**
|
|
24
|
+
- Break down into deliverable milestones
|
|
25
|
+
- Identify dependencies
|
|
26
|
+
- Estimate complexity honestly
|
|
27
|
+
|
|
28
|
+
## Planning Process
|
|
29
|
+
|
|
30
|
+
### 1. Problem Analysis
|
|
31
|
+
- What problem are we solving?
|
|
32
|
+
- Who are the users?
|
|
33
|
+
- What are the constraints?
|
|
34
|
+
- What does success look like?
|
|
35
|
+
|
|
36
|
+
### 2. Solution Exploration
|
|
37
|
+
- What are possible approaches?
|
|
38
|
+
- What are the trade-offs of each?
|
|
39
|
+
- What do similar systems do?
|
|
40
|
+
- What are the risks?
|
|
41
|
+
|
|
42
|
+
### 3. Technical Design
|
|
43
|
+
- Component architecture
|
|
44
|
+
- Data models and flows
|
|
45
|
+
- API contracts
|
|
46
|
+
- Integration points
|
|
47
|
+
|
|
48
|
+
### 4. Implementation Planning
|
|
49
|
+
- Task breakdown
|
|
50
|
+
- Dependency mapping
|
|
51
|
+
- Risk mitigation
|
|
52
|
+
- Testing strategy
|
|
53
|
+
|
|
54
|
+
## Deliverables
|
|
55
|
+
|
|
56
|
+
### Requirements Document
|
|
57
|
+
- EARS-formatted requirements
|
|
58
|
+
- Acceptance criteria
|
|
59
|
+
- Constraints and assumptions
|
|
60
|
+
|
|
61
|
+
### Design Document
|
|
62
|
+
- Architecture diagrams
|
|
63
|
+
- Component specifications
|
|
64
|
+
- Interface definitions
|
|
65
|
+
- Security considerations
|
|
66
|
+
|
|
67
|
+
### Task Breakdown
|
|
68
|
+
- TDD-structured tasks
|
|
69
|
+
- Complexity estimates
|
|
70
|
+
- Dependencies identified
|
|
71
|
+
- Steering doc references
|
|
72
|
+
|
|
73
|
+
## Communication Style
|
|
74
|
+
|
|
75
|
+
- Use diagrams to explain architecture
|
|
76
|
+
- Present options with trade-offs
|
|
77
|
+
- Be explicit about assumptions
|
|
78
|
+
- Highlight risks and mitigations
|
|
79
|
+
- Provide time/complexity estimates when asked
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: Research and exploration mode
|
|
4
|
+
mode: research
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Research Context
|
|
8
|
+
|
|
9
|
+
You are in **research mode**, focused on exploring codebases, understanding systems, and gathering information.
|
|
10
|
+
|
|
11
|
+
## Primary Objectives
|
|
12
|
+
|
|
13
|
+
1. **Understand Before Acting**
|
|
14
|
+
- Explore thoroughly before suggesting changes
|
|
15
|
+
- Trace code paths to understand behavior
|
|
16
|
+
- Identify patterns and conventions
|
|
17
|
+
|
|
18
|
+
2. **Document Findings**
|
|
19
|
+
- Summarize key discoveries
|
|
20
|
+
- Note important files and functions
|
|
21
|
+
- Highlight potential issues or opportunities
|
|
22
|
+
|
|
23
|
+
3. **Answer Questions Accurately**
|
|
24
|
+
- Base answers on actual code, not assumptions
|
|
25
|
+
- Acknowledge uncertainty when it exists
|
|
26
|
+
- Provide references to relevant files
|
|
27
|
+
|
|
28
|
+
## Research Strategies
|
|
29
|
+
|
|
30
|
+
### Codebase Exploration
|
|
31
|
+
- Start with entry points (main, index, config)
|
|
32
|
+
- Follow import/export chains
|
|
33
|
+
- Identify core modules and dependencies
|
|
34
|
+
- Map the architecture
|
|
35
|
+
|
|
36
|
+
### Pattern Recognition
|
|
37
|
+
- What design patterns are used?
|
|
38
|
+
- How is dependency injection handled?
|
|
39
|
+
- What testing approach is used?
|
|
40
|
+
- How are errors handled?
|
|
41
|
+
|
|
42
|
+
### Documentation Mining
|
|
43
|
+
- Read README and CONTRIBUTING files
|
|
44
|
+
- Check for inline documentation
|
|
45
|
+
- Review test files for usage examples
|
|
46
|
+
- Look for architectural decision records
|
|
47
|
+
|
|
48
|
+
## Information Gathering
|
|
49
|
+
|
|
50
|
+
### Questions to Answer
|
|
51
|
+
- What does this code do?
|
|
52
|
+
- How is it structured?
|
|
53
|
+
- What are the dependencies?
|
|
54
|
+
- What patterns are followed?
|
|
55
|
+
- Where are the potential issues?
|
|
56
|
+
|
|
57
|
+
### Code Navigation Tips
|
|
58
|
+
- Use grep/search for function definitions
|
|
59
|
+
- Follow the type system for understanding
|
|
60
|
+
- Read tests to understand expected behavior
|
|
61
|
+
- Check commit history for context
|
|
62
|
+
|
|
63
|
+
## Communication Style
|
|
64
|
+
|
|
65
|
+
- Present findings in organized summaries
|
|
66
|
+
- Use code references (file:line)
|
|
67
|
+
- Distinguish facts from inferences
|
|
68
|
+
- Offer to dive deeper when relevant
|
|
69
|
+
- Create diagrams for complex relationships
|
|
70
|
+
|
|
71
|
+
## Output Formats
|
|
72
|
+
|
|
73
|
+
### Summary Report
|
|
74
|
+
```markdown
|
|
75
|
+
## Codebase Analysis: [Component]
|
|
76
|
+
|
|
77
|
+
### Overview
|
|
78
|
+
Brief description of what this component does.
|
|
79
|
+
|
|
80
|
+
### Key Files
|
|
81
|
+
- `src/main.ts` - Entry point
|
|
82
|
+
- `src/core/` - Core business logic
|
|
83
|
+
|
|
84
|
+
### Architecture
|
|
85
|
+
How components interact.
|
|
86
|
+
|
|
87
|
+
### Patterns Used
|
|
88
|
+
- Dependency Injection (Inversify)
|
|
89
|
+
- Repository Pattern
|
|
90
|
+
|
|
91
|
+
### Observations
|
|
92
|
+
Notable findings, potential issues, opportunities.
|
|
93
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Code review mode with quality focus
|
|
4
|
+
mode: review
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Review Context
|
|
8
|
+
|
|
9
|
+
You are in **review mode**, focused on evaluating code quality and catching issues.
|
|
10
|
+
|
|
11
|
+
## Review Philosophy
|
|
12
|
+
|
|
13
|
+
Channel your inner Linus Torvalds - be direct, thorough, and focused on what matters:
|
|
14
|
+
- Code correctness over style preferences
|
|
15
|
+
- Maintainability over cleverness
|
|
16
|
+
- Simplicity over complexity
|
|
17
|
+
|
|
18
|
+
## Review Checklist
|
|
19
|
+
|
|
20
|
+
### Correctness
|
|
21
|
+
- [ ] Does the code do what it claims?
|
|
22
|
+
- [ ] Are edge cases handled?
|
|
23
|
+
- [ ] Is error handling appropriate?
|
|
24
|
+
- [ ] Are there potential null/undefined issues?
|
|
25
|
+
|
|
26
|
+
### Design
|
|
27
|
+
- [ ] Does it follow existing patterns?
|
|
28
|
+
- [ ] Is the abstraction level appropriate?
|
|
29
|
+
- [ ] Are responsibilities clearly separated?
|
|
30
|
+
- [ ] Is the code testable?
|
|
31
|
+
|
|
32
|
+
### Security
|
|
33
|
+
- [ ] Input validation present?
|
|
34
|
+
- [ ] No hardcoded secrets?
|
|
35
|
+
- [ ] Proper authentication/authorization?
|
|
36
|
+
- [ ] SQL injection / XSS prevention?
|
|
37
|
+
|
|
38
|
+
### Performance
|
|
39
|
+
- [ ] No obvious N+1 queries?
|
|
40
|
+
- [ ] Appropriate data structures?
|
|
41
|
+
- [ ] No unnecessary computations?
|
|
42
|
+
|
|
43
|
+
### Testing
|
|
44
|
+
- [ ] Tests cover the changes?
|
|
45
|
+
- [ ] Tests are meaningful (not just coverage)?
|
|
46
|
+
- [ ] Edge cases tested?
|
|
47
|
+
|
|
48
|
+
## Feedback Style
|
|
49
|
+
|
|
50
|
+
### Be Direct
|
|
51
|
+
```
|
|
52
|
+
BAD: "Maybe you could consider possibly using a different approach here?"
|
|
53
|
+
GOOD: "Use a Map instead of array.find() - O(1) vs O(n) lookup."
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Be Specific
|
|
57
|
+
```
|
|
58
|
+
BAD: "This function is too complex."
|
|
59
|
+
GOOD: "This function has 5 nested conditions. Extract the validation logic into a separate function."
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Explain Why
|
|
63
|
+
```
|
|
64
|
+
BAD: "Don't use any here."
|
|
65
|
+
GOOD: "Replace `any` with `unknown` - it forces proper type checking before use."
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Severity Levels
|
|
69
|
+
|
|
70
|
+
- **🔴 Blocker**: Must fix before merge (bugs, security issues)
|
|
71
|
+
- **🟠 Major**: Should fix, significant improvement (design issues)
|
|
72
|
+
- **🟡 Minor**: Nice to fix, minor improvement (style, optimization)
|
|
73
|
+
- **💭 Suggestion**: Consider for future (ideas, alternatives)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: Security audit mode with threat focus
|
|
4
|
+
mode: security-audit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Audit Context
|
|
8
|
+
|
|
9
|
+
You are in **security audit mode**, focused on identifying vulnerabilities and security risks.
|
|
10
|
+
|
|
11
|
+
## Audit Framework
|
|
12
|
+
|
|
13
|
+
Follow OWASP Top 10 as primary checklist:
|
|
14
|
+
|
|
15
|
+
### A01: Broken Access Control
|
|
16
|
+
- [ ] Authentication required for sensitive operations?
|
|
17
|
+
- [ ] Authorization checked for each request?
|
|
18
|
+
- [ ] Principle of least privilege applied?
|
|
19
|
+
- [ ] Direct object references protected?
|
|
20
|
+
|
|
21
|
+
### A02: Cryptographic Failures
|
|
22
|
+
- [ ] Sensitive data encrypted at rest?
|
|
23
|
+
- [ ] TLS used for data in transit?
|
|
24
|
+
- [ ] Strong hashing for passwords (bcrypt, argon2)?
|
|
25
|
+
- [ ] No secrets in source code?
|
|
26
|
+
|
|
27
|
+
### A03: Injection
|
|
28
|
+
- [ ] Parameterized queries used?
|
|
29
|
+
- [ ] Input validation on all user data?
|
|
30
|
+
- [ ] Output encoding for context?
|
|
31
|
+
- [ ] No eval() or similar?
|
|
32
|
+
|
|
33
|
+
### A04: Insecure Design
|
|
34
|
+
- [ ] Threat modeling performed?
|
|
35
|
+
- [ ] Defense in depth applied?
|
|
36
|
+
- [ ] Secure defaults configured?
|
|
37
|
+
- [ ] Rate limiting implemented?
|
|
38
|
+
|
|
39
|
+
### A05: Security Misconfiguration
|
|
40
|
+
- [ ] Unnecessary features disabled?
|
|
41
|
+
- [ ] Error messages don't leak info?
|
|
42
|
+
- [ ] Security headers configured?
|
|
43
|
+
- [ ] Default credentials removed?
|
|
44
|
+
|
|
45
|
+
### A06: Vulnerable Components
|
|
46
|
+
- [ ] Dependencies up to date?
|
|
47
|
+
- [ ] Known vulnerabilities checked?
|
|
48
|
+
- [ ] Minimal dependency footprint?
|
|
49
|
+
|
|
50
|
+
### A07: Authentication Failures
|
|
51
|
+
- [ ] Strong password policy?
|
|
52
|
+
- [ ] Brute force protection?
|
|
53
|
+
- [ ] Session management secure?
|
|
54
|
+
- [ ] Credential storage secure?
|
|
55
|
+
|
|
56
|
+
### A08: Data Integrity
|
|
57
|
+
- [ ] Data validation on input?
|
|
58
|
+
- [ ] Integrity checks on critical data?
|
|
59
|
+
- [ ] Audit logging enabled?
|
|
60
|
+
|
|
61
|
+
### A09: Logging Failures
|
|
62
|
+
- [ ] Security events logged?
|
|
63
|
+
- [ ] Sensitive data excluded from logs?
|
|
64
|
+
- [ ] Logs protected from tampering?
|
|
65
|
+
|
|
66
|
+
### A10: SSRF
|
|
67
|
+
- [ ] URL validation present?
|
|
68
|
+
- [ ] Allowlist for external services?
|
|
69
|
+
- [ ] Internal services protected?
|
|
70
|
+
|
|
71
|
+
## Reporting Format
|
|
72
|
+
|
|
73
|
+
For each finding:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
### [SEVERITY] Finding Title
|
|
77
|
+
|
|
78
|
+
**Location**: file.ts:123
|
|
79
|
+
**Category**: OWASP A03 - Injection
|
|
80
|
+
**Risk**: Description of potential impact
|
|
81
|
+
**Evidence**: Code snippet or proof
|
|
82
|
+
**Recommendation**: How to fix
|
|
83
|
+
**Reference**: Link to guidance
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Severity Levels
|
|
87
|
+
|
|
88
|
+
- **CRITICAL**: Immediate exploitation possible, high impact
|
|
89
|
+
- **HIGH**: Likely exploitation, significant impact
|
|
90
|
+
- **MEDIUM**: Possible exploitation, moderate impact
|
|
91
|
+
- **LOW**: Unlikely exploitation or low impact
|
|
92
|
+
- **INFO**: Best practice improvement
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Steering Migration Tool for SDD MCP v3.1
|
|
4
|
+
*
|
|
5
|
+
* Migrates projects from static steering documents to the new consolidated
|
|
6
|
+
* agents/rules/skills architecture.
|
|
7
|
+
*
|
|
8
|
+
* This tool:
|
|
9
|
+
* 1. Detects old steering structure (.spec/steering/ with static docs)
|
|
10
|
+
* 2. Backs up existing steering to .spec/steering.backup/
|
|
11
|
+
* 3. Removes static steering docs (principles, tdd-guideline, linus-review, etc.)
|
|
12
|
+
* 4. Preserves project-specific docs (product.md, tech.md, structure.md)
|
|
13
|
+
*
|
|
14
|
+
* The static steering content has been merged into:
|
|
15
|
+
* - principles.md → rules/coding-style.md
|
|
16
|
+
* - tdd-guideline.md → agents/tdd-guide.md
|
|
17
|
+
* - linus-review.md → agents/reviewer.md
|
|
18
|
+
* - owasp-top10-check.md → agents/security-auditor.md
|
|
19
|
+
* - commit.md → skills/sdd-commit/SKILL.md
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Main migration function
|
|
23
|
+
*/
|
|
24
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Steering Migration Tool for SDD MCP v3.1
|
|
4
|
+
*
|
|
5
|
+
* Migrates projects from static steering documents to the new consolidated
|
|
6
|
+
* agents/rules/skills architecture.
|
|
7
|
+
*
|
|
8
|
+
* This tool:
|
|
9
|
+
* 1. Detects old steering structure (.spec/steering/ with static docs)
|
|
10
|
+
* 2. Backs up existing steering to .spec/steering.backup/
|
|
11
|
+
* 3. Removes static steering docs (principles, tdd-guideline, linus-review, etc.)
|
|
12
|
+
* 4. Preserves project-specific docs (product.md, tech.md, structure.md)
|
|
13
|
+
*
|
|
14
|
+
* The static steering content has been merged into:
|
|
15
|
+
* - principles.md → rules/coding-style.md
|
|
16
|
+
* - tdd-guideline.md → agents/tdd-guide.md
|
|
17
|
+
* - linus-review.md → agents/reviewer.md
|
|
18
|
+
* - owasp-top10-check.md → agents/security-auditor.md
|
|
19
|
+
* - commit.md → skills/sdd-commit/SKILL.md
|
|
20
|
+
*/
|
|
21
|
+
import * as fs from 'fs';
|
|
22
|
+
import * as path from 'path';
|
|
23
|
+
const HELP = `
|
|
24
|
+
SDD Steering Migration Tool (v3.1)
|
|
25
|
+
|
|
26
|
+
Migrates from static steering documents to consolidated agents/rules/skills.
|
|
27
|
+
|
|
28
|
+
Usage: npx sdd-mcp-server migrate-steering [options]
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
--path <dir> Project directory (default: current directory)
|
|
32
|
+
--dry-run, -n Preview without making changes
|
|
33
|
+
--force, -f Skip confirmation prompts
|
|
34
|
+
--help, -h Show this help
|
|
35
|
+
|
|
36
|
+
What This Tool Does:
|
|
37
|
+
1. Backs up existing .spec/steering/ to .spec/steering.backup/
|
|
38
|
+
2. Removes static steering documents that have been merged:
|
|
39
|
+
- AGENTS.md (meta-doc, removed)
|
|
40
|
+
- commit.md (merged into skills/sdd-commit/SKILL.md)
|
|
41
|
+
- linus-review.md (merged into agents/reviewer.md)
|
|
42
|
+
- owasp-top10-check.md (merged into agents/security-auditor.md)
|
|
43
|
+
- principles.md (merged into rules/coding-style.md)
|
|
44
|
+
- tdd-guideline.md (merged into agents/tdd-guide.md)
|
|
45
|
+
3. Preserves project-specific templates:
|
|
46
|
+
- product.md
|
|
47
|
+
- tech.md
|
|
48
|
+
- structure.md
|
|
49
|
+
|
|
50
|
+
Migration Path:
|
|
51
|
+
The static guidance content now lives in enhanced components:
|
|
52
|
+
- Design principles: .claude/rules/coding-style.md
|
|
53
|
+
- TDD methodology: .claude/agents/tdd-guide.md
|
|
54
|
+
- Review criteria: .claude/agents/reviewer.md
|
|
55
|
+
- Security checklist: .claude/agents/security-auditor.md
|
|
56
|
+
- Commit format: .claude/skills/sdd-commit/SKILL.md
|
|
57
|
+
|
|
58
|
+
Examples:
|
|
59
|
+
npx sdd-mcp-server migrate-steering # Migrate current directory
|
|
60
|
+
npx sdd-mcp-server migrate-steering --dry-run # Preview changes
|
|
61
|
+
npx sdd-mcp-server migrate-steering --path ./my-project
|
|
62
|
+
`;
|
|
63
|
+
/**
|
|
64
|
+
* Static steering documents that should be removed
|
|
65
|
+
* These have been merged into agents/rules/skills
|
|
66
|
+
*/
|
|
67
|
+
const STATIC_STEERING_DOCS = [
|
|
68
|
+
'AGENTS.md',
|
|
69
|
+
'commit.md',
|
|
70
|
+
'linus-review.md',
|
|
71
|
+
'owasp-top10-check.md',
|
|
72
|
+
'principles.md',
|
|
73
|
+
'tdd-guideline.md',
|
|
74
|
+
];
|
|
75
|
+
/**
|
|
76
|
+
* Project-specific templates that should be preserved
|
|
77
|
+
*/
|
|
78
|
+
const PROJECT_SPECIFIC_DOCS = [
|
|
79
|
+
'product.md',
|
|
80
|
+
'tech.md',
|
|
81
|
+
'structure.md',
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* Parse command line arguments
|
|
85
|
+
*/
|
|
86
|
+
function parseArgs(args) {
|
|
87
|
+
let projectPath = process.cwd();
|
|
88
|
+
let dryRun = false;
|
|
89
|
+
let force = false;
|
|
90
|
+
let showHelp = false;
|
|
91
|
+
for (let i = 0; i < args.length; i++) {
|
|
92
|
+
switch (args[i]) {
|
|
93
|
+
case '--path':
|
|
94
|
+
projectPath = path.resolve(args[++i] || '.');
|
|
95
|
+
break;
|
|
96
|
+
case '--dry-run':
|
|
97
|
+
case '-n':
|
|
98
|
+
dryRun = true;
|
|
99
|
+
break;
|
|
100
|
+
case '--force':
|
|
101
|
+
case '-f':
|
|
102
|
+
force = true;
|
|
103
|
+
break;
|
|
104
|
+
case '--help':
|
|
105
|
+
case '-h':
|
|
106
|
+
showHelp = true;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return { projectPath, dryRun, force, showHelp };
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get all files in a directory recursively
|
|
114
|
+
*/
|
|
115
|
+
function getAllFiles(dir) {
|
|
116
|
+
const files = [];
|
|
117
|
+
if (!fs.existsSync(dir))
|
|
118
|
+
return files;
|
|
119
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
120
|
+
const fullPath = path.join(dir, entry.name);
|
|
121
|
+
if (entry.isDirectory()) {
|
|
122
|
+
files.push(...getAllFiles(fullPath));
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
files.push(fullPath);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return files;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Check if a steering directory has static docs that need migration
|
|
132
|
+
*/
|
|
133
|
+
function detectOldStructure(steeringPath) {
|
|
134
|
+
const staticDocs = [];
|
|
135
|
+
const projectDocs = [];
|
|
136
|
+
const otherDocs = [];
|
|
137
|
+
if (!fs.existsSync(steeringPath)) {
|
|
138
|
+
return { hasStaticDocs: false, staticDocs, projectDocs, otherDocs };
|
|
139
|
+
}
|
|
140
|
+
const entries = fs.readdirSync(steeringPath);
|
|
141
|
+
for (const entry of entries) {
|
|
142
|
+
if (!entry.endsWith('.md'))
|
|
143
|
+
continue;
|
|
144
|
+
if (STATIC_STEERING_DOCS.includes(entry)) {
|
|
145
|
+
staticDocs.push(entry);
|
|
146
|
+
}
|
|
147
|
+
else if (PROJECT_SPECIFIC_DOCS.includes(entry)) {
|
|
148
|
+
projectDocs.push(entry);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
otherDocs.push(entry);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
hasStaticDocs: staticDocs.length > 0,
|
|
156
|
+
staticDocs,
|
|
157
|
+
projectDocs,
|
|
158
|
+
otherDocs,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Create backup of steering directory
|
|
163
|
+
*/
|
|
164
|
+
function backupSteering(steeringPath, backupPath, dryRun) {
|
|
165
|
+
if (dryRun) {
|
|
166
|
+
console.log(` Would backup: ${steeringPath} → ${backupPath}`);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
// If backup already exists, add timestamp
|
|
170
|
+
let finalBackupPath = backupPath;
|
|
171
|
+
if (fs.existsSync(backupPath)) {
|
|
172
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
173
|
+
finalBackupPath = `${backupPath}-${timestamp}`;
|
|
174
|
+
}
|
|
175
|
+
// Copy all files to backup
|
|
176
|
+
fs.mkdirSync(finalBackupPath, { recursive: true });
|
|
177
|
+
const files = getAllFiles(steeringPath);
|
|
178
|
+
for (const file of files) {
|
|
179
|
+
const rel = path.relative(steeringPath, file);
|
|
180
|
+
const destFile = path.join(finalBackupPath, rel);
|
|
181
|
+
fs.mkdirSync(path.dirname(destFile), { recursive: true });
|
|
182
|
+
fs.copyFileSync(file, destFile);
|
|
183
|
+
}
|
|
184
|
+
console.log(` ✓ Backed up to: ${finalBackupPath}`);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Remove static steering documents
|
|
188
|
+
*/
|
|
189
|
+
function removeStaticDocs(steeringPath, staticDocs, dryRun) {
|
|
190
|
+
for (const doc of staticDocs) {
|
|
191
|
+
const docPath = path.join(steeringPath, doc);
|
|
192
|
+
if (dryRun) {
|
|
193
|
+
console.log(` Would remove: ${doc}`);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
if (fs.existsSync(docPath)) {
|
|
197
|
+
fs.unlinkSync(docPath);
|
|
198
|
+
console.log(` ✓ Removed: ${doc}`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Main migration function
|
|
205
|
+
*/
|
|
206
|
+
export async function main() {
|
|
207
|
+
const args = process.argv.slice(2);
|
|
208
|
+
const { projectPath, dryRun, force, showHelp } = parseArgs(args);
|
|
209
|
+
if (showHelp) {
|
|
210
|
+
console.log(HELP);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const steeringPath = path.join(projectPath, '.spec', 'steering');
|
|
214
|
+
const backupPath = path.join(projectPath, '.spec', 'steering.backup');
|
|
215
|
+
console.log('\n🔄 SDD Steering Migration (v3.1)\n');
|
|
216
|
+
// Check if .spec/steering exists
|
|
217
|
+
if (!fs.existsSync(steeringPath)) {
|
|
218
|
+
console.log('ℹ️ No .spec/steering directory found. Nothing to migrate.\n');
|
|
219
|
+
console.log(' If this is a new project, run: npx sdd-mcp-server install\n');
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
// Detect structure
|
|
223
|
+
const { hasStaticDocs, staticDocs, projectDocs, otherDocs } = detectOldStructure(steeringPath);
|
|
224
|
+
if (!hasStaticDocs) {
|
|
225
|
+
console.log('✅ No static steering documents found. Already migrated or clean install.\n');
|
|
226
|
+
if (projectDocs.length > 0) {
|
|
227
|
+
console.log(' Project-specific documents preserved:');
|
|
228
|
+
for (const doc of projectDocs) {
|
|
229
|
+
console.log(` • ${doc}`);
|
|
230
|
+
}
|
|
231
|
+
console.log('');
|
|
232
|
+
}
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
// Display what will happen
|
|
236
|
+
console.log('📋 Migration Plan:\n');
|
|
237
|
+
console.log(' Static documents to remove (merged into components):');
|
|
238
|
+
for (const doc of staticDocs) {
|
|
239
|
+
const mergedInto = getMergeTarget(doc);
|
|
240
|
+
console.log(` • ${doc} → ${mergedInto}`);
|
|
241
|
+
}
|
|
242
|
+
console.log('');
|
|
243
|
+
if (projectDocs.length > 0) {
|
|
244
|
+
console.log(' Project-specific documents to preserve:');
|
|
245
|
+
for (const doc of projectDocs) {
|
|
246
|
+
console.log(` • ${doc}`);
|
|
247
|
+
}
|
|
248
|
+
console.log('');
|
|
249
|
+
}
|
|
250
|
+
if (otherDocs.length > 0) {
|
|
251
|
+
console.log(' Other documents (will be preserved):');
|
|
252
|
+
for (const doc of otherDocs) {
|
|
253
|
+
console.log(` • ${doc}`);
|
|
254
|
+
}
|
|
255
|
+
console.log('');
|
|
256
|
+
}
|
|
257
|
+
if (dryRun) {
|
|
258
|
+
console.log('🔍 DRY RUN - No changes will be made.\n');
|
|
259
|
+
}
|
|
260
|
+
// Backup
|
|
261
|
+
console.log('📦 Backup:\n');
|
|
262
|
+
backupSteering(steeringPath, backupPath, dryRun);
|
|
263
|
+
console.log('');
|
|
264
|
+
// Remove static docs
|
|
265
|
+
console.log('🗑️ Removing static documents:\n');
|
|
266
|
+
removeStaticDocs(steeringPath, staticDocs, dryRun);
|
|
267
|
+
console.log('');
|
|
268
|
+
// Summary
|
|
269
|
+
if (dryRun) {
|
|
270
|
+
console.log('✅ Preview complete. Run without --dry-run to apply changes.\n');
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
console.log('✅ Migration complete!\n');
|
|
274
|
+
console.log(' The static steering content now lives in:');
|
|
275
|
+
console.log(' • .claude/rules/coding-style.md (SOLID, DRY, KISS, YAGNI)');
|
|
276
|
+
console.log(' • .claude/agents/reviewer.md (Linus-style review)');
|
|
277
|
+
console.log(' • .claude/agents/tdd-guide.md (TDD methodology)');
|
|
278
|
+
console.log(' • .claude/agents/security-auditor.md (OWASP Top 10)');
|
|
279
|
+
console.log(' • .claude/skills/sdd-commit/SKILL.md (Commit format)\n');
|
|
280
|
+
console.log(' To update .claude/ components, run: npx sdd-mcp-server install\n');
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Get the merge target description for a static doc
|
|
285
|
+
*/
|
|
286
|
+
function getMergeTarget(doc) {
|
|
287
|
+
const targets = {
|
|
288
|
+
'AGENTS.md': '(removed - meta documentation)',
|
|
289
|
+
'commit.md': 'skills/sdd-commit/SKILL.md',
|
|
290
|
+
'linus-review.md': 'agents/reviewer.md',
|
|
291
|
+
'owasp-top10-check.md': 'agents/security-auditor.md',
|
|
292
|
+
'principles.md': 'rules/coding-style.md',
|
|
293
|
+
'tdd-guideline.md': 'agents/tdd-guide.md',
|
|
294
|
+
};
|
|
295
|
+
return targets[doc] || '(unknown)';
|
|
296
|
+
}
|
|
297
|
+
// ESM main module detection
|
|
298
|
+
const isMainModule = process.argv[1] && (process.argv[1].endsWith('/migrate-steering.js') ||
|
|
299
|
+
process.argv[1].endsWith('/migrate-steering.ts') ||
|
|
300
|
+
process.argv[1].endsWith('\\migrate-steering.js') ||
|
|
301
|
+
process.argv[1].endsWith('\\migrate-steering.ts'));
|
|
302
|
+
if (isMainModule) {
|
|
303
|
+
main().catch((error) => {
|
|
304
|
+
console.error('Error:', error.message);
|
|
305
|
+
process.exit(1);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=migrate-steering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-steering.js","sourceRoot":"","sources":["../../src/cli/migrate-steering.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,I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