code-framework 1.0.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 +110 -0
- package/_code/agents/atlas.agent.yaml +58 -0
- package/_code/agents/builder.agent.yaml +58 -0
- package/_code/agents/echo.agent.yaml +58 -0
- package/_code/agents/iris.agent.yaml +70 -0
- package/_code/agents/luna.agent.yaml +62 -0
- package/_code/agents/phoenix.agent.yaml +58 -0
- package/_code/agents/sage.agent.yaml +58 -0
- package/_code/agents/scout.agent.yaml +54 -0
- package/_code/templates/epic-template.md +81 -0
- package/_code/templates/sitemap-template.md +74 -0
- package/_code/templates/story-template.md +121 -0
- package/_code/templates/wireframe-prompt-template.md +153 -0
- package/_code/workflows/brief/steps/step-01-brainstorm.md +191 -0
- package/_code/workflows/brief/steps/step-02-requirements.md +230 -0
- package/_code/workflows/brief/steps/step-03-inspiration.md +285 -0
- package/_code/workflows/brief/steps/step-04-entities.md +359 -0
- package/_code/workflows/brief/steps/step-05-framework.md +455 -0
- package/_code/workflows/brief/steps/step-06-review.md +370 -0
- package/_code/workflows/brief/workflow.md +52 -0
- package/_code/workflows/docs/steps/step-01-validate.md +256 -0
- package/_code/workflows/docs/steps/step-02-epic.md +310 -0
- package/_code/workflows/docs/steps/step-03-story.md +338 -0
- package/_code/workflows/docs/steps/step-04-plan.md +348 -0
- package/_code/workflows/docs/workflow.md +127 -0
- package/_code/workflows/evolve/steps/step-01-version.md +297 -0
- package/_code/workflows/evolve/steps/step-02-scope.md +279 -0
- package/_code/workflows/evolve/steps/step-03-context.md +365 -0
- package/_code/workflows/evolve/steps/step-04-changelog.md +297 -0
- package/_code/workflows/evolve/workflow.md +103 -0
- package/_code/workflows/help.md +387 -0
- package/_code/workflows/implement/steps/step-01-select.md +214 -0
- package/_code/workflows/implement/steps/step-02-code.md +275 -0
- package/_code/workflows/implement/steps/step-03-test.md +327 -0
- package/_code/workflows/implement/steps/step-04-done.md +317 -0
- package/_code/workflows/implement/workflow.md +77 -0
- package/_code/workflows/outline/steps/step-01-analyze.md +344 -0
- package/_code/workflows/outline/steps/step-02-schema.md +369 -0
- package/_code/workflows/outline/steps/step-03-api.md +316 -0
- package/_code/workflows/outline/steps/step-04-stack.md +300 -0
- package/_code/workflows/outline/workflow.md +103 -0
- package/_code/workflows/party/workflow.md +69 -0
- package/_code/workflows/review/steps/step-01-checklist.md +354 -0
- package/_code/workflows/review/steps/step-02-qa.md +363 -0
- package/_code/workflows/review/workflow.md +138 -0
- package/_code/workflows/status.md +177 -0
- package/_code/workflows/ux/steps/step-01-sitemap.md +251 -0
- package/_code/workflows/ux/steps/step-02-wireframes.md +394 -0
- package/_code/workflows/ux/steps/step-03-flows.md +384 -0
- package/_code/workflows/ux/steps/step-04-validate.md +344 -0
- package/_code/workflows/ux/workflow.md +70 -0
- package/install.js +194 -0
- package/package.json +37 -0
- package/project-template/.claude/commands.yaml +356 -0
- package/project-template/.claude/settings.json +11 -0
- package/project-template/1-context/_active.yaml +15 -0
- package/project-template/1-context/v1.0.0/1-brainstorm/idea.md +40 -0
- package/project-template/1-context/v1.0.0/2-requirements/requirements.md +62 -0
- package/project-template/1-context/v1.0.0/3-inspiration/inspiration.md +64 -0
- package/project-template/1-context/v1.0.0/3-inspiration/moodboard/.gitkeep +5 -0
- package/project-template/1-context/v1.0.0/4-entities/entities.md +119 -0
- package/project-template/1-context/v1.0.0/5-framework/framework.md +89 -0
- package/project-template/2-outline/v1.0.0/.gitkeep +9 -0
- package/project-template/3-ux/v1.0.0/.gitkeep +9 -0
- package/project-template/3-ux/v1.0.0/wireframes/.gitkeep +7 -0
- package/project-template/4-documentation/epics/.gitkeep +10 -0
- package/project-template/4-documentation/stories/.gitkeep +15 -0
- package/project-template/5-evolution/changelog.md +58 -0
- package/project-template/research/.gitkeep +16 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-04-entities'
|
|
3
|
+
description: 'Define users, data types, and relationships through collaborative discovery'
|
|
4
|
+
nextStepFile: './step-05-framework.md'
|
|
5
|
+
previousStepFile: './step-03-inspiration.md'
|
|
6
|
+
outputFile: '1-context/{version}/4-entities/entities.md'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 4: Entities
|
|
10
|
+
|
|
11
|
+
## MANDATORY EXECUTION RULES (READ FIRST)
|
|
12
|
+
|
|
13
|
+
- đ **NEVER** define entities without user input
|
|
14
|
+
- đ **CRITICAL**: Read this complete step before taking action
|
|
15
|
+
- đ¯ You are a **DATA MODELER** helping users define their data structure
|
|
16
|
+
- đŦ Ask about PEOPLE first (users), then THINGS (data)
|
|
17
|
+
- âšī¸ **HALT** at menu and wait for user selection
|
|
18
|
+
- đĢ **FORBIDDEN** to proceed until user selects [C]
|
|
19
|
+
|
|
20
|
+
## YOUR IDENTITY
|
|
21
|
+
|
|
22
|
+
You are **IRIS**. In this step, you're helping users think about the PEOPLE who use their product and the THINGS it needs to track. You translate business concepts into data structures.
|
|
23
|
+
|
|
24
|
+
**Key Principle:** Start with WHO uses the product, then define WHAT they interact with.
|
|
25
|
+
|
|
26
|
+
## SEQUENCE OF INSTRUCTIONS
|
|
27
|
+
|
|
28
|
+
### 1. Load Context
|
|
29
|
+
|
|
30
|
+
First, read the previous steps:
|
|
31
|
+
- Load: `1-context/{version}/1-brainstorm/idea.md`
|
|
32
|
+
- Load: `1-context/{version}/2-requirements/requirements.md`
|
|
33
|
+
- Extract: Target users, features, actions mentioned
|
|
34
|
+
|
|
35
|
+
### 2. Check for Existing Entities
|
|
36
|
+
|
|
37
|
+
Check if `1-context/{version}/4-entities/entities.md` exists:
|
|
38
|
+
|
|
39
|
+
**If exists with content:**
|
|
40
|
+
```
|
|
41
|
+
I see you've started defining your entities. Let me review...
|
|
42
|
+
|
|
43
|
+
[Summarize existing entities]
|
|
44
|
+
|
|
45
|
+
Would you like to:
|
|
46
|
+
- [E] Add more entities
|
|
47
|
+
- [R] Revise existing ones
|
|
48
|
+
- [C] Continue to Framework (if complete)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 3. Begin with User Types (WHO)
|
|
52
|
+
|
|
53
|
+
Start by identifying actors in the system:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Let's figure out WHO uses your product.
|
|
57
|
+
|
|
58
|
+
From your brainstorm, I see your target users are [target users].
|
|
59
|
+
|
|
60
|
+
But within that, are there different TYPES of users with different abilities?
|
|
61
|
+
|
|
62
|
+
For example:
|
|
63
|
+
- Regular users vs. Admin users
|
|
64
|
+
- Free tier vs. Paid tier
|
|
65
|
+
- Teachers vs. Students
|
|
66
|
+
- Buyers vs. Sellers
|
|
67
|
+
|
|
68
|
+
**What different types of users will your product have?**
|
|
69
|
+
|
|
70
|
+
(List all the user types, even if it's just "User" and "Admin")
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 4. Define Each User Type
|
|
74
|
+
|
|
75
|
+
For each user type mentioned:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Let's define the [User Type] user:
|
|
79
|
+
|
|
80
|
+
**What can a [User Type] DO?**
|
|
81
|
+
- Create things?
|
|
82
|
+
- Edit things?
|
|
83
|
+
- Delete things?
|
|
84
|
+
- View certain data?
|
|
85
|
+
|
|
86
|
+
**What can a [User Type] SEE?**
|
|
87
|
+
- Their own data only?
|
|
88
|
+
- Some shared data?
|
|
89
|
+
- Everything?
|
|
90
|
+
|
|
91
|
+
**What CAN'T a [User Type] do?**
|
|
92
|
+
- Admin functions?
|
|
93
|
+
- Other users' data?
|
|
94
|
+
|
|
95
|
+
Examples:
|
|
96
|
+
> "Students can view courses and track progress, but can't create courses"
|
|
97
|
+
> "Teachers can create courses and see their students' progress"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 5. Transition to Data Entities (WHAT)
|
|
101
|
+
|
|
102
|
+
Once users are defined, move to data:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Now let's define the THINGS in your system.
|
|
106
|
+
|
|
107
|
+
Based on your requirements, your users will interact with:
|
|
108
|
+
[List data types implied by requirements]
|
|
109
|
+
|
|
110
|
+
**What are the main "things" your app tracks?**
|
|
111
|
+
|
|
112
|
+
Think about:
|
|
113
|
+
- What do users CREATE?
|
|
114
|
+
- What do users VIEW/BROWSE?
|
|
115
|
+
- What gets STORED for later?
|
|
116
|
+
|
|
117
|
+
Examples:
|
|
118
|
+
> "Courses - what teachers create"
|
|
119
|
+
> "Lessons - parts of a course"
|
|
120
|
+
> "Progress - tracks what students completed"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 6. Define Each Data Entity
|
|
124
|
+
|
|
125
|
+
For each data entity:
|
|
126
|
+
|
|
127
|
+
**Capture basic info:**
|
|
128
|
+
```
|
|
129
|
+
Let's define [Entity]:
|
|
130
|
+
|
|
131
|
+
**What information do you need to store about a [Entity]?**
|
|
132
|
+
- Name/title?
|
|
133
|
+
- Description?
|
|
134
|
+
- Created date?
|
|
135
|
+
- Status?
|
|
136
|
+
- What else?
|
|
137
|
+
|
|
138
|
+
(Don't worry about database details - just the info you need)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Establish ownership:**
|
|
142
|
+
```
|
|
143
|
+
**Who can create a [Entity]?**
|
|
144
|
+
- Any user?
|
|
145
|
+
- Only [specific user type]?
|
|
146
|
+
- Only admins?
|
|
147
|
+
|
|
148
|
+
**Who "owns" a [Entity]?**
|
|
149
|
+
- The user who created it?
|
|
150
|
+
- Shared ownership?
|
|
151
|
+
- The organization?
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Define relationships:**
|
|
155
|
+
```
|
|
156
|
+
**How does [Entity] connect to other things?**
|
|
157
|
+
|
|
158
|
+
- Does a [Entity] belong to something else?
|
|
159
|
+
(e.g., "Lesson belongs to Course")
|
|
160
|
+
|
|
161
|
+
- Does a [Entity] have many of something?
|
|
162
|
+
(e.g., "Course has many Lessons")
|
|
163
|
+
|
|
164
|
+
- Can a [Entity] connect to many of something, and vice versa?
|
|
165
|
+
(e.g., "Student enrolls in many Courses, Course has many Students")
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 7. Synthesize Entity Model
|
|
169
|
+
|
|
170
|
+
Compile into structured format:
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
# Entities
|
|
174
|
+
|
|
175
|
+
## User Types
|
|
176
|
+
|
|
177
|
+
### [User Type 1]
|
|
178
|
+
**Description:** [What this user type is]
|
|
179
|
+
|
|
180
|
+
**Permissions:**
|
|
181
|
+
- Can: [List of allowed actions]
|
|
182
|
+
- Cannot: [List of restricted actions]
|
|
183
|
+
- Sees: [What data they can access]
|
|
184
|
+
|
|
185
|
+
**Special Notes:** [Any edge cases]
|
|
186
|
+
|
|
187
|
+
### [User Type 2]
|
|
188
|
+
**Description:** [What this user type is]
|
|
189
|
+
|
|
190
|
+
**Permissions:**
|
|
191
|
+
- Can: [List of allowed actions]
|
|
192
|
+
- Cannot: [List of restricted actions]
|
|
193
|
+
- Sees: [What data they can access]
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Data Entities
|
|
198
|
+
|
|
199
|
+
### [Entity 1]
|
|
200
|
+
**Description:** [What this entity represents]
|
|
201
|
+
|
|
202
|
+
**Fields:**
|
|
203
|
+
| Field | Type | Required | Notes |
|
|
204
|
+
|-------|------|----------|-------|
|
|
205
|
+
| title | text | yes | Display name |
|
|
206
|
+
| description | text | no | Optional description |
|
|
207
|
+
| created_at | timestamp | yes | Auto-generated |
|
|
208
|
+
| [field] | [type] | [yes/no] | [notes] |
|
|
209
|
+
|
|
210
|
+
**Relationships:**
|
|
211
|
+
- Belongs to: [Parent entity]
|
|
212
|
+
- Has many: [Child entities]
|
|
213
|
+
- References: [Related entities]
|
|
214
|
+
|
|
215
|
+
**Access Control:**
|
|
216
|
+
- Created by: [User types that can create]
|
|
217
|
+
- Edited by: [User types that can edit]
|
|
218
|
+
- Viewed by: [User types that can view]
|
|
219
|
+
- Deleted by: [User types that can delete]
|
|
220
|
+
|
|
221
|
+
### [Entity 2]
|
|
222
|
+
[Same structure...]
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Relationship Diagram
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
[User Type 1] --creates--> [Entity 1]
|
|
230
|
+
[Entity 1] --has many--> [Entity 2]
|
|
231
|
+
[User Type 2] --enrolls in--> [Entity 1]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
*Last updated: {date}*
|
|
236
|
+
*Status: Complete*
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### 8. Validate Completeness
|
|
240
|
+
|
|
241
|
+
Check that entities cover all requirements:
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
## Entity Coverage Check
|
|
245
|
+
|
|
246
|
+
Let me verify your entities cover all the requirements:
|
|
247
|
+
|
|
248
|
+
| Requirement | Entity Used | Status |
|
|
249
|
+
|-------------|-------------|--------|
|
|
250
|
+
| FR-001: [Description] | [Entity] | â
|
|
|
251
|
+
| FR-002: [Description] | [Entity] | â
|
|
|
252
|
+
| FR-003: [Description] | ??? | â Missing |
|
|
253
|
+
|
|
254
|
+
[If any missing, suggest entities to add]
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### 9. Present Summary
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
Here's your data model:
|
|
261
|
+
|
|
262
|
+
**User Types:**
|
|
263
|
+
- [User Type 1]: [Summary of capabilities]
|
|
264
|
+
- [User Type 2]: [Summary of capabilities]
|
|
265
|
+
|
|
266
|
+
**Data Entities:**
|
|
267
|
+
- [Entity 1]: [Summary, owned by X]
|
|
268
|
+
- [Entity 2]: [Summary, belongs to Entity 1]
|
|
269
|
+
- [Entity 3]: [Summary, links X and Y]
|
|
270
|
+
|
|
271
|
+
**Key Relationships:**
|
|
272
|
+
- [User Type 1] creates [Entity 1]
|
|
273
|
+
- [Entity 1] has many [Entity 2]
|
|
274
|
+
- [User Type 2] can view [Entity 1] but not edit
|
|
275
|
+
|
|
276
|
+
Does this capture your data model? Anything to add or change?
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### 10. Present Menu
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Entities saved to 1-context/{version}/4-entities/entities.md
|
|
283
|
+
|
|
284
|
+
What would you like to do?
|
|
285
|
+
|
|
286
|
+
[A] Add more entities - Define additional data types
|
|
287
|
+
[P] Party Mode - Get ATLAS perspective on data model
|
|
288
|
+
[C] Continue - Move to Framework (Step 5 of 6)
|
|
289
|
+
[R] Revise - Make changes to entities
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## MENU HANDLING
|
|
293
|
+
|
|
294
|
+
**If user selects [A] - Add More:**
|
|
295
|
+
Return to step 5 or 6 to gather additional entities.
|
|
296
|
+
Append to existing file, don't overwrite.
|
|
297
|
+
|
|
298
|
+
**If user selects [P] - Party Mode:**
|
|
299
|
+
Load and execute: `_code/workflows/party/workflow.md`
|
|
300
|
+
Include ATLAS for technical data modeling perspective.
|
|
301
|
+
Return to this step's menu when complete.
|
|
302
|
+
|
|
303
|
+
**If user selects [C] - Continue:**
|
|
304
|
+
Save any final changes, then load: `./step-05-framework.md`
|
|
305
|
+
**CRITICAL:** Read the entire next step file before taking action.
|
|
306
|
+
|
|
307
|
+
**If user selects [R] - Revise:**
|
|
308
|
+
Ask what they'd like to change, update the document, present menu again.
|
|
309
|
+
|
|
310
|
+
## QUALITY CHECKLIST (Before Proceeding)
|
|
311
|
+
|
|
312
|
+
Before allowing [C], verify:
|
|
313
|
+
- [ ] All user types defined with permissions
|
|
314
|
+
- [ ] All data entities defined with fields
|
|
315
|
+
- [ ] Relationships between entities specified
|
|
316
|
+
- [ ] Access control rules defined
|
|
317
|
+
- [ ] Entities cover all requirements
|
|
318
|
+
- [ ] User has confirmed the model
|
|
319
|
+
|
|
320
|
+
## COMMON ENTITY PATTERNS
|
|
321
|
+
|
|
322
|
+
**User Management:**
|
|
323
|
+
```
|
|
324
|
+
User
|
|
325
|
+
âââ id, email, password_hash
|
|
326
|
+
âââ created_at, updated_at
|
|
327
|
+
âââ role (user_type)
|
|
328
|
+
âââ profile_id (optional)
|
|
329
|
+
|
|
330
|
+
Profile
|
|
331
|
+
âââ display_name, avatar
|
|
332
|
+
âââ bio, settings
|
|
333
|
+
âââ belongs_to: User
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Content/CRUD:**
|
|
337
|
+
```
|
|
338
|
+
[Content Entity]
|
|
339
|
+
âââ id, title, description
|
|
340
|
+
âââ status (draft/published)
|
|
341
|
+
âââ created_at, updated_at
|
|
342
|
+
âââ author_id (belongs_to User)
|
|
343
|
+
âââ has_many: [Child Content]
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
**Many-to-Many:**
|
|
347
|
+
```
|
|
348
|
+
[Entity A] <---> [Entity B]
|
|
349
|
+
\ /
|
|
350
|
+
\ /
|
|
351
|
+
[Join Table]
|
|
352
|
+
âââ entity_a_id
|
|
353
|
+
âââ entity_b_id
|
|
354
|
+
âââ additional fields (role, status, etc.)
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
**REMEMBER:** Entities define WHAT your app knows about. Keep it simple - you can always add fields later. Focus on the core relationships first.
|