siesa-agents 2.1.2 → 2.1.4
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 +83 -83
- package/bin/install.js +400 -400
- package/bin/prepare-publish.js +26 -26
- package/bin/restore-folders.js +26 -26
- package/bmad-core/agent-teams/team-all.yaml +15 -15
- package/bmad-core/agent-teams/team-fullstack.yaml +19 -19
- package/bmad-core/agent-teams/team-ide-minimal.yaml +11 -11
- package/bmad-core/agent-teams/team-no-ui.yaml +14 -14
- package/bmad-core/agents/analyst.md +84 -84
- package/bmad-core/agents/architect.md +94 -94
- package/bmad-core/agents/backend-agent.md +189 -189
- package/bmad-core/agents/bmad-master.md +110 -110
- package/bmad-core/agents/bmad-orchestrator.md +147 -147
- package/bmad-core/agents/dev.md +81 -81
- package/bmad-core/agents/frontend-agent.md +168 -168
- package/bmad-core/agents/pm.md +84 -84
- package/bmad-core/agents/po.md +79 -79
- package/bmad-core/agents/qa.md +91 -91
- package/bmad-core/agents/sm.md +65 -65
- package/bmad-core/agents/ux-expert.md +69 -69
- package/bmad-core/checklists/architect-checklist.md +440 -440
- package/bmad-core/checklists/backend-checklist.md +142 -142
- package/bmad-core/checklists/change-checklist.md +184 -184
- package/bmad-core/checklists/frontend-checklist.md +105 -105
- package/bmad-core/checklists/pm-checklist.md +372 -372
- package/bmad-core/checklists/po-master-checklist.md +434 -434
- package/bmad-core/checklists/story-dod-checklist.md +96 -96
- package/bmad-core/checklists/story-draft-checklist.md +155 -155
- package/bmad-core/core-config.yaml +22 -22
- package/bmad-core/data/backend-standards.md +439 -439
- package/bmad-core/data/bmad-kb.md +809 -809
- package/bmad-core/data/brainstorming-techniques.md +38 -38
- package/bmad-core/data/elicitation-methods.md +156 -156
- package/bmad-core/data/frontend-standards.md +323 -323
- package/bmad-core/data/technical-preferences.md +5 -5
- package/bmad-core/data/test-levels-framework.md +148 -148
- package/bmad-core/data/test-priorities-matrix.md +174 -174
- package/bmad-core/enhanced-ide-development-workflow.md +248 -248
- package/bmad-core/install-manifest.yaml +230 -230
- package/bmad-core/tasks/advanced-elicitation.md +119 -119
- package/bmad-core/tasks/apply-qa-fixes.md +150 -150
- package/bmad-core/tasks/brownfield-create-epic.md +162 -162
- package/bmad-core/tasks/brownfield-create-story.md +149 -149
- package/bmad-core/tasks/correct-course.md +72 -72
- package/bmad-core/tasks/create-brownfield-story.md +314 -314
- package/bmad-core/tasks/create-component.md +102 -102
- package/bmad-core/tasks/create-deep-research-prompt.md +280 -280
- package/bmad-core/tasks/create-doc.md +103 -103
- package/bmad-core/tasks/create-entity.md +132 -132
- package/bmad-core/tasks/create-feature.md +90 -90
- package/bmad-core/tasks/create-next-story.md +114 -114
- package/bmad-core/tasks/create-service.md +117 -117
- package/bmad-core/tasks/create-use-case.md +140 -140
- package/bmad-core/tasks/document-project.md +345 -345
- package/bmad-core/tasks/execute-checklist.md +88 -88
- package/bmad-core/tasks/facilitate-brainstorming-session.md +138 -138
- package/bmad-core/tasks/generate-ai-frontend-prompt.md +53 -53
- package/bmad-core/tasks/index-docs.md +175 -175
- package/bmad-core/tasks/kb-mode-interaction.md +77 -77
- package/bmad-core/tasks/nfr-assess.md +345 -345
- package/bmad-core/tasks/qa-gate.md +163 -163
- package/bmad-core/tasks/review-story.md +316 -316
- package/bmad-core/tasks/risk-profile.md +355 -355
- package/bmad-core/tasks/scaffold-backend.md +110 -110
- package/bmad-core/tasks/scaffold-frontend.md +78 -78
- package/bmad-core/tasks/shard-doc.md +187 -187
- package/bmad-core/tasks/test-design.md +176 -176
- package/bmad-core/tasks/trace-requirements.md +266 -266
- package/bmad-core/tasks/validate-next-story.md +136 -136
- package/bmad-core/templates/architecture-tmpl.yaml +662 -662
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -156
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +477 -477
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +281 -281
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +307 -307
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +258 -258
- package/bmad-core/templates/front-end-spec-tmpl.yaml +350 -350
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +824 -824
- package/bmad-core/templates/market-research-tmpl.yaml +253 -253
- package/bmad-core/templates/prd-tmpl.yaml +203 -203
- package/bmad-core/templates/project-brief-tmpl.yaml +222 -222
- package/bmad-core/templates/qa-gate-tmpl.yaml +103 -103
- package/bmad-core/templates/story-tmpl.yaml +138 -138
- package/bmad-core/user-guide.md +530 -530
- package/bmad-core/utils/bmad-doc-template.md +327 -327
- package/bmad-core/utils/workflow-management.md +71 -71
- package/bmad-core/workflows/brownfield-fullstack.yaml +298 -298
- package/bmad-core/workflows/brownfield-service.yaml +188 -188
- package/bmad-core/workflows/brownfield-ui.yaml +198 -198
- package/bmad-core/workflows/greenfield-fullstack.yaml +241 -241
- package/bmad-core/workflows/greenfield-service.yaml +207 -207
- package/bmad-core/workflows/greenfield-ui.yaml +236 -236
- package/bmad-core/working-in-the-brownfield.md +606 -606
- package/claude/commands/BMad/agents/backend.md +187 -187
- package/claude/commands/BMad/agents/frontend.md +150 -150
- package/github/b-mad-expert.md +742 -742
- package/github/chatmodes/analyst.chatmode.md +89 -89
- package/github/chatmodes/architect.chatmode.md +97 -97
- package/github/chatmodes/backend.chatmode.md +194 -194
- package/github/chatmodes/bmad-master.chatmode.md +115 -115
- package/github/chatmodes/bmad-orchestrator.chatmode.md +152 -152
- package/github/chatmodes/dev.chatmode.md +86 -86
- package/github/chatmodes/frontend.chatmode.md +157 -157
- package/github/chatmodes/pm.chatmode.md +89 -89
- package/github/chatmodes/po.chatmode.md +84 -84
- package/github/chatmodes/qa.chatmode.md +96 -96
- package/github/chatmodes/sm.chatmode.md +70 -70
- package/github/chatmodes/ux-expert.chatmode.md +74 -74
- package/index.js +9 -9
- package/package.json +37 -37
- package/vscode/mcp.json +11 -11
- package/vscode/settings.json +12 -12
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
<!-- Powered by BMAD™ Core -->
|
|
2
|
-
|
|
3
|
-
# Create Document from Template (YAML Driven)
|
|
4
|
-
|
|
5
|
-
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
|
|
6
|
-
|
|
7
|
-
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
|
|
8
|
-
|
|
9
|
-
When this task is invoked:
|
|
10
|
-
|
|
11
|
-
1. **DISABLE ALL EFFICIENCY OPTIMIZATIONS** - This workflow requires full user interaction
|
|
12
|
-
2. **MANDATORY STEP-BY-STEP EXECUTION** - Each section must be processed sequentially with user feedback
|
|
13
|
-
3. **ELICITATION IS REQUIRED** - When `elicit: true`, you MUST use the 1-9 format and wait for user response
|
|
14
|
-
4. **NO SHORTCUTS ALLOWED** - Complete documents cannot be created without following this workflow
|
|
15
|
-
|
|
16
|
-
**VIOLATION INDICATOR:** If you create a complete document without user interaction, you have violated this workflow.
|
|
17
|
-
|
|
18
|
-
## Critical: Template Discovery
|
|
19
|
-
|
|
20
|
-
If a YAML Template has not been provided, list all templates from .bmad-core/templates or ask the user to provide another.
|
|
21
|
-
|
|
22
|
-
## CRITICAL: Mandatory Elicitation Format
|
|
23
|
-
|
|
24
|
-
**When `elicit: true`, this is a HARD STOP requiring user interaction:**
|
|
25
|
-
|
|
26
|
-
**YOU MUST:**
|
|
27
|
-
|
|
28
|
-
1. Present section content
|
|
29
|
-
2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
|
|
30
|
-
3. **STOP and present numbered options 1-9:**
|
|
31
|
-
- **Option 1:** Always "Proceed to next section"
|
|
32
|
-
- **Options 2-9:** Select 8 methods from data/elicitation-methods
|
|
33
|
-
- End with: "Select 1-9 or just type your question/feedback:"
|
|
34
|
-
4. **WAIT FOR USER RESPONSE** - Do not proceed until user selects option or provides feedback
|
|
35
|
-
|
|
36
|
-
**WORKFLOW VIOLATION:** Creating content for elicit=true sections without user interaction violates this task.
|
|
37
|
-
|
|
38
|
-
**NEVER ask yes/no questions or use any other format.**
|
|
39
|
-
|
|
40
|
-
## Processing Flow
|
|
41
|
-
|
|
42
|
-
1. **Parse YAML template** - Load template metadata and sections
|
|
43
|
-
2. **Set preferences** - Show current mode (Interactive), confirm output file
|
|
44
|
-
3. **Process each section:**
|
|
45
|
-
- Skip if condition unmet
|
|
46
|
-
- Check agent permissions (owner/editors) - note if section is restricted to specific agents
|
|
47
|
-
- Draft content using section instruction
|
|
48
|
-
- Present content + detailed rationale
|
|
49
|
-
- **IF elicit: true** → MANDATORY 1-9 options format
|
|
50
|
-
- Save to file if possible
|
|
51
|
-
4. **Continue until complete**
|
|
52
|
-
|
|
53
|
-
## Detailed Rationale Requirements
|
|
54
|
-
|
|
55
|
-
When presenting section content, ALWAYS include rationale that explains:
|
|
56
|
-
|
|
57
|
-
- Trade-offs and choices made (what was chosen over alternatives and why)
|
|
58
|
-
- Key assumptions made during drafting
|
|
59
|
-
- Interesting or questionable decisions that need user attention
|
|
60
|
-
- Areas that might need validation
|
|
61
|
-
|
|
62
|
-
## Elicitation Results Flow
|
|
63
|
-
|
|
64
|
-
After user selects elicitation method (2-9):
|
|
65
|
-
|
|
66
|
-
1. Execute method from data/elicitation-methods
|
|
67
|
-
2. Present results with insights
|
|
68
|
-
3. Offer options:
|
|
69
|
-
- **1. Apply changes and update section**
|
|
70
|
-
- **2. Return to elicitation menu**
|
|
71
|
-
- **3. Ask any questions or engage further with this elicitation**
|
|
72
|
-
|
|
73
|
-
## Agent Permissions
|
|
74
|
-
|
|
75
|
-
When processing sections with agent permission fields:
|
|
76
|
-
|
|
77
|
-
- **owner**: Note which agent role initially creates/populates the section
|
|
78
|
-
- **editors**: List agent roles allowed to modify the section
|
|
79
|
-
- **readonly**: Mark sections that cannot be modified after creation
|
|
80
|
-
|
|
81
|
-
**For sections with restricted access:**
|
|
82
|
-
|
|
83
|
-
- Include a note in the generated document indicating the responsible agent
|
|
84
|
-
- Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
|
|
85
|
-
|
|
86
|
-
## YOLO Mode
|
|
87
|
-
|
|
88
|
-
User can type `#yolo` to toggle to YOLO mode (process all sections at once).
|
|
89
|
-
|
|
90
|
-
## CRITICAL REMINDERS
|
|
91
|
-
|
|
92
|
-
**❌ NEVER:**
|
|
93
|
-
|
|
94
|
-
- Ask yes/no questions for elicitation
|
|
95
|
-
- Use any format other than 1-9 numbered options
|
|
96
|
-
- Create new elicitation methods
|
|
97
|
-
|
|
98
|
-
**✅ ALWAYS:**
|
|
99
|
-
|
|
100
|
-
- Use exact 1-9 format when elicit: true
|
|
101
|
-
- Select options 2-9 from data/elicitation-methods only
|
|
102
|
-
- Provide detailed rationale explaining decisions
|
|
103
|
-
- End with "Select 1-9 or just type your question/feedback:"
|
|
1
|
+
<!-- Powered by BMAD™ Core -->
|
|
2
|
+
|
|
3
|
+
# Create Document from Template (YAML Driven)
|
|
4
|
+
|
|
5
|
+
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
|
|
6
|
+
|
|
7
|
+
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
|
|
8
|
+
|
|
9
|
+
When this task is invoked:
|
|
10
|
+
|
|
11
|
+
1. **DISABLE ALL EFFICIENCY OPTIMIZATIONS** - This workflow requires full user interaction
|
|
12
|
+
2. **MANDATORY STEP-BY-STEP EXECUTION** - Each section must be processed sequentially with user feedback
|
|
13
|
+
3. **ELICITATION IS REQUIRED** - When `elicit: true`, you MUST use the 1-9 format and wait for user response
|
|
14
|
+
4. **NO SHORTCUTS ALLOWED** - Complete documents cannot be created without following this workflow
|
|
15
|
+
|
|
16
|
+
**VIOLATION INDICATOR:** If you create a complete document without user interaction, you have violated this workflow.
|
|
17
|
+
|
|
18
|
+
## Critical: Template Discovery
|
|
19
|
+
|
|
20
|
+
If a YAML Template has not been provided, list all templates from .bmad-core/templates or ask the user to provide another.
|
|
21
|
+
|
|
22
|
+
## CRITICAL: Mandatory Elicitation Format
|
|
23
|
+
|
|
24
|
+
**When `elicit: true`, this is a HARD STOP requiring user interaction:**
|
|
25
|
+
|
|
26
|
+
**YOU MUST:**
|
|
27
|
+
|
|
28
|
+
1. Present section content
|
|
29
|
+
2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
|
|
30
|
+
3. **STOP and present numbered options 1-9:**
|
|
31
|
+
- **Option 1:** Always "Proceed to next section"
|
|
32
|
+
- **Options 2-9:** Select 8 methods from data/elicitation-methods
|
|
33
|
+
- End with: "Select 1-9 or just type your question/feedback:"
|
|
34
|
+
4. **WAIT FOR USER RESPONSE** - Do not proceed until user selects option or provides feedback
|
|
35
|
+
|
|
36
|
+
**WORKFLOW VIOLATION:** Creating content for elicit=true sections without user interaction violates this task.
|
|
37
|
+
|
|
38
|
+
**NEVER ask yes/no questions or use any other format.**
|
|
39
|
+
|
|
40
|
+
## Processing Flow
|
|
41
|
+
|
|
42
|
+
1. **Parse YAML template** - Load template metadata and sections
|
|
43
|
+
2. **Set preferences** - Show current mode (Interactive), confirm output file
|
|
44
|
+
3. **Process each section:**
|
|
45
|
+
- Skip if condition unmet
|
|
46
|
+
- Check agent permissions (owner/editors) - note if section is restricted to specific agents
|
|
47
|
+
- Draft content using section instruction
|
|
48
|
+
- Present content + detailed rationale
|
|
49
|
+
- **IF elicit: true** → MANDATORY 1-9 options format
|
|
50
|
+
- Save to file if possible
|
|
51
|
+
4. **Continue until complete**
|
|
52
|
+
|
|
53
|
+
## Detailed Rationale Requirements
|
|
54
|
+
|
|
55
|
+
When presenting section content, ALWAYS include rationale that explains:
|
|
56
|
+
|
|
57
|
+
- Trade-offs and choices made (what was chosen over alternatives and why)
|
|
58
|
+
- Key assumptions made during drafting
|
|
59
|
+
- Interesting or questionable decisions that need user attention
|
|
60
|
+
- Areas that might need validation
|
|
61
|
+
|
|
62
|
+
## Elicitation Results Flow
|
|
63
|
+
|
|
64
|
+
After user selects elicitation method (2-9):
|
|
65
|
+
|
|
66
|
+
1. Execute method from data/elicitation-methods
|
|
67
|
+
2. Present results with insights
|
|
68
|
+
3. Offer options:
|
|
69
|
+
- **1. Apply changes and update section**
|
|
70
|
+
- **2. Return to elicitation menu**
|
|
71
|
+
- **3. Ask any questions or engage further with this elicitation**
|
|
72
|
+
|
|
73
|
+
## Agent Permissions
|
|
74
|
+
|
|
75
|
+
When processing sections with agent permission fields:
|
|
76
|
+
|
|
77
|
+
- **owner**: Note which agent role initially creates/populates the section
|
|
78
|
+
- **editors**: List agent roles allowed to modify the section
|
|
79
|
+
- **readonly**: Mark sections that cannot be modified after creation
|
|
80
|
+
|
|
81
|
+
**For sections with restricted access:**
|
|
82
|
+
|
|
83
|
+
- Include a note in the generated document indicating the responsible agent
|
|
84
|
+
- Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
|
|
85
|
+
|
|
86
|
+
## YOLO Mode
|
|
87
|
+
|
|
88
|
+
User can type `#yolo` to toggle to YOLO mode (process all sections at once).
|
|
89
|
+
|
|
90
|
+
## CRITICAL REMINDERS
|
|
91
|
+
|
|
92
|
+
**❌ NEVER:**
|
|
93
|
+
|
|
94
|
+
- Ask yes/no questions for elicitation
|
|
95
|
+
- Use any format other than 1-9 numbered options
|
|
96
|
+
- Create new elicitation methods
|
|
97
|
+
|
|
98
|
+
**✅ ALWAYS:**
|
|
99
|
+
|
|
100
|
+
- Use exact 1-9 format when elicit: true
|
|
101
|
+
- Select options 2-9 from data/elicitation-methods only
|
|
102
|
+
- Provide detailed rationale explaining decisions
|
|
103
|
+
- End with "Select 1-9 or just type your question/feedback:"
|
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
# Create Domain Entity
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
Create a domain entity with value objects, aggregates, and business rules following DDD principles.
|
|
5
|
-
|
|
6
|
-
## Task Configuration
|
|
7
|
-
```yaml
|
|
8
|
-
elicit: true
|
|
9
|
-
interactive: true
|
|
10
|
-
required_params:
|
|
11
|
-
- entity_name
|
|
12
|
-
- service_name
|
|
13
|
-
- properties
|
|
14
|
-
optional_params:
|
|
15
|
-
- value_objects
|
|
16
|
-
- business_rules
|
|
17
|
-
- domain_events
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Task Execution
|
|
21
|
-
|
|
22
|
-
### Step 1: Elicit Entity Requirements
|
|
23
|
-
Ask user for:
|
|
24
|
-
|
|
25
|
-
**Entity Name**: What is the entity name? (use PascalCase)
|
|
26
|
-
**Service Name**: Which bounded context does this entity belong to?
|
|
27
|
-
**Properties**: What are the entity properties? (name, type, validation rules)
|
|
28
|
-
**Value Objects**: Any complex properties that should be value objects? (optional)
|
|
29
|
-
**Business Rules**: What business rules should this entity enforce? (optional)
|
|
30
|
-
**Domain Events**: What events should this entity publish? (optional)
|
|
31
|
-
|
|
32
|
-
### Step 2: Generate Entity Structure
|
|
33
|
-
Create the following files:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
src/modules/{service-name}/domain/
|
|
37
|
-
├── entities/
|
|
38
|
-
│ └── {entity}.entity.ts
|
|
39
|
-
├── value-objects/
|
|
40
|
-
│ ├── {entity}-id.value-object.ts
|
|
41
|
-
│ └── {property}.value-object.ts
|
|
42
|
-
├── aggregates/
|
|
43
|
-
│ └── {entity}.aggregate.ts
|
|
44
|
-
└── events/
|
|
45
|
-
└── {entity}-{action}.event.ts
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Step 3: Create Domain Entity
|
|
49
|
-
Generate entity with:
|
|
50
|
-
- Unique identifier (UUID or custom ID)
|
|
51
|
-
- Properties with proper typing
|
|
52
|
-
- Business rule validation methods
|
|
53
|
-
- Factory methods for creation
|
|
54
|
-
- Domain event publishing
|
|
55
|
-
- Immutability patterns
|
|
56
|
-
|
|
57
|
-
Example structure:
|
|
58
|
-
```typescript
|
|
59
|
-
export class {Entity}Entity extends AggregateRoot {{
|
|
60
|
-
private constructor(
|
|
61
|
-
public readonly id: {Entity}Id,
|
|
62
|
-
private _property: PropertyValueObject,
|
|
63
|
-
// ... other properties
|
|
64
|
-
) {{
|
|
65
|
-
super();
|
|
66
|
-
}}
|
|
67
|
-
|
|
68
|
-
static create(props: Create{Entity}Props): {Entity}Entity {{
|
|
69
|
-
// Validation logic
|
|
70
|
-
// Business rule enforcement
|
|
71
|
-
const entity = new {Entity}Entity(/* ... */);
|
|
72
|
-
entity.addDomainEvent(new {Entity}CreatedEvent(entity.id));
|
|
73
|
-
return entity;
|
|
74
|
-
}}
|
|
75
|
-
|
|
76
|
-
// Business methods
|
|
77
|
-
public updateProperty(newValue: PropertyValueObject): void {{
|
|
78
|
-
// Business rule validation
|
|
79
|
-
this._property = newValue;
|
|
80
|
-
this.addDomainEvent(new {Entity}UpdatedEvent(this.id));
|
|
81
|
-
}}
|
|
82
|
-
|
|
83
|
-
// Getters
|
|
84
|
-
get property(): PropertyValueObject {{
|
|
85
|
-
return this._property;
|
|
86
|
-
}}
|
|
87
|
-
}}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Step 4: Generate Value Objects
|
|
91
|
-
For each value object:
|
|
92
|
-
- Immutable classes with validation
|
|
93
|
-
- Equality based on value, not reference
|
|
94
|
-
- Factory methods with validation
|
|
95
|
-
- Type safety and domain expressiveness
|
|
96
|
-
|
|
97
|
-
### Step 5: Create Aggregate Root
|
|
98
|
-
If entity is an aggregate root:
|
|
99
|
-
- Extend AggregateRoot base class
|
|
100
|
-
- Manage domain events
|
|
101
|
-
- Enforce consistency boundaries
|
|
102
|
-
- Handle child entity relationships
|
|
103
|
-
|
|
104
|
-
### Step 6: Generate Domain Events
|
|
105
|
-
For each domain event:
|
|
106
|
-
- Event class with entity data
|
|
107
|
-
- Event handler interfaces
|
|
108
|
-
- Integration with application layer
|
|
109
|
-
- Serialization for external systems
|
|
110
|
-
|
|
111
|
-
### Step 7: Generate Prisma Schema
|
|
112
|
-
Update Prisma schema with:
|
|
113
|
-
- Entity table definition
|
|
114
|
-
- Proper field types and constraints
|
|
115
|
-
- Relationships with other entities
|
|
116
|
-
- Indexes for performance
|
|
117
|
-
- Migrations for schema changes
|
|
118
|
-
|
|
119
|
-
### Step 8: Generate Tests
|
|
120
|
-
Create comprehensive tests:
|
|
121
|
-
- Entity business rule tests
|
|
122
|
-
- Value object validation tests
|
|
123
|
-
- Aggregate consistency tests
|
|
124
|
-
- Domain event publishing tests
|
|
125
|
-
- Factory method tests
|
|
126
|
-
|
|
127
|
-
## Completion Criteria
|
|
128
|
-
- Entity follows DDD patterns
|
|
129
|
-
- Business rules properly enforced
|
|
130
|
-
- Value objects provide type safety
|
|
131
|
-
- Domain events properly implemented
|
|
132
|
-
- Prisma schema updated
|
|
1
|
+
# Create Domain Entity
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Create a domain entity with value objects, aggregates, and business rules following DDD principles.
|
|
5
|
+
|
|
6
|
+
## Task Configuration
|
|
7
|
+
```yaml
|
|
8
|
+
elicit: true
|
|
9
|
+
interactive: true
|
|
10
|
+
required_params:
|
|
11
|
+
- entity_name
|
|
12
|
+
- service_name
|
|
13
|
+
- properties
|
|
14
|
+
optional_params:
|
|
15
|
+
- value_objects
|
|
16
|
+
- business_rules
|
|
17
|
+
- domain_events
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Task Execution
|
|
21
|
+
|
|
22
|
+
### Step 1: Elicit Entity Requirements
|
|
23
|
+
Ask user for:
|
|
24
|
+
|
|
25
|
+
**Entity Name**: What is the entity name? (use PascalCase)
|
|
26
|
+
**Service Name**: Which bounded context does this entity belong to?
|
|
27
|
+
**Properties**: What are the entity properties? (name, type, validation rules)
|
|
28
|
+
**Value Objects**: Any complex properties that should be value objects? (optional)
|
|
29
|
+
**Business Rules**: What business rules should this entity enforce? (optional)
|
|
30
|
+
**Domain Events**: What events should this entity publish? (optional)
|
|
31
|
+
|
|
32
|
+
### Step 2: Generate Entity Structure
|
|
33
|
+
Create the following files:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
src/modules/{service-name}/domain/
|
|
37
|
+
├── entities/
|
|
38
|
+
│ └── {entity}.entity.ts
|
|
39
|
+
├── value-objects/
|
|
40
|
+
│ ├── {entity}-id.value-object.ts
|
|
41
|
+
│ └── {property}.value-object.ts
|
|
42
|
+
├── aggregates/
|
|
43
|
+
│ └── {entity}.aggregate.ts
|
|
44
|
+
└── events/
|
|
45
|
+
└── {entity}-{action}.event.ts
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 3: Create Domain Entity
|
|
49
|
+
Generate entity with:
|
|
50
|
+
- Unique identifier (UUID or custom ID)
|
|
51
|
+
- Properties with proper typing
|
|
52
|
+
- Business rule validation methods
|
|
53
|
+
- Factory methods for creation
|
|
54
|
+
- Domain event publishing
|
|
55
|
+
- Immutability patterns
|
|
56
|
+
|
|
57
|
+
Example structure:
|
|
58
|
+
```typescript
|
|
59
|
+
export class {Entity}Entity extends AggregateRoot {{
|
|
60
|
+
private constructor(
|
|
61
|
+
public readonly id: {Entity}Id,
|
|
62
|
+
private _property: PropertyValueObject,
|
|
63
|
+
// ... other properties
|
|
64
|
+
) {{
|
|
65
|
+
super();
|
|
66
|
+
}}
|
|
67
|
+
|
|
68
|
+
static create(props: Create{Entity}Props): {Entity}Entity {{
|
|
69
|
+
// Validation logic
|
|
70
|
+
// Business rule enforcement
|
|
71
|
+
const entity = new {Entity}Entity(/* ... */);
|
|
72
|
+
entity.addDomainEvent(new {Entity}CreatedEvent(entity.id));
|
|
73
|
+
return entity;
|
|
74
|
+
}}
|
|
75
|
+
|
|
76
|
+
// Business methods
|
|
77
|
+
public updateProperty(newValue: PropertyValueObject): void {{
|
|
78
|
+
// Business rule validation
|
|
79
|
+
this._property = newValue;
|
|
80
|
+
this.addDomainEvent(new {Entity}UpdatedEvent(this.id));
|
|
81
|
+
}}
|
|
82
|
+
|
|
83
|
+
// Getters
|
|
84
|
+
get property(): PropertyValueObject {{
|
|
85
|
+
return this._property;
|
|
86
|
+
}}
|
|
87
|
+
}}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 4: Generate Value Objects
|
|
91
|
+
For each value object:
|
|
92
|
+
- Immutable classes with validation
|
|
93
|
+
- Equality based on value, not reference
|
|
94
|
+
- Factory methods with validation
|
|
95
|
+
- Type safety and domain expressiveness
|
|
96
|
+
|
|
97
|
+
### Step 5: Create Aggregate Root
|
|
98
|
+
If entity is an aggregate root:
|
|
99
|
+
- Extend AggregateRoot base class
|
|
100
|
+
- Manage domain events
|
|
101
|
+
- Enforce consistency boundaries
|
|
102
|
+
- Handle child entity relationships
|
|
103
|
+
|
|
104
|
+
### Step 6: Generate Domain Events
|
|
105
|
+
For each domain event:
|
|
106
|
+
- Event class with entity data
|
|
107
|
+
- Event handler interfaces
|
|
108
|
+
- Integration with application layer
|
|
109
|
+
- Serialization for external systems
|
|
110
|
+
|
|
111
|
+
### Step 7: Generate Prisma Schema
|
|
112
|
+
Update Prisma schema with:
|
|
113
|
+
- Entity table definition
|
|
114
|
+
- Proper field types and constraints
|
|
115
|
+
- Relationships with other entities
|
|
116
|
+
- Indexes for performance
|
|
117
|
+
- Migrations for schema changes
|
|
118
|
+
|
|
119
|
+
### Step 8: Generate Tests
|
|
120
|
+
Create comprehensive tests:
|
|
121
|
+
- Entity business rule tests
|
|
122
|
+
- Value object validation tests
|
|
123
|
+
- Aggregate consistency tests
|
|
124
|
+
- Domain event publishing tests
|
|
125
|
+
- Factory method tests
|
|
126
|
+
|
|
127
|
+
## Completion Criteria
|
|
128
|
+
- Entity follows DDD patterns
|
|
129
|
+
- Business rules properly enforced
|
|
130
|
+
- Value objects provide type safety
|
|
131
|
+
- Domain events properly implemented
|
|
132
|
+
- Prisma schema updated
|
|
133
133
|
- Comprehensive test coverage
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
# Create Frontend Feature
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
Create a complete feature following Clean Architecture + DDD principles with all necessary layers.
|
|
5
|
-
|
|
6
|
-
## Task Configuration
|
|
7
|
-
```yaml
|
|
8
|
-
elicit: true
|
|
9
|
-
interactive: true
|
|
10
|
-
required_params:
|
|
11
|
-
- feature_name
|
|
12
|
-
- entities
|
|
13
|
-
- use_cases
|
|
14
|
-
optional_params:
|
|
15
|
-
- api_endpoints
|
|
16
|
-
- ui_components
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Task Execution
|
|
20
|
-
|
|
21
|
-
### Step 1: Elicit Feature Requirements
|
|
22
|
-
Ask user for:
|
|
23
|
-
|
|
24
|
-
**Feature Name**: What is the name of the feature? (use kebab-case)
|
|
25
|
-
**Domain Entities**: What are the main business entities for this feature?
|
|
26
|
-
**Use Cases**: What are the main use cases/operations users can perform?
|
|
27
|
-
**API Endpoints**: What backend endpoints will this feature consume? (optional)
|
|
28
|
-
**UI Components**: Any specific components you know you'll need? (optional)
|
|
29
|
-
|
|
30
|
-
### Step 2: Create Feature Structure
|
|
31
|
-
Generate the following structure:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
src/features/{feature_name}/
|
|
35
|
-
├── domain/
|
|
36
|
-
│ ├── entities/
|
|
37
|
-
│ ├── repositories/
|
|
38
|
-
│ ├── services/
|
|
39
|
-
│ └── types/
|
|
40
|
-
├── application/
|
|
41
|
-
│ ├── use-cases/
|
|
42
|
-
│ ├── hooks/
|
|
43
|
-
│ └── store/
|
|
44
|
-
├── infrastructure/
|
|
45
|
-
│ ├── repositories/
|
|
46
|
-
│ ├── api/
|
|
47
|
-
│ └── adapters/
|
|
48
|
-
└── presentation/
|
|
49
|
-
├── components/
|
|
50
|
-
├── pages/
|
|
51
|
-
└── styles/
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Step 3: Generate Domain Layer
|
|
55
|
-
For each entity:
|
|
56
|
-
- Create TypeScript interfaces/types
|
|
57
|
-
- Define value objects if needed
|
|
58
|
-
- Create repository interfaces
|
|
59
|
-
- Define domain services if complex business rules exist
|
|
60
|
-
|
|
61
|
-
### Step 4: Generate Application Layer
|
|
62
|
-
For each use case:
|
|
63
|
-
- Create use case implementation
|
|
64
|
-
- Create custom hooks that consume use cases
|
|
65
|
-
- Setup Zustand store for feature state
|
|
66
|
-
- Implement error handling and loading states
|
|
67
|
-
|
|
68
|
-
### Step 5: Generate Infrastructure Layer
|
|
69
|
-
- Implement repository concrete classes
|
|
70
|
-
- Setup API clients with proper typing
|
|
71
|
-
- Create adapters for external services
|
|
72
|
-
- Configure error handling and retries
|
|
73
|
-
|
|
74
|
-
### Step 6: Generate Presentation Layer
|
|
75
|
-
- Create feature-specific components
|
|
76
|
-
- Setup routing for feature pages
|
|
77
|
-
- Implement accessibility features
|
|
78
|
-
- Add loading and error states
|
|
79
|
-
|
|
80
|
-
### Step 7: Generate Tests
|
|
81
|
-
- Unit tests for domain entities and services
|
|
82
|
-
- Integration tests for use cases
|
|
83
|
-
- Component tests for presentation layer
|
|
84
|
-
- API integration tests for infrastructure layer
|
|
85
|
-
|
|
86
|
-
## Completion Criteria
|
|
87
|
-
- All layers properly implemented
|
|
88
|
-
- Clean Architecture dependencies respected
|
|
89
|
-
- TypeScript compilation successful
|
|
90
|
-
- All tests passing
|
|
1
|
+
# Create Frontend Feature
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Create a complete feature following Clean Architecture + DDD principles with all necessary layers.
|
|
5
|
+
|
|
6
|
+
## Task Configuration
|
|
7
|
+
```yaml
|
|
8
|
+
elicit: true
|
|
9
|
+
interactive: true
|
|
10
|
+
required_params:
|
|
11
|
+
- feature_name
|
|
12
|
+
- entities
|
|
13
|
+
- use_cases
|
|
14
|
+
optional_params:
|
|
15
|
+
- api_endpoints
|
|
16
|
+
- ui_components
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Task Execution
|
|
20
|
+
|
|
21
|
+
### Step 1: Elicit Feature Requirements
|
|
22
|
+
Ask user for:
|
|
23
|
+
|
|
24
|
+
**Feature Name**: What is the name of the feature? (use kebab-case)
|
|
25
|
+
**Domain Entities**: What are the main business entities for this feature?
|
|
26
|
+
**Use Cases**: What are the main use cases/operations users can perform?
|
|
27
|
+
**API Endpoints**: What backend endpoints will this feature consume? (optional)
|
|
28
|
+
**UI Components**: Any specific components you know you'll need? (optional)
|
|
29
|
+
|
|
30
|
+
### Step 2: Create Feature Structure
|
|
31
|
+
Generate the following structure:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
src/features/{feature_name}/
|
|
35
|
+
├── domain/
|
|
36
|
+
│ ├── entities/
|
|
37
|
+
│ ├── repositories/
|
|
38
|
+
│ ├── services/
|
|
39
|
+
│ └── types/
|
|
40
|
+
├── application/
|
|
41
|
+
│ ├── use-cases/
|
|
42
|
+
│ ├── hooks/
|
|
43
|
+
│ └── store/
|
|
44
|
+
├── infrastructure/
|
|
45
|
+
│ ├── repositories/
|
|
46
|
+
│ ├── api/
|
|
47
|
+
│ └── adapters/
|
|
48
|
+
└── presentation/
|
|
49
|
+
├── components/
|
|
50
|
+
├── pages/
|
|
51
|
+
└── styles/
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 3: Generate Domain Layer
|
|
55
|
+
For each entity:
|
|
56
|
+
- Create TypeScript interfaces/types
|
|
57
|
+
- Define value objects if needed
|
|
58
|
+
- Create repository interfaces
|
|
59
|
+
- Define domain services if complex business rules exist
|
|
60
|
+
|
|
61
|
+
### Step 4: Generate Application Layer
|
|
62
|
+
For each use case:
|
|
63
|
+
- Create use case implementation
|
|
64
|
+
- Create custom hooks that consume use cases
|
|
65
|
+
- Setup Zustand store for feature state
|
|
66
|
+
- Implement error handling and loading states
|
|
67
|
+
|
|
68
|
+
### Step 5: Generate Infrastructure Layer
|
|
69
|
+
- Implement repository concrete classes
|
|
70
|
+
- Setup API clients with proper typing
|
|
71
|
+
- Create adapters for external services
|
|
72
|
+
- Configure error handling and retries
|
|
73
|
+
|
|
74
|
+
### Step 6: Generate Presentation Layer
|
|
75
|
+
- Create feature-specific components
|
|
76
|
+
- Setup routing for feature pages
|
|
77
|
+
- Implement accessibility features
|
|
78
|
+
- Add loading and error states
|
|
79
|
+
|
|
80
|
+
### Step 7: Generate Tests
|
|
81
|
+
- Unit tests for domain entities and services
|
|
82
|
+
- Integration tests for use cases
|
|
83
|
+
- Component tests for presentation layer
|
|
84
|
+
- API integration tests for infrastructure layer
|
|
85
|
+
|
|
86
|
+
## Completion Criteria
|
|
87
|
+
- All layers properly implemented
|
|
88
|
+
- Clean Architecture dependencies respected
|
|
89
|
+
- TypeScript compilation successful
|
|
90
|
+
- All tests passing
|
|
91
91
|
- Feature integrated with main application
|