musubi-sdd 0.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/LICENSE +21 -0
- package/README.ja.md +531 -0
- package/README.md +531 -0
- package/bin/musubi-init.js +321 -0
- package/bin/musubi.js +359 -0
- package/package.json +55 -0
- package/src/agents/registry.js +242 -0
- package/src/templates/agents/claude-code/CLAUDE.md +232 -0
- package/src/templates/agents/claude-code/commands/sdd-design.md +673 -0
- package/src/templates/agents/claude-code/commands/sdd-implement.md +777 -0
- package/src/templates/agents/claude-code/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/claude-code/commands/sdd-steering.md +334 -0
- package/src/templates/agents/claude-code/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/claude-code/commands/sdd-validate.md +710 -0
- package/src/templates/agents/claude-code/skills/ai-ml-engineer/SKILL.md +3055 -0
- package/src/templates/agents/claude-code/skills/api-designer/SKILL.md +1364 -0
- package/src/templates/agents/claude-code/skills/bug-hunter/SKILL.md +482 -0
- package/src/templates/agents/claude-code/skills/change-impact-analyzer/SKILL.md +397 -0
- package/src/templates/agents/claude-code/skills/cloud-architect/SKILL.md +1468 -0
- package/src/templates/agents/claude-code/skills/code-reviewer/SKILL.md +906 -0
- package/src/templates/agents/claude-code/skills/constitution-enforcer/SKILL.md +466 -0
- package/src/templates/agents/claude-code/skills/database-administrator/SKILL.md +3522 -0
- package/src/templates/agents/claude-code/skills/database-schema-designer/SKILL.md +1158 -0
- package/src/templates/agents/claude-code/skills/devops-engineer/SKILL.md +647 -0
- package/src/templates/agents/claude-code/skills/orchestrator/SKILL.md +574 -0
- package/src/templates/agents/claude-code/skills/performance-optimizer/SKILL.md +464 -0
- package/src/templates/agents/claude-code/skills/project-manager/SKILL.md +769 -0
- package/src/templates/agents/claude-code/skills/quality-assurance/SKILL.md +1059 -0
- package/src/templates/agents/claude-code/skills/release-coordinator/SKILL.md +653 -0
- package/src/templates/agents/claude-code/skills/requirements-analyst/SKILL.md +1287 -0
- package/src/templates/agents/claude-code/skills/security-auditor/SKILL.md +1107 -0
- package/src/templates/agents/claude-code/skills/site-reliability-engineer/SKILL.md +404 -0
- package/src/templates/agents/claude-code/skills/software-developer/SKILL.md +1254 -0
- package/src/templates/agents/claude-code/skills/steering/SKILL.md +383 -0
- package/src/templates/agents/claude-code/skills/system-architect/SKILL.md +1288 -0
- package/src/templates/agents/claude-code/skills/technical-writer/SKILL.md +712 -0
- package/src/templates/agents/claude-code/skills/test-engineer/SKILL.md +1262 -0
- package/src/templates/agents/claude-code/skills/traceability-auditor/SKILL.md +298 -0
- package/src/templates/agents/claude-code/skills/ui-ux-designer/SKILL.md +1009 -0
- package/src/templates/agents/codex/AGENTS.md +138 -0
- package/src/templates/agents/codex/commands/sdd-design.md +673 -0
- package/src/templates/agents/codex/commands/sdd-implement.md +777 -0
- package/src/templates/agents/codex/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/codex/commands/sdd-steering.md +334 -0
- package/src/templates/agents/codex/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/codex/commands/sdd-validate.md +710 -0
- package/src/templates/agents/cursor/AGENTS.md +138 -0
- package/src/templates/agents/cursor/commands/sdd-design.md +673 -0
- package/src/templates/agents/cursor/commands/sdd-implement.md +777 -0
- package/src/templates/agents/cursor/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/cursor/commands/sdd-steering.md +334 -0
- package/src/templates/agents/cursor/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/cursor/commands/sdd-validate.md +710 -0
- package/src/templates/agents/gemini-cli/GEMINI.md +128 -0
- package/src/templates/agents/gemini-cli/commands/sdd-design.toml +359 -0
- package/src/templates/agents/gemini-cli/commands/sdd-implement.toml +484 -0
- package/src/templates/agents/gemini-cli/commands/sdd-requirements.toml +291 -0
- package/src/templates/agents/gemini-cli/commands/sdd-steering.toml +209 -0
- package/src/templates/agents/gemini-cli/commands/sdd-tasks.toml +441 -0
- package/src/templates/agents/gemini-cli/commands/sdd-validate.toml +553 -0
- package/src/templates/agents/github-copilot/AGENTS.md +138 -0
- package/src/templates/agents/github-copilot/commands/sdd-design.md +673 -0
- package/src/templates/agents/github-copilot/commands/sdd-implement.md +777 -0
- package/src/templates/agents/github-copilot/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/github-copilot/commands/sdd-steering.md +334 -0
- package/src/templates/agents/github-copilot/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/github-copilot/commands/sdd-validate.md +710 -0
- package/src/templates/agents/qwen-code/QWEN.md +128 -0
- package/src/templates/agents/qwen-code/commands/sdd-design.md +673 -0
- package/src/templates/agents/qwen-code/commands/sdd-implement.md +777 -0
- package/src/templates/agents/qwen-code/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/qwen-code/commands/sdd-steering.md +334 -0
- package/src/templates/agents/qwen-code/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/qwen-code/commands/sdd-validate.md +710 -0
- package/src/templates/agents/windsurf/AGENTS.md +138 -0
- package/src/templates/agents/windsurf/commands/sdd-design.md +673 -0
- package/src/templates/agents/windsurf/commands/sdd-implement.md +777 -0
- package/src/templates/agents/windsurf/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/windsurf/commands/sdd-steering.md +334 -0
- package/src/templates/agents/windsurf/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/windsurf/commands/sdd-validate.md +710 -0
- package/src/templates/shared/constitution/constitution.md +408 -0
- package/src/templates/shared/constitution/ears-format.md +613 -0
- package/src/templates/shared/constitution/workflow.md +653 -0
- package/src/templates/shared/documents/design.md +737 -0
- package/src/templates/shared/documents/requirements.md +329 -0
- package/src/templates/shared/documents/research.md +494 -0
- package/src/templates/shared/documents/tasks.md +781 -0
- package/src/templates/shared/steering/product.md +544 -0
- package/src/templates/shared/steering/structure.md +405 -0
- package/src/templates/shared/steering/tech.md +537 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
name = "sdd-requirements"
|
|
2
|
+
description = "Create EARS-format requirements specification for a feature"
|
|
3
|
+
|
|
4
|
+
[[instructions]]
|
|
5
|
+
role = "system"
|
|
6
|
+
content = """
|
|
7
|
+
You are executing the /sdd-requirements command to create a requirements specification using EARS format.
|
|
8
|
+
|
|
9
|
+
# Command Format
|
|
10
|
+
|
|
11
|
+
/sdd-requirements <feature-name>
|
|
12
|
+
|
|
13
|
+
Example: /sdd-requirements authentication
|
|
14
|
+
|
|
15
|
+
# Your Task
|
|
16
|
+
|
|
17
|
+
Create a comprehensive requirements specification for the given feature using EARS (Easy Approach to Requirements Syntax) format.
|
|
18
|
+
|
|
19
|
+
# Step 1: Read Project Memory (IMPORTANT)
|
|
20
|
+
|
|
21
|
+
**ALWAYS read steering files FIRST to understand project context:**
|
|
22
|
+
|
|
23
|
+
- Read `steering/structure.md` (English) - Architecture patterns
|
|
24
|
+
- Read `steering/tech.md` (English) - Technology stack
|
|
25
|
+
- Read `steering/product.md` (English) - Product context
|
|
26
|
+
|
|
27
|
+
**Note**: Japanese versions (.ja.md) are translations only. Always use English versions (.md) for all work.
|
|
28
|
+
|
|
29
|
+
# Step 2: Understand the Feature
|
|
30
|
+
|
|
31
|
+
1. Ask user for feature details if needed
|
|
32
|
+
2. Understand the business goal
|
|
33
|
+
3. Identify affected components (based on steering/structure.md)
|
|
34
|
+
4. Consider technical constraints (based on steering/tech.md)
|
|
35
|
+
5. Align with product vision (based on steering/product.md)
|
|
36
|
+
|
|
37
|
+
# Step 3: Generate EARS Requirements
|
|
38
|
+
|
|
39
|
+
Use the 5 EARS patterns:
|
|
40
|
+
|
|
41
|
+
## 1. Ubiquitous Requirements
|
|
42
|
+
Format: The [system] SHALL [requirement]
|
|
43
|
+
|
|
44
|
+
Example:
|
|
45
|
+
- The system SHALL authenticate users via email and password
|
|
46
|
+
- The authentication service SHALL hash passwords using bcrypt
|
|
47
|
+
|
|
48
|
+
## 2. Event-Driven Requirements
|
|
49
|
+
Format: WHEN [event], the [system] SHALL [response]
|
|
50
|
+
|
|
51
|
+
Example:
|
|
52
|
+
- WHEN user submits valid credentials, the system SHALL create a session
|
|
53
|
+
- WHEN login fails 5 times, the system SHALL lock the account for 30 minutes
|
|
54
|
+
|
|
55
|
+
## 3. State-Driven Requirements
|
|
56
|
+
Format: WHILE [state], the [system] SHALL [response]
|
|
57
|
+
|
|
58
|
+
Example:
|
|
59
|
+
- WHILE user is authenticated, the system SHALL display user profile
|
|
60
|
+
- WHILE session is active, the system SHALL refresh token every 15 minutes
|
|
61
|
+
|
|
62
|
+
## 4. Unwanted Behavior
|
|
63
|
+
Format: IF [condition], THEN the [system] SHALL [response]
|
|
64
|
+
|
|
65
|
+
Example:
|
|
66
|
+
- IF password is invalid, THEN the system SHALL return 401 error
|
|
67
|
+
- IF session expires, THEN the system SHALL redirect to login
|
|
68
|
+
|
|
69
|
+
## 5. Optional Features
|
|
70
|
+
Format: WHERE [feature enabled], the [system] SHALL [requirement]
|
|
71
|
+
|
|
72
|
+
Example:
|
|
73
|
+
- WHERE 2FA is enabled, the system SHALL require OTP code
|
|
74
|
+
- WHERE social login is configured, the system SHALL offer OAuth options
|
|
75
|
+
|
|
76
|
+
# Step 4: Requirement Structure
|
|
77
|
+
|
|
78
|
+
For each requirement:
|
|
79
|
+
|
|
80
|
+
1. **Requirement ID**: REQ-<FEATURE>-NNN
|
|
81
|
+
Example: REQ-AUTH-001, REQ-AUTH-002
|
|
82
|
+
|
|
83
|
+
2. **Title**: Clear, descriptive name
|
|
84
|
+
|
|
85
|
+
3. **EARS Statement**: Using one of the 5 patterns
|
|
86
|
+
|
|
87
|
+
4. **Acceptance Criteria**: Testable conditions
|
|
88
|
+
- GIVEN [context]
|
|
89
|
+
- WHEN [action]
|
|
90
|
+
- THEN [expected result]
|
|
91
|
+
|
|
92
|
+
5. **Priority**: Must-Have / Should-Have / Nice-to-Have
|
|
93
|
+
|
|
94
|
+
6. **Dependencies**: Links to other requirements
|
|
95
|
+
|
|
96
|
+
# Step 5: Document Structure
|
|
97
|
+
|
|
98
|
+
Create a requirements document with:
|
|
99
|
+
|
|
100
|
+
## Header
|
|
101
|
+
- Feature Name
|
|
102
|
+
- Version
|
|
103
|
+
- Date
|
|
104
|
+
- Author
|
|
105
|
+
- Status
|
|
106
|
+
|
|
107
|
+
## 1. Overview
|
|
108
|
+
- Feature description
|
|
109
|
+
- Business value
|
|
110
|
+
- Affected components (from steering/structure.md)
|
|
111
|
+
|
|
112
|
+
## 2. Functional Requirements
|
|
113
|
+
Group by category:
|
|
114
|
+
- User Management
|
|
115
|
+
- Authentication
|
|
116
|
+
- Authorization
|
|
117
|
+
- Error Handling
|
|
118
|
+
- etc.
|
|
119
|
+
|
|
120
|
+
For each requirement:
|
|
121
|
+
- ID: REQ-<FEATURE>-NNN
|
|
122
|
+
- Title
|
|
123
|
+
- EARS statement
|
|
124
|
+
- Acceptance criteria
|
|
125
|
+
- Priority
|
|
126
|
+
- Dependencies
|
|
127
|
+
|
|
128
|
+
## 3. Non-Functional Requirements
|
|
129
|
+
- Performance (response time, throughput)
|
|
130
|
+
- Security (based on Constitutional Article - OWASP Top 10)
|
|
131
|
+
- Reliability (uptime, error rates)
|
|
132
|
+
- Scalability
|
|
133
|
+
- Maintainability
|
|
134
|
+
|
|
135
|
+
## 4. Technical Constraints
|
|
136
|
+
Based on steering/tech.md:
|
|
137
|
+
- Technology stack alignment
|
|
138
|
+
- Framework requirements
|
|
139
|
+
- Database requirements
|
|
140
|
+
- API design (REST/GraphQL/gRPC)
|
|
141
|
+
|
|
142
|
+
## 5. Constitutional Compliance
|
|
143
|
+
|
|
144
|
+
Ensure requirements align with Constitutional Articles:
|
|
145
|
+
|
|
146
|
+
- **Article I: Library-First** - Feature implemented as library in lib/
|
|
147
|
+
- **Article II: CLI Interface** - Library exposes CLI interface
|
|
148
|
+
- **Article III: Test-First** - Requirements include test scenarios
|
|
149
|
+
- **Article IV: EARS Format** - All requirements in EARS format
|
|
150
|
+
- **Article V: Traceability** - Each requirement traceable to code and tests
|
|
151
|
+
|
|
152
|
+
## 6. Dependencies
|
|
153
|
+
- Other features required
|
|
154
|
+
- External services
|
|
155
|
+
- Infrastructure needs
|
|
156
|
+
|
|
157
|
+
## 7. Risks & Assumptions
|
|
158
|
+
- Technical risks
|
|
159
|
+
- Business assumptions
|
|
160
|
+
- Dependencies on external factors
|
|
161
|
+
|
|
162
|
+
# Step 6: Bilingual Output
|
|
163
|
+
|
|
164
|
+
**IMPORTANT**: Create BOTH English and Japanese versions.
|
|
165
|
+
|
|
166
|
+
**English version (Primary/Reference)**:
|
|
167
|
+
Save to: `storage/specs/{{feature-name}}-requirements.md`
|
|
168
|
+
|
|
169
|
+
**Japanese version (Translation)**:
|
|
170
|
+
Save to: `storage/specs/{{feature-name}}-requirements.ja.md`
|
|
171
|
+
|
|
172
|
+
Translation rules:
|
|
173
|
+
- Keep requirement IDs in English (REQ-AUTH-001)
|
|
174
|
+
- Keep EARS keywords in English (WHEN, SHALL, IF, THEN, etc.)
|
|
175
|
+
- Keep technical terms in English (API, REST, JWT, etc.)
|
|
176
|
+
- Translate explanations and descriptions to Japanese
|
|
177
|
+
|
|
178
|
+
# Example Output
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
# Feature Requirements: User Authentication
|
|
182
|
+
|
|
183
|
+
**Version**: 1.0
|
|
184
|
+
**Date**: 2025-11-17
|
|
185
|
+
**Status**: Draft
|
|
186
|
+
|
|
187
|
+
## 1. Overview
|
|
188
|
+
|
|
189
|
+
This feature provides secure user authentication for the application.
|
|
190
|
+
|
|
191
|
+
**Business Value**: Enable users to securely access the platform
|
|
192
|
+
**Affected Components**: lib/auth/, app/api/auth/
|
|
193
|
+
|
|
194
|
+
## 2. Functional Requirements
|
|
195
|
+
|
|
196
|
+
### User Registration
|
|
197
|
+
|
|
198
|
+
#### REQ-AUTH-001: Email Registration
|
|
199
|
+
**EARS**: The system SHALL allow users to register using email and password.
|
|
200
|
+
|
|
201
|
+
**Acceptance Criteria**:
|
|
202
|
+
- GIVEN user provides valid email and password
|
|
203
|
+
- WHEN user submits registration form
|
|
204
|
+
- THEN system SHALL create user account
|
|
205
|
+
- AND system SHALL send verification email
|
|
206
|
+
|
|
207
|
+
**Priority**: Must-Have
|
|
208
|
+
**Dependencies**: None
|
|
209
|
+
|
|
210
|
+
#### REQ-AUTH-002: Password Validation
|
|
211
|
+
**EARS**: The system SHALL enforce password requirements.
|
|
212
|
+
|
|
213
|
+
**Acceptance Criteria**:
|
|
214
|
+
- GIVEN user provides password
|
|
215
|
+
- WHEN password is validated
|
|
216
|
+
- THEN system SHALL reject if length < 8 characters
|
|
217
|
+
- AND system SHALL reject if no special characters
|
|
218
|
+
|
|
219
|
+
**Priority**: Must-Have
|
|
220
|
+
**Dependencies**: REQ-AUTH-001
|
|
221
|
+
|
|
222
|
+
### User Login
|
|
223
|
+
|
|
224
|
+
#### REQ-AUTH-003: Email Login
|
|
225
|
+
**EARS**: WHEN user provides valid credentials, the system SHALL authenticate the user AND create a session.
|
|
226
|
+
|
|
227
|
+
**Acceptance Criteria**:
|
|
228
|
+
- GIVEN user has registered account
|
|
229
|
+
- WHEN user submits correct email and password
|
|
230
|
+
- THEN system SHALL verify credentials
|
|
231
|
+
- AND system SHALL create session token
|
|
232
|
+
- AND system SHALL return JWT token
|
|
233
|
+
|
|
234
|
+
**Priority**: Must-Have
|
|
235
|
+
**Dependencies**: REQ-AUTH-001
|
|
236
|
+
|
|
237
|
+
## 3. Non-Functional Requirements
|
|
238
|
+
|
|
239
|
+
### Security
|
|
240
|
+
- Passwords SHALL be hashed using bcrypt (cost factor 10)
|
|
241
|
+
- Sessions SHALL expire after 24 hours
|
|
242
|
+
- JWT tokens SHALL use RS256 algorithm
|
|
243
|
+
|
|
244
|
+
### Performance
|
|
245
|
+
- Login response time SHALL be < 500ms
|
|
246
|
+
- Registration SHALL complete < 1 second
|
|
247
|
+
|
|
248
|
+
## 4. Constitutional Compliance
|
|
249
|
+
|
|
250
|
+
- ✅ Article I: Implemented as lib/auth/
|
|
251
|
+
- ✅ Article II: CLI interface for user management
|
|
252
|
+
- ✅ Article III: Test scenarios defined
|
|
253
|
+
- ✅ Article IV: All requirements in EARS format
|
|
254
|
+
- ✅ Article V: Traceability matrix included
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
# Validation
|
|
258
|
+
|
|
259
|
+
Before finalizing:
|
|
260
|
+
|
|
261
|
+
1. **EARS Compliance**:
|
|
262
|
+
- All requirements use EARS patterns
|
|
263
|
+
- Keywords correct (WHEN, SHALL, IF, THEN, WHERE, WHILE)
|
|
264
|
+
- Requirements are unambiguous
|
|
265
|
+
|
|
266
|
+
2. **Constitutional Compliance**:
|
|
267
|
+
- Library-first approach documented
|
|
268
|
+
- CLI interface requirements included
|
|
269
|
+
- Test scenarios defined
|
|
270
|
+
- Traceability considered
|
|
271
|
+
|
|
272
|
+
3. **Completeness**:
|
|
273
|
+
- Functional requirements covered
|
|
274
|
+
- Non-functional requirements included
|
|
275
|
+
- Dependencies identified
|
|
276
|
+
- Acceptance criteria defined
|
|
277
|
+
|
|
278
|
+
4. **Bilingual**:
|
|
279
|
+
- Both English and Japanese versions created
|
|
280
|
+
- Technical terms consistent
|
|
281
|
+
- Requirements IDs identical
|
|
282
|
+
|
|
283
|
+
# Next Steps
|
|
284
|
+
|
|
285
|
+
After requirements are complete:
|
|
286
|
+
1. User reviews and approves
|
|
287
|
+
2. Proceed to design: /sdd-design {{feature-name}}
|
|
288
|
+
3. Or validate compliance: /sdd-validate {{feature-name}}
|
|
289
|
+
|
|
290
|
+
**Execute requirements generation now.**
|
|
291
|
+
"""
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
name = "sdd-steering"
|
|
2
|
+
description = "Generate or update project memory (steering context)"
|
|
3
|
+
|
|
4
|
+
[[instructions]]
|
|
5
|
+
role = "system"
|
|
6
|
+
content = """
|
|
7
|
+
You are executing the /sdd-steering command to generate or update the project's steering context.
|
|
8
|
+
|
|
9
|
+
# What is Steering?
|
|
10
|
+
|
|
11
|
+
Steering provides **project memory** for all AI agents. It consists of 3 core files that document:
|
|
12
|
+
1. **structure.md** - Architecture patterns, directory structure, naming conventions
|
|
13
|
+
2. **tech.md** - Technology stack, frameworks, tools
|
|
14
|
+
3. **product.md** - Business context, product goals, users
|
|
15
|
+
|
|
16
|
+
# Mode Detection
|
|
17
|
+
|
|
18
|
+
Determine which mode to use:
|
|
19
|
+
|
|
20
|
+
1. **Bootstrap Mode** - No steering files exist
|
|
21
|
+
- Analyze entire codebase
|
|
22
|
+
- Generate initial steering files
|
|
23
|
+
- Create both English (.md) and Japanese (.ja.md) versions
|
|
24
|
+
|
|
25
|
+
2. **Sync Mode** - Steering files exist, codebase has changed
|
|
26
|
+
- Compare current steering with codebase
|
|
27
|
+
- Identify discrepancies
|
|
28
|
+
- Update steering files to match reality
|
|
29
|
+
- Preserve both English and Japanese versions
|
|
30
|
+
|
|
31
|
+
3. **Review Mode** - User wants to review/improve steering
|
|
32
|
+
- Present current steering
|
|
33
|
+
- Suggest improvements
|
|
34
|
+
- Ask user for feedback
|
|
35
|
+
|
|
36
|
+
# Mode 1: Bootstrap (First Time)
|
|
37
|
+
|
|
38
|
+
## Detection
|
|
39
|
+
- `steering/` directory doesn't exist OR
|
|
40
|
+
- `steering/structure.md`, `steering/tech.md`, `steering/product.md` don't exist
|
|
41
|
+
|
|
42
|
+
## Steps
|
|
43
|
+
|
|
44
|
+
1. **Analyze Codebase**:
|
|
45
|
+
- Directory structure
|
|
46
|
+
- File organization patterns
|
|
47
|
+
- Technology stack (package.json, requirements.txt, go.mod, etc.)
|
|
48
|
+
- Frameworks detected
|
|
49
|
+
- Database technologies
|
|
50
|
+
- API patterns
|
|
51
|
+
- Testing frameworks
|
|
52
|
+
- Build tools
|
|
53
|
+
- Deployment configurations
|
|
54
|
+
|
|
55
|
+
2. **Infer Product Context**:
|
|
56
|
+
- README.md analysis
|
|
57
|
+
- Package descriptions
|
|
58
|
+
- Domain concepts from code
|
|
59
|
+
- User types from code
|
|
60
|
+
|
|
61
|
+
3. **Generate Steering Files** (Bilingual):
|
|
62
|
+
|
|
63
|
+
**IMPORTANT**: Create BOTH English and Japanese versions for each file.
|
|
64
|
+
**English version is always the reference/source.**
|
|
65
|
+
|
|
66
|
+
Create `steering/structure.md` (English) with:
|
|
67
|
+
- Architecture pattern (monolith, microservices, library-first, etc.)
|
|
68
|
+
- Directory organization rules
|
|
69
|
+
- Naming conventions
|
|
70
|
+
- Component boundaries
|
|
71
|
+
- Integration patterns
|
|
72
|
+
|
|
73
|
+
Create `steering/structure.ja.md` (Japanese) with:
|
|
74
|
+
- Translation of structure.md content
|
|
75
|
+
- All technical terms consistent with English version
|
|
76
|
+
|
|
77
|
+
Create `steering/tech.md` (English) with:
|
|
78
|
+
- Primary language(s) and versions
|
|
79
|
+
- Frameworks and versions
|
|
80
|
+
- Database(s) and versions
|
|
81
|
+
- API technologies (REST, GraphQL, gRPC)
|
|
82
|
+
- Testing frameworks
|
|
83
|
+
- Build/deployment tools
|
|
84
|
+
- Development tools
|
|
85
|
+
|
|
86
|
+
Create `steering/tech.ja.md` (Japanese) with:
|
|
87
|
+
- Translation of tech.md content
|
|
88
|
+
- Technology names kept in English with Japanese explanations
|
|
89
|
+
|
|
90
|
+
Create `steering/product.md` (English) with:
|
|
91
|
+
- Product vision (inferred from README)
|
|
92
|
+
- Target users (inferred from code)
|
|
93
|
+
- Core capabilities
|
|
94
|
+
- Business domain
|
|
95
|
+
- Success metrics (if available)
|
|
96
|
+
|
|
97
|
+
Create `steering/product.ja.md` (Japanese) with:
|
|
98
|
+
- Translation of product.md content
|
|
99
|
+
- Product terminology consistent with English version
|
|
100
|
+
|
|
101
|
+
4. **Bilingual File Generation**:
|
|
102
|
+
- Generate English version (.md) FIRST
|
|
103
|
+
- Then generate Japanese translation (.ja.md)
|
|
104
|
+
- English version is the reference for all agents
|
|
105
|
+
- Japanese version for Japanese-speaking team members
|
|
106
|
+
|
|
107
|
+
5. **Create Rules Directory**:
|
|
108
|
+
- Copy constitutional governance files
|
|
109
|
+
- Copy workflow guide
|
|
110
|
+
- Copy EARS format guide
|
|
111
|
+
|
|
112
|
+
## Output
|
|
113
|
+
|
|
114
|
+
Present summary with created files and key findings.
|
|
115
|
+
|
|
116
|
+
# Mode 2: Sync (Update Existing)
|
|
117
|
+
|
|
118
|
+
## Detection
|
|
119
|
+
- Steering files exist
|
|
120
|
+
- Codebase may have changed since last steering update
|
|
121
|
+
|
|
122
|
+
## Steps
|
|
123
|
+
|
|
124
|
+
1. **Read Current Steering**:
|
|
125
|
+
- Read `steering/structure.md`
|
|
126
|
+
- Read `steering/tech.md`
|
|
127
|
+
- Read `steering/product.md`
|
|
128
|
+
|
|
129
|
+
2. **Analyze Current Codebase**:
|
|
130
|
+
- Same analysis as Bootstrap mode
|
|
131
|
+
- Compare with current steering
|
|
132
|
+
|
|
133
|
+
3. **Detect Discrepancies**:
|
|
134
|
+
- New technologies added?
|
|
135
|
+
- Architecture changed?
|
|
136
|
+
- New components added?
|
|
137
|
+
- Directory structure evolved?
|
|
138
|
+
|
|
139
|
+
4. **Update Steering Files** (Bilingual):
|
|
140
|
+
- Update English version (.md) FIRST
|
|
141
|
+
- Update sections that changed
|
|
142
|
+
- Preserve sections that are still accurate
|
|
143
|
+
- Add changelog entries
|
|
144
|
+
- Then update Japanese version (.ja.md) to match
|
|
145
|
+
- Ensure both versions stay synchronized
|
|
146
|
+
|
|
147
|
+
5. **Generate Sync Report**:
|
|
148
|
+
- List changes detected
|
|
149
|
+
- Show updated files
|
|
150
|
+
- Note files with no changes
|
|
151
|
+
|
|
152
|
+
# Mode 3: Review (User-Initiated Review)
|
|
153
|
+
|
|
154
|
+
## Steps
|
|
155
|
+
|
|
156
|
+
1. **Present Current Steering**:
|
|
157
|
+
- Show current structure.md summary
|
|
158
|
+
- Show current tech.md summary
|
|
159
|
+
- Show current product.md summary
|
|
160
|
+
|
|
161
|
+
2. **Identify Improvement Opportunities**:
|
|
162
|
+
- Missing information
|
|
163
|
+
- Outdated information
|
|
164
|
+
- Unclear sections
|
|
165
|
+
- Inconsistencies
|
|
166
|
+
|
|
167
|
+
3. **Ask User for Feedback**:
|
|
168
|
+
- Get user confirmation on changes
|
|
169
|
+
- Update based on feedback
|
|
170
|
+
|
|
171
|
+
# Constitutional Compliance
|
|
172
|
+
|
|
173
|
+
This command supports **Article VI: Project Memory**:
|
|
174
|
+
> All agents SHALL consult project memory (steering files) before making decisions.
|
|
175
|
+
|
|
176
|
+
By maintaining accurate steering files, all agents can:
|
|
177
|
+
- Make context-aware decisions
|
|
178
|
+
- Follow established patterns
|
|
179
|
+
- Align with product goals
|
|
180
|
+
- Use correct technologies
|
|
181
|
+
|
|
182
|
+
# Validation
|
|
183
|
+
|
|
184
|
+
After generating/updating steering:
|
|
185
|
+
|
|
186
|
+
1. **Completeness Check**:
|
|
187
|
+
- All 3 core files present
|
|
188
|
+
- Both English and Japanese versions
|
|
189
|
+
- Rules directory populated
|
|
190
|
+
|
|
191
|
+
2. **Accuracy Check**:
|
|
192
|
+
- Technologies match package.json
|
|
193
|
+
- Architecture matches codebase structure
|
|
194
|
+
- Product context aligns with README
|
|
195
|
+
|
|
196
|
+
3. **Consistency Check**:
|
|
197
|
+
- English and Japanese versions match
|
|
198
|
+
- No contradictions between files
|
|
199
|
+
- Steering aligns with constitutional articles
|
|
200
|
+
|
|
201
|
+
# Next Steps
|
|
202
|
+
|
|
203
|
+
Once steering is complete, users can:
|
|
204
|
+
1. Review and adjust steering files manually
|
|
205
|
+
2. Proceed with requirements analysis: /sdd-requirements [feature]
|
|
206
|
+
3. Use any command (they will now have project context)
|
|
207
|
+
|
|
208
|
+
**Execute steering generation/update now.**
|
|
209
|
+
"""
|