@codemcp/workflows 6.4.0 → 6.5.1
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/package.json +2 -2
- package/packages/cli/dist/{chunk-D2Q6Y3QQ.js → chunk-4AZGS2GG.js} +321 -388
- package/packages/cli/dist/{cli-DXJJF56V.js → cli-ZCCFBQTP.js} +3 -3
- package/packages/cli/dist/{dist-W7PPKVFG.js → dist-I6VSREAJ.js} +11 -5
- package/packages/cli/dist/{dist-W7VMGB3G.js → dist-MW7THWM3.js} +875 -1136
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/cli/resources/workflows/bugfix.yaml +14 -0
- package/packages/cli/resources/workflows/epcc.yaml +12 -0
- package/packages/cli/resources/workflows/greenfield.yaml +16 -0
- package/packages/cli/resources/workflows/minor.yaml +8 -0
- package/packages/cli/resources/workflows/tdd.yaml +10 -0
- package/packages/cli/resources/workflows/waterfall.yaml +16 -0
- package/packages/core/dist/beads-integration.d.ts +3 -5
- package/packages/core/dist/beads-integration.js +29 -35
- package/packages/core/dist/beads-integration.js.map +1 -1
- package/packages/core/dist/beads-state-manager.d.ts +3 -1
- package/packages/core/dist/beads-state-manager.js +17 -15
- package/packages/core/dist/beads-state-manager.js.map +1 -1
- package/packages/core/dist/file-detection-manager.js +15 -22
- package/packages/core/dist/file-detection-manager.js.map +1 -1
- package/packages/core/dist/index.d.ts +1 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/instruction-generator.d.ts +3 -7
- package/packages/core/dist/instruction-generator.js +17 -25
- package/packages/core/dist/instruction-generator.js.map +1 -1
- package/packages/core/dist/interfaces/instruction-generator.interface.d.ts +13 -4
- package/packages/core/dist/interfaces/plan-manager.interface.d.ts +9 -0
- package/packages/core/dist/logger.d.ts +49 -20
- package/packages/core/dist/logger.js +65 -141
- package/packages/core/dist/logger.js.map +1 -1
- package/packages/core/dist/plan-manager.d.ts +6 -4
- package/packages/core/dist/plan-manager.js +19 -15
- package/packages/core/dist/plan-manager.js.map +1 -1
- package/packages/core/dist/project-docs-manager.d.ts +3 -1
- package/packages/core/dist/project-docs-manager.js +11 -9
- package/packages/core/dist/project-docs-manager.js.map +1 -1
- package/packages/core/dist/state-machine-loader.d.ts +16 -0
- package/packages/core/dist/state-machine-loader.js +29 -0
- package/packages/core/dist/state-machine-loader.js.map +1 -1
- package/packages/core/dist/state-machine-types.d.ts +8 -0
- package/packages/core/dist/string-utils.d.ts +8 -0
- package/packages/core/dist/string-utils.js +14 -0
- package/packages/core/dist/string-utils.js.map +1 -0
- package/packages/core/dist/task-backend.d.ts +6 -3
- package/packages/core/dist/task-backend.js +10 -8
- package/packages/core/dist/task-backend.js.map +1 -1
- package/packages/core/dist/transition-engine.d.ts +3 -6
- package/packages/core/dist/transition-engine.js +31 -76
- package/packages/core/dist/transition-engine.js.map +1 -1
- package/packages/core/dist/workflow-manager.d.ts +2 -0
- package/packages/core/dist/workflow-manager.js +14 -2
- package/packages/core/dist/workflow-manager.js.map +1 -1
- package/packages/core/package.json +1 -1
- package/packages/core/resources/workflows/bugfix.yaml +14 -0
- package/packages/core/resources/workflows/epcc.yaml +12 -0
- package/packages/core/resources/workflows/greenfield.yaml +16 -0
- package/packages/core/resources/workflows/minor.yaml +8 -0
- package/packages/core/resources/workflows/tdd.yaml +10 -0
- package/packages/core/resources/workflows/waterfall.yaml +16 -0
- package/packages/docs/.vitepress/dist/workflows/bugfix.yaml +14 -0
- package/packages/docs/.vitepress/dist/workflows/epcc.yaml +12 -0
- package/packages/docs/.vitepress/dist/workflows/greenfield.yaml +16 -0
- package/packages/docs/.vitepress/dist/workflows/minor.yaml +8 -0
- package/packages/docs/.vitepress/dist/workflows/tdd.yaml +10 -0
- package/packages/docs/.vitepress/dist/workflows/waterfall.yaml +16 -0
- package/packages/docs/package.json +1 -1
- package/packages/mcp-server/dist/index.d.ts +1027 -0
- package/packages/mcp-server/dist/index.js +879 -1140
- package/packages/mcp-server/package.json +1 -1
- package/packages/mcp-server/resources/workflows/bugfix.yaml +14 -0
- package/packages/mcp-server/resources/workflows/epcc.yaml +12 -0
- package/packages/mcp-server/resources/workflows/greenfield.yaml +16 -0
- package/packages/mcp-server/resources/workflows/minor.yaml +8 -0
- package/packages/mcp-server/resources/workflows/tdd.yaml +10 -0
- package/packages/mcp-server/resources/workflows/waterfall.yaml +16 -0
- package/packages/opencode-plugin/dist/index.d.ts +220 -0
- package/packages/opencode-plugin/dist/index.js +28616 -0
- package/packages/opencode-plugin/package.json +55 -0
- package/packages/opencode-plugin/resources/agents/architect.yaml +61 -0
- package/packages/opencode-plugin/resources/agents/business-analyst.yaml +60 -0
- package/packages/opencode-plugin/resources/agents/developer.yaml +61 -0
- package/packages/opencode-plugin/resources/templates/architecture/arc42/arc42-template-EN.md +1077 -0
- package/packages/opencode-plugin/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio-2023.png +0 -0
- package/packages/opencode-plugin/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio.png +0 -0
- package/packages/opencode-plugin/resources/templates/architecture/arc42/images/05_building_blocks-EN.png +0 -0
- package/packages/opencode-plugin/resources/templates/architecture/arc42/images/08-concepts-EN.drawio.png +0 -0
- package/packages/opencode-plugin/resources/templates/architecture/arc42/images/arc42-logo.png +0 -0
- package/packages/opencode-plugin/resources/templates/architecture/c4.md +224 -0
- package/packages/opencode-plugin/resources/templates/architecture/freestyle.md +53 -0
- package/packages/opencode-plugin/resources/templates/architecture/game.md +250 -0
- package/packages/opencode-plugin/resources/templates/architecture/none.md +17 -0
- package/packages/opencode-plugin/resources/templates/design/comprehensive.md +207 -0
- package/packages/opencode-plugin/resources/templates/design/freestyle.md +37 -0
- package/packages/opencode-plugin/resources/templates/design/game.md +66 -0
- package/packages/opencode-plugin/resources/templates/design/none.md +17 -0
- package/packages/opencode-plugin/resources/templates/requirements/ears.md +90 -0
- package/packages/opencode-plugin/resources/templates/requirements/freestyle.md +42 -0
- package/packages/opencode-plugin/resources/templates/requirements/game.md +162 -0
- package/packages/opencode-plugin/resources/templates/requirements/none.md +17 -0
- package/packages/opencode-plugin/resources/templates/skills/POWER.md +23 -0
- package/packages/opencode-plugin/resources/templates/skills/SKILL.md +19 -0
- package/packages/opencode-plugin/resources/workflows/adr.yaml +157 -0
- package/packages/opencode-plugin/resources/workflows/big-bang-conversion.yaml +592 -0
- package/packages/opencode-plugin/resources/workflows/boundary-testing.yaml +376 -0
- package/packages/opencode-plugin/resources/workflows/bugfix.yaml +178 -0
- package/packages/opencode-plugin/resources/workflows/business-analysis.yaml +597 -0
- package/packages/opencode-plugin/resources/workflows/c4-analysis.yaml +471 -0
- package/packages/opencode-plugin/resources/workflows/epcc.yaml +195 -0
- package/packages/opencode-plugin/resources/workflows/game-beginner.yaml +434 -0
- package/packages/opencode-plugin/resources/workflows/greenfield.yaml +217 -0
- package/packages/opencode-plugin/resources/workflows/minor.yaml +146 -0
- package/packages/opencode-plugin/resources/workflows/posts.yaml +193 -0
- package/packages/opencode-plugin/resources/workflows/sdd-bugfix-crowd.yaml +608 -0
- package/packages/opencode-plugin/resources/workflows/sdd-bugfix.yaml +381 -0
- package/packages/opencode-plugin/resources/workflows/sdd-feature-crowd.yaml +713 -0
- package/packages/opencode-plugin/resources/workflows/sdd-feature.yaml +471 -0
- package/packages/opencode-plugin/resources/workflows/sdd-greenfield-crowd.yaml +336 -0
- package/packages/opencode-plugin/resources/workflows/sdd-greenfield.yaml +463 -0
- package/packages/opencode-plugin/resources/workflows/skilled-bugfix.yaml +174 -0
- package/packages/opencode-plugin/resources/workflows/skilled-epcc.yaml +171 -0
- package/packages/opencode-plugin/resources/workflows/skilled-greenfield.yaml +207 -0
- package/packages/opencode-plugin/resources/workflows/slides.yaml +237 -0
- package/packages/opencode-plugin/resources/workflows/tdd.yaml +170 -0
- package/packages/opencode-plugin/resources/workflows/waterfall.yaml +225 -0
- package/packages/opencode-tui-plugin/package.json +46 -0
- package/packages/visualizer/package.json +1 -1
- package/resources/workflows/bugfix.yaml +14 -0
- package/resources/workflows/epcc.yaml +12 -0
- package/resources/workflows/greenfield.yaml +16 -0
- package/resources/workflows/minor.yaml +8 -0
- package/resources/workflows/tdd.yaml +10 -0
- package/resources/workflows/waterfall.yaml +16 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
# yaml-language-server: $schema=../state-machine-schema.json
|
|
2
|
+
---
|
|
3
|
+
name: 'sdd-greenfield'
|
|
4
|
+
description: 'Specification-driven development for new projects from scratch: Constitution → Specify → Plan → Tasks → Implement → Document'
|
|
5
|
+
initial_state: 'constitution'
|
|
6
|
+
|
|
7
|
+
# Enhanced metadata for better discoverability
|
|
8
|
+
metadata:
|
|
9
|
+
domain: 'sdd'
|
|
10
|
+
complexity: 'high'
|
|
11
|
+
bestFor:
|
|
12
|
+
- 'New projects from scratch'
|
|
13
|
+
- 'Greenfield development'
|
|
14
|
+
- 'Complex system design'
|
|
15
|
+
- 'Comprehensive planning needed'
|
|
16
|
+
useCases:
|
|
17
|
+
- 'Starting a new application'
|
|
18
|
+
- 'Building a new service'
|
|
19
|
+
- 'Creating a new library'
|
|
20
|
+
examples:
|
|
21
|
+
- 'Build a new web application'
|
|
22
|
+
- 'Create a microservice architecture'
|
|
23
|
+
- 'Develop a new API platform'
|
|
24
|
+
|
|
25
|
+
# States with default instructions and transitions
|
|
26
|
+
states:
|
|
27
|
+
constitution:
|
|
28
|
+
description: 'Establish constitutional framework and project governance'
|
|
29
|
+
default_instructions: |
|
|
30
|
+
**STEP 1: Create Project Constitution**
|
|
31
|
+
Use the template provided to create a `constitution.md` file in the project root.
|
|
32
|
+
|
|
33
|
+
**STEP 2: Customize Principles**
|
|
34
|
+
Adapt the constitutional principles to your specific project needs.
|
|
35
|
+
|
|
36
|
+
**STEP 3: Set Quality Gates**
|
|
37
|
+
Define what constitutes acceptable quality and when to reject solutions.
|
|
38
|
+
|
|
39
|
+
**STEP 4: Document Governance**
|
|
40
|
+
Establish how these principles will be enforced throughout development.
|
|
41
|
+
|
|
42
|
+
This constitutional framework will be referenced in all subsequent phases and serves as the source of truth for development decisions.
|
|
43
|
+
additional_instructions: |
|
|
44
|
+
Use this template to create your `constitution.md` file:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# [PROJECT_NAME] Constitution
|
|
48
|
+
|
|
49
|
+
## Core Principles
|
|
50
|
+
|
|
51
|
+
### I. Specifications First
|
|
52
|
+
Specifications are the source of truth, not code. All development decisions must align with written specifications. Code serves specifications, not the other way around.
|
|
53
|
+
|
|
54
|
+
### II. User Value Drives Decisions
|
|
55
|
+
Every feature and technical decision must demonstrate clear user value. If it doesn't serve users, it doesn't belong in the project.
|
|
56
|
+
|
|
57
|
+
### III. Simplicity Over Complexity
|
|
58
|
+
Choose simple solutions over complex ones. Complexity must be justified by significant user benefit. YAGNI (You Aren't Gonna Need It) principles apply.
|
|
59
|
+
|
|
60
|
+
### IV. Testability is Mandatory
|
|
61
|
+
All functionality must be testable. If it can't be tested, it can't be verified. Test-driven development is preferred.
|
|
62
|
+
|
|
63
|
+
### V. Security by Design
|
|
64
|
+
Security considerations are built in from the start, not added later. All data handling and user interactions must consider security implications.
|
|
65
|
+
|
|
66
|
+
### VI. Performance Considerations are Explicit
|
|
67
|
+
Performance requirements are documented and measurable. Performance trade-offs are made consciously and documented.
|
|
68
|
+
|
|
69
|
+
### VII. Maintainability Over Cleverness
|
|
70
|
+
Code should be readable and maintainable by future developers. Clever solutions that are hard to understand are discouraged.
|
|
71
|
+
|
|
72
|
+
### VIII. Documentation Serves Users
|
|
73
|
+
Documentation focuses on helping users accomplish their goals, not explaining implementation details to developers.
|
|
74
|
+
|
|
75
|
+
### IX. Dependencies are Minimized and Justified
|
|
76
|
+
External dependencies are kept to a minimum. Each dependency must provide significant value and be actively maintained.
|
|
77
|
+
|
|
78
|
+
## Quality Gates
|
|
79
|
+
|
|
80
|
+
- All specifications must be reviewed and approved before implementation
|
|
81
|
+
- All code must pass constitutional compliance review
|
|
82
|
+
- All features must demonstrate measurable user value
|
|
83
|
+
- All changes must maintain or improve system simplicity
|
|
84
|
+
|
|
85
|
+
## Governance
|
|
86
|
+
|
|
87
|
+
This constitution supersedes all other development practices. Amendments require documentation, approval, and migration plan. All development decisions must verify compliance with these principles.
|
|
88
|
+
|
|
89
|
+
**Version**: 1.0 | **Ratified**: [DATE] | **Last Amended**: [DATE]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Customize this template for your specific project, replacing [PROJECT_NAME] and [DATE] with appropriate values.
|
|
93
|
+
|
|
94
|
+
transitions:
|
|
95
|
+
- trigger: 'constitution_established'
|
|
96
|
+
to: 'specify'
|
|
97
|
+
transition_reason: 'Constitutional framework established, ready to create specifications'
|
|
98
|
+
|
|
99
|
+
specify:
|
|
100
|
+
description: 'Create comprehensive feature specification'
|
|
101
|
+
default_instructions: |
|
|
102
|
+
Create the feature specification that will be the source of truth for all development.
|
|
103
|
+
|
|
104
|
+
**STEP 1: Parse User Requirements**
|
|
105
|
+
Extract key concepts from the user's description:
|
|
106
|
+
- Identify: actors, actions, data, constraints
|
|
107
|
+
- Focus on WHAT users need and WHY, not HOW to implement
|
|
108
|
+
|
|
109
|
+
**STEP 2: Interactive Requirements Gathering**
|
|
110
|
+
Ask clarifying questions about:
|
|
111
|
+
- Target Users: Who will use this system? What are their technical skills?
|
|
112
|
+
- Scale & Performance: How many users? What performance expectations?
|
|
113
|
+
- Integration: Does this need to integrate with existing systems?
|
|
114
|
+
- Constraints: Any specific requirements, compliance needs, or limitations?
|
|
115
|
+
- Success Metrics: How will you measure if this is successful?
|
|
116
|
+
|
|
117
|
+
**STEP 3: Handle Ambiguities Systematically**
|
|
118
|
+
- Make informed guesses based on context and industry standards
|
|
119
|
+
- Use `[NEEDS CLARIFICATION: specific question]` ONLY for critical decisions that:
|
|
120
|
+
- Significantly impact feature scope or user experience
|
|
121
|
+
- Have multiple reasonable interpretations with different implications
|
|
122
|
+
- Lack any reasonable default
|
|
123
|
+
- **LIMIT: Maximum 3 clarification markers total**
|
|
124
|
+
- Prioritize: scope > security/privacy > user experience > technical details
|
|
125
|
+
|
|
126
|
+
**STEP 4: Validate Quality**
|
|
127
|
+
- No implementation details (languages, frameworks, APIs)
|
|
128
|
+
- Written for non-technical stakeholders
|
|
129
|
+
- All requirements are testable
|
|
130
|
+
- Success criteria are measurable and technology-agnostic
|
|
131
|
+
|
|
132
|
+
**STEP 5: Handle Clarifications** (if any exist)
|
|
133
|
+
- Present options to user in structured format
|
|
134
|
+
- Wait for user responses
|
|
135
|
+
- Update specification with chosen answers
|
|
136
|
+
|
|
137
|
+
Create `$VIBE_DIR/specs/$BRANCH_NAME/spec.md` using the template provided.
|
|
138
|
+
additional_instructions: |
|
|
139
|
+
Use this template to create your `spec.md` file:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
# Feature Specification: [FEATURE NAME]
|
|
143
|
+
|
|
144
|
+
**Created**: [DATE]
|
|
145
|
+
**Status**: Draft
|
|
146
|
+
|
|
147
|
+
## User Scenarios & Testing *(mandatory)*
|
|
148
|
+
|
|
149
|
+
### User Story 1 - [Brief Title] (Priority: P1)
|
|
150
|
+
|
|
151
|
+
[Describe this user journey in plain language]
|
|
152
|
+
|
|
153
|
+
**Why this priority**: [Explain the value and why it has this priority level]
|
|
154
|
+
|
|
155
|
+
**Independent Test**: [Describe how this can be tested independently]
|
|
156
|
+
|
|
157
|
+
**Acceptance Scenarios**:
|
|
158
|
+
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
159
|
+
2. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### User Story 2 - [Brief Title] (Priority: P2)
|
|
164
|
+
|
|
165
|
+
[Describe this user journey in plain language]
|
|
166
|
+
|
|
167
|
+
**Why this priority**: [Explain the value and why it has this priority level]
|
|
168
|
+
|
|
169
|
+
**Independent Test**: [Describe how this can be tested independently]
|
|
170
|
+
|
|
171
|
+
**Acceptance Scenarios**:
|
|
172
|
+
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
[Add more user stories as needed, each with an assigned priority]
|
|
177
|
+
|
|
178
|
+
### Edge Cases
|
|
179
|
+
|
|
180
|
+
- What happens when [boundary condition]?
|
|
181
|
+
- How does system handle [error scenario]?
|
|
182
|
+
|
|
183
|
+
## Requirements *(mandatory)*
|
|
184
|
+
|
|
185
|
+
### Functional Requirements
|
|
186
|
+
|
|
187
|
+
- **FR-001**: System MUST [specific capability]
|
|
188
|
+
- **FR-002**: System MUST [specific capability]
|
|
189
|
+
- **FR-003**: Users MUST be able to [key interaction]
|
|
190
|
+
- **FR-004**: System MUST [data requirement]
|
|
191
|
+
- **FR-005**: System MUST [behavior]
|
|
192
|
+
|
|
193
|
+
### Key Entities *(include if feature involves data)*
|
|
194
|
+
|
|
195
|
+
- **[Entity 1]**: [What it represents, key attributes without implementation]
|
|
196
|
+
- **[Entity 2]**: [What it represents, relationships to other entities]
|
|
197
|
+
|
|
198
|
+
## Success Criteria *(mandatory)*
|
|
199
|
+
|
|
200
|
+
### Measurable Outcomes
|
|
201
|
+
|
|
202
|
+
- **SC-001**: [Measurable metric, e.g., "Users can complete task in under 2 minutes"]
|
|
203
|
+
- **SC-002**: [Measurable metric, e.g., "System handles 1000 concurrent users"]
|
|
204
|
+
- **SC-003**: [User satisfaction metric, e.g., "90% task completion rate"]
|
|
205
|
+
- **SC-004**: [Business metric, e.g., "Reduce support tickets by 50%"]
|
|
206
|
+
|
|
207
|
+
## Assumptions
|
|
208
|
+
|
|
209
|
+
- [Document any assumptions made during specification]
|
|
210
|
+
- [Include reasonable defaults chosen]
|
|
211
|
+
|
|
212
|
+
## Dependencies
|
|
213
|
+
|
|
214
|
+
- [External systems or prerequisites]
|
|
215
|
+
- [Integration requirements]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Fill in all sections with specific details for your feature. Each user story should be independently testable and prioritized.
|
|
219
|
+
|
|
220
|
+
transitions:
|
|
221
|
+
- trigger: 'specification_complete'
|
|
222
|
+
to: 'plan'
|
|
223
|
+
transition_reason: 'Feature specification completed and validated, ready for implementation planning'
|
|
224
|
+
|
|
225
|
+
- trigger: 'needs_clarification'
|
|
226
|
+
to: 'specify'
|
|
227
|
+
instructions: >
|
|
228
|
+
Specification has unresolved clarifications. Present structured questions to the user,
|
|
229
|
+
wait for their responses, then update the specification accordingly.
|
|
230
|
+
transition_reason: 'Specification needs user clarification before proceeding'
|
|
231
|
+
|
|
232
|
+
plan:
|
|
233
|
+
description: 'Generate implementation plan with constitutional compliance'
|
|
234
|
+
default_instructions: |
|
|
235
|
+
Create the implementation plan with constitutional compliance gates.
|
|
236
|
+
|
|
237
|
+
**STEP 1: Load Context**
|
|
238
|
+
- Read the feature specification: `$VIBE_DIR/specs/$BRANCH_NAME/spec.md`
|
|
239
|
+
- Read the project constitution: `constitution.md`
|
|
240
|
+
- Understand the technical requirements
|
|
241
|
+
|
|
242
|
+
**STEP 2: Interactive Technology Selection**
|
|
243
|
+
Ask the user about their preferences:
|
|
244
|
+
- Technology Stack: What programming languages/frameworks do you prefer?
|
|
245
|
+
- Architecture Style: Monolith, microservices, serverless, or hybrid?
|
|
246
|
+
- Database: What type of data storage do you need? (SQL, NoSQL, files)
|
|
247
|
+
- Deployment: Where will this run? (cloud, on-premise, local)
|
|
248
|
+
- Experience Level: What's your experience with different technologies?
|
|
249
|
+
- Constraints: Any technology restrictions or requirements?
|
|
250
|
+
|
|
251
|
+
**STEP 3: Analyze Technical Context**
|
|
252
|
+
- Identify technology stack and architecture decisions based on user input
|
|
253
|
+
- Map dependencies and integration points
|
|
254
|
+
- Mark unknowns as "NEEDS CLARIFICATION" for research phase
|
|
255
|
+
|
|
256
|
+
**STEP 4: Check Constitutional Compliance**
|
|
257
|
+
- Evaluate planned approach against each constitutional article
|
|
258
|
+
- Identify any violations and justify or resolve them
|
|
259
|
+
- Document compliance decisions
|
|
260
|
+
|
|
261
|
+
**STEP 5: Generate Research & Decisions**
|
|
262
|
+
- For each unknown in Technical Context → research task
|
|
263
|
+
- For each technology choice → best practices task
|
|
264
|
+
- Generate `$VIBE_DIR/specs/$BRANCH_NAME/technology-research.md` with all decisions and rationale
|
|
265
|
+
|
|
266
|
+
**STEP 6: Document High-Level Design**
|
|
267
|
+
- Document high-level architecture and component overview
|
|
268
|
+
- Identify major system boundaries and integration points
|
|
269
|
+
- Document technology stack decisions and rationale
|
|
270
|
+
|
|
271
|
+
**STEP 7: Re-evaluate Constitutional Compliance**
|
|
272
|
+
- Verify design decisions align with constitutional principles
|
|
273
|
+
- Document any adjustments needed
|
|
274
|
+
|
|
275
|
+
Create `$VIBE_DIR/specs/$BRANCH_NAME/plan.md` with the complete implementation strategy, including technology decisions, architecture, and development phases.
|
|
276
|
+
|
|
277
|
+
transitions:
|
|
278
|
+
- trigger: 'plan_complete'
|
|
279
|
+
to: 'tasks'
|
|
280
|
+
transition_reason: 'Implementation plan completed with constitutional compliance, ready to generate tasks'
|
|
281
|
+
|
|
282
|
+
- trigger: 'constitutional_violation'
|
|
283
|
+
to: 'plan'
|
|
284
|
+
instructions: >
|
|
285
|
+
Implementation plan violates constitutional principles. Review and revise the approach
|
|
286
|
+
to align with the established governance framework.
|
|
287
|
+
transition_reason: 'Plan violates constitutional principles, needs revision'
|
|
288
|
+
|
|
289
|
+
tasks:
|
|
290
|
+
description: 'Generate actionable, dependency-ordered tasks organized by user stories'
|
|
291
|
+
default_instructions: |
|
|
292
|
+
Generate actionable tasks organized by user stories for independent implementation.
|
|
293
|
+
|
|
294
|
+
**STEP 1: Load Design Documents**
|
|
295
|
+
- Required: `$VIBE_DIR/specs/$BRANCH_NAME/plan.md` (tech stack, libraries, structure), `$VIBE_DIR/specs/$BRANCH_NAME/spec.md` (user stories with priorities)
|
|
296
|
+
- Optional: `$VIBE_DIR/specs/$BRANCH_NAME/technology-research.md`
|
|
297
|
+
|
|
298
|
+
**STEP 2: Extract User Stories**
|
|
299
|
+
Load user stories with priorities (P1, P2, P3...)
|
|
300
|
+
|
|
301
|
+
**STEP 3: Generate Tasks Organized by User Story**
|
|
302
|
+
- Setup Phase: Shared infrastructure needed by all stories
|
|
303
|
+
- Foundational Phase: Prerequisites that must complete before ANY user story
|
|
304
|
+
- User Story Phases (P1, P2, P3...): One phase per story in priority order
|
|
305
|
+
- Group all tasks needed to complete JUST that story
|
|
306
|
+
- Include models, services, endpoints, UI components specific to that story
|
|
307
|
+
- Mark parallelizable tasks with `[P]`
|
|
308
|
+
- Each story should be independently testable
|
|
309
|
+
|
|
310
|
+
**STEP 4: Apply Task Rules**
|
|
311
|
+
- Different files = mark `[P]` for parallel execution
|
|
312
|
+
- Same file = sequential (no `[P]`)
|
|
313
|
+
- Number tasks sequentially (T001, T002...)
|
|
314
|
+
- Each task specific enough for LLM to complete without additional context
|
|
315
|
+
|
|
316
|
+
**STEP 5: Generate Dependency Graph**
|
|
317
|
+
Show user story completion order and parallel opportunities
|
|
318
|
+
|
|
319
|
+
**STEP 6: Document Implementation Strategy**
|
|
320
|
+
MVP-first approach (typically just User Story 1)
|
|
321
|
+
|
|
322
|
+
additional_instructions: |
|
|
323
|
+
Create these documents in the following order:
|
|
324
|
+
|
|
325
|
+
**1. Data Model** (`$VIBE_DIR/specs/$BRANCH_NAME/data-model.md`)
|
|
326
|
+
- Extract entities from the specification
|
|
327
|
+
- Define relationships between entities
|
|
328
|
+
- Include validation rules from requirements
|
|
329
|
+
- Document state transitions if applicable
|
|
330
|
+
|
|
331
|
+
**2. API Contracts** (`$VIBE_DIR/specs/$BRANCH_NAME/contracts/`)
|
|
332
|
+
- Generate API contracts from functional requirements
|
|
333
|
+
- Create OpenAPI/GraphQL schemas based on chosen technology stack
|
|
334
|
+
- Ensure contracts align with data models
|
|
335
|
+
- Include error handling and validation
|
|
336
|
+
|
|
337
|
+
**3. Development Setup** (`$VIBE_DIR/specs/$BRANCH_NAME/quickstart.md`)
|
|
338
|
+
- Project setup instructions based on chosen technology stack
|
|
339
|
+
- Development environment configuration
|
|
340
|
+
- Build and run instructions
|
|
341
|
+
- Testing setup and commands
|
|
342
|
+
|
|
343
|
+
**4. Task Breakdown** (`$VIBE_DIR/specs/$BRANCH_NAME/tasks.md`)
|
|
344
|
+
Use this structure for the tasks file:
|
|
345
|
+
|
|
346
|
+
```markdown
|
|
347
|
+
# Implementation Tasks: [FEATURE NAME]
|
|
348
|
+
|
|
349
|
+
## Setup Phase
|
|
350
|
+
- T001: [Setup task] [P]
|
|
351
|
+
- T002: [Infrastructure task]
|
|
352
|
+
|
|
353
|
+
## Foundational Phase
|
|
354
|
+
- T003: [Database setup]
|
|
355
|
+
- T004: [Core dependencies] [P]
|
|
356
|
+
|
|
357
|
+
## User Story 1 (P1): [Story Title]
|
|
358
|
+
**Goal**: [What this story achieves]
|
|
359
|
+
**Independent Test**: [How to test this story alone]
|
|
360
|
+
|
|
361
|
+
- T005: [Model for this story] [P]
|
|
362
|
+
- T006: [Service for this story] [P]
|
|
363
|
+
- T007: [API endpoint for this story]
|
|
364
|
+
- T008: [UI component for this story] [P]
|
|
365
|
+
|
|
366
|
+
## User Story 2 (P2): [Story Title]
|
|
367
|
+
[Continue pattern...]
|
|
368
|
+
|
|
369
|
+
## Dependencies
|
|
370
|
+
- Story 1 → Story 2 (if applicable)
|
|
371
|
+
- Parallel opportunities: T001, T002, T004 can run simultaneously
|
|
372
|
+
|
|
373
|
+
## MVP Scope
|
|
374
|
+
Recommended MVP: User Story 1 only
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
transitions:
|
|
378
|
+
- trigger: 'tasks_generated'
|
|
379
|
+
to: 'implement'
|
|
380
|
+
transition_reason: 'Tasks generated and organized by user stories, ready for implementation'
|
|
381
|
+
|
|
382
|
+
implement:
|
|
383
|
+
description: 'Execute implementation following the task breakdown'
|
|
384
|
+
default_instructions: |
|
|
385
|
+
Execute the implementation by following the tasks in the order defined in `$VIBE_DIR/specs/$BRANCH_NAME/tasks.md`.
|
|
386
|
+
|
|
387
|
+
**STEP 1: Follow Task Order**
|
|
388
|
+
Execute tasks in the sequence defined, respecting dependencies
|
|
389
|
+
|
|
390
|
+
**STEP 2: Ensure Constitutional Compliance**
|
|
391
|
+
Verify all implementation decisions align with the project constitution
|
|
392
|
+
|
|
393
|
+
**STEP 3: Complete User Stories Incrementally**
|
|
394
|
+
Focus on one user story at a time for incremental delivery
|
|
395
|
+
|
|
396
|
+
**STEP 4: Meet Quality Gates**
|
|
397
|
+
Each user story must meet the success criteria from the specification
|
|
398
|
+
|
|
399
|
+
**STEP 5: Validate Each User Story**
|
|
400
|
+
Test each user story independently before moving to the next
|
|
401
|
+
|
|
402
|
+
**STEP 6: Keep Documentation Current**
|
|
403
|
+
Update documentation as you implement
|
|
404
|
+
|
|
405
|
+
**Progress Tracking:**
|
|
406
|
+
- Mark completed tasks with `[x]` in `$VIBE_DIR/specs/$BRANCH_NAME/tasks.md`
|
|
407
|
+
- Document any deviations or decisions in the plan file
|
|
408
|
+
- Update the specification if requirements evolve during implementation
|
|
409
|
+
|
|
410
|
+
Focus on delivering working, tested increments that provide user value.
|
|
411
|
+
|
|
412
|
+
transitions:
|
|
413
|
+
- trigger: 'implementation_complete'
|
|
414
|
+
to: 'document'
|
|
415
|
+
transition_reason: 'All tasks completed and user stories implemented, ready for final documentation'
|
|
416
|
+
|
|
417
|
+
- trigger: 'implementation_blocked'
|
|
418
|
+
to: 'plan'
|
|
419
|
+
instructions: >
|
|
420
|
+
Implementation is blocked by technical issues or missing requirements.
|
|
421
|
+
Return to planning to resolve the blockers and update the approach.
|
|
422
|
+
transition_reason: 'Implementation blocked, need to revise plan'
|
|
423
|
+
|
|
424
|
+
document:
|
|
425
|
+
description: 'Create comprehensive project documentation'
|
|
426
|
+
default_instructions: |
|
|
427
|
+
Create the final project documentation that serves users and maintainers.
|
|
428
|
+
|
|
429
|
+
**STEP 1: Create User Documentation**
|
|
430
|
+
- Installation and setup guide
|
|
431
|
+
- User manual with examples
|
|
432
|
+
- API documentation (if applicable)
|
|
433
|
+
- Troubleshooting guide
|
|
434
|
+
|
|
435
|
+
**STEP 2: Create Developer Documentation**
|
|
436
|
+
- Architecture overview
|
|
437
|
+
- Development setup
|
|
438
|
+
- Contributing guidelines
|
|
439
|
+
- Code organization
|
|
440
|
+
|
|
441
|
+
**STEP 3: Create Project Documentation**
|
|
442
|
+
- README with project overview
|
|
443
|
+
- Changelog
|
|
444
|
+
- License information
|
|
445
|
+
- Deployment guide
|
|
446
|
+
|
|
447
|
+
**Quality Standards** (from constitution):
|
|
448
|
+
- Documentation serves users, not developers
|
|
449
|
+
- Focus on practical examples and common use cases
|
|
450
|
+
- Keep technical details minimal and focused
|
|
451
|
+
- Ensure documentation is maintainable
|
|
452
|
+
|
|
453
|
+
Create comprehensive documentation that enables users to successfully adopt and use the project.
|
|
454
|
+
|
|
455
|
+
transitions: []
|
|
456
|
+
|
|
457
|
+
# Global transitions available from any state
|
|
458
|
+
global_transitions:
|
|
459
|
+
- trigger: 'abandon_project'
|
|
460
|
+
to: 'constitution'
|
|
461
|
+
instructions: >
|
|
462
|
+
If you want to restart the project, you'll begin again with establishing the constitutional framework.
|
|
463
|
+
transition_reason: 'Project abandoned, restart from beginning'
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'skilled-bugfix'
|
|
3
|
+
description: 'A focused workflow for bug fixing: Reproduce, Analyze, Fix, Verify - optimized for debugging and fixing existing issues'
|
|
4
|
+
initial_state: 'reproduce'
|
|
5
|
+
|
|
6
|
+
# Enhanced metadata for better discoverability
|
|
7
|
+
metadata:
|
|
8
|
+
domain: 'skilled'
|
|
9
|
+
complexity: 'medium'
|
|
10
|
+
bestFor:
|
|
11
|
+
- 'Bug fixes'
|
|
12
|
+
- 'Issue resolution'
|
|
13
|
+
- 'Error debugging'
|
|
14
|
+
- 'Performance problems'
|
|
15
|
+
useCases:
|
|
16
|
+
- 'Fixing a crash or error'
|
|
17
|
+
- 'Resolving incorrect behavior'
|
|
18
|
+
- 'Performance optimization'
|
|
19
|
+
examples:
|
|
20
|
+
- 'Fix login authentication error'
|
|
21
|
+
- 'Resolve memory leak issue'
|
|
22
|
+
- 'Fix incorrect calculation in reports'
|
|
23
|
+
|
|
24
|
+
# States with default instructions and transitions
|
|
25
|
+
states:
|
|
26
|
+
reproduce:
|
|
27
|
+
description: 'Reproduce and understand the bug'
|
|
28
|
+
default_instructions: |
|
|
29
|
+
Gather specific information to reliably reproduce the reported bug:
|
|
30
|
+
- What are the exact OS, browser/runtime versions, and hardware specs?
|
|
31
|
+
- What is the precise sequence of actions that trigger the bug?
|
|
32
|
+
- What error messages, logs, or stack traces are available?
|
|
33
|
+
- Does this happen every time or intermittently?
|
|
34
|
+
- How many users are affected and what is the business impact?
|
|
35
|
+
|
|
36
|
+
Create test cases that demonstrate the problem. Document your findings and create tasks as needed.
|
|
37
|
+
transitions:
|
|
38
|
+
- trigger: 'bug_reproduced'
|
|
39
|
+
to: 'analyze'
|
|
40
|
+
transition_reason: 'Bug reproduced successfully, ready to analyze root cause'
|
|
41
|
+
|
|
42
|
+
analyze:
|
|
43
|
+
description: 'Analyze the bug and identify root cause'
|
|
44
|
+
default_instructions: |
|
|
45
|
+
Examine the code paths involved in the bug, identify the root cause, and understand why the issue occurs. Use debugging tools, add logging, and trace through the problematic code.
|
|
46
|
+
|
|
47
|
+
- **Apply your architecture skill.** If unavailable, ask user about architectural conventions.
|
|
48
|
+
- **Apply your application-design skill.** If unavailable, ask user about application design practices.
|
|
49
|
+
|
|
50
|
+
Document your analysis and create tasks as needed.
|
|
51
|
+
transitions:
|
|
52
|
+
- trigger: 'need_more_reproduction'
|
|
53
|
+
to: 'reproduce'
|
|
54
|
+
additional_instructions: 'Analysis revealed need for additional reproduction scenarios. Focus on reproducing the specific conditions identified during analysis.'
|
|
55
|
+
transition_reason: 'Analysis revealed need for additional reproduction work'
|
|
56
|
+
|
|
57
|
+
- trigger: 'root_cause_identified'
|
|
58
|
+
to: 'fix'
|
|
59
|
+
additional_instructions: 'Document the root cause approach and update task progress.'
|
|
60
|
+
transition_reason: 'Root cause identified, ready to implement fix'
|
|
61
|
+
review_perspectives:
|
|
62
|
+
- perspective: 'architect'
|
|
63
|
+
prompt: "Review root cause analysis and ensure the proposed fix doesn't introduce architectural issues or technical debt. Consider the broader system impact of the proposed solution."
|
|
64
|
+
- perspective: 'security_expert'
|
|
65
|
+
prompt: "Evaluate if the bug has security implications and ensure the fix doesn't introduce new vulnerabilities. Review the security aspects of the proposed solution."
|
|
66
|
+
|
|
67
|
+
- trigger: 'abandon_bug'
|
|
68
|
+
to: 'reproduce'
|
|
69
|
+
additional_instructions: 'Bug analysis abandoned. Clean up any analysis work and prepare for new bug reports.'
|
|
70
|
+
transition_reason: 'Bug analysis abandoned'
|
|
71
|
+
|
|
72
|
+
fix:
|
|
73
|
+
description: 'Implement the bug fix'
|
|
74
|
+
default_instructions: |
|
|
75
|
+
Implement the solution based on your analysis:
|
|
76
|
+
|
|
77
|
+
- **Apply your coding skill.** If unavailable, ask user about coding practices.
|
|
78
|
+
- **Apply your testing skill.** If unavailable, ask user about testing practices.
|
|
79
|
+
- Check whether there is a design document in the project and follow it
|
|
80
|
+
|
|
81
|
+
Before implementing, assess the approach:
|
|
82
|
+
- How critical is this system? What is the blast radius if the fix causes issues?
|
|
83
|
+
- Should this be a minimal fix or a more comprehensive solution?
|
|
84
|
+
|
|
85
|
+
Make targeted changes that address the root cause without introducing new issues. Be careful to maintain existing functionality while fixing the bug.
|
|
86
|
+
transitions:
|
|
87
|
+
- trigger: 'need_more_analysis'
|
|
88
|
+
to: 'analyze'
|
|
89
|
+
additional_instructions: 'Fix implementation revealed additional complexity or issues. Focus on analyzing the newly discovered aspects of the problem.'
|
|
90
|
+
transition_reason: 'Fix work revealed need for additional analysis'
|
|
91
|
+
|
|
92
|
+
- trigger: 'fix_implemented'
|
|
93
|
+
to: 'verify'
|
|
94
|
+
additional_instructions: 'Document the fix approach and update task progress.'
|
|
95
|
+
transition_reason: 'Fix implemented, ready for verification'
|
|
96
|
+
review_perspectives:
|
|
97
|
+
- perspective: 'senior_software_developer'
|
|
98
|
+
prompt: 'Review fix implementation, code quality, and ensure the solution properly addresses the root cause. Check for potential side effects and code maintainability.'
|
|
99
|
+
- perspective: 'performance_engineer'
|
|
100
|
+
prompt: "Verify that the fix doesn't introduce performance regressions or new bottlenecks. Assess the performance impact of the implemented solution."
|
|
101
|
+
|
|
102
|
+
- trigger: 'abandon_bug'
|
|
103
|
+
to: 'reproduce'
|
|
104
|
+
additional_instructions: 'Bug fix abandoned. Clean up any fix work and prepare for new bug reports.'
|
|
105
|
+
transition_reason: 'Bug fix abandoned'
|
|
106
|
+
|
|
107
|
+
verify:
|
|
108
|
+
description: 'Verify the fix and ensure no regressions'
|
|
109
|
+
default_instructions: |
|
|
110
|
+
Test the fix thoroughly to ensure the original bug is resolved and no new issues were introduced.
|
|
111
|
+
|
|
112
|
+
- **Apply your testing skill.** If unavailable, ask user about testing practices.
|
|
113
|
+
- Verify the solution is robust and handles edge cases
|
|
114
|
+
transitions:
|
|
115
|
+
- trigger: 'fix_needs_adjustment'
|
|
116
|
+
to: 'fix'
|
|
117
|
+
additional_instructions: 'Verification revealed issues with the current fix. Focus on addressing the specific problems identified during verification.'
|
|
118
|
+
transition_reason: 'Verification found issues requiring fix adjustments'
|
|
119
|
+
|
|
120
|
+
- trigger: 'need_more_analysis'
|
|
121
|
+
to: 'analyze'
|
|
122
|
+
additional_instructions: "Verification revealed the fix doesn't fully address the root cause. Focus on deeper analysis of the remaining issues."
|
|
123
|
+
transition_reason: 'Verification revealed need for additional analysis'
|
|
124
|
+
|
|
125
|
+
- trigger: 'bug_fixed'
|
|
126
|
+
to: 'finalize'
|
|
127
|
+
transition_reason: 'Bug fix complete and verified, ready for next issue'
|
|
128
|
+
|
|
129
|
+
- trigger: 'abandon_bug'
|
|
130
|
+
to: 'reproduce'
|
|
131
|
+
additional_instructions: 'Bug verification abandoned. Clean up any verification work and prepare for new bug reports.'
|
|
132
|
+
transition_reason: 'Bug verification abandoned'
|
|
133
|
+
|
|
134
|
+
finalize:
|
|
135
|
+
description: 'Code cleanup and documentation finalization'
|
|
136
|
+
default_instructions: |
|
|
137
|
+
Ensure code quality and documentation accuracy through systematic cleanup and review.
|
|
138
|
+
|
|
139
|
+
**STEP 1: Code Cleanup**
|
|
140
|
+
Systematically clean up development artifacts:
|
|
141
|
+
- Remove all temporary debug output statements used during bug investigation (console logging, print statements, debug output functions)
|
|
142
|
+
- Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
|
|
143
|
+
- Remove completed TODOs and convert remaining ones to proper issue tracking if needed
|
|
144
|
+
- Remove temporary debugging code, test code blocks, and commented-out code
|
|
145
|
+
- Ensure proper error handling replaces temporary debug logging
|
|
146
|
+
|
|
147
|
+
**STEP 2: Documentation Review**
|
|
148
|
+
Review and update documentation to reflect the bug fix:
|
|
149
|
+
- Check whether there is a design document in the project and update it if the fix changed any design details
|
|
150
|
+
- Compare documentation against the actual bug fix implementation
|
|
151
|
+
- Update only the documentation sections that have functional changes
|
|
152
|
+
- Remove references to investigation iterations, progress notes, and temporary decisions
|
|
153
|
+
- Ensure documentation describes the final fixed state, not the debugging process
|
|
154
|
+
- Ask the user to review document updates
|
|
155
|
+
|
|
156
|
+
**STEP 3: Final Validation**
|
|
157
|
+
- **Apply your testing skill.** If unavailable, ask user about testing practices.
|
|
158
|
+
- Verify documentation accuracy with a final review
|
|
159
|
+
- Ensure bug fix is ready for production
|
|
160
|
+
- Update task progress and mark completed work as you finalize the bug fix
|
|
161
|
+
transitions:
|
|
162
|
+
- trigger: 'need_fix_changes'
|
|
163
|
+
to: 'fix'
|
|
164
|
+
additional_instructions: 'Finalization revealed issues with the bug fix. Focus on addressing the specific problems identified during final review.'
|
|
165
|
+
transition_reason: 'Finalization revealed issues requiring fix changes'
|
|
166
|
+
|
|
167
|
+
- trigger: 'finalization_complete'
|
|
168
|
+
to: 'reproduce'
|
|
169
|
+
transition_reason: 'Bug fix complete and finalized, ready for next issue'
|
|
170
|
+
|
|
171
|
+
- trigger: 'abandon_bug'
|
|
172
|
+
to: 'reproduce'
|
|
173
|
+
additional_instructions: 'Bug finalization abandoned. Clean up any finalization work and prepare for new bug reports.'
|
|
174
|
+
transition_reason: 'Bug finalization abandoned'
|