agentme 0.33.1 → 0.35.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 (22) hide show
  1. package/.filedist-package.yml +1 -1
  2. package/.xdrs/agentme/bdrs/index.md +20 -0
  3. package/.xdrs/agentme/bdrs/operations/.assets/team-composition.svg +171 -0
  4. package/.xdrs/agentme/bdrs/operations/401-epic-feature-story-planning.md +159 -0
  5. package/.xdrs/agentme/bdrs/operations/402-digital-product-roles.md +149 -0
  6. package/.xdrs/agentme/bdrs/operations/403-product-team-composition.md +102 -0
  7. package/.xdrs/agentme/bdrs/operations/404-team-roles-and-specialists.md +274 -0
  8. package/.xdrs/agentme/bdrs/principles/001-company-organizational-levels.md +61 -0
  9. package/.xdrs/agentme/bdrs/principles/002-okr-framework.md +74 -0
  10. package/.xdrs/agentme/bdrs/principles/003-product-delivery-value-flow.md +90 -0
  11. package/.xdrs/agentme/edrs/application/skills/200-run-skill-tests/SKILL.test.md +2 -2
  12. package/.xdrs/agentme/edrs/index.md +2 -2
  13. package/.xdrs/agentme/edrs/principles/skills/150-refine-plan-mode/SKILL.md +339 -0
  14. package/.xdrs/agentme/edrs/principles/skills/150-refine-plan-mode/SKILL.test.md +91 -0
  15. package/.xdrs/agentme/edrs/principles/skills/151-refine-user-story/SKILL.md +505 -0
  16. package/.xdrs/agentme/edrs/principles/skills/151-refine-user-story/SKILL.test.md +455 -0
  17. package/.xdrs/agentme/index.md +6 -1
  18. package/package.json +1 -1
  19. package/.xdrs/agentme/edrs/principles/skills/150-plan-mode-consistency/SKILL.md +0 -184
  20. package/.xdrs/agentme/edrs/principles/skills/150-plan-mode-consistency/SKILL.test.md +0 -88
  21. package/.xdrs/agentme/edrs/principles/skills/151-write-user-story/SKILL.md +0 -144
  22. package/.xdrs/agentme/edrs/principles/skills/151-write-user-story/SKILL.test.md +0 -88
@@ -0,0 +1,455 @@
1
+ ---
2
+ skill: 151-refine-user-story
3
+ skill-version: "3.0"
4
+ ---
5
+
6
+ ## Test Scenarios
7
+
8
+ ### Scenario 1: Vague request refined into a single story
9
+
10
+ **Trigger / Input**
11
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
12
+
13
+ "We need to add notifications to the app."
14
+
15
+ **Expected Behaviour**
16
+ 1. Skill classifies the input as vague and restates the current understanding before asking questions.
17
+ 2. Skill asks targeted follow-up questions covering problem/value, scope, requirements, flow, edge cases, and dependencies — one group at a time using `vscode_askQuestions` when available.
18
+ 3. Skill does NOT produce any story or acceptance criteria while ambiguities remain open.
19
+ 4. After all questions are answered and no ambiguity remains, skill performs a consistency check across goal, scope, and acceptance criteria.
20
+ 5. Skill reviews each scope item for completeness, edge cases, technical constraint consequences, and missing attachments.
21
+ 6. Skill decides whether the work fits in one story; if so, produces one refined story using the output template.
22
+ 7. Output contains all required sections: Title, User Story, Scope, Acceptance Criteria.
23
+
24
+ **Simulated Human Responses**
25
+ 1. "Registered users receive notifications. Events that trigger them: a new direct message, a mention in a comment, or a status change on an item they own."
26
+ 2. "In-app only (bell icon with a badge counter). No email or push for now."
27
+ 3. "Users can mark individual notifications as read or mark all as read. Unread count shown in the header."
28
+ 4. "No notifications for system or admin events. Notifications are scoped to the current user only."
29
+ 5. "If the user is offline the notification is stored and shown when they next open the app. No real-time delivery guarantee needed yet."
30
+ 6. "No limit on stored notifications per user for now. No deletion UI required."
31
+
32
+ **Assertions**
33
+ - [ ] Skill asks at least one question about who receives notifications and what triggers them before producing any output.
34
+ - [ ] Skill does not output a story while any area in the identification table (problem, scope, requirements, flow, edge cases, dependencies) has an open question.
35
+ - [ ] Output follows the output template with Title (max 10 words), User Story (As a … I want … so that …), Scope, and Acceptance Criteria sections.
36
+ - [ ] Output contains acceptance criteria items that are verifiable and start with a checkbox `- [ ]`.
37
+
38
+ ---
39
+
40
+ ### Scenario 2: User refuses to answer a clarifying question
41
+
42
+ **Trigger / Input**
43
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
44
+
45
+ "Add export to PDF for the reports page."
46
+
47
+ The skill asks: "Should the export include all report data or only the currently filtered view?" The user replies: "I don't know, just decide."
48
+
49
+ **Expected Behaviour**
50
+ 1. Skill classifies the input and identifies the filtering scope as an open decision.
51
+ 2. Skill asks the clarifying question about export scope.
52
+ 3. When the user refuses to answer, skill notes the item as an unresolved assumption.
53
+ 4. Skill does NOT produce a story or acceptance criteria while the assumption is unresolved.
54
+ 5. Skill explicitly communicates that it cannot proceed until the assumption is resolved, and re-asks or rephrases the question.
55
+
56
+ **Assertions**
57
+ - [ ] Skill does not produce a story, acceptance criteria, or output template while the filtering scope is unresolved.
58
+ - [ ] Skill explicitly states that the unresolved assumption blocks output and asks the user to resolve it.
59
+
60
+ ---
61
+
62
+ ### Scenario 3: Request too large — split into vertical slices, one refined, rest deferred
63
+
64
+ **Trigger / Input**
65
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
66
+
67
+ "Build a complete user authentication system: registration with email/password, login, password reset via email, and social login with Google."
68
+
69
+ **Expected Behaviour**
70
+ 1. Phase 0 finds no XDRS scope and skips to Phase 1.
71
+ 2. Skill classifies the input as too large (bundles multiple independent user outcomes).
72
+ 3. Skill asks targeted questions to understand each flow's requirements.
73
+ 4. After questions are resolved, skill determines the work cannot fit in one story and proposes splitting into 4 vertical slices: registration, login, password reset, social login.
74
+ 5. Skill presents `vscode_askQuestions` with "Accept split — start refining Registration" (recommended) plus options to adjust boundaries or keep the original scope.
75
+ 6. User accepts the split and picks "Registration" as the first slice to refine.
76
+ 7. Skill restarts from Phase 1 with the narrower registration scope. The remaining 3 slices are recorded as Deferred Stories.
77
+ 8. Phases 1–7 run on the registration slice only. At Phase 8, a Deferred Items summary lists the 3 remaining slices.
78
+ 9. Because no plan doc is active, skill presents `vscode_askQuestions` asking where to save the deferred slices; user picks BACKLOG.md.
79
+ 10. Skill outputs one fully refined story (registration) and appends the 3 deferred slices to BACKLOG.md.
80
+
81
+ **Simulated Human Responses**
82
+ 1. "Registration: email + password only. Password min 8 chars, at least one digit. Email must be verified before the user can log in."
83
+ 2. "Login: email + password. No magic links. Session token valid for 7 days. Invalidated on logout."
84
+ 3. "Password reset: send a time-limited link to the registered email. Link expires after 1 hour. User sets a new password via the link."
85
+ 4. "Google social login: OAuth 2.0. If the Google email matches an existing account, link them. Otherwise create a new account."
86
+ 5. "Error handling: show a user-friendly message for invalid credentials, expired links, and OAuth failures. No silent failures."
87
+ 6. "No rate limiting, CAPTCHA, or 2FA in scope for now. Each flow ships independently."
88
+
89
+ **Assertions**
90
+ - [ ] Skill skips Phase 0 when no XDRS scope is found.
91
+ - [ ] Skill proposes a split at Phase 2 with rationale for each slice boundary.
92
+ - [ ] Skill uses `vscode_askQuestions` to present the split options, not plain text.
93
+ - [ ] Skill restarts Phase 1 for the chosen slice (registration) only after the user accepts the split.
94
+ - [ ] Output contains exactly one fully refined story (the chosen slice) using the full output template.
95
+ - [ ] Deferred Items summary at Phase 8 lists the three deferred slices, each with a one-line description.
96
+ - [ ] Skill does NOT produce a single merged story covering all four flows.
97
+ - [ ] Output confirms the chosen slice delivers a complete, independently shippable end-to-end user outcome.
98
+ - [ ] Output shows no slice is a technical-layer-only story (e.g. "implement the auth database schema" alone is not acceptable).
99
+
100
+ ---
101
+
102
+ ### Scenario 4: Phase gate re-run — user requests deeper pass on Phase 4
103
+
104
+ **Trigger / Input**
105
+ You are an agent with the `151-refine-user-story` skill loaded. The skill has completed Phase 4 (Consistency & Scope Review) and presents the phase gate. The user selects:
106
+
107
+ "Re-run Phase 4: Consistency & Scope Review — deeper pass"
108
+
109
+ **Expected Behaviour**
110
+ 1. Skill does NOT advance to Phase 5 — it restarts Phase 4 Step 1 (consistency check) and Phase 4 Step 2 (scope item review) with fresh eyes.
111
+ 2. During the deeper pass, skill surfaces at least one finding not raised in the first run (e.g. a new edge case or a scope item with an unresolved constraint).
112
+ 3. Skill asks a question about the new finding using `vscode_askQuestions`.
113
+ 4. After the human responds, Phase 4 converges again and the gate is re-presented.
114
+ 5. Skill re-presents the Phase 4 gate with "Continue to Phase 5 — Visual Validation" as the recommended option.
115
+
116
+ **Simulated Human Responses**
117
+ 1. (Re-run Phase 4: Consistency & Scope Review selected at gate)
118
+ 2. "The empty state message should appear only after a 300 ms delay to avoid a flash on fast networks."
119
+
120
+ **Assertions**
121
+ - [ ] Skill re-runs Phase 4 (does not skip to Phase 5) when the human selects re-run.
122
+ - [ ] Skill surfaces at least one new finding during the deeper pass.
123
+ - [ ] Skill asks a question about the new finding before re-presenting the gate.
124
+ - [ ] Skill re-presents the Phase 4 gate after the human responds.
125
+ - [ ] Skill does not advance to Phase 5 until the gate is explicitly confirmed with "Continue".
126
+
127
+ ---
128
+
129
+ ### Scenario 5: Phase 6 user-perspective challenge surfaces a missing journey step
130
+
131
+ **Trigger / Input**
132
+ You are an agent with the `151-refine-user-story` skill loaded. The story being refined is:
133
+
134
+ "Add a CSV export button to the reports page so registered users can download the current view."
135
+
136
+ Phases 1–5 are complete. The skill is running Phase 6, angle 1 (User journey completeness).
137
+
138
+ **Expected Behaviour**
139
+ 1. During angle 1 analysis, skill identifies that the story does not specify what the user sees while the export is being prepared — there is no loading state or download confirmation described.
140
+ 2. Skill presents this as a finding and asks: "What should the user see while the export is being prepared — an immediate download, a loading indicator, or a background task with a notification? What feedback confirms the download completed?"
141
+ 3. Human answers the question.
142
+ 4. Skill incorporates the answer into the story scope and continues to angles 2–9.
143
+ 5. Skill does NOT produce the final story until Phase 8 is complete and the readiness checklist passes.
144
+
145
+ **Simulated Human Responses**
146
+ 1. "Show a spinner while generating. When ready, auto-download the file and show a success toast: 'Your CSV is ready'."
147
+
148
+ **Assertions**
149
+ - [ ] Skill runs Phase 6 analysis before producing any output.
150
+ - [ ] Skill surfaces the missing loading state and download confirmation as a finding during angle 1 (User journey completeness).
151
+ - [ ] Skill asks at least one question about the finding using `vscode_askQuestions` before moving to angle 2.
152
+ - [ ] Skill reflects the human's answer in the story scope (loading spinner + success toast added).
153
+ - [ ] Skill does not skip to Phase 8 while any angle has open questions.
154
+
155
+ ---
156
+
157
+ ### Scenario 6: Plan document with pending placeholder stories — user picks one to refine
158
+
159
+ **Trigger / Input**
160
+ You are an agent with the `151-refine-user-story` skill loaded. The user references an epic plan document at `.xdrs/_local/bdrs/operations/plans/001-epic-improve-checkout.md`. The plan contains:
161
+
162
+ ```
163
+ ### Milestone 1: Payment Speed
164
+ **Key tasks:**
165
+ - [Reduce payment steps — pending](.assets/userstory-001-reduce-payment-steps.md)
166
+ - [Save payment method — pending](.assets/userstory-002-save-payment-method.md)
167
+
168
+ ### Milestone 2: Error Recovery
169
+ **Key tasks:**
170
+ - [Retry failed payment — pending](.assets/userstory-001-retry-failed-payment.md)
171
+ ```
172
+
173
+ Each `.assets/userstory-*.md` file contains `**Status:** to-be-refined` plus any preliminary notes captured when the story was created.
174
+
175
+ **Expected Behaviour**
176
+ 1. Skill activates Phase 0, detects the plan document, and parses all Milestone key tasks.
177
+ 2. Skill reads each linked `.assets/userstory-*.md` file and checks for `**Status:** to-be-refined`. Identifies all three as pending.
178
+ 3. Skill presents a `vscode_askQuestions` list of the three pending stories plus a "New story" option.
179
+ 4. User picks the "Reduce payment steps" story from Milestone 1.
180
+ 5. Skill reads the placeholder file — extracts NNN (001) and slug (`reduce-payment-steps`) from its `**Story ID:**` line; carries any notes into Phase 1 as starting context.
181
+ 6. Skill proceeds to Phase 1 using the placeholder's title and notes as the subject.
182
+ 7. After Phase 8, skill overwrites `.assets/userstory-001-reduce-payment-steps.md` with the fully refined content (no `**Status:**` line).
183
+ 8. Skill updates the task entry link text in Milestone 1 to `- [Reduce payment steps at checkout](.assets/userstory-001-reduce-payment-steps.md)`.
184
+
185
+ **Assertions**
186
+ - [ ] Skill detects pending stories by reading file content (`**Status:** to-be-refined`), not by task entry name format.
187
+ - [ ] Skill lists all three pending stories before Phase 1 begins.
188
+ - [ ] Output shows NNN and slug extracted from the placeholder file's `**Story ID:**` line, not from the task entry text.
189
+ - [ ] Skill overwrites the story detail file with refined content and no `**Status:**` field after Phase 8.
190
+ - [ ] Skill updates the Milestone 1 task entry link text to the refined story title; the file path stays the same.
191
+ - [ ] Skill does NOT offer "Save to BACKLOG.md" for deferred items while a plan doc is active.
192
+
193
+ ---
194
+
195
+ ### Scenario 7: Refined story output writes asset file and updates plan Milestone link
196
+
197
+ **Trigger / Input**
198
+ You are an agent with the `151-refine-user-story` skill loaded. Phase 0 has detected an active plan doc at `.xdrs/_local/bdrs/operations/plans/002-epic-onboarding.md` with Milestone 1: "First Login Experience". The user is refining a new story to be placed there.
199
+
200
+ After completing Phases 1–6, Phase 8 produces the final story: "Show personalised welcome screen on first login".
201
+
202
+ **Expected Behaviour**
203
+ 1. Phase 8 determines the next NNN in the plan's `.assets/` folder (no existing userstory files → NNN = 001).
204
+ 2. Skill writes `.assets/userstory-001-welcome-screen-first-login.md` using the output template sections: Title, User Story, Scope, Edge Cases, Out of Scope, Constraints, Detailed Specs, Acceptance Criteria, Attachments, plus a back-link to the epic plan.
205
+ 3. Skill inserts `- [Show personalised welcome screen on first login](.assets/userstory-001-welcome-screen-first-login.md)` as a key task in Milestone 1 of the plan doc.
206
+
207
+ **Assertions**
208
+ - [ ] Skill creates the story detail file at the correct path inside the plan's `.assets/` folder.
209
+ - [ ] Output uses all required template sections including `## Constraints` and `## Detailed Specs`.
210
+ - [ ] Output includes a back-link to the parent epic plan.
211
+ - [ ] Plan doc's Milestone 1 key tasks section contains a markdown link entry pointing to the new file.
212
+ - [ ] Output shows NNN as 001 (first story in this epic's `.assets/` folder).
213
+
214
+ ---
215
+
216
+ ### Scenario 8: No XDRS scope — skill asks where to save and defaults to workspace root
217
+
218
+ **Trigger / Input**
219
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
220
+
221
+ "I need to refine a story: users should be able to reset their PIN via SMS."
222
+
223
+ **Expected Behaviour**
224
+ 1. Phase 0 finds no XDRS scope and skips to Phase 1 immediately.
225
+ 2. Skill runs all phases normally.
226
+ 3. At Phase 8, after producing the final story, skill asks via `vscode_askQuestions` where to save the story file, defaulting to `userstory-001-reset-pin-via-sms.md` at the workspace root.
227
+ 4. If the story is split, the deferred slices prompt offers: add to existing epic plan, create new epic plan, or save to `BACKLOG.md`.
228
+
229
+ **Assertions**
230
+ - [ ] Skill does not block or present any plan-doc questions when no XDRS scope exists.
231
+ - [ ] Skill asks for a save location with a clear default path at Phase 8.
232
+ - [ ] Skill saves the story file to the user-confirmed path.
233
+ - [ ] Skill triggers a destination choice for split deferred stories (not silently writing to BACKLOG.md).
234
+
235
+ ---
236
+
237
+ ### Scenario 9: Story lacking detailed specs is flagged and sent back for more refinement
238
+
239
+ **Trigger / Input**
240
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user is refining:
241
+
242
+ "Integrate with the payments provider so users can pay by card."
243
+
244
+ After Phase 2 Step 1, no API endpoints, no payload structures, no documentation links, and no contact names have been surfaced.
245
+
246
+ **Expected Behaviour**
247
+ 1. Phase 2 Step 1 interface-and-integration scan identifies that no external API details are recorded despite the story clearly involving a payment provider integration.
248
+ 2. Skill asks targeted questions: "What is the payment provider? Do you have an API reference or documentation link? What is the payment flow — which endpoints are called, in what order, with what payload?"
249
+ 3. Human provides partial answers: "We use Stripe. Charge endpoint. Don't know the exact payload."
250
+ 4. Skill asks follow-up: "Can you share the Stripe API documentation link or the name of someone who owns the Stripe integration?"
251
+ 5. Phase 8 readiness checklist item for Detailed Specs fails until sufficient detail is provided (endpoint, payload shape, or doc link).
252
+
253
+ **Assertions**
254
+ - [ ] Phase 2 Step 1 explicitly surfaces the missing integration details before Step 2 is reached.
255
+ - [ ] Skill does not produce a final story while `## Detailed Specs` remains empty for a story involving an external API.
256
+ - [ ] Phase 8 checklist item for Detailed Specs is checked only after sufficient detail (at minimum a doc link or endpoint) is provided.
257
+ - [ ] Final output's `## Detailed Specs` section contains at least the Stripe API reference and the charge endpoint.
258
+
259
+ ---
260
+
261
+ ### Scenario 10: XDRS scope active, start fresh, story split — Phase 8 asks where to put deferred slices
262
+
263
+ **Trigger / Input**
264
+ You are an agent with the `151-refine-user-story` skill loaded. Phase 0 detected an XDRS scope with two existing epic plans but the user chose "start fresh — no plan context". During Phase 2, the story is found to be too large and split into three slices. The user accepts the split and starts refining Slice 1.
265
+
266
+ **Expected Behaviour**
267
+ 1. Phase 0 detects XDRS scope, presents epic plan list plus "Start fresh" option, user picks "Start fresh".
268
+ 2. Phases 1–7 run normally for Slice 1.
269
+ 3. At Phase 8, because the context is "start fresh" (no active plan doc), the two deferred slices trigger a `vscode_askQuestions` prompt: "Where should the deferred story slices go?" with options: add to an existing epic plan (lists found epics), create a new epic plan, or save to BACKLOG.md.
270
+ 4. Skill applies the chosen action (e.g., creates placeholder files for the two deferred slices and inserts `- [Slice description — pending](.assets/userstory-NNN-slug.md)` task entries in the chosen epic plan, or appends descriptions to BACKLOG.md).
271
+
272
+ **Assertions**
273
+ - [ ] Phase 0 presents the XDRS epic plan list even in "start fresh" mode.
274
+ - [ ] Deferred slices do NOT go silently to BACKLOG.md when an XDRS scope is present.
275
+ - [ ] Phase 8 presents a `vscode_askQuestions` destination choice for deferred slices.
276
+ - [ ] If an epic plan is chosen, deferred slices are created as placeholder files and inserted as `- [description — pending](.assets/...)` link entries in the correct Milestone.
277
+
278
+ ---
279
+
280
+ ### Scenario 11: Very large story split into multiple slices — no XDRS scope — deferred slices saved to BACKLOG.md
281
+
282
+ **Trigger / Input**
283
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
284
+
285
+ "I need to build the entire checkout flow: cart review, address selection, payment method entry, coupon validation, order summary, fraud check, payment processing, order confirmation email, and post-purchase upsell screen."
286
+
287
+ **Expected Behaviour**
288
+ 1. Phase 0 finds no XDRS scope and skips to Phase 1 immediately.
289
+ 2. Phase 1 classifies the input as a vague, massively oversized request covering 9+ distinct behaviours.
290
+ 3. Phase 2 determines the story is far too large for a single story (estimated > 2 weeks). Skill proposes splitting into vertical slices, for example:
291
+ - Slice 1: Review cart and confirm address
292
+ - Slice 2: Enter and validate payment method
293
+ - Slice 3: Apply coupon and show order summary
294
+ - Slice 4: Fraud check and payment processing
295
+ - Slice 5: Order confirmation email
296
+ - Slice 6: Post-purchase upsell screen
297
+ 4. Skill presents `vscode_askQuestions` asking which slice to refine first; user picks Slice 1.
298
+ 5. Phases 1–7 run on Slice 1 only. The remaining 5 slices are tracked as Deferred Stories.
299
+ 6. At Phase 8, because no plan doc is active, skill presents `vscode_askQuestions`:
300
+ - **"Save deferred slices to BACKLOG.md"** (recommended)
301
+ - **"Save to a different file"** (open box)
302
+ - **"Skip — do not save"**
303
+ 7. User picks "Save deferred slices to BACKLOG.md". Skill appends the 5 deferred slices under a `## Deferred Stories` heading in `BACKLOG.md` at the workspace root (creating the file if needed), each with a one-line description and split rationale.
304
+ 8. Skill outputs the refined story for Slice 1 only.
305
+
306
+ **Assertions**
307
+ - [ ] Phase 0 is skipped entirely (no XDRS scope found).
308
+ - [ ] Skill explicitly states at Phase 2 that the request is too large and must be split.
309
+ - [ ] All identified slices are presented for user selection before any refinement begins.
310
+ - [ ] Only the user-selected slice (Slice 1) is refined through Phases 1–7.
311
+ - [ ] The remaining slices appear in a Deferred Items summary at Phase 8.
312
+ - [ ] `vscode_askQuestions` is used at Phase 8 to ask where to save deferred slices (not silently appended).
313
+ - [ ] BACKLOG.md is created (or appended to) at the workspace root with a `## Deferred Stories` section.
314
+ - [ ] Each deferred slice in BACKLOG.md has a one-line description and reason for deferral.
315
+ - [ ] The final output contains exactly one refined story (Slice 1), not all slices.
316
+ - [ ] Skill does NOT offer BACKLOG.md for deferred items from an active plan doc (this scenario has no plan doc — condition satisfied).
317
+
318
+ ---
319
+
320
+ ### Scenario 12: Phase 6 passes cleanly but Phase 7 implementer angles surface missing error paths and a security concern
321
+
322
+ **Trigger / Input**
323
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. Phases 1–6 have completed for:
324
+
325
+ "Allow users to link their Google account to an existing account so they can sign in with Google."
326
+
327
+ Phase 6 converged without surfacing major gaps. The skill is now entering Phase 7.
328
+
329
+ **Expected Behaviour**
330
+ 1. Phase 7 fires and applies the per-angle protocol to all 8 implementer angles.
331
+ 2. Angle 2 (Error and edge paths): the protocol generates questions about failure modes. The current story does not describe what happens if: the Google OAuth callback fails, the Google email is already linked to another account, or the OAuth token is revoked after linking. Skill surfaces these as findings and asks the user how each should be handled.
332
+ 3. Angle 6 (Security implications): the protocol generates questions about auth handling. The story does not specify how the OAuth state parameter is validated, how long the linking session is valid, or whether the user must be authenticated before initiating Google linking. Skill surfaces these as an auth concern and asks.
333
+ 4. Angles 1, 3, 4, 5, 7 converge quickly with answers drawn from story contents or brief user responses.
334
+ 5. Angle 8 (Implementer dry run): a cold engineer following the story would get stuck on the OAuth callback error handling and the authentication prerequisite — both already surfaced by angles 2 and 6. Skill confirms these are now resolved and the dry run passes.
335
+ 6. Phase 8 checklist requires both Phase 6 (9 user-perspective angles) and Phase 7 (8 implementer-perspective angles) complete before output is produced.
336
+ 7. Phase 9 Check A re-validates items 8 (error and edge paths) and 12 (security implications) in the final output. Both pass.
337
+ 8. Phase 9 Check B applies the 4 size criteria — none are met — skill presents the completion gate.
338
+
339
+ **Simulated Human Responses**
340
+ 1. (Phase 7 angle 2 question on OAuth callback failure) "Show an error toast: 'Could not link Google account. Please try again.' Keep the user on the account settings page."
341
+ 2. (Phase 7 angle 2 question on email already linked) "Show: 'This Google account is already linked to another user.' Do not link or merge — block the attempt."
342
+ 3. (Phase 7 angle 2 question on revoked token) "Out of scope — user must re-link manually if token is revoked."
343
+ 4. (Phase 7 angle 6 question on auth prerequisite) "User must be logged in. Redirect to login if not."
344
+ 5. (Phase 7 angle 6 question on state parameter validation) "Yes — validate CSRF state parameter on callback. Reject if missing or mismatched."
345
+
346
+ **Assertions**
347
+ - [ ] Phase 6 completes with all 9 user-perspective angles run using the per-angle protocol (5–10 questions generated per angle, answers attempted, gaps asked).
348
+ - [ ] Phase 7 fires after Phase 6 gate is confirmed.
349
+ - [ ] Phase 7 angle 2 surfaces at least the OAuth callback failure and the "email already linked" case as open findings and asks the user about each.
350
+ - [ ] Phase 7 angle 6 surfaces the missing authentication prerequisite and CSRF state validation as a security concern and asks the user.
351
+ - [ ] Phase 7 angle 8 (implementer dry run) references the gaps found in angles 2 and 6 and confirms they are resolved before marking the dry run passed.
352
+ - [ ] Phase 8 checklist explicitly requires both Phase 6 (9 angles) and Phase 7 (8 angles) complete.
353
+ - [ ] Phase 9 Check A items 8 and 12 pass in the final output (error paths and security addressed in story).
354
+ - [ ] Phase 9 Check B detects no split needed; skill presents the completion gate.
355
+ - [ ] Final story includes error handling for OAuth failure, duplicate email, and revoked token (out-of-scope noted), and documents the CSRF state validation and auth prerequisite in Acceptance Criteria or Detailed Specs.
356
+
357
+ ---
358
+
359
+ ### Scenario 13: Context Enrichment — existing CRM system, domain inferred, URL provided, mid-phase probe fires
360
+
361
+ **Trigger / Input**
362
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
363
+
364
+ "Delete contacts from Leads."
365
+
366
+ **Expected Behaviour**
367
+ 1. Phase 1 Step 3 fires (Context Enrichment).
368
+ 2. Skill performs quick request analysis internally and infers the domain is likely a CRM based on the entities "contacts" and "Leads."
369
+ 3. Skill scans the workspace — finds no relevant source code, READMEs, or prior stories.
370
+ 4. Skill asks targeted, domain-specific questions: *"This looks like a CRM — is it? Can you point me to the Leads screen documentation or any existing specs?"* and *"Do you have screenshots or a recording of the current Leads / Contacts flow?"*
371
+ 5. User provides a URL: `https://internal.docs/crm/leads-screen`.
372
+ 6. Skill reads the URL content and summarises it (factual, labeled with source).
373
+ 7. Context loop re-evaluates: no further gaps at this stage; convergence reached after 1 round. Skill presents the convergence gate.
374
+ 8. User selects "Context is sufficient — continue to Phase 2."
375
+ 9. Skill compiles the Context Summary and carries it into Phase 2.
376
+ 10. During Phase 2 Step 2 (requirements loop), skill hits an interface-and-integration gap: the URL did not specify the API used for deleting contacts. Skill applies the Context Probe rule and asks: *"The docs describe the UI flow but do not mention the API contract for contact deletion — do you have an API reference or endpoint spec?"*
377
+ 11. User provides a partial answer. Skill records it and continues.
378
+
379
+ **Simulated Human Responses**
380
+ 1. (Quick analysis internal — not shown)
381
+ 2. URL: `https://internal.docs/crm/leads-screen`
382
+ 3. (Convergence gate) "Context is sufficient — continue to Phase 2"
383
+ 4. (API probe) "We use a REST API. DELETE /contacts/:id. No other docs."
384
+
385
+ **Assertions**
386
+ - [ ] Skill performs quick internal analysis before surfacing any question.
387
+ - [ ] First questions are domain-specific and tied to inferred domain (CRM), not generic.
388
+ - [ ] Skill auto-reads the provided URL and summarizes its content with source label.
389
+ - [ ] Context loop converges after 1 round and presents the convergence gate.
390
+ - [ ] Context Summary is compiled and referenced in Phase 2.
391
+ - [ ] Mid-phase Context Probe fires in Phase 2 for the API gap — ask is tied to the specific gap, not generic.
392
+ - [ ] Skipped or partial answers (no further docs) are recorded as "Context: not provided for [topic]" and do NOT block Phase 2 progress.
393
+
394
+ ---
395
+
396
+ ### Scenario 14: Context Enrichment — new feature, no codebase, user pastes KR + interview excerpt, loop converges in 2 rounds
397
+
398
+ **Trigger / Input**
399
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
400
+
401
+ "We need a way for field technicians to report equipment failures from their mobile device."
402
+
403
+ **Expected Behaviour**
404
+ 1. Phase 1 Step 3 fires (Context Enrichment).
405
+ 2. Quick analysis identifies: domain = field service / maintenance; key entities = technicians, equipment, failure reports; no named system; operation = create/report flow.
406
+ 3. Workspace scan finds nothing relevant — no source code, no docs.
407
+ 4. Skill asks targeted questions: *"What business outcome is expected from this feature? Are there OKR or KR documents describing the goal?"* and *"Were there user interviews or stakeholder discussions about this need? A transcript or notes would help."* and *"Is there an existing system (even paper-based or manual) that this replaces?"*
408
+ 5. User pastes a KR: "KR: 90% of failures reported within 15 minutes of occurrence (baseline: 45% today)" and an interview excerpt: "Technicians said they often forget details by the time they reach a desk. They need it on-site."
409
+ 6. Skill summarizes the pasted content with source label.
410
+ 7. Context loop re-evaluates: a new gap surfaced (no info on mobile platform or existing backend). Skill asks 1 follow-up round: *"What mobile platform should this target (iOS, Android, both)? Is there an existing backend or API that failure reports should be sent to?"*
411
+ 8. User answers. Loop re-evaluates — no further gaps. Convergence reached after 2 rounds.
412
+ 9. Skill presents the convergence gate; user selects "Context is sufficient — continue to Phase 2."
413
+ 10. Context Summary is compiled with KR, interview excerpt, and platform answer all labeled.
414
+
415
+ **Simulated Human Responses**
416
+ 1. (No workspace artifacts found — no answer needed)
417
+ 2. KR + interview excerpt (pasted inline)
418
+ 3. Follow-up: "Android only. No existing backend — we'll build it."
419
+
420
+ **Assertions**
421
+ - [ ] Skill asks targeted questions derived from domain inference even when workspace scan finds nothing.
422
+ - [ ] Pasted KR and interview excerpt are summarized with source label (e.g. `**Source:** user-provided KR — 90% failure reporting rate target`).
423
+ - [ ] Loop fires a second round when new gaps are identified after first answers.
424
+ - [ ] Loop converges after exactly 2 rounds (no infinite loop).
425
+ - [ ] Context Summary contains all three pieces: KR, interview excerpt, platform decision.
426
+ - [ ] Phase 2 references the Context Summary when restating understanding.
427
+
428
+ ---
429
+
430
+ ### Scenario 15: Context Enrichment — user skips entirely, Phase 2 proceeds, no fabrication
431
+
432
+ **Trigger / Input**
433
+ You are an agent with the `151-refine-user-story` skill loaded. The workspace has no `.xdrs/` directory. The user says:
434
+
435
+ "Add a dark mode toggle to the settings page."
436
+
437
+ **Expected Behaviour**
438
+ 1. Phase 1 Step 3 fires (Context Enrichment).
439
+ 2. Quick analysis: domain = UI/UX, web or mobile app; key entity = settings page; operation = toggle/preference.
440
+ 3. Workspace scan finds nothing.
441
+ 4. Skill asks targeted questions: *"Is there an existing design system or theme configuration? Can you point me to the settings page code or design spec?"* and *"What frameworks or platforms does this app use?"*
442
+ 5. User selects "Skip — no additional context available."
443
+ 6. Skill records `Context: none available` and proceeds immediately to Phase 2.
444
+ 7. Phase 2 restates understanding without any fabricated system details, noting context is unavailable.
445
+ 8. Phase 2 requirements loop asks about the existing theme system, frameworks, and user preference persistence — without assuming any specific technology.
446
+
447
+ **Simulated Human Responses**
448
+ 1. "Skip — no additional context available"
449
+
450
+ **Assertions**
451
+ - [ ] Skill records `Context: none available` explicitly and does not invent any system details.
452
+ - [ ] Skill proceeds to Phase 2 immediately after the skip — no re-prompting.
453
+ - [ ] Phase 2 Step 1 restate does not reference any assumed technologies or design systems.
454
+ - [ ] Phase 2 requirements loop asks about theme system and framework without assuming anything from the story text.
455
+ - [ ] Skipped Context Probe is not treated as an unresolved decision — does not block the Hard Gate.
@@ -17,7 +17,7 @@ The `agentme` scope is a curated library of XDRs and skills encoding best practi
17
17
 
18
18
  ### What this scope covers
19
19
 
20
- The `agentme` scope provides opinionated, reusable guidance on how to scaffold, build, test, and ship software projects. It targets AI coding agents and human developers who want consistent, high-quality defaults across JavaScript, Go, and Python projects.
20
+ The `agentme` scope provides opinionated, reusable guidance on how to scaffold, build, test, and ship software projects. It targets AI coding agents and human developers who want consistent, high-quality defaults across JavaScript, Go, and Python projects. It also provides business decisions for software development project management (epics, features, user stories).
21
21
 
22
22
  All content in this scope is published and consumed by external projects. Changes must be clear, backwards-compatible where possible, and thoroughly reviewed before merging.
23
23
 
@@ -25,6 +25,11 @@ All content in this scope is published and consumed by external projects. Change
25
25
 
26
26
  The `agentme` EDRs cover project tooling and structure for each supported language, CLI standards, monorepo layout, CI/CD pipelines, and observability. See the full list in the [EDRs Index](edrs/index.md).
27
27
 
28
+ ### Business decisions
29
+
30
+ The `agentme` BDRs cover software development project management practices: how to organize and track epics, features, and user stories using XDRS plan documents. See the full list in the [BDRs Index](bdrs/index.md).
31
+
28
32
  ## Type Indexes
29
33
 
30
34
  - [EDRs Index](edrs/index.md) - Engineering decisions for coding best practices and project tooling
35
+ - [BDRs Index](bdrs/index.md) - Business decisions for software development project management
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentme",
3
- "version": "0.33.1",
3
+ "version": "0.35.0",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "filedist": "^0.39.0"