sublation-os 1.0.2 → 1.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/.claude/agents/sublation-os/implementation-verifier.md +16 -0
- package/.claude/agents/sublation-os/implementer.md +16 -0
- package/.claude/commands/sublation-os/address-comments.md +13 -0
- package/.claude/commands/sublation-os/consolidate-learnings.md +553 -0
- package/.claude/commands/sublation-os/implement-tasks.md +10 -0
- package/.claude/commands/sublation-os/investigate.md +14 -4
- package/.claude/commands/sublation-os/optimise.md +14 -0
- package/.claude/commands/sublation-os/review.md +18 -1
- package/.claude/commands/sublation-os/test-plan.md +19 -2
- package/.claude/skills/README.md +274 -0
- package/.claude/skills/auto-learn/SKILL.md +233 -0
- package/.cursor/commands/sublation-os/address-comments.md +74 -0
- package/.cursor/commands/sublation-os/commit-message.md +84 -0
- package/.cursor/commands/sublation-os/consolidate-learnings.md +553 -0
- package/.cursor/commands/sublation-os/create-tasks.md +254 -0
- package/.cursor/commands/sublation-os/implement-tasks.md +207 -0
- package/.cursor/commands/sublation-os/investigate.md +164 -0
- package/.cursor/commands/sublation-os/learn.md +131 -0
- package/.cursor/commands/sublation-os/optimise.md +108 -0
- package/.cursor/commands/sublation-os/plan-product.md +241 -0
- package/.cursor/commands/sublation-os/pr-description.md +15 -0
- package/.cursor/commands/sublation-os/recall.md +114 -0
- package/.cursor/commands/sublation-os/review-v2.md +701 -0
- package/.cursor/commands/sublation-os/review.md +12 -0
- package/.cursor/commands/sublation-os/shape-spec.md +395 -0
- package/.cursor/commands/sublation-os/test-plan.md +12 -0
- package/.cursor/commands/sublation-os/write-spec.md +134 -0
- package/README.md +50 -13
- package/bin/install.js +103 -24
- package/package.json +3 -2
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
You are helping me shape and plan the scope for a new feature. The following MULTI-PHASE process is aimed at documenting our key decisions regarding scope, design and architecture approach.
|
|
2
|
+
|
|
3
|
+
Carefully read and execute the instructions in the following files IN SEQUENCE, following their numbered file names. Only proceed to the next numbered instruction file once the previous numbered instruction has been executed.
|
|
4
|
+
|
|
5
|
+
Instructions to follow in sequence:
|
|
6
|
+
|
|
7
|
+
# PHASE 1: Initialize Spec
|
|
8
|
+
|
|
9
|
+
The FIRST STEP is to initialize the spec by following these instructions:
|
|
10
|
+
|
|
11
|
+
# Spec Initialization
|
|
12
|
+
|
|
13
|
+
## Core Responsibilities
|
|
14
|
+
|
|
15
|
+
1. **Get the description of the feature:** Receive it from the user or check the product roadmap
|
|
16
|
+
2. **Initialize Spec Structure**: Create the spec folder with date prefix
|
|
17
|
+
3. **Save Raw Idea**: Document the user's exact description without modification
|
|
18
|
+
4. **Create Create Implementation & Verification Folders**: Setup folder structure for tracking implementation of this spec.
|
|
19
|
+
5. **Prepare for Requirements**: Set up structure for next phase
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### Step 1: Get the description of the feature
|
|
24
|
+
|
|
25
|
+
IF you were given a description of the feature, then use that to initiate a new spec.
|
|
26
|
+
|
|
27
|
+
OTHERWISE follow these steps to get the description:
|
|
28
|
+
|
|
29
|
+
1. Check `@agent-os/product/roadmap.md` to find the next feature in the roadmap.
|
|
30
|
+
2. OUTPUT the following to user and WAIT for user's response:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Which feature would you like to initiate a new spec for?
|
|
34
|
+
|
|
35
|
+
- The roadmap shows [feature description] is next. Go with that?
|
|
36
|
+
- Or provide a description of a feature you'd like to initiate a spec for.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**If you have not yet received a description from the user, WAIT until user responds.**
|
|
40
|
+
|
|
41
|
+
### Step 2: Initialize Spec Structure
|
|
42
|
+
|
|
43
|
+
Determine a kebab-case spec name from the user's description, then create the spec folder:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Get today's date in YYYY-MM-DD format
|
|
47
|
+
TODAY=$(date +%Y-%m-%d)
|
|
48
|
+
|
|
49
|
+
# Determine kebab-case spec name from user's description
|
|
50
|
+
SPEC_NAME="[kebab-case-name]"
|
|
51
|
+
|
|
52
|
+
# Create dated folder name
|
|
53
|
+
DATED_SPEC_NAME="${TODAY}-${SPEC_NAME}"
|
|
54
|
+
|
|
55
|
+
# Store this path for output
|
|
56
|
+
SPEC_PATH="agent-os/specs/$DATED_SPEC_NAME"
|
|
57
|
+
|
|
58
|
+
# Create folder structure following architecture
|
|
59
|
+
mkdir -p $SPEC_PATH/planning
|
|
60
|
+
mkdir -p $SPEC_PATH/planning/visuals
|
|
61
|
+
|
|
62
|
+
echo "Created spec folder: $SPEC_PATH"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Step 3: Create Implementation Folder
|
|
66
|
+
|
|
67
|
+
Create 2 folders:
|
|
68
|
+
- `$SPEC_PATH/implementation/`
|
|
69
|
+
|
|
70
|
+
Leave this folder empty, for now. Later, this folder will be populated with reports documented by implementation agents.
|
|
71
|
+
|
|
72
|
+
### Step 4: Output Confirmation
|
|
73
|
+
|
|
74
|
+
Return or output the following:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Spec folder initialized: `[spec-path]`
|
|
78
|
+
|
|
79
|
+
Structure created:
|
|
80
|
+
- planning/ - For requirements and specifications
|
|
81
|
+
- planning/visuals/ - For mockups and screenshots
|
|
82
|
+
- implementation/ - For implementation documentation
|
|
83
|
+
|
|
84
|
+
Ready for requirements research phase.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Important Constraints
|
|
88
|
+
|
|
89
|
+
- Always use dated folder names (YYYY-MM-DD-spec-name)
|
|
90
|
+
- Pass the exact spec path back to the orchestrator
|
|
91
|
+
- Follow folder structure exactly
|
|
92
|
+
- Implementation folder should be empty, for now
|
|
93
|
+
|
|
94
|
+
# PHASE 2: Shape Spec
|
|
95
|
+
|
|
96
|
+
Now that you've initialized the folder for this new spec, proceed with the research phase.
|
|
97
|
+
|
|
98
|
+
Follow these instructions for researching this spec's requirements:
|
|
99
|
+
|
|
100
|
+
# Spec Research
|
|
101
|
+
|
|
102
|
+
## Core Responsibilities
|
|
103
|
+
|
|
104
|
+
1. **Read Initial Idea**: Load the raw idea from initialization.md
|
|
105
|
+
2. **Analyze Product Context**: Understand product mission, roadmap, and how this feature fits
|
|
106
|
+
3. **Ask Clarifying Questions**: Generate targeted questions WITH visual asset request AND reusability check
|
|
107
|
+
4. **Process Answers**: Analyze responses and any provided visuals
|
|
108
|
+
5. **Ask Follow-ups**: Based on answers and visual analysis if needed
|
|
109
|
+
6. **Save Requirements**: Document the requirements you've gathered to a single file named: `[spec-path]/planning/requirements.md`
|
|
110
|
+
|
|
111
|
+
## Workflow
|
|
112
|
+
|
|
113
|
+
### Step 1: Read Initial Idea
|
|
114
|
+
|
|
115
|
+
Read the raw idea from `[spec-path]/planning/initialization.md` to understand what the user wants to build.
|
|
116
|
+
|
|
117
|
+
### Step 2: Analyze Product Context
|
|
118
|
+
|
|
119
|
+
Before generating questions, understand the broader product context:
|
|
120
|
+
|
|
121
|
+
1. **Read Product Mission**: Load `agent-os/product/mission.md` to understand:
|
|
122
|
+
- The product's overall mission and purpose
|
|
123
|
+
- Target users and their primary use cases
|
|
124
|
+
- Core problems the product aims to solve
|
|
125
|
+
- How users are expected to benefit
|
|
126
|
+
|
|
127
|
+
2. **Read Product Roadmap**: Load `agent-os/product/roadmap.md` to understand:
|
|
128
|
+
- Features and capabilities already completed
|
|
129
|
+
- The current state of the product
|
|
130
|
+
- Where this new feature fits in the broader roadmap
|
|
131
|
+
- Related features that might inform or constrain this work
|
|
132
|
+
|
|
133
|
+
3. **Read Product Tech Stack**: Load `agent-os/product/tech-stack.md` to understand:
|
|
134
|
+
- Technologies and frameworks in use
|
|
135
|
+
- Technical constraints and capabilities
|
|
136
|
+
- Libraries and tools available
|
|
137
|
+
|
|
138
|
+
This context will help you:
|
|
139
|
+
- Ask more relevant and contextual questions
|
|
140
|
+
- Identify existing features that might be reused or referenced
|
|
141
|
+
- Ensure the feature aligns with product goals
|
|
142
|
+
- Understand user needs and expectations
|
|
143
|
+
|
|
144
|
+
### Step 3: Generate First Round of Questions WITH Visual Request AND Reusability Check
|
|
145
|
+
|
|
146
|
+
Based on the initial idea, generate 4-8 targeted, NUMBERED questions that explore requirements while suggesting reasonable defaults.
|
|
147
|
+
|
|
148
|
+
**CRITICAL: Always include the visual asset request AND reusability question at the END of your questions.**
|
|
149
|
+
|
|
150
|
+
**Question generation guidelines:**
|
|
151
|
+
- Start each question with a number
|
|
152
|
+
- Propose sensible assumptions based on best practices
|
|
153
|
+
- Frame questions as "I'm assuming X, is that correct?"
|
|
154
|
+
- Make it easy for users to confirm or provide alternatives
|
|
155
|
+
- Include specific suggestions they can say yes/no to
|
|
156
|
+
- Always end with an open question about exclusions
|
|
157
|
+
|
|
158
|
+
**Required output format:**
|
|
159
|
+
```
|
|
160
|
+
Based on your idea for [spec name], I have some clarifying questions:
|
|
161
|
+
|
|
162
|
+
1. I assume [specific assumption]. Is that correct, or [alternative]?
|
|
163
|
+
2. I'm thinking [specific approach]. Should we [alternative]?
|
|
164
|
+
3. [Continue with numbered questions...]
|
|
165
|
+
[Last numbered question about exclusions]
|
|
166
|
+
|
|
167
|
+
**Existing Code Reuse:**
|
|
168
|
+
Are there existing features in your codebase with similar patterns we should reference? For example:
|
|
169
|
+
- Similar interface elements or UI components to re-use
|
|
170
|
+
- Comparable page layouts or navigation patterns
|
|
171
|
+
- Related backend logic or service objects
|
|
172
|
+
- Existing models or controllers with similar functionality
|
|
173
|
+
|
|
174
|
+
Please provide file/folder paths or names of these features if they exist.
|
|
175
|
+
|
|
176
|
+
**Visual Assets Request:**
|
|
177
|
+
Do you have any design mockups, wireframes, or screenshots that could help guide the development?
|
|
178
|
+
|
|
179
|
+
If yes, please place them in: `[spec-path]/planning/visuals/`
|
|
180
|
+
|
|
181
|
+
Use descriptive file names like:
|
|
182
|
+
- homepage-mockup.png
|
|
183
|
+
- dashboard-wireframe.jpg
|
|
184
|
+
- lofi-form-layout.png
|
|
185
|
+
- mobile-view.png
|
|
186
|
+
- existing-ui-screenshot.png
|
|
187
|
+
|
|
188
|
+
Please answer the questions above and let me know if you've added any visual files or can point to similar existing features.
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**OUTPUT these questions to the orchestrator and STOP - wait for user response.**
|
|
192
|
+
|
|
193
|
+
### Step 4: Process Answers and MANDATORY Visual Check
|
|
194
|
+
|
|
195
|
+
After receiving user's answers from the orchestrator:
|
|
196
|
+
|
|
197
|
+
1. Store the user's answers for later documentation
|
|
198
|
+
|
|
199
|
+
2. **MANDATORY: Check for visual assets regardless of user's response:**
|
|
200
|
+
|
|
201
|
+
**CRITICAL**: You MUST run the following bash command even if the user says "no visuals" or doesn't mention visuals (Users often add files without mentioning them):
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# List all files in visuals folder - THIS IS MANDATORY
|
|
205
|
+
ls -la [spec-path]/planning/visuals/ 2>/dev/null | grep -E '\.(png|jpg|jpeg|gif|svg|pdf)$' || echo "No visual files found"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
3. IF visual files are found (bash command returns filenames):
|
|
209
|
+
- Use Read tool to analyze EACH visual file found
|
|
210
|
+
- Note key design elements, patterns, and user flows
|
|
211
|
+
- Document observations for each file
|
|
212
|
+
- Check filenames for low-fidelity indicators (lofi, lo-fi, wireframe, sketch, rough, etc.)
|
|
213
|
+
|
|
214
|
+
4. IF user provided paths or names of similar features:
|
|
215
|
+
- Make note of these paths/names for spec-writer to reference
|
|
216
|
+
- DO NOT explore them yourself (to save time), but DO document their names for future reference by the spec-writer.
|
|
217
|
+
|
|
218
|
+
### Step 5: Generate Follow-up Questions (if needed)
|
|
219
|
+
|
|
220
|
+
Determine if follow-up questions are needed based on:
|
|
221
|
+
|
|
222
|
+
**Visual-triggered follow-ups:**
|
|
223
|
+
- If visuals were found but user didn't mention them: "I found [filename(s)] in the visuals folder. Let me analyze these for the specification."
|
|
224
|
+
- If filenames contain "lofi", "lo-fi", "wireframe", "sketch", or "rough": "I notice you've provided [filename(s)] which appear to be wireframes/low-fidelity mockups. Should we treat these as layout and structure guides rather than exact design specifications, using our application's existing styling instead?"
|
|
225
|
+
- If visuals show features not discussed in answers
|
|
226
|
+
- If there are discrepancies between answers and visuals
|
|
227
|
+
|
|
228
|
+
**Reusability follow-ups:**
|
|
229
|
+
- If user didn't provide similar features but the spec seems common: "This seems like it might share patterns with existing features. Could you point me to any similar forms/pages/logic in your app?"
|
|
230
|
+
- If provided paths seem incomplete you can ask something like: "You mentioned [feature]. Are there any service objects or backend logic we should also reference?"
|
|
231
|
+
|
|
232
|
+
**User's Answers-triggered follow-ups:**
|
|
233
|
+
- Vague requirements need clarification
|
|
234
|
+
- Missing technical details
|
|
235
|
+
- Unclear scope boundaries
|
|
236
|
+
|
|
237
|
+
**If follow-ups needed, OUTPUT to orchestrator:**
|
|
238
|
+
```
|
|
239
|
+
Based on your answers [and the visual files I found], I have a few follow-up questions:
|
|
240
|
+
|
|
241
|
+
1. [Specific follow-up question]
|
|
242
|
+
2. [Another follow-up if needed]
|
|
243
|
+
|
|
244
|
+
Please provide these additional details.
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Then STOP and wait for responses.**
|
|
248
|
+
|
|
249
|
+
### Step 6: Save Complete Requirements
|
|
250
|
+
|
|
251
|
+
After all questions are answered, record ALL gathered information to ONE FILE at this location with this name: `[spec-path]/planning/requirements.md`
|
|
252
|
+
|
|
253
|
+
Use the following structure and do not deviate from this structure when writing your gathered information to `requirements.md`. Include ONLY the items specified in the following structure:
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
# Spec Requirements: [Spec Name]
|
|
257
|
+
|
|
258
|
+
## Initial Description
|
|
259
|
+
[User's original spec description from initialization.md]
|
|
260
|
+
|
|
261
|
+
## Requirements Discussion
|
|
262
|
+
|
|
263
|
+
### First Round Questions
|
|
264
|
+
|
|
265
|
+
**Q1:** [First question asked]
|
|
266
|
+
**Answer:** [User's answer]
|
|
267
|
+
|
|
268
|
+
**Q2:** [Second question asked]
|
|
269
|
+
**Answer:** [User's answer]
|
|
270
|
+
|
|
271
|
+
[Continue for all questions]
|
|
272
|
+
|
|
273
|
+
### Existing Code to Reference
|
|
274
|
+
[Based on user's response about similar features]
|
|
275
|
+
|
|
276
|
+
**Similar Features Identified:**
|
|
277
|
+
- Feature: [Name] - Path: `[path provided by user]`
|
|
278
|
+
- Components to potentially reuse: [user's description]
|
|
279
|
+
- Backend logic to reference: [user's description]
|
|
280
|
+
|
|
281
|
+
[If user provided no similar features]
|
|
282
|
+
No similar existing features identified for reference.
|
|
283
|
+
|
|
284
|
+
### Follow-up Questions
|
|
285
|
+
[If any were asked]
|
|
286
|
+
|
|
287
|
+
**Follow-up 1:** [Question]
|
|
288
|
+
**Answer:** [User's answer]
|
|
289
|
+
|
|
290
|
+
## Visual Assets
|
|
291
|
+
|
|
292
|
+
### Files Provided:
|
|
293
|
+
[Based on actual bash check, not user statement]
|
|
294
|
+
- `filename.png`: [Description of what it shows from your analysis]
|
|
295
|
+
- `filename2.jpg`: [Key elements observed from your analysis]
|
|
296
|
+
|
|
297
|
+
### Visual Insights:
|
|
298
|
+
- [Design patterns identified]
|
|
299
|
+
- [User flow implications]
|
|
300
|
+
- [UI components shown]
|
|
301
|
+
- [Fidelity level: high-fidelity mockup / low-fidelity wireframe]
|
|
302
|
+
|
|
303
|
+
[If bash check found no files]
|
|
304
|
+
No visual assets provided.
|
|
305
|
+
|
|
306
|
+
## Requirements Summary
|
|
307
|
+
|
|
308
|
+
### Functional Requirements
|
|
309
|
+
- [Core functionality based on answers]
|
|
310
|
+
- [User actions enabled]
|
|
311
|
+
- [Data to be managed]
|
|
312
|
+
|
|
313
|
+
### Reusability Opportunities
|
|
314
|
+
- [Components that might exist already based on user's input]
|
|
315
|
+
- [Backend patterns to investigate]
|
|
316
|
+
- [Similar features to model after]
|
|
317
|
+
|
|
318
|
+
### Scope Boundaries
|
|
319
|
+
**In Scope:**
|
|
320
|
+
- [What will be built]
|
|
321
|
+
|
|
322
|
+
**Out of Scope:**
|
|
323
|
+
- [What won't be built]
|
|
324
|
+
- [Future enhancements mentioned]
|
|
325
|
+
|
|
326
|
+
### Technical Considerations
|
|
327
|
+
- [Integration points mentioned]
|
|
328
|
+
- [Existing system constraints]
|
|
329
|
+
- [Technology preferences stated]
|
|
330
|
+
- [Similar code patterns to follow]
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Step 7: Output Completion
|
|
334
|
+
|
|
335
|
+
Return to orchestrator:
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
Requirements research complete!
|
|
339
|
+
|
|
340
|
+
✅ Processed [X] clarifying questions
|
|
341
|
+
✅ Visual check performed: [Found and analyzed Y files / No files found]
|
|
342
|
+
✅ Reusability opportunities: [Identified Z similar features / None identified]
|
|
343
|
+
✅ Requirements documented comprehensively
|
|
344
|
+
|
|
345
|
+
Requirements saved to: `[spec-path]/planning/requirements.md`
|
|
346
|
+
|
|
347
|
+
Ready for specification creation.
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Important Constraints
|
|
351
|
+
|
|
352
|
+
- **MANDATORY**: Always run bash command to check visuals folder after receiving user answers
|
|
353
|
+
- DO NOT write technical specifications for development. Just record your findings from information gathering to this single file: `[spec-path]/planning/requirements.md`.
|
|
354
|
+
- Visual check is based on actual file(s) found via bash, NOT user statements
|
|
355
|
+
- Check filenames for low-fidelity indicators and clarify design intent if found
|
|
356
|
+
- Ask about existing similar features to promote code reuse
|
|
357
|
+
- Keep follow-ups minimal (1-3 questions max)
|
|
358
|
+
- Save user's exact answers, not interpretations
|
|
359
|
+
- Document all visual findings including fidelity level
|
|
360
|
+
- Document paths to similar features for spec-writer to reference
|
|
361
|
+
- OUTPUT questions and STOP to wait for orchestrator to relay responses
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## Display confirmation and next step
|
|
365
|
+
|
|
366
|
+
Once you've completed your research and documented it, output the following message:
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
✅ I have documented this spec's research and requirements in `agent-os/specs/[this-spec]/planning`.
|
|
370
|
+
|
|
371
|
+
Next step: Run the command, `1-create-spec.md`.
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
After all steps complete, inform the user:
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
Spec initialized successfully!
|
|
378
|
+
|
|
379
|
+
✅ Spec folder created: `[spec-path]`
|
|
380
|
+
✅ Requirements gathered
|
|
381
|
+
✅ Visual assets: [Found X files / No files provided]
|
|
382
|
+
|
|
383
|
+
👉 Run `/write-spec` to create the spec.md document.
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
## User Standards & Preferences Compliance
|
|
387
|
+
|
|
388
|
+
IMPORTANT: Ensure that your research questions and insights are ALIGNED and DOES NOT CONFLICT with the user's preferences and standards as detailed in the following files:
|
|
389
|
+
|
|
390
|
+
@agent-os/standards/global/coding-style.md
|
|
391
|
+
@agent-os/standards/global/commenting.md
|
|
392
|
+
@agent-os/standards/global/conventions.md
|
|
393
|
+
@agent-os/standards/global/error-handling.md
|
|
394
|
+
@agent-os/standards/global/tech-stack.md
|
|
395
|
+
@agent-os/standards/global/validation.md
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Now that we've initiated and planned the details for a new spec, we will now proceed with drafting the specification document, following these instructions:
|
|
2
|
+
|
|
3
|
+
# Spec Writing
|
|
4
|
+
|
|
5
|
+
## Core Responsibilities
|
|
6
|
+
|
|
7
|
+
1. **Analyze Requirements**: Load and analyze requirements and visual assets thoroughly
|
|
8
|
+
2. **Search for Reusable Code**: Find reusable components and patterns in existing codebase
|
|
9
|
+
3. **Create Specification**: Write comprehensive specification document
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
### Step 1: Analyze Requirements and Context
|
|
14
|
+
|
|
15
|
+
Read and understand all inputs and THINK HARD:
|
|
16
|
+
```bash
|
|
17
|
+
# Read the requirements document
|
|
18
|
+
cat sublation-os/specs/[current-spec]/planning/requirements.md
|
|
19
|
+
|
|
20
|
+
# Check for visual assets
|
|
21
|
+
ls -la sublation-os/specs/[current-spec]/planning/visuals/ 2>/dev/null | grep -v "^total" | grep -v "^d"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Parse and analyze:
|
|
25
|
+
- User's feature description and goals
|
|
26
|
+
- Requirements gathered by spec-shaper
|
|
27
|
+
- Visual mockups or screenshots (if present)
|
|
28
|
+
- Any constraints or out-of-scope items mentioned
|
|
29
|
+
|
|
30
|
+
### Step 2: Search for Reusable Code
|
|
31
|
+
|
|
32
|
+
Before creating specifications, search the codebase for existing patterns and components that can be reused.
|
|
33
|
+
|
|
34
|
+
Based on the feature requirements, identify relevant keywords and search for:
|
|
35
|
+
- Similar features or functionality
|
|
36
|
+
- Existing UI components that match your needs
|
|
37
|
+
- Models, services, or controllers with related logic
|
|
38
|
+
- API patterns that could be extended
|
|
39
|
+
- Database structures that could be reused
|
|
40
|
+
|
|
41
|
+
Use appropriate search tools and commands for the project's technology stack to find:
|
|
42
|
+
- Components that can be reused or extended
|
|
43
|
+
- Patterns to follow from similar features
|
|
44
|
+
- Naming conventions used in the codebase
|
|
45
|
+
- Architecture patterns already established
|
|
46
|
+
|
|
47
|
+
Document your findings for use in the specification.
|
|
48
|
+
|
|
49
|
+
### Step 3: Create Core Specification
|
|
50
|
+
|
|
51
|
+
Write the main specification to `sublation-os/specs/[current-spec]/spec.md`.
|
|
52
|
+
|
|
53
|
+
DO NOT write actual code in the spec.md document. Just describe the requirements clearly and concisely.
|
|
54
|
+
|
|
55
|
+
Keep it short and include only essential information for each section.
|
|
56
|
+
|
|
57
|
+
Follow this structure exactly when creating the content of `spec.md`:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Specification: [Feature Name]
|
|
61
|
+
|
|
62
|
+
## Goal
|
|
63
|
+
[1-2 sentences describing the core objective]
|
|
64
|
+
|
|
65
|
+
## User Stories
|
|
66
|
+
- As a [user type], I want to [action] so that [benefit]
|
|
67
|
+
- [repeat for up to 2 max additional user stories]
|
|
68
|
+
|
|
69
|
+
## Specific Requirements
|
|
70
|
+
|
|
71
|
+
**Specific requirement name**
|
|
72
|
+
- [Up to 8 CONCISE sub-bullet points to clarify specific sub-requirements, design or architectual decisions that go into this requirement, or the technical approach to take when implementing this requirement]
|
|
73
|
+
|
|
74
|
+
[repeat for up to a max of 10 specific requirements]
|
|
75
|
+
|
|
76
|
+
## Visual Design
|
|
77
|
+
[If mockups provided]
|
|
78
|
+
|
|
79
|
+
**`planning/visuals/[filename]`**
|
|
80
|
+
- [up to 8 CONCISE bullets describing specific UI elements found in this visual to address when building]
|
|
81
|
+
|
|
82
|
+
[repeat for each file in the `planning/visuals` folder]
|
|
83
|
+
|
|
84
|
+
## Existing Code to Leverage
|
|
85
|
+
|
|
86
|
+
**Code, component, or existing logic found**
|
|
87
|
+
- [up to 5 bullets that describe what this existing code does and how it should be re-used or replicated when building this spec]
|
|
88
|
+
|
|
89
|
+
[repeat for up to 5 existing code areas]
|
|
90
|
+
|
|
91
|
+
## Out of Scope
|
|
92
|
+
- [up to 10 concise descriptions of specific features that are out of scope and MUST NOT be built in this spec]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Important Constraints
|
|
96
|
+
|
|
97
|
+
1. **Always search for reusable code** before specifying new components
|
|
98
|
+
2. **Reference visual assets** when available
|
|
99
|
+
3. **Do NOT write actual code** in the spec
|
|
100
|
+
4. **Keep each section short**, with clear, direct, skimmable specifications
|
|
101
|
+
5. **Do NOT deviate from the template above** and do not add additional sections
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Display confirmation and next step
|
|
105
|
+
|
|
106
|
+
Display the following message to the user:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
The spec has been created at `sublation-os/specs/[this-spec]/spec.md`.
|
|
110
|
+
|
|
111
|
+
Review it closely to ensure everything aligns with your vision and requirements.
|
|
112
|
+
|
|
113
|
+
Next step: Run the command, 2-create-tasks-list.md
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## User Standards & Preferences Compliance
|
|
117
|
+
|
|
118
|
+
IMPORTANT: Ensure that the specification document's content is ALIGNED and DOES NOT CONFLICT with the user's preferences and standards as detailed in the following files:
|
|
119
|
+
|
|
120
|
+
@sublation-os/standards/backend/api.md
|
|
121
|
+
@sublation-os/standards/backend/migrations.md
|
|
122
|
+
@sublation-os/standards/backend/models.md
|
|
123
|
+
@sublation-os/standards/backend/queries.md
|
|
124
|
+
@sublation-os/standards/frontend/accessibility.md
|
|
125
|
+
@sublation-os/standards/frontend/components.md
|
|
126
|
+
@sublation-os/standards/frontend/css.md
|
|
127
|
+
@sublation-os/standards/frontend/responsive.md
|
|
128
|
+
@sublation-os/standards/global/coding-style.md
|
|
129
|
+
@sublation-os/standards/global/commenting.md
|
|
130
|
+
@sublation-os/standards/global/conventions.md
|
|
131
|
+
@sublation-os/standards/global/error-handling.md
|
|
132
|
+
@sublation-os/standards/global/tech-stack.md
|
|
133
|
+
@sublation-os/standards/global/validation.md
|
|
134
|
+
@sublation-os/standards/testing/test-writing.md
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Sublation-OS Framework
|
|
4
4
|
|
|
5
|
-
A comprehensive development framework for
|
|
5
|
+
A comprehensive development framework for AI-assisted development that enhances your workflow with standards, specifications, memory, and powerful agents. Works with Claude Code and Cursor.
|
|
6
6
|
|
|
7
7
|
## What is Sublation-OS?
|
|
8
8
|
|
|
@@ -24,7 +24,20 @@ Install Sublation-OS in your project with a single command:
|
|
|
24
24
|
npx sublation-os
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
This installs support for both Claude Code and Cursor by default.
|
|
28
|
+
|
|
29
|
+
**Choose specific integrations:**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Install only Claude Code integration
|
|
33
|
+
npx sublation-os --claude
|
|
34
|
+
|
|
35
|
+
# Install only Cursor integration
|
|
36
|
+
npx sublation-os --cursor
|
|
37
|
+
|
|
38
|
+
# Install both (default behavior)
|
|
39
|
+
npx sublation-os --all
|
|
40
|
+
```
|
|
28
41
|
|
|
29
42
|
For alternative installation methods (script installation, git submodules), see the [Installation Guide](INSTALL.md).
|
|
30
43
|
|
|
@@ -34,16 +47,32 @@ The installer will create/update these directories in your project:
|
|
|
34
47
|
|
|
35
48
|
```
|
|
36
49
|
your-project/
|
|
37
|
-
├── .sublation-os/ # Framework core
|
|
50
|
+
├── .sublation-os/ # Framework core (always installed)
|
|
38
51
|
│ ├── config.yml # Configuration
|
|
39
52
|
│ ├── memory/ # Learned lessons
|
|
40
53
|
│ ├── specs/ # Feature specifications
|
|
41
54
|
│ └── standards/ # Coding standards
|
|
42
|
-
├── .claude/
|
|
55
|
+
├── .claude/ # Claude Code integration (optional)
|
|
43
56
|
│ ├── agents/sublation-os/ # 7 specialized agents
|
|
44
|
-
│
|
|
57
|
+
│ ├── commands/sublation-os/ # Slash commands
|
|
58
|
+
│ └── skills/ # Auto-invoked skills
|
|
59
|
+
└── .cursor/ # Cursor integration (optional)
|
|
60
|
+
└── commands/sublation-os/ # Slash commands
|
|
45
61
|
```
|
|
46
62
|
|
|
63
|
+
**Default behavior** (`npx sublation-os` or `npx sublation-os --all`):
|
|
64
|
+
- Installs `.sublation-os/` core framework
|
|
65
|
+
- Installs Claude Code integration (`.claude/`)
|
|
66
|
+
- Installs Cursor integration (`.cursor/`)
|
|
67
|
+
|
|
68
|
+
**Claude Code only** (`npx sublation-os --claude`):
|
|
69
|
+
- Installs `.sublation-os/` core framework
|
|
70
|
+
- Installs Claude Code integration (`.claude/`)
|
|
71
|
+
|
|
72
|
+
**Cursor only** (`npx sublation-os --cursor`):
|
|
73
|
+
- Installs `.sublation-os/` core framework
|
|
74
|
+
- Installs Cursor integration (`.cursor/`)
|
|
75
|
+
|
|
47
76
|
## Features
|
|
48
77
|
|
|
49
78
|
### Standards Library
|
|
@@ -75,17 +104,25 @@ Capture durable learnings from each session:
|
|
|
75
104
|
|
|
76
105
|
Claude Code automatically loads these lessons in future sessions.
|
|
77
106
|
|
|
78
|
-
### Slash Commands
|
|
79
|
-
|
|
80
|
-
Quick access to common workflows:
|
|
107
|
+
### Slash Commands & Skills
|
|
81
108
|
|
|
82
|
-
|
|
83
|
-
- `/sublation-os:
|
|
84
|
-
- `/sublation-os:
|
|
85
|
-
- `/sublation-os:
|
|
109
|
+
**Slash Commands** (User-invoked):
|
|
110
|
+
- `/sublation-os:learn` - Manually capture a learning
|
|
111
|
+
- `/sublation-os:review` - Quick code review
|
|
112
|
+
- `/sublation-os:review-v2` - Comprehensive CoT + ReAct code review
|
|
113
|
+
- `/sublation-os:investigate` - Debug errors with ReAct methodology
|
|
114
|
+
- `/sublation-os:recall` - Search memory for past learnings
|
|
86
115
|
- `/sublation-os:commit-message` - Generate git commit message
|
|
87
|
-
- `/sublation-os:review` - Code review
|
|
88
116
|
- `/sublation-os:pr-description` - Generate PR description
|
|
117
|
+
- `/sublation-os:address-comments` - Address PR review comments
|
|
118
|
+
- `/sublation-os:optimise` - Analyze code for performance issues
|
|
119
|
+
- `/sublation-os:test-plan` - Generate test plan from spec
|
|
120
|
+
|
|
121
|
+
**Skills** (Automatically invoked by Claude):
|
|
122
|
+
- `auto-learn` - Automatically captures learnings during development
|
|
123
|
+
- Triggered after implementations, bug fixes, and code reviews
|
|
124
|
+
- Silently builds institutional knowledge
|
|
125
|
+
- Same format as `/learn` but invoked proactively
|
|
89
126
|
|
|
90
127
|
## Documentation
|
|
91
128
|
|