siesa-agents 2.1.2 → 2.1.3-dev.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.
Files changed (114) hide show
  1. package/README.md +83 -83
  2. package/bin/install.js +400 -400
  3. package/bin/prepare-publish.js +26 -26
  4. package/bin/restore-folders.js +26 -26
  5. package/bmad-core/agent-teams/team-all.yaml +15 -15
  6. package/bmad-core/agent-teams/team-fullstack.yaml +19 -19
  7. package/bmad-core/agent-teams/team-ide-minimal.yaml +11 -11
  8. package/bmad-core/agent-teams/team-no-ui.yaml +14 -14
  9. package/bmad-core/agents/analyst.md +84 -84
  10. package/bmad-core/agents/architect.md +94 -94
  11. package/bmad-core/agents/backend-agent.md +189 -189
  12. package/bmad-core/agents/bmad-master.md +110 -110
  13. package/bmad-core/agents/bmad-orchestrator.md +147 -147
  14. package/bmad-core/agents/dev.md +81 -81
  15. package/bmad-core/agents/frontend-agent.md +168 -168
  16. package/bmad-core/agents/pm.md +84 -84
  17. package/bmad-core/agents/po.md +79 -79
  18. package/bmad-core/agents/qa.md +91 -91
  19. package/bmad-core/agents/sm.md +65 -65
  20. package/bmad-core/agents/ux-expert.md +69 -69
  21. package/bmad-core/checklists/architect-checklist.md +440 -440
  22. package/bmad-core/checklists/backend-checklist.md +142 -142
  23. package/bmad-core/checklists/change-checklist.md +184 -184
  24. package/bmad-core/checklists/frontend-checklist.md +105 -105
  25. package/bmad-core/checklists/pm-checklist.md +372 -372
  26. package/bmad-core/checklists/po-master-checklist.md +434 -434
  27. package/bmad-core/checklists/story-dod-checklist.md +96 -96
  28. package/bmad-core/checklists/story-draft-checklist.md +155 -155
  29. package/bmad-core/core-config.yaml +22 -22
  30. package/bmad-core/data/backend-standards.md +439 -439
  31. package/bmad-core/data/bmad-kb.md +809 -809
  32. package/bmad-core/data/brainstorming-techniques.md +38 -38
  33. package/bmad-core/data/elicitation-methods.md +156 -156
  34. package/bmad-core/data/frontend-standards.md +323 -323
  35. package/bmad-core/data/technical-preferences.md +5 -5
  36. package/bmad-core/data/test-levels-framework.md +148 -148
  37. package/bmad-core/data/test-priorities-matrix.md +174 -174
  38. package/bmad-core/enhanced-ide-development-workflow.md +248 -248
  39. package/bmad-core/install-manifest.yaml +230 -230
  40. package/bmad-core/tasks/advanced-elicitation.md +119 -119
  41. package/bmad-core/tasks/apply-qa-fixes.md +150 -150
  42. package/bmad-core/tasks/brownfield-create-epic.md +162 -162
  43. package/bmad-core/tasks/brownfield-create-story.md +149 -149
  44. package/bmad-core/tasks/correct-course.md +72 -72
  45. package/bmad-core/tasks/create-brownfield-story.md +314 -314
  46. package/bmad-core/tasks/create-component.md +102 -102
  47. package/bmad-core/tasks/create-deep-research-prompt.md +280 -280
  48. package/bmad-core/tasks/create-doc.md +103 -103
  49. package/bmad-core/tasks/create-entity.md +132 -132
  50. package/bmad-core/tasks/create-feature.md +90 -90
  51. package/bmad-core/tasks/create-next-story.md +114 -114
  52. package/bmad-core/tasks/create-service.md +117 -117
  53. package/bmad-core/tasks/create-use-case.md +140 -140
  54. package/bmad-core/tasks/document-project.md +345 -345
  55. package/bmad-core/tasks/execute-checklist.md +88 -88
  56. package/bmad-core/tasks/facilitate-brainstorming-session.md +138 -138
  57. package/bmad-core/tasks/generate-ai-frontend-prompt.md +53 -53
  58. package/bmad-core/tasks/index-docs.md +175 -175
  59. package/bmad-core/tasks/kb-mode-interaction.md +77 -77
  60. package/bmad-core/tasks/nfr-assess.md +345 -345
  61. package/bmad-core/tasks/qa-gate.md +163 -163
  62. package/bmad-core/tasks/review-story.md +316 -316
  63. package/bmad-core/tasks/risk-profile.md +355 -355
  64. package/bmad-core/tasks/scaffold-backend.md +110 -110
  65. package/bmad-core/tasks/scaffold-frontend.md +78 -78
  66. package/bmad-core/tasks/shard-doc.md +187 -187
  67. package/bmad-core/tasks/test-design.md +176 -176
  68. package/bmad-core/tasks/trace-requirements.md +266 -266
  69. package/bmad-core/tasks/validate-next-story.md +136 -136
  70. package/bmad-core/templates/architecture-tmpl.yaml +662 -662
  71. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -156
  72. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +477 -477
  73. package/bmad-core/templates/brownfield-prd-tmpl.yaml +281 -281
  74. package/bmad-core/templates/competitor-analysis-tmpl.yaml +307 -307
  75. package/bmad-core/templates/front-end-architecture-tmpl.yaml +258 -258
  76. package/bmad-core/templates/front-end-spec-tmpl.yaml +350 -350
  77. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +824 -824
  78. package/bmad-core/templates/market-research-tmpl.yaml +253 -253
  79. package/bmad-core/templates/prd-tmpl.yaml +203 -203
  80. package/bmad-core/templates/project-brief-tmpl.yaml +222 -222
  81. package/bmad-core/templates/qa-gate-tmpl.yaml +103 -103
  82. package/bmad-core/templates/story-tmpl.yaml +138 -138
  83. package/bmad-core/user-guide.md +530 -530
  84. package/bmad-core/utils/bmad-doc-template.md +327 -327
  85. package/bmad-core/utils/workflow-management.md +71 -71
  86. package/bmad-core/workflows/brownfield-fullstack.yaml +298 -298
  87. package/bmad-core/workflows/brownfield-service.yaml +188 -188
  88. package/bmad-core/workflows/brownfield-ui.yaml +198 -198
  89. package/bmad-core/workflows/greenfield-fullstack.yaml +241 -241
  90. package/bmad-core/workflows/greenfield-service.yaml +207 -207
  91. package/bmad-core/workflows/greenfield-ui.yaml +236 -236
  92. package/bmad-core/working-in-the-brownfield.md +606 -606
  93. package/claude/commands/BMad/agents/backend.md +187 -187
  94. package/claude/commands/BMad/agents/frontend.md +150 -150
  95. package/claude/hooks/file-restriction-hook.py +51 -0
  96. package/claude/hooks/track-agent.py +67 -0
  97. package/claude/settings.local.json +37 -1
  98. package/github/b-mad-expert.md +742 -742
  99. package/github/chatmodes/analyst.chatmode.md +89 -89
  100. package/github/chatmodes/architect.chatmode.md +97 -97
  101. package/github/chatmodes/backend.chatmode.md +194 -194
  102. package/github/chatmodes/bmad-master.chatmode.md +115 -115
  103. package/github/chatmodes/bmad-orchestrator.chatmode.md +152 -152
  104. package/github/chatmodes/dev.chatmode.md +86 -86
  105. package/github/chatmodes/frontend.chatmode.md +157 -157
  106. package/github/chatmodes/pm.chatmode.md +89 -89
  107. package/github/chatmodes/po.chatmode.md +84 -84
  108. package/github/chatmodes/qa.chatmode.md +96 -96
  109. package/github/chatmodes/sm.chatmode.md +70 -70
  110. package/github/chatmodes/ux-expert.chatmode.md +74 -74
  111. package/index.js +9 -9
  112. package/package.json +37 -37
  113. package/vscode/mcp.json +11 -11
  114. package/vscode/settings.json +12 -12
@@ -1,327 +1,327 @@
1
- <!-- Powered by BMAD™ Core -->
2
-
3
- # BMad Document Template Specification
4
-
5
- ## Overview
6
-
7
- BMad document templates are defined in YAML format to drive interactive document generation and agent interaction. Templates separate structure definition from content generation, making them both human and LLM-agent-friendly.
8
-
9
- ## Template Structure
10
-
11
- ```yaml
12
- template:
13
- id: template-identifier
14
- name: Human Readable Template Name
15
- version: 1.0
16
- output:
17
- format: markdown
18
- filename: default-path/to/{{filename}}.md
19
- title: '{{variable}} Document Title'
20
-
21
- workflow:
22
- mode: interactive
23
- elicitation: advanced-elicitation
24
-
25
- sections:
26
- - id: section-id
27
- title: Section Title
28
- instruction: |
29
- Detailed instructions for the LLM on how to handle this section
30
- # ... additional section properties
31
- ```
32
-
33
- ## Core Fields
34
-
35
- ### Template Metadata
36
-
37
- - **id**: Unique identifier for the template
38
- - **name**: Human-readable name displayed in UI
39
- - **version**: Template version for tracking changes
40
- - **output.format**: Default "markdown" for document templates
41
- - **output.filename**: Default output file path (can include variables)
42
- - **output.title**: Document title (becomes H1 in markdown)
43
-
44
- ### Workflow Configuration
45
-
46
- - **workflow.mode**: Default interaction mode ("interactive" or "yolo")
47
- - **workflow.elicitation**: Elicitation task to use ("advanced-elicitation")
48
-
49
- ## Section Properties
50
-
51
- ### Required Fields
52
-
53
- - **id**: Unique section identifier
54
- - **title**: Section heading text
55
- - **instruction**: Detailed guidance for LLM on handling this section
56
-
57
- ### Optional Fields
58
-
59
- #### Content Control
60
-
61
- - **type**: Content type hint for structured sections
62
- - **template**: Fixed template text for section content
63
- - **item_template**: Template for repeatable items within section
64
- - **prefix**: Prefix for numbered items (e.g., "FR", "NFR")
65
-
66
- #### Behavior Flags
67
-
68
- - **elicit**: Boolean - Apply elicitation after section rendered
69
- - **repeatable**: Boolean - Section can be repeated multiple times
70
- - **condition**: String - Condition for including section (e.g., "has ui requirements")
71
-
72
- #### Agent Permissions
73
-
74
- - **owner**: String - Agent role that initially creates/populates this section
75
- - **editors**: Array - List of agent roles allowed to modify this section
76
- - **readonly**: Boolean - Section cannot be modified after initial creation
77
-
78
- #### Content Guidance
79
-
80
- - **examples**: Array of example content (not included in output)
81
- - **choices**: Object with choice options for common decisions
82
- - **placeholder**: Default placeholder text
83
-
84
- #### Structure
85
-
86
- - **sections**: Array of nested child sections
87
-
88
- ## Supported Types
89
-
90
- ### Content Types
91
-
92
- - **bullet-list**: Unordered list items
93
- - **numbered-list**: Ordered list with optional prefix
94
- - **paragraphs**: Free-form paragraph text
95
- - **table**: Structured table data
96
- - **code-block**: Code or configuration blocks
97
- - **template-text**: Fixed template with variable substitution
98
- - **mermaid**: Mermaid diagram with specified type and details
99
-
100
- ### Special Types
101
-
102
- - **repeatable-container**: Container for multiple instances
103
- - **conditional-block**: Content shown based on conditions
104
- - **choice-selector**: Present choices to user
105
-
106
- ## Advanced Features
107
-
108
- ### Variable Substitution
109
-
110
- Use `{{variable_name}}` in titles, templates, and content:
111
-
112
- ```yaml
113
- title: 'Epic {{epic_number}} {{epic_title}}'
114
- template: 'As a {{user_type}}, I want {{action}}, so that {{benefit}}.'
115
- ```
116
-
117
- ### Conditional Sections
118
-
119
- ```yaml
120
- - id: ui-section
121
- title: User Interface Design
122
- condition: Project has UX/UI Requirements
123
- instruction: Only include if project has UI components
124
- ```
125
-
126
- ### Choice Integration
127
-
128
- ```yaml
129
- choices:
130
- architecture: [Monolith, Microservices, Serverless]
131
- testing: [Unit Only, Unit + Integration, Full Pyramid]
132
- ```
133
-
134
- ### Mermaid Diagrams
135
-
136
- ```yaml
137
- - id: system-architecture
138
- title: System Architecture Diagram
139
- type: mermaid
140
- instruction: Create a system architecture diagram showing key components and data flow
141
- mermaid_type: flowchart
142
- details: |
143
- Show the following components:
144
- - User interface layer
145
- - API gateway
146
- - Core services
147
- - Database layer
148
- - External integrations
149
- ```
150
-
151
- **Supported mermaid_type values:**
152
-
153
- **Core Diagram Types:**
154
-
155
- - `flowchart` - Flow charts and process diagrams
156
- - `sequenceDiagram` - Sequence diagrams for interactions
157
- - `classDiagram` - Class relationship diagrams (UML)
158
- - `stateDiagram` - State transition diagrams
159
- - `erDiagram` - Entity relationship diagrams
160
- - `gantt` - Gantt charts for timelines
161
- - `pie` - Pie charts for data visualization
162
-
163
- **Advanced Diagram Types:**
164
-
165
- - `journey` - User journey maps
166
- - `mindmap` - Mindmaps for brainstorming
167
- - `timeline` - Timeline diagrams for chronological events
168
- - `quadrantChart` - Quadrant charts for data categorization
169
- - `xyChart` - XY charts (bar charts, line charts)
170
- - `sankey` - Sankey diagrams for flow visualization
171
-
172
- **Specialized Types:**
173
-
174
- - `c4Context` - C4 context diagrams (experimental)
175
- - `requirement` - Requirement diagrams
176
- - `packet` - Network packet diagrams
177
- - `block` - Block diagrams
178
- - `kanban` - Kanban boards
179
-
180
- ### Agent Permissions Example
181
-
182
- ```yaml
183
- - id: story-details
184
- title: Story
185
- owner: scrum-master
186
- editors: [scrum-master]
187
- readonly: false
188
- sections:
189
- - id: dev-notes
190
- title: Dev Notes
191
- owner: dev-agent
192
- editors: [dev-agent]
193
- readonly: false
194
- instruction: Implementation notes and technical details
195
- - id: qa-results
196
- title: QA Results
197
- owner: qa-agent
198
- editors: [qa-agent]
199
- readonly: true
200
- instruction: Quality assurance test results
201
- ```
202
-
203
- ### Repeatable Sections
204
-
205
- ```yaml
206
- - id: epic-details
207
- title: Epic {{epic_number}} {{epic_title}}
208
- repeatable: true
209
- sections:
210
- - id: story
211
- title: Story {{epic_number}}.{{story_number}} {{story_title}}
212
- repeatable: true
213
- sections:
214
- - id: criteria
215
- title: Acceptance Criteria
216
- type: numbered-list
217
- item_template: '{{criterion_number}}: {{criteria}}'
218
- repeatable: true
219
- ```
220
-
221
- ### Examples with Code Blocks
222
-
223
- ````yaml
224
- examples:
225
- - 'FR6: The system must authenticate users within 2 seconds'
226
- - |
227
- ```mermaid
228
- sequenceDiagram
229
- participant User
230
- participant API
231
- participant DB
232
- User->>API: POST /login
233
- API->>DB: Validate credentials
234
- DB-->>API: User data
235
- API-->>User: JWT token
236
- ```
237
- - |
238
- **Architecture Decision Record**
239
-
240
- **Decision**: Use PostgreSQL for primary database
241
- **Rationale**: ACID compliance and JSON support needed
242
- **Consequences**: Requires database management expertise
243
- ````
244
-
245
- ## Section Hierarchy
246
-
247
- Templates define the complete document structure starting with the first H2 - each level in is the next H#:
248
-
249
- ```yaml
250
- sections:
251
- - id: overview
252
- title: Project Overview
253
- sections:
254
- - id: goals
255
- title: Goals
256
- - id: scope
257
- title: Scope
258
- sections:
259
- - id: in-scope
260
- title: In Scope
261
- - id: out-scope
262
- title: Out of Scope
263
- ```
264
-
265
- ## Processing Flow
266
-
267
- 1. **Parse Template**: Load and validate YAML structure
268
- 2. **Initialize Workflow**: Set interaction mode and elicitation
269
- 3. **Process Sections**: Handle each section in order:
270
- - Check conditions
271
- - Apply instructions
272
- - Generate content
273
- - Handle choices and variables
274
- - Apply elicitation if specified
275
- - Process nested sections
276
- 4. **Generate Output**: Create clean markdown document
277
-
278
- ## Best Practices
279
-
280
- ### Template Design
281
-
282
- - Keep instructions clear and specific
283
- - Use examples for complex content
284
- - Structure sections logically
285
- - Include all necessary guidance for LLM
286
-
287
- ### Content Instructions
288
-
289
- - Be explicit about expected format
290
- - Include reasoning for decisions
291
- - Specify interaction patterns
292
- - Reference other documents when needed
293
-
294
- ### Variable Naming
295
-
296
- - Use descriptive variable names
297
- - Follow consistent naming conventions
298
- - Document expected variable values
299
-
300
- ### Examples Usage
301
-
302
- - Provide concrete examples for complex sections
303
- - Include both simple and complex cases
304
- - Use realistic project scenarios
305
- - Include code blocks and diagrams when helpful
306
-
307
- ## Validation
308
-
309
- Templates should be validated for:
310
-
311
- - Valid YAML syntax
312
- - Required fields present
313
- - Consistent section IDs
314
- - Proper nesting structure
315
- - Valid variable references
316
-
317
- ## Migration from Legacy
318
-
319
- When converting from markdown+frontmatter templates:
320
-
321
- 1. Extract embedded `[[LLM:]]` instructions to `instruction` fields
322
- 2. Convert `<<REPEAT>>` blocks to `repeatable: true` sections
323
- 3. Extract `^^CONDITIONS^^` to `condition` fields
324
- 4. Move `@{examples}` to `examples` arrays
325
- 5. Convert `{{placeholders}}` to proper variable syntax
326
-
327
- This specification ensures templates are both human-readable and machine-processable while maintaining the flexibility needed for complex document generation.
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # BMad Document Template Specification
4
+
5
+ ## Overview
6
+
7
+ BMad document templates are defined in YAML format to drive interactive document generation and agent interaction. Templates separate structure definition from content generation, making them both human and LLM-agent-friendly.
8
+
9
+ ## Template Structure
10
+
11
+ ```yaml
12
+ template:
13
+ id: template-identifier
14
+ name: Human Readable Template Name
15
+ version: 1.0
16
+ output:
17
+ format: markdown
18
+ filename: default-path/to/{{filename}}.md
19
+ title: '{{variable}} Document Title'
20
+
21
+ workflow:
22
+ mode: interactive
23
+ elicitation: advanced-elicitation
24
+
25
+ sections:
26
+ - id: section-id
27
+ title: Section Title
28
+ instruction: |
29
+ Detailed instructions for the LLM on how to handle this section
30
+ # ... additional section properties
31
+ ```
32
+
33
+ ## Core Fields
34
+
35
+ ### Template Metadata
36
+
37
+ - **id**: Unique identifier for the template
38
+ - **name**: Human-readable name displayed in UI
39
+ - **version**: Template version for tracking changes
40
+ - **output.format**: Default "markdown" for document templates
41
+ - **output.filename**: Default output file path (can include variables)
42
+ - **output.title**: Document title (becomes H1 in markdown)
43
+
44
+ ### Workflow Configuration
45
+
46
+ - **workflow.mode**: Default interaction mode ("interactive" or "yolo")
47
+ - **workflow.elicitation**: Elicitation task to use ("advanced-elicitation")
48
+
49
+ ## Section Properties
50
+
51
+ ### Required Fields
52
+
53
+ - **id**: Unique section identifier
54
+ - **title**: Section heading text
55
+ - **instruction**: Detailed guidance for LLM on handling this section
56
+
57
+ ### Optional Fields
58
+
59
+ #### Content Control
60
+
61
+ - **type**: Content type hint for structured sections
62
+ - **template**: Fixed template text for section content
63
+ - **item_template**: Template for repeatable items within section
64
+ - **prefix**: Prefix for numbered items (e.g., "FR", "NFR")
65
+
66
+ #### Behavior Flags
67
+
68
+ - **elicit**: Boolean - Apply elicitation after section rendered
69
+ - **repeatable**: Boolean - Section can be repeated multiple times
70
+ - **condition**: String - Condition for including section (e.g., "has ui requirements")
71
+
72
+ #### Agent Permissions
73
+
74
+ - **owner**: String - Agent role that initially creates/populates this section
75
+ - **editors**: Array - List of agent roles allowed to modify this section
76
+ - **readonly**: Boolean - Section cannot be modified after initial creation
77
+
78
+ #### Content Guidance
79
+
80
+ - **examples**: Array of example content (not included in output)
81
+ - **choices**: Object with choice options for common decisions
82
+ - **placeholder**: Default placeholder text
83
+
84
+ #### Structure
85
+
86
+ - **sections**: Array of nested child sections
87
+
88
+ ## Supported Types
89
+
90
+ ### Content Types
91
+
92
+ - **bullet-list**: Unordered list items
93
+ - **numbered-list**: Ordered list with optional prefix
94
+ - **paragraphs**: Free-form paragraph text
95
+ - **table**: Structured table data
96
+ - **code-block**: Code or configuration blocks
97
+ - **template-text**: Fixed template with variable substitution
98
+ - **mermaid**: Mermaid diagram with specified type and details
99
+
100
+ ### Special Types
101
+
102
+ - **repeatable-container**: Container for multiple instances
103
+ - **conditional-block**: Content shown based on conditions
104
+ - **choice-selector**: Present choices to user
105
+
106
+ ## Advanced Features
107
+
108
+ ### Variable Substitution
109
+
110
+ Use `{{variable_name}}` in titles, templates, and content:
111
+
112
+ ```yaml
113
+ title: 'Epic {{epic_number}} {{epic_title}}'
114
+ template: 'As a {{user_type}}, I want {{action}}, so that {{benefit}}.'
115
+ ```
116
+
117
+ ### Conditional Sections
118
+
119
+ ```yaml
120
+ - id: ui-section
121
+ title: User Interface Design
122
+ condition: Project has UX/UI Requirements
123
+ instruction: Only include if project has UI components
124
+ ```
125
+
126
+ ### Choice Integration
127
+
128
+ ```yaml
129
+ choices:
130
+ architecture: [Monolith, Microservices, Serverless]
131
+ testing: [Unit Only, Unit + Integration, Full Pyramid]
132
+ ```
133
+
134
+ ### Mermaid Diagrams
135
+
136
+ ```yaml
137
+ - id: system-architecture
138
+ title: System Architecture Diagram
139
+ type: mermaid
140
+ instruction: Create a system architecture diagram showing key components and data flow
141
+ mermaid_type: flowchart
142
+ details: |
143
+ Show the following components:
144
+ - User interface layer
145
+ - API gateway
146
+ - Core services
147
+ - Database layer
148
+ - External integrations
149
+ ```
150
+
151
+ **Supported mermaid_type values:**
152
+
153
+ **Core Diagram Types:**
154
+
155
+ - `flowchart` - Flow charts and process diagrams
156
+ - `sequenceDiagram` - Sequence diagrams for interactions
157
+ - `classDiagram` - Class relationship diagrams (UML)
158
+ - `stateDiagram` - State transition diagrams
159
+ - `erDiagram` - Entity relationship diagrams
160
+ - `gantt` - Gantt charts for timelines
161
+ - `pie` - Pie charts for data visualization
162
+
163
+ **Advanced Diagram Types:**
164
+
165
+ - `journey` - User journey maps
166
+ - `mindmap` - Mindmaps for brainstorming
167
+ - `timeline` - Timeline diagrams for chronological events
168
+ - `quadrantChart` - Quadrant charts for data categorization
169
+ - `xyChart` - XY charts (bar charts, line charts)
170
+ - `sankey` - Sankey diagrams for flow visualization
171
+
172
+ **Specialized Types:**
173
+
174
+ - `c4Context` - C4 context diagrams (experimental)
175
+ - `requirement` - Requirement diagrams
176
+ - `packet` - Network packet diagrams
177
+ - `block` - Block diagrams
178
+ - `kanban` - Kanban boards
179
+
180
+ ### Agent Permissions Example
181
+
182
+ ```yaml
183
+ - id: story-details
184
+ title: Story
185
+ owner: scrum-master
186
+ editors: [scrum-master]
187
+ readonly: false
188
+ sections:
189
+ - id: dev-notes
190
+ title: Dev Notes
191
+ owner: dev-agent
192
+ editors: [dev-agent]
193
+ readonly: false
194
+ instruction: Implementation notes and technical details
195
+ - id: qa-results
196
+ title: QA Results
197
+ owner: qa-agent
198
+ editors: [qa-agent]
199
+ readonly: true
200
+ instruction: Quality assurance test results
201
+ ```
202
+
203
+ ### Repeatable Sections
204
+
205
+ ```yaml
206
+ - id: epic-details
207
+ title: Epic {{epic_number}} {{epic_title}}
208
+ repeatable: true
209
+ sections:
210
+ - id: story
211
+ title: Story {{epic_number}}.{{story_number}} {{story_title}}
212
+ repeatable: true
213
+ sections:
214
+ - id: criteria
215
+ title: Acceptance Criteria
216
+ type: numbered-list
217
+ item_template: '{{criterion_number}}: {{criteria}}'
218
+ repeatable: true
219
+ ```
220
+
221
+ ### Examples with Code Blocks
222
+
223
+ ````yaml
224
+ examples:
225
+ - 'FR6: The system must authenticate users within 2 seconds'
226
+ - |
227
+ ```mermaid
228
+ sequenceDiagram
229
+ participant User
230
+ participant API
231
+ participant DB
232
+ User->>API: POST /login
233
+ API->>DB: Validate credentials
234
+ DB-->>API: User data
235
+ API-->>User: JWT token
236
+ ```
237
+ - |
238
+ **Architecture Decision Record**
239
+
240
+ **Decision**: Use PostgreSQL for primary database
241
+ **Rationale**: ACID compliance and JSON support needed
242
+ **Consequences**: Requires database management expertise
243
+ ````
244
+
245
+ ## Section Hierarchy
246
+
247
+ Templates define the complete document structure starting with the first H2 - each level in is the next H#:
248
+
249
+ ```yaml
250
+ sections:
251
+ - id: overview
252
+ title: Project Overview
253
+ sections:
254
+ - id: goals
255
+ title: Goals
256
+ - id: scope
257
+ title: Scope
258
+ sections:
259
+ - id: in-scope
260
+ title: In Scope
261
+ - id: out-scope
262
+ title: Out of Scope
263
+ ```
264
+
265
+ ## Processing Flow
266
+
267
+ 1. **Parse Template**: Load and validate YAML structure
268
+ 2. **Initialize Workflow**: Set interaction mode and elicitation
269
+ 3. **Process Sections**: Handle each section in order:
270
+ - Check conditions
271
+ - Apply instructions
272
+ - Generate content
273
+ - Handle choices and variables
274
+ - Apply elicitation if specified
275
+ - Process nested sections
276
+ 4. **Generate Output**: Create clean markdown document
277
+
278
+ ## Best Practices
279
+
280
+ ### Template Design
281
+
282
+ - Keep instructions clear and specific
283
+ - Use examples for complex content
284
+ - Structure sections logically
285
+ - Include all necessary guidance for LLM
286
+
287
+ ### Content Instructions
288
+
289
+ - Be explicit about expected format
290
+ - Include reasoning for decisions
291
+ - Specify interaction patterns
292
+ - Reference other documents when needed
293
+
294
+ ### Variable Naming
295
+
296
+ - Use descriptive variable names
297
+ - Follow consistent naming conventions
298
+ - Document expected variable values
299
+
300
+ ### Examples Usage
301
+
302
+ - Provide concrete examples for complex sections
303
+ - Include both simple and complex cases
304
+ - Use realistic project scenarios
305
+ - Include code blocks and diagrams when helpful
306
+
307
+ ## Validation
308
+
309
+ Templates should be validated for:
310
+
311
+ - Valid YAML syntax
312
+ - Required fields present
313
+ - Consistent section IDs
314
+ - Proper nesting structure
315
+ - Valid variable references
316
+
317
+ ## Migration from Legacy
318
+
319
+ When converting from markdown+frontmatter templates:
320
+
321
+ 1. Extract embedded `[[LLM:]]` instructions to `instruction` fields
322
+ 2. Convert `<<REPEAT>>` blocks to `repeatable: true` sections
323
+ 3. Extract `^^CONDITIONS^^` to `condition` fields
324
+ 4. Move `@{examples}` to `examples` arrays
325
+ 5. Convert `{{placeholders}}` to proper variable syntax
326
+
327
+ This specification ensures templates are both human-readable and machine-processable while maintaining the flexibility needed for complex document generation.