vibe-fabric 0.3.2 → 0.3.3

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.
@@ -0,0 +1,125 @@
1
+ # Task: Analyze PRD Requirements
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write the task output | Yes |
9
+ | {MODULES} | JSON array of module names to analyze | Yes |
10
+
11
+ ---
12
+
13
+ ## Context
14
+
15
+ You are analyzing PRD requirements to prepare for scope creation.
16
+
17
+ Project: {PROJECT_PATH}
18
+ Modules to analyze: {MODULES}
19
+
20
+ ---
21
+
22
+ ## Your Task
23
+
24
+ Analyze requirements and categorize them by priority and scope-readiness.
25
+
26
+ ### Step 1: Read All Requirements
27
+
28
+ Read all requirement files in:
29
+ - `docs/prd/modules/*/` - All module requirements
30
+
31
+ For each requirement, extract:
32
+ - ID (e.g., REQ-AUTH-001)
33
+ - Title
34
+ - Module
35
+ - Status (draft, in-progress, implemented)
36
+ - Priority (P1, P2, P3)
37
+ - Dependencies on other requirements
38
+
39
+ ### Step 2: Check Existing Scopes
40
+
41
+ Read all scope files:
42
+ - `docs/scopes/drafts/`
43
+ - `docs/scopes/ready/`
44
+ - `docs/scopes/sent/`
45
+ - `docs/scopes/completed/`
46
+
47
+ Identify which requirements are already covered by scopes.
48
+
49
+ ### Step 3: Categorize Requirements
50
+
51
+ Group requirements into:
52
+ 1. **Ready to scope** - Not covered, no blocking dependencies
53
+ 2. **Blocked** - Has unscoped dependencies
54
+ 3. **Already scoped** - Covered by existing scope
55
+ 4. **Implemented** - Status is implemented
56
+
57
+ ### Step 4: Prioritize
58
+
59
+ Order ready-to-scope requirements by:
60
+ 1. Priority (P1 first)
61
+ 2. Dependency order (dependencies before dependents)
62
+ 3. Module grouping (related requirements together)
63
+
64
+ ---
65
+
66
+ ## Output Format
67
+
68
+ Write to: {OUTPUT_FILE}
69
+
70
+ ```json
71
+ {
72
+ "analysis": {
73
+ "total_requirements": 23,
74
+ "ready_to_scope": 12,
75
+ "blocked": 3,
76
+ "already_scoped": 5,
77
+ "implemented": 3
78
+ },
79
+ "by_module": {
80
+ "auth": {
81
+ "total": 5,
82
+ "ready": 3,
83
+ "blocked": 0,
84
+ "scoped": 1,
85
+ "implemented": 1
86
+ }
87
+ },
88
+ "ready_to_scope": [
89
+ {
90
+ "id": "REQ-AUTH-001",
91
+ "title": "User Login",
92
+ "module": "auth",
93
+ "priority": "P1",
94
+ "dependencies": [],
95
+ "suggested_scope": "User authentication and session management"
96
+ }
97
+ ],
98
+ "blocked": [
99
+ {
100
+ "id": "REQ-PAY-003",
101
+ "title": "Refund Processing",
102
+ "blocked_by": ["REQ-PAY-001", "REQ-PAY-002"],
103
+ "reason": "Depends on payment processing which is not scoped"
104
+ }
105
+ ],
106
+ "scope_suggestions": [
107
+ {
108
+ "name": "User Authentication",
109
+ "requirements": ["REQ-AUTH-001", "REQ-AUTH-002", "REQ-AUTH-003"],
110
+ "rationale": "These requirements form a cohesive authentication feature"
111
+ }
112
+ ]
113
+ }
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Rules
119
+
120
+ - Do NOT modify any files
121
+ - Do NOT interact with the user
122
+ - ONLY output to {OUTPUT_FILE}
123
+ - Group related requirements that should be in the same scope
124
+ - Consider dependencies when suggesting scopes
125
+ - A good scope has 3-8 requirements
@@ -0,0 +1,188 @@
1
+ # Task: Check Scope Dependencies
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write the task output | Yes |
9
+ | {PREVIOUS_OUTPUTS} | JSON array of previous task output paths | Yes |
10
+
11
+ ---
12
+
13
+ ## Context
14
+
15
+ You are checking dependency ordering for scopes.
16
+
17
+ Project: {PROJECT_PATH}
18
+
19
+ ---
20
+
21
+ ## Your Task
22
+
23
+ Analyze scope dependencies and determine correct ordering. This is NON-INTERACTIVE.
24
+
25
+ ### Step 1: Load All Scopes
26
+
27
+ Read all scopes from:
28
+ - `docs/scopes/drafts/`
29
+ - `docs/scopes/ready/`
30
+ - `docs/scopes/sent/`
31
+ - `docs/scopes/completed/`
32
+
33
+ Also check {PREVIOUS_OUTPUTS} for newly created scopes.
34
+
35
+ ### Step 2: Extract Dependencies
36
+
37
+ For each scope, find:
38
+ - Scope ID
39
+ - Status
40
+ - Dependencies (other scopes it depends on)
41
+ - Whether dependencies are blocking
42
+
43
+ ### Step 3: Build Dependency Graph
44
+
45
+ Create a dependency graph:
46
+ - Nodes: All scopes
47
+ - Edges: Dependency relationships
48
+ - Direction: From dependent to dependency
49
+
50
+ ### Step 4: Detect Issues
51
+
52
+ Check for:
53
+ - **Circular dependencies**: A depends on B, B depends on A
54
+ - **Missing dependencies**: References non-existent scope
55
+ - **Blocked scopes**: Dependencies not completed
56
+ - **Order violations**: Dependent scope sent before dependency
57
+
58
+ ### Step 5: Calculate Order
59
+
60
+ Determine the recommended implementation order:
61
+ 1. Scopes with no dependencies first
62
+ 2. Then scopes whose dependencies are completed
63
+ 3. Flag blocked scopes
64
+
65
+ ---
66
+
67
+ ## Output Format
68
+
69
+ Write to: {OUTPUT_FILE}
70
+
71
+ ```json
72
+ {
73
+ "analysis": {
74
+ "total_scopes": 8,
75
+ "with_dependencies": 5,
76
+ "blocked": 2,
77
+ "circular_dependencies": 0
78
+ },
79
+ "dependency_graph": {
80
+ "SCOPE-001": {
81
+ "status": "completed",
82
+ "depends_on": [],
83
+ "depended_by": ["SCOPE-002", "SCOPE-003"]
84
+ },
85
+ "SCOPE-002": {
86
+ "status": "sent",
87
+ "depends_on": ["SCOPE-001"],
88
+ "depended_by": ["SCOPE-004"]
89
+ },
90
+ "SCOPE-003": {
91
+ "status": "draft",
92
+ "depends_on": ["SCOPE-001"],
93
+ "depended_by": []
94
+ },
95
+ "SCOPE-004": {
96
+ "status": "draft",
97
+ "depends_on": ["SCOPE-002"],
98
+ "depended_by": []
99
+ }
100
+ },
101
+ "recommended_order": [
102
+ {
103
+ "order": 1,
104
+ "scope_id": "SCOPE-003",
105
+ "title": "Password Reset",
106
+ "status": "draft",
107
+ "reason": "Dependency SCOPE-001 is completed"
108
+ },
109
+ {
110
+ "order": 2,
111
+ "scope_id": "SCOPE-004",
112
+ "title": "User Profile",
113
+ "status": "draft",
114
+ "reason": "Blocked until SCOPE-002 completes"
115
+ }
116
+ ],
117
+ "issues": [
118
+ {
119
+ "type": "blocked",
120
+ "scope_id": "SCOPE-004",
121
+ "blocked_by": "SCOPE-002",
122
+ "message": "SCOPE-004 depends on SCOPE-002 which is still in 'sent' status"
123
+ }
124
+ ],
125
+ "warnings": [],
126
+ "ready_to_send": ["SCOPE-003"]
127
+ }
128
+ ```
129
+
130
+ For circular dependency:
131
+
132
+ ```json
133
+ {
134
+ "issues": [
135
+ {
136
+ "type": "circular",
137
+ "scopes": ["SCOPE-005", "SCOPE-006"],
138
+ "message": "Circular dependency: SCOPE-005 depends on SCOPE-006, which depends on SCOPE-005"
139
+ }
140
+ ]
141
+ }
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Rules
147
+
148
+ - Do NOT modify any files
149
+ - Do NOT interact with the user
150
+ - ONLY output to {OUTPUT_FILE}
151
+ - Consider only blocking dependencies for order
152
+ - Non-blocking dependencies are informational
153
+ - Completed scopes should not appear in recommended_order
154
+
155
+ ---
156
+
157
+ ## Dependency Status Logic
158
+
159
+ ```
160
+ If dependency.status == "completed":
161
+ dependent can proceed
162
+
163
+ If dependency.status == "sent" or "in-progress":
164
+ dependent is blocked (waiting)
165
+
166
+ If dependency.status == "draft" or "ready":
167
+ dependent is blocked (dependency not started)
168
+
169
+ If dependency does not exist:
170
+ error: missing dependency
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Order Calculation
176
+
177
+ Topological sort based on:
178
+ 1. Dependencies resolved
179
+ 2. Priority (P1 before P2 before P3)
180
+ 3. Complexity (S before M before L)
181
+
182
+ Example:
183
+ ```
184
+ SCOPE-001 (no deps, P1) -> Order 1
185
+ SCOPE-002 (depends on 001, P1) -> Order 2
186
+ SCOPE-003 (depends on 001, P2) -> Order 3
187
+ SCOPE-004 (depends on 002, P1) -> Order 4
188
+ ```
@@ -0,0 +1,207 @@
1
+ # Task: Create Scope (Interactive)
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write the task output | Yes |
9
+ | {FEATURE} | Feature name for the scope | Yes |
10
+ | {REQUIREMENTS} | JSON array of requirement IDs | Yes |
11
+ | {SUGGESTED_ID} | Suggested scope ID (e.g., SCOPE-003) | Yes |
12
+ | {PREVIOUS_OUTPUTS} | JSON array of previous task output paths | Yes |
13
+
14
+ ---
15
+
16
+ ## Context
17
+
18
+ You are creating a new scope through conversation with the user.
19
+
20
+ Project: {PROJECT_PATH}
21
+ Feature: {FEATURE}
22
+ Requirements: {REQUIREMENTS}
23
+ Suggested ID: {SUGGESTED_ID}
24
+
25
+ ---
26
+
27
+ ## Your Task
28
+
29
+ Create a scope through Q&A with the user. This is an INTERACTIVE task.
30
+
31
+ ### Step 1: Load Previous Work
32
+
33
+ Read the recommendation from {PREVIOUS_OUTPUTS} if available.
34
+
35
+ ### Step 2: Present Draft
36
+
37
+ Show the user the recommended scope structure:
38
+
39
+ ```
40
+ Creating scope for: {FEATURE}
41
+
42
+ Based on PRD analysis, here's the recommended scope:
43
+
44
+ ID: {SUGGESTED_ID}
45
+ Title: [Recommended title]
46
+ Target: [backend/frontend/both]
47
+ Complexity: [S/M/L]
48
+ Priority: [P1/P2/P3]
49
+
50
+ Summary:
51
+ [2-3 sentence summary]
52
+
53
+ User Story:
54
+ As a [role],
55
+ I want to [action],
56
+ so that [benefit].
57
+
58
+ Requirements (from PRD):
59
+ - REQ-XXX-001: [Title]
60
+ - REQ-XXX-002: [Title]
61
+
62
+ Acceptance Criteria:
63
+ - AC-1: Given [...], when [...], then [...]
64
+ - AC-2: Given [...], when [...], then [...]
65
+
66
+ Does this look right? What would you like to change?
67
+ ```
68
+
69
+ ### Step 3: Refine Through Conversation
70
+
71
+ Ask clarifying questions:
72
+
73
+ 1. **Target**: "Should this be implemented in backend, frontend, or both?"
74
+ 2. **Scope boundaries**: "Should we include [related requirement] in this scope?"
75
+ 3. **Acceptance criteria**: "Are there any edge cases or error scenarios to add?"
76
+ 4. **Dependencies**: "Does this depend on any other scopes being completed first?"
77
+ 5. **Out of scope**: "What should we explicitly exclude?"
78
+
79
+ ### Step 4: Capture User Decisions
80
+
81
+ Update the scope based on user feedback:
82
+ - Add/remove requirements
83
+ - Adjust acceptance criteria
84
+ - Update target or complexity
85
+ - Add constraints or notes
86
+
87
+ ### Step 5: Confirm Final Scope
88
+
89
+ Present the final scope for confirmation:
90
+
91
+ ```
92
+ Final scope to create:
93
+
94
+ SCOPE-003: User Authentication
95
+ ================================
96
+
97
+ [Full scope content in template format]
98
+
99
+ Ready to save this scope? (Yes/No/Edit more)
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Output Format
105
+
106
+ Write to: {OUTPUT_FILE}
107
+
108
+ ```json
109
+ {
110
+ "action": "create",
111
+ "scope": {
112
+ "id": "SCOPE-003",
113
+ "title": "User Authentication",
114
+ "status": "draft",
115
+ "target": "backend",
116
+ "complexity": "M",
117
+ "module": "auth",
118
+ "priority": "P1",
119
+ "summary": "Implement JWT-based authentication...",
120
+ "user_story": {
121
+ "role": "registered user",
122
+ "action": "log in with my email and password",
123
+ "benefit": "I can access my personal data securely"
124
+ },
125
+ "requirements": {
126
+ "functional": [
127
+ {"id": "REQ-1", "text": "POST /auth/login accepts email/password"},
128
+ {"id": "REQ-2", "text": "Returns JWT token on success"}
129
+ ],
130
+ "non_functional": [
131
+ {"id": "NFR-1", "text": "Response time under 200ms"}
132
+ ]
133
+ },
134
+ "acceptance_criteria": [
135
+ {
136
+ "id": "AC-1",
137
+ "given": "valid email and password",
138
+ "when": "user submits POST /auth/login",
139
+ "then": "return 200 with JWT token"
140
+ }
141
+ ],
142
+ "constraints": [
143
+ {"id": "C-1", "text": "Must use bcrypt for password hashing"}
144
+ ],
145
+ "dependencies": [
146
+ {"scope": "SCOPE-001", "reason": "Needs user schema", "blocking": true}
147
+ ],
148
+ "out_of_scope": [
149
+ "Password reset (SCOPE-004)",
150
+ "Social login (future)"
151
+ ],
152
+ "implementation_notes": {
153
+ "approach": "Use existing auth middleware pattern",
154
+ "key_files": ["src/auth/", "src/middleware/"]
155
+ },
156
+ "prd_requirements": ["REQ-AUTH-001", "REQ-AUTH-002", "REQ-AUTH-003"]
157
+ },
158
+ "file_path": "docs/scopes/drafts/SCOPE-003-user-authentication.md"
159
+ }
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Rules
165
+
166
+ - This is INTERACTIVE - engage with the user
167
+ - Start with recommendations from previous analysis
168
+ - Let user override any suggestion
169
+ - Ensure Given/When/Then format for acceptance criteria
170
+ - Validate scope has at least 1 requirement and 1 AC
171
+ - Generate appropriate file name from title (kebab-case)
172
+ - Include PRD requirement IDs in prd_requirements field
173
+
174
+ ---
175
+
176
+ ## Conversation Style
177
+
178
+ Be helpful and collaborative:
179
+
180
+ ```
181
+ > Based on the PRD, I recommend including REQ-AUTH-001 (Login) and
182
+ > REQ-AUTH-002 (JWT tokens) in this scope. They're tightly coupled
183
+ > and should be delivered together.
184
+ >
185
+ > Should we also include REQ-AUTH-003 (Password validation)?
186
+ > It's related but could be a separate scope if you prefer.
187
+ ```
188
+
189
+ Ask follow-up questions:
190
+
191
+ ```
192
+ > For the acceptance criteria, I've drafted 5 scenarios covering
193
+ > successful login, invalid credentials, and token refresh.
194
+ >
195
+ > Are there any edge cases you'd like to add? For example:
196
+ > - Account lockout after failed attempts?
197
+ > - Rate limiting?
198
+ ```
199
+
200
+ Confirm decisions:
201
+
202
+ ```
203
+ > Got it! I'll mark password reset as out of scope and add a note
204
+ > that it will be handled in a future scope.
205
+ >
206
+ > Anything else to adjust before we finalize?
207
+ ```
@@ -0,0 +1,146 @@
1
+ # Task: Recommend Scope Boundaries
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write the task output | Yes |
9
+ | {TARGET_FEATURE} | Feature name to create scope for | Yes |
10
+ | {REQUIREMENTS} | JSON array of requirement IDs to include | Yes |
11
+ | {PREVIOUS_OUTPUTS} | JSON array of previous task output paths | Yes |
12
+
13
+ ---
14
+
15
+ ## Context
16
+
17
+ You are recommending scope boundaries based on PRD analysis.
18
+
19
+ Project: {PROJECT_PATH}
20
+ Target feature: {TARGET_FEATURE}
21
+ Requirements: {REQUIREMENTS}
22
+
23
+ ---
24
+
25
+ ## Your Task
26
+
27
+ Create a recommended scope structure with suggested content.
28
+
29
+ ### Step 1: Read Previous Analysis
30
+
31
+ Load the analysis from previous tasks in {PREVIOUS_OUTPUTS}.
32
+
33
+ ### Step 2: Read Requirement Details
34
+
35
+ For each requirement in {REQUIREMENTS}, read the full content from PRD files.
36
+
37
+ ### Step 3: Determine Scope Attributes
38
+
39
+ Based on requirements, determine:
40
+
41
+ **Target Repository:**
42
+ - `backend` - Server-side work (APIs, database, business logic)
43
+ - `frontend` - Client-side work (UI, components, state management)
44
+ - `both` - Requires work in both repos
45
+
46
+ **Complexity:**
47
+ - `S` - Small, a few hours
48
+ - `M` - Medium, 1-2 days
49
+ - `L` - Large, 3-5 days
50
+ - `XL` - Extra large, consider splitting
51
+
52
+ **Priority:**
53
+ - Inherit from highest priority requirement
54
+
55
+ ### Step 4: Draft Scope Content
56
+
57
+ Create a draft of:
58
+ - Summary (2-3 sentences)
59
+ - User story
60
+ - Acceptance criteria (from requirements)
61
+ - Technical constraints
62
+ - Dependencies on other scopes
63
+ - Out of scope items
64
+
65
+ ---
66
+
67
+ ## Output Format
68
+
69
+ Write to: {OUTPUT_FILE}
70
+
71
+ ```json
72
+ {
73
+ "scope_id": "SCOPE-003",
74
+ "title": "User Authentication",
75
+ "target": "backend",
76
+ "complexity": "M",
77
+ "priority": "P1",
78
+ "module": "auth",
79
+ "summary": "Implement JWT-based authentication with login, logout, and token refresh endpoints. Users authenticate with email/password and receive secure tokens for API access.",
80
+ "user_story": {
81
+ "role": "registered user",
82
+ "action": "log in with my email and password",
83
+ "benefit": "I can access my personal data and features securely"
84
+ },
85
+ "requirements": [
86
+ {
87
+ "id": "REQ-AUTH-001",
88
+ "title": "User Login",
89
+ "original_text": "Users can log in with email and password"
90
+ },
91
+ {
92
+ "id": "REQ-AUTH-002",
93
+ "title": "JWT Tokens",
94
+ "original_text": "System issues JWT tokens on successful login"
95
+ }
96
+ ],
97
+ "acceptance_criteria": [
98
+ {
99
+ "id": "AC-1",
100
+ "given": "valid email and password",
101
+ "when": "user submits login form",
102
+ "then": "system returns JWT token and 200 status"
103
+ },
104
+ {
105
+ "id": "AC-2",
106
+ "given": "invalid credentials",
107
+ "when": "user submits login form",
108
+ "then": "system returns 401 with error message"
109
+ }
110
+ ],
111
+ "technical_constraints": [
112
+ "Must use bcrypt for password hashing",
113
+ "JWT expiration: 24 hours"
114
+ ],
115
+ "dependencies": [
116
+ {
117
+ "scope_id": "SCOPE-001",
118
+ "reason": "Requires user database schema",
119
+ "blocking": true
120
+ }
121
+ ],
122
+ "out_of_scope": [
123
+ "Password reset flow (SCOPE-004)",
124
+ "Social login (future)",
125
+ "Multi-factor authentication (future)"
126
+ ],
127
+ "implementation_notes": {
128
+ "suggested_approach": "Implement using existing auth middleware pattern",
129
+ "key_files": ["src/auth/", "src/middleware/"]
130
+ },
131
+ "estimated_acs": 8,
132
+ "rationale": "These requirements form a cohesive authentication feature. Login and JWT handling are tightly coupled and should be delivered together."
133
+ }
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Rules
139
+
140
+ - Do NOT modify any files
141
+ - Do NOT interact with the user
142
+ - ONLY output to {OUTPUT_FILE}
143
+ - Generate acceptance criteria in Given/When/Then format
144
+ - Include error scenarios in acceptance criteria
145
+ - Keep scope focused (3-8 requirements)
146
+ - Identify blocking dependencies