@llipe.com/dev-tasks 0.6.1 → 0.6.5

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 (143) hide show
  1. package/.claude/agents/developer.md +294 -0
  2. package/.claude/agents/github-ops.md +407 -0
  3. package/.claude/agents/housekeeping.md +109 -0
  4. package/.claude/agents/technical-writer.md +390 -0
  5. package/.claude/agents/ux-engineer.md +184 -0
  6. package/.claude/agents/verifier.md +276 -0
  7. package/.claude/commands/developer.md +272 -0
  8. package/.claude/commands/github-ops.md +10 -0
  9. package/.claude/commands/housekeeping.md +10 -0
  10. package/.claude/commands/planner.md +506 -0
  11. package/.claude/commands/product-engineer.md +263 -0
  12. package/.claude/commands/technical-writer.md +10 -0
  13. package/.claude/commands/ux-engineer.md +10 -0
  14. package/.claude/commands/verifier-audit.md +10 -0
  15. package/.claude/commands/verifier-design.md +10 -0
  16. package/.claude/hooks/git-guard.sh +95 -0
  17. package/.claude/skills/activity-contract-test-design/SKILL.md +122 -0
  18. package/.claude/skills/activity-drift-reconciliation/SKILL.md +133 -0
  19. package/.claude/skills/activity-e2e-test-design/SKILL.md +124 -0
  20. package/.claude/skills/activity-edge-case-refinement/SKILL.md +146 -0
  21. package/.claude/skills/activity-generate-spec/SKILL.md +137 -0
  22. package/.claude/skills/activity-generate-stories/SKILL.md +243 -0
  23. package/.claude/skills/activity-init/SKILL.md +162 -0
  24. package/.claude/skills/activity-publish-github/SKILL.md +116 -0
  25. package/.claude/skills/activity-random-test-tactics/SKILL.md +181 -0
  26. package/.claude/skills/activity-refine/SKILL.md +236 -0
  27. package/.claude/skills/git-ops/SKILL.md +221 -0
  28. package/.claude/skills/implement/SKILL.md +129 -0
  29. package/.claude/skills/memo-cli-usage/REFERENCE.md +798 -0
  30. package/.claude/skills/memo-cli-usage/SKILL.md +144 -0
  31. package/.claude/skills/plan/SKILL.md +145 -0
  32. package/.claude/skills/webapp-mockup/SKILL.md +76 -0
  33. package/.claude/skills/webapp-mockup/scripts/scaffold-mockup.sh +469 -0
  34. package/.github/agents/developer.agent.md +293 -0
  35. package/.github/agents/github-ops.agent.md +416 -0
  36. package/.github/agents/housekeeping.agent.md +109 -0
  37. package/.github/agents/planner.agent.md +496 -0
  38. package/.github/agents/product-engineer.agent.md +262 -0
  39. package/.github/agents/technical-writer.agent.md +389 -0
  40. package/.github/agents/ux-engineer.agent.md +183 -0
  41. package/.github/agents/verifier.agent.md +275 -0
  42. package/.github/instructions/domain/nextjs-pages-components.instructions.md +375 -0
  43. package/.github/instructions/implement.instructions.md +128 -0
  44. package/.github/instructions/plan.instructions.md +144 -0
  45. package/.github/prompts/developer-execute.prompt.md +13 -0
  46. package/.github/prompts/github-ops.prompt.md +16 -0
  47. package/.github/prompts/housekeeping.prompt.md +16 -0
  48. package/.github/prompts/planner-resume.prompt.md +13 -0
  49. package/.github/prompts/planner.prompt.md +18 -0
  50. package/.github/prompts/product-engineer-feature.prompt.md +21 -0
  51. package/.github/prompts/product-engineer-init.prompt.md +16 -0
  52. package/.github/prompts/product-engineer-issue.prompt.md +19 -0
  53. package/.github/prompts/technical-writer.prompt.md +21 -0
  54. package/.github/prompts/ux-engineer.prompt.md +14 -0
  55. package/.github/prompts/verifier-audit.prompt.md +33 -0
  56. package/.github/prompts/verifier-design.prompt.md +28 -0
  57. package/.github/skills/activity-contract-test-design/SKILL.md +117 -0
  58. package/.github/skills/activity-drift-reconciliation/SKILL.md +128 -0
  59. package/.github/skills/activity-e2e-test-design/SKILL.md +119 -0
  60. package/.github/skills/activity-edge-case-refinement/SKILL.md +141 -0
  61. package/.github/skills/activity-generate-spec/SKILL.md +132 -0
  62. package/.github/skills/activity-generate-stories/SKILL.md +238 -0
  63. package/.github/skills/activity-init/SKILL.md +157 -0
  64. package/.github/skills/activity-publish-github/SKILL.md +111 -0
  65. package/.github/skills/activity-random-test-tactics/SKILL.md +176 -0
  66. package/.github/skills/activity-refine/SKILL.md +231 -0
  67. package/.github/skills/git-ops/SKILL.md +216 -0
  68. package/.github/skills/memo-cli-usage/REFERENCE.md +798 -0
  69. package/.github/skills/memo-cli-usage/SKILL.md +144 -0
  70. package/.github/skills/webapp-mockup/SKILL.md +71 -0
  71. package/.github/skills/webapp-mockup/scripts/scaffold-mockup.sh +469 -0
  72. package/.kiro/agents/developer.md +305 -0
  73. package/.kiro/agents/github-ops.md +428 -0
  74. package/.kiro/agents/housekeeping.md +122 -0
  75. package/.kiro/agents/planner.md +530 -0
  76. package/.kiro/agents/product-engineer.md +294 -0
  77. package/.kiro/agents/technical-writer.md +408 -0
  78. package/.kiro/agents/ux-engineer.md +200 -0
  79. package/.kiro/agents/verifier.md +275 -0
  80. package/.kiro/hooks/git-guard.json +16 -0
  81. package/.kiro/hooks/scripts/git-guard.sh +116 -0
  82. package/.kiro/skills/activity-contract-test-design/SKILL.md +122 -0
  83. package/.kiro/skills/activity-drift-reconciliation/SKILL.md +133 -0
  84. package/.kiro/skills/activity-e2e-test-design/SKILL.md +124 -0
  85. package/.kiro/skills/activity-edge-case-refinement/SKILL.md +146 -0
  86. package/.kiro/skills/activity-generate-spec/SKILL.md +137 -0
  87. package/.kiro/skills/activity-generate-stories/SKILL.md +243 -0
  88. package/.kiro/skills/activity-init/SKILL.md +162 -0
  89. package/.kiro/skills/activity-publish-github/SKILL.md +116 -0
  90. package/.kiro/skills/activity-random-test-tactics/SKILL.md +181 -0
  91. package/.kiro/skills/activity-refine/SKILL.md +236 -0
  92. package/.kiro/skills/git-ops/SKILL.md +221 -0
  93. package/.kiro/skills/memo-cli-usage/REFERENCE.md +798 -0
  94. package/.kiro/skills/memo-cli-usage/SKILL.md +144 -0
  95. package/.kiro/skills/webapp-mockup/SKILL.md +76 -0
  96. package/.kiro/steering/git-guard-notice.md +11 -0
  97. package/.kiro/steering/implement.md +129 -0
  98. package/.kiro/steering/nextjs-pages-components.md +376 -0
  99. package/.kiro/steering/plan.md +145 -0
  100. package/AGENTS.md +122 -0
  101. package/CHANGELOG.md +40 -2
  102. package/CLAUDE.md +94 -0
  103. package/README.md +33 -18
  104. package/dist/adapters/cli/extract-all.js +4 -4
  105. package/dist/adapters/cli/extract-component.d.ts +1 -1
  106. package/dist/adapters/cli/extract-component.js +4 -4
  107. package/dist/adapters/cli/parse-args.d.ts +1 -0
  108. package/dist/adapters/cli/parse-args.d.ts.map +1 -1
  109. package/dist/adapters/cli/parse-args.js +4 -0
  110. package/dist/adapters/cli/parse-args.js.map +1 -1
  111. package/dist/bin/dev-tasks.js +23 -9
  112. package/dist/bin/dev-tasks.js.map +1 -1
  113. package/dist/bin/dt.js +3 -3
  114. package/dist/core/distribution/index.d.ts +5 -3
  115. package/dist/core/distribution/index.d.ts.map +1 -1
  116. package/dist/core/distribution/index.js +3 -2
  117. package/dist/core/distribution/index.js.map +1 -1
  118. package/dist/core/distribution/install.d.ts +20 -8
  119. package/dist/core/distribution/install.d.ts.map +1 -1
  120. package/dist/core/distribution/install.js +76 -36
  121. package/dist/core/distribution/install.js.map +1 -1
  122. package/dist/core/distribution/manifest.d.ts +25 -2
  123. package/dist/core/distribution/manifest.d.ts.map +1 -1
  124. package/dist/core/distribution/manifest.js +29 -2
  125. package/dist/core/distribution/manifest.js.map +1 -1
  126. package/dist/core/distribution/migrate.d.ts +6 -3
  127. package/dist/core/distribution/migrate.d.ts.map +1 -1
  128. package/dist/core/distribution/migrate.js +21 -19
  129. package/dist/core/distribution/migrate.js.map +1 -1
  130. package/dist/core/distribution/profiles.d.ts +30 -0
  131. package/dist/core/distribution/profiles.d.ts.map +1 -0
  132. package/dist/core/distribution/profiles.js +57 -0
  133. package/dist/core/distribution/profiles.js.map +1 -0
  134. package/dist/core/distribution/update.d.ts +6 -4
  135. package/dist/core/distribution/update.d.ts.map +1 -1
  136. package/dist/core/distribution/update.js +22 -22
  137. package/dist/core/distribution/update.js.map +1 -1
  138. package/dist/core/extract/component.d.ts +9 -9
  139. package/dist/core/extract/component.js +5 -5
  140. package/dist/core/extract/report.d.ts +1 -1
  141. package/dist/core/extract/report.js +1 -1
  142. package/package.json +37 -18
  143. package/skills/.gitkeep +0 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: activity-drift-reconciliation
3
+ description: "Routes verifier drift findings into task-list/GitHub-checklist expansion, new-issue creation, or PRD/spec changelog write-back with a human-confirmation gate. Use when a verifier fidelity report (Design or Audit Mode) surfaces drift that needs to be acted on."
4
+ ---
5
+
6
+ # Activity: Drift Reconciliation
7
+
8
+ Take a `verifier` fidelity report (Audit Mode) or PRD-level rollup audit and route each drift finding to the correct destination — an expanded task list, a new GitHub issue, a PRD/spec changelog update, or a new follow-up issue for a closed scope — without ever blocking the PR/issue completion that triggered the audit. Invoked by the `product-engineer` agent whenever `developer` or `planner` hands off drift findings from a mandatory `verifier` audit.
9
+
10
+ ---
11
+
12
+ > **RFC 2119 Notice:** The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
13
+
14
+ ## Goal
15
+
16
+ Given a `verifier` drift catalog (per-item impact class, intent class, and evidence), decide and execute the correct reconciliation path for each item, so drift is never silently dropped and never silently blocks completion.
17
+
18
+ ## Context
19
+
20
+ This activity assumes:
21
+
22
+ - A `/workstream/fidelity-report-{issue-or-story-id}.md` produced by `verifier` in Audit Mode exists, or a rollup report from a `planner` Phase 5 run.
23
+ - The drift catalog in that report classifies every item by **impact** (`Critical`/`Major`/`Minor`) and **intent** (`Intended`/`Unintended`/`Undetermined`).
24
+ - The originating task list (`/workstream/tasks-*.md`) and GitHub Issue for the current scope are known.
25
+ - `developer` or `planner` has already reached (or passed) its own completion gate — this activity runs **after** that gating decision, never before it, and its outcome never reopens or blocks that gate.
26
+
27
+ ## Non-Negotiable Operating Rules
28
+
29
+ 1. **Non-blocking, always:** Reconciliation **MUST NOT** be used to block, reopen, or gate PR/issue completion. It is a post-hoc write-back activity only.
30
+ 2. **Route by intent first, then scope:** Every drift item **MUST** be classified by intent (`Intended`/`Unintended`/`Undetermined`) before deciding a destination. `Undetermined` items **MUST** be escalated to a human as a clarifying question before routing — do not guess.
31
+ 3. **Human confirmation gate for Intended drift:** You **MUST NOT** update a PRD or spec for Intended drift without an explicit human confirmation step. No new task is created for Intended drift.
32
+ 4. **Active task list expansion:** For Unintended drift against a task list that is still open/active, you **MUST** expand `/workstream/tasks-*.md` with new sub-task(s) and update the GitHub Issue checklist to match — the GitHub Issue and local file **MUST** stay in sync.
33
+ 5. **New issue for out-of-scope drift:** For Unintended drift that warrants tracking beyond the current task's scope, you **MUST** delegate to `github-ops` to create a new GitHub issue/sub-task, cross-referenced to the originating issue.
34
+ 6. **Closed-scope drift never reopens:** For drift found against an already-closed/merged task list or issue (including a PRD-level rollup after a consolidated PR), you **MUST** open a new follow-up issue/task list rather than reopening the closed one.
35
+ 7. **Changelog discipline:** Any PRD/spec update resulting from Intended drift **MUST** include an incremented changelog entry (version, date, summary, author) in that document.
36
+ 8. **Traceability:** Every routed drift item **MUST** be traceable back to its source fidelity report and AC (or `N/A` for out-of-scope/rollup-only findings).
37
+ 9. **English-only outputs:** All new tasks, issue bodies, comments, and changelog entries **MUST** be in English.
38
+
39
+ ## Process
40
+
41
+ ### Step 1 — Intake
42
+
43
+ Read the fidelity report (or rollup report). For each drift catalog item, extract:
44
+
45
+ - `drift_id`, `AC(s)` affected (or `N/A`)
46
+ - Impact class (`Critical`/`Major`/`Minor`)
47
+ - Intent class (`Intended`/`Unintended`/`Undetermined`)
48
+ - Evidence source(s) cited by `verifier`
49
+ - Originating scope: issue/story task list path + GitHub issue number, and whether that scope is still open or already closed/merged
50
+
51
+ ### Step 2 — Classify Undetermined Items
52
+
53
+ For any item classified `Undetermined` by `verifier`, ask the user one focused clarifying question per item (or a batched question if several share context) to resolve intent before proceeding. Do not route an `Undetermined` item until it is resolved to `Intended` or `Unintended`.
54
+
55
+ ### Step 3 — Route Each Item
56
+
57
+ Apply this decision table in order:
58
+
59
+ | Condition | Route | AC Reference |
60
+ | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------ |
61
+ | Intended drift | Human-confirmation gate → PRD/spec changelog update (Step 4). No new task. | AC-5 |
62
+ | Unintended drift, originating task list/issue still open | Expand `/workstream/tasks-*.md` with new sub-task(s); sync GitHub Issue checklist (Step 5) | AC-3 |
63
+ | Unintended drift, warrants tracking beyond current task scope | Create new GitHub issue/sub-task via `github-ops`, cross-referenced to originating issue (Step 6) | AC-4 |
64
+ | Drift found against an already-closed/merged task list or issue (e.g., PRD-level rollup) | Open a new follow-up issue/task list; do not reopen the closed one (Step 7) | AC-6 |
65
+
66
+ A single audit run may produce items routed to more than one path — process each item independently through this table.
67
+
68
+ ### Step 4 — Intended Drift → Human-Confirmed PRD/Spec Update
69
+
70
+ 1. Present the drift item (what changed, why it appears intentional, evidence) to the human and ask for explicit confirmation: _"Confirm this is an intentional deviation from the PRD/spec — update the document? (y/n)"_
71
+ 2. If declined, re-classify as `Unintended` and re-route via Step 3.
72
+ 3. If confirmed:
73
+ - Update the relevant PRD and/or spec section to reflect the confirmed behavior.
74
+ - Add a changelog row: `| <version+1> | <date> | <summary of what changed and why> | product-engineer |`.
75
+ - **MUST NOT** create a new task for this item.
76
+ - Record the confirmation (who/when) in the changelog summary or a linked comment.
77
+
78
+ ### Step 5 — Unintended Drift, Active Task List
79
+
80
+ 1. Add new sub-task(s) to the correct parent task in `/workstream/tasks-*.md`, following the existing numbering convention (e.g., `N.x`).
81
+ 2. Update the corresponding GitHub Issue checklist with the same new sub-task(s), keeping wording identical between the two.
82
+ 3. Note the originating drift item ID in the new sub-task text so the fix is traceable back to the fidelity report.
83
+ 4. Hand off the new sub-task(s) to `developer` for execution through the normal `implement` flow — this activity does not implement the fix itself.
84
+
85
+ ### Step 6 — Unintended Drift, Beyond Current Task Scope
86
+
87
+ 1. Delegate to `github-ops` to create a new GitHub issue using standard issue conventions (title format, Summary, Acceptance Criteria).
88
+ 2. The new issue body **MUST** cross-reference the originating issue (`Refs #<originating-issue-number>`) and cite the drift item and AC from the fidelity report.
89
+ 3. If the new issue is large enough to need its own task list, hand off to the `plan` activity to generate one — this activity only creates the issue, it does not itself plan the fix.
90
+
91
+ ### Step 7 — Drift Against a Closed/Merged Scope
92
+
93
+ 1. Confirm the originating task list/issue state is closed or merged (do not proceed on an assumption — check GitHub issue state and/or task-list completion markers).
94
+ 2. Create a new GitHub issue and a new `/workstream/tasks-*.md` follow-up task list scoped to the drift item(s) only.
95
+ 3. Cross-reference the closed issue/PR in the new issue body (`Follow-up to #<closed-issue-number>`, `Refs PR #<merged-pr-number>`).
96
+ 4. **MUST NOT** reopen the closed issue or reopen/merge into the closed task list.
97
+
98
+ ## Output
99
+
100
+ Reconciliation summary returned to the caller (`developer`, `planner`, or the user):
101
+
102
+ ```markdown
103
+ # Drift Reconciliation Summary — [scope]
104
+
105
+ Source fidelity report: /workstream/fidelity-report-{id}.md
106
+
107
+ ## Routed Items
108
+
109
+ | Drift ID | Impact | Intent | Route | Destination |
110
+ | -------- | -------- | ---------- | -------------------------- | ------------------------------------------- |
111
+ | D-1 | Minor | Unintended | Active task list expansion | tasks-issue-42.md #3.5, Issue #42 checklist |
112
+ | D-2 | Major | Intended | PRD/spec changelog update | spec-checkout.md v1.3 |
113
+ | D-3 | Critical | Unintended | New issue | Issue #58 (Refs #42) |
114
+ | D-4 | Minor | Unintended | Follow-up (closed scope) | Issue #59 + tasks-issue-59.md |
115
+
116
+ ## Escalations
117
+
118
+ - Undetermined items resolved: <list, or none>
119
+
120
+ ## Non-Blocking Confirmation
121
+
122
+ This reconciliation pass ran after [developer/planner]'s completion gate and did not block or reopen it.
123
+ ```
124
+
125
+ ## Final Instructions
126
+
127
+ 1. You **MUST** classify every drift item by intent before routing it — resolve `Undetermined` first.
128
+ 2. You **MUST NOT** create a new task for Intended drift, and you **MUST NOT** update the PRD/spec for Intended drift without explicit human confirmation.
129
+ 3. You **MUST** keep the local task file and the GitHub Issue checklist in sync whenever you expand an active task list.
130
+ 4. You **MUST** delegate new-issue creation to `github-ops` and follow its conventions (title format, labels, cross-referencing).
131
+ 5. You **MUST NOT** reopen a closed/merged issue or task list — open a new follow-up instead.
132
+ 6. You **MUST** confirm and state that this activity never blocks or reopens the completion gate that triggered it.
133
+ 7. You **MUST** return the reconciliation summary in the format above.
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: activity-e2e-test-design
3
+ description: "Generate end-to-end black-box test scenarios from a spec or user stories. Use when deriving E2E compliance scenarios."
4
+ ---
5
+
6
+ # Activity: E2E Black-Box Test Design
7
+
8
+ Generate end-to-end black-box test scenarios from a complete specification or a single user story. Produces executable scenario descriptions tied to acceptance criteria, covering happy paths, negative paths, and abuse cases. Invoked by the `verifier` agent in Design Mode.
9
+
10
+ ---
11
+
12
+ > **RFC 2119 Notice:** The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
13
+
14
+ ## Goal
15
+
16
+ Derive a comprehensive set of end-to-end black-box test scenarios from requirements. Every acceptance criterion (AC) **MUST** be covered by at least one positive (happy-path) scenario and at least one negative or edge-case scenario.
17
+
18
+ ## Context
19
+
20
+ This activity assumes:
21
+
22
+ - A numbered list of acceptance criteria is available (produced by Phase 2 of `verifier`).
23
+ - The source artifact (spec or user story) has been read and parsed.
24
+ - The output feeds into the test plan assembled by `verifier`.
25
+
26
+ ## Process
27
+
28
+ 1. **Receive AC list and source artifact.**
29
+ 2. **Identify user-facing workflows.** Map each AC to the observable behavior it describes.
30
+ 3. **Generate scenarios.** For each AC, produce:
31
+ - ≥1 happy-path scenario (expected inputs → expected outputs).
32
+ - ≥1 negative-path scenario (invalid/missing inputs → expected error behavior).
33
+ - ≥1 abuse-case scenario where applicable (malicious input, privilege escalation, injection).
34
+ 4. **Assign severity.** Mark each scenario as `critical`, `major`, or `minor` based on business impact.
35
+ 5. **Cross-reference.** Ensure every AC has at least one scenario; flag uncovered ACs.
36
+ 6. **Return structured output** for inclusion in the test plan.
37
+
38
+ ## Scenario Template
39
+
40
+ Each scenario **MUST** follow this structure:
41
+
42
+ ```markdown
43
+ ### SC-{id}: {Scenario Title}
44
+
45
+ | Field | Value |
46
+ | ------------------- | --------------------------------------- |
47
+ | **AC(s)** | AC-{n}, AC-{m} |
48
+ | **Type** | happy-path / negative-path / abuse-case |
49
+ | **Severity** | critical / major / minor |
50
+ | **Preconditions** | {State required before execution} |
51
+ | **Steps** | 1. {Step} 2. {Step} … |
52
+ | **Expected Result** | {Observable outcome from the outside} |
53
+ | **Pass Criteria** | {Unambiguous condition for pass} |
54
+ ```
55
+
56
+ ## Example
57
+
58
+ Given a user story:
59
+
60
+ > _As a user, I want to log in with my email and password so that I can access my dashboard._
61
+
62
+ **AC-1:** User with valid credentials is redirected to the dashboard.
63
+ **AC-2:** User with invalid credentials sees an error message.
64
+ **AC-3:** Account is locked after 5 consecutive failed attempts.
65
+
66
+ ### SC-1: Successful login with valid credentials
67
+
68
+ | Field | Value |
69
+ | ------------------- | ------------------------------------------------------------------------------- |
70
+ | **AC(s)** | AC-1 |
71
+ | **Type** | happy-path |
72
+ | **Severity** | critical |
73
+ | **Preconditions** | User account exists and is active. |
74
+ | **Steps** | 1. Navigate to `/login`. 2. Enter valid email and password. 3. Submit the form. |
75
+ | **Expected Result** | User is redirected to `/dashboard`. Session is established. |
76
+ | **Pass Criteria** | HTTP 302 redirect to `/dashboard`. Auth cookie present. |
77
+
78
+ ### SC-2: Login with wrong password
79
+
80
+ | Field | Value |
81
+ | ------------------- | ------------------------------------------------------------------------------------- |
82
+ | **AC(s)** | AC-2 |
83
+ | **Type** | negative-path |
84
+ | **Severity** | critical |
85
+ | **Preconditions** | User account exists and is active. |
86
+ | **Steps** | 1. Navigate to `/login`. 2. Enter valid email and wrong password. 3. Submit the form. |
87
+ | **Expected Result** | Login page displays "Invalid email or password" error. |
88
+ | **Pass Criteria** | HTTP 401. Error message displayed. No session created. |
89
+
90
+ ### SC-3: Account lockout after 5 failures
91
+
92
+ | Field | Value |
93
+ | ------------------- | ---------------------------------------------------------------------------------------------------------------- |
94
+ | **AC(s)** | AC-3 |
95
+ | **Type** | negative-path |
96
+ | **Severity** | major |
97
+ | **Preconditions** | User account exists. Failed attempt counter is at 0. |
98
+ | **Steps** | 1. Submit login with wrong password 5 times consecutively. 2. Attempt login with correct password. |
99
+ | **Expected Result** | After 5th failure, account is locked. 6th attempt (even with correct password) returns "Account locked" message. |
100
+ | **Pass Criteria** | HTTP 423 on 6th attempt. Lock message displayed. |
101
+
102
+ ### SC-4: SQL injection in email field
103
+
104
+ | Field | Value |
105
+ | ------------------- | ------------------------------------------------------------------ |
106
+ | **AC(s)** | AC-1, AC-2 |
107
+ | **Type** | abuse-case |
108
+ | **Severity** | critical |
109
+ | **Preconditions** | Login page accessible. |
110
+ | **Steps** | 1. Enter `' OR 1=1 --` as email. 2. Enter any password. 3. Submit. |
111
+ | **Expected Result** | Login fails with "Invalid email or password". No data leak. |
112
+ | **Pass Criteria** | HTTP 401. No SQL error exposed. No authentication bypass. |
113
+
114
+ ## Output
115
+
116
+ This skill returns a list of scenarios in the template format above. The calling agent (`verifier`) assembles them into the E2E section of the test plan.
117
+
118
+ ## Final Instructions
119
+
120
+ 1. You **MUST** produce at least one happy-path and one negative-path scenario per AC.
121
+ 2. You **MUST** include abuse-case scenarios for ACs involving authentication, authorization, or user input.
122
+ 3. You **MUST** assign severity to every scenario.
123
+ 4. You **MUST NOT** reference internal implementation details — all assertions are based on observable behavior.
124
+ 5. You **MUST** flag any AC that cannot be covered by an E2E scenario and explain why.
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: activity-edge-case-refinement
3
+ description: "Systematically discover edge cases by category with concrete examples. Use when expanding coverage for input domains, state transitions, timing, and failure modes."
4
+ ---
5
+
6
+ # Activity: Edge-Case Refinement
7
+
8
+ Systematic edge-case discovery by category with concrete examples for each. Produces a categorized edge-case catalog mapped to acceptance criteria, ensuring no high-risk boundary goes untested. Invoked by the `verifier` agent in Design Mode.
9
+
10
+ ---
11
+
12
+ > **RFC 2119 Notice:** The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
13
+
14
+ ## Goal
15
+
16
+ Discover and catalog edge cases across all relevant categories for the feature under test. Every edge case **MUST** be tied to at least one acceptance criterion and include a concrete, testable example.
17
+
18
+ ## Context
19
+
20
+ This activity assumes:
21
+
22
+ - A numbered list of acceptance criteria is available (produced by Phase 2 of `verifier`).
23
+ - E2E scenarios and contract scenarios have already been drafted (or will be composed alongside).
24
+ - The output feeds into the edge-case section of the test plan assembled by `verifier`.
25
+
26
+ ## Edge-Case Categories
27
+
28
+ You **MUST** evaluate every category below against the source artifact. For each category that applies, produce ≥1 concrete edge case. For categories that do not apply, explicitly note `N/A — {reason}`.
29
+
30
+ ### 1. Input Domain
31
+
32
+ Boundary values, empty/null/missing inputs, maximum-length strings, special characters, Unicode, encoding mismatches.
33
+
34
+ **Example:** A name field accepts 1–100 characters. Edge cases: empty string, 1 character, 100 characters, 101 characters, string with only whitespace, string with emoji, string with null bytes.
35
+
36
+ ### 2. State Transitions
37
+
38
+ Invalid state transitions, re-entrant operations, concurrent state changes, transitions from terminal states.
39
+
40
+ **Example:** An order can move `pending → confirmed → shipped → delivered`. Edge cases: attempt `pending → shipped` (skip confirmed), attempt `delivered → pending` (reverse), call confirm twice on the same order.
41
+
42
+ ### 3. Timing & Concurrency
43
+
44
+ Race conditions, timeouts, out-of-order events, duplicate submissions, slow network responses.
45
+
46
+ **Example:** Two users submit the same promo code simultaneously. Edge case: both requests arrive before either is committed — does the system apply the code twice or correctly reject one?
47
+
48
+ ### 4. Idempotency
49
+
50
+ Repeated identical requests, retry storms, duplicate webhook deliveries.
51
+
52
+ **Example:** `POST /api/payments` is called twice with the same idempotency key. Edge case: second call should return the same result without creating a duplicate payment.
53
+
54
+ ### 5. Failure Modes
55
+
56
+ Network failures mid-operation, partial writes, downstream service unavailability, disk full, database connection loss.
57
+
58
+ **Example:** Payment gateway returns a timeout after charging the card. Edge case: system must not create a second charge on retry — check for charge-before-confirm pattern.
59
+
60
+ ### 6. Auth & Permissions
61
+
62
+ Expired tokens, revoked permissions mid-session, privilege escalation, cross-tenant data access.
63
+
64
+ **Example:** User A has `read` access to project X. Edge case: User A attempts `DELETE /api/projects/X` — should receive 403, not 404 or 500.
65
+
66
+ ### 7. Data Boundaries
67
+
68
+ Integer overflow, float precision, date boundaries (leap years, DST transitions, epoch limits), empty collections, maximum record counts.
69
+
70
+ **Example:** A date picker allows selecting a delivery date. Edge cases: Feb 29 in a leap year, Feb 29 in a non-leap year, Dec 31 23:59:59 UTC, Jan 1 00:00:00 UTC, dates in year 2038.
71
+
72
+ ### 8. Resource Exhaustion
73
+
74
+ Memory pressure, connection pool depletion, rate limiting, disk space, file descriptor limits.
75
+
76
+ **Example:** API rate limit is 100 requests/minute. Edge cases: 100th request (should succeed), 101st request (should return 429), requests resume after the window resets.
77
+
78
+ ### 9. API Versioning
79
+
80
+ Backward compatibility, deprecated field handling, schema migration, version header omission.
81
+
82
+ **Example:** API v2 renames `userName` to `username`. Edge cases: v1 client sends `userName` to v2 endpoint, v2 client sends `username` to v1 endpoint, request with no version header.
83
+
84
+ ## Edge-Case Template
85
+
86
+ ```markdown
87
+ ### EC-{id}: {Edge-Case Title}
88
+
89
+ | Field | Value |
90
+ | ------------------- | --------------------------------------------------------------------------------------- |
91
+ | **AC(s)** | AC-{n} |
92
+ | **Category** | {category name from list above} |
93
+ | **Input / Setup** | {Concrete input or precondition} |
94
+ | **Expected Result** | {Observable behavior} |
95
+ | **Risk if Missed** | {Consequence of not testing this — data loss, security breach, silent corruption, etc.} |
96
+ ```
97
+
98
+ ## Example Walkthrough: "Requested vs Delivered" Validation
99
+
100
+ Given a user story with AC-5: "Discount code can only be used once per user."
101
+
102
+ **Deriving the edge case:**
103
+
104
+ 1. **Parse AC:** "used once per user" → requires per-user uniqueness check.
105
+ 2. **Category:** Idempotency + Timing & Concurrency.
106
+ 3. **Concrete edge case:**
107
+
108
+ ### EC-7: Same discount code submitted twice simultaneously
109
+
110
+ | Field | Value |
111
+ | ------------------- | --------------------------------------------------------------------------------------------------- |
112
+ | **AC(s)** | AC-5 |
113
+ | **Category** | Idempotency, Timing & Concurrency |
114
+ | **Input / Setup** | User sends two `POST /api/cart/discount` requests with the same code in parallel (within 50ms). |
115
+ | **Expected Result** | Exactly one application succeeds. The second returns an error indicating the code was already used. |
116
+ | **Risk if Missed** | User gets double discount — revenue loss, potential abuse vector. |
117
+
118
+ **Validating "requested vs delivered":**
119
+
120
+ - **Requested (AC-5):** Code used once per user.
121
+ - **Delivered:** Run the edge case; if both requests succeed → **DRIFT** detected. If exactly one succeeds → **PASS**.
122
+
123
+ ## Output
124
+
125
+ This skill returns a categorized list of edge cases in the template format above. The calling agent (`verifier`) assembles them into the edge-case section of the test plan.
126
+
127
+ ## Execution Checklist
128
+
129
+ Use this checklist to verify completeness before returning results:
130
+
131
+ - [ ] All 9 categories evaluated against the source artifact.
132
+ - [ ] Each applicable category has ≥1 concrete edge case with filled template.
133
+ - [ ] Non-applicable categories marked `N/A` with reason.
134
+ - [ ] Every edge case maps to ≥1 AC.
135
+ - [ ] Risk-if-missed populated for every edge case.
136
+ - [ ] No edge case references internal implementation details.
137
+ - [ ] Edge cases are numbered sequentially (`EC-1`, `EC-2`, …).
138
+
139
+ ## Final Instructions
140
+
141
+ 1. You **MUST** evaluate all 9 categories — do not skip any.
142
+ 2. You **MUST** produce at least one concrete edge case per applicable category.
143
+ 3. You **MUST** include the "Risk if Missed" field for every edge case.
144
+ 4. You **MUST NOT** reference internal implementation details — all edge cases describe observable behavior.
145
+ 5. You **MUST** flag ACs that appear to have no meaningful edge cases and explain why.
146
+ 6. You **SHOULD** prioritize edge cases by risk severity when the catalog is large.
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: activity-generate-spec
3
+ description: "Transform an approved PRD into a technical specification. Use in product-engineer Feature Mode after refine."
4
+ ---
5
+
6
+ # Activity: Generate Technical Specification
7
+
8
+ Transform refined requirements (PRD) into an actionable technical design by synthesizing them with the project's Technical Guidelines. Use this skill when a PRD is approved and ready for technical breakdown. Invoked by the `product-engineer` agent in Feature Mode.
9
+
10
+ ---
11
+
12
+ > **RFC 2119 Notice:** The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
13
+
14
+ ## Goal
15
+
16
+ Transform refined requirements (PRD) into an actionable technical design by synthesizing them with the project's Technical Guidelines. The specification bridges "what to build" (PRD) and "how to build it" (implementation).
17
+
18
+ ## Context
19
+
20
+ This activity assumes the following documents already exist:
21
+
22
+ - `product-context.md` — Product understanding
23
+ - `technical-guidelines.md` — Technical standards and patterns
24
+ - `prd-[feature-name].md` — Feature requirements (produced by the **refine** activity)
25
+
26
+ ## Document Changelog Convention
27
+
28
+ Every specification produced by this activity **MUST** include a **Changelog** table as the **first section** after the document title. The changelog tracks the version history of the document.
29
+
30
+ - The initial version **MUST** be `1.0`.
31
+ - Every subsequent update **MUST** increment the minor version (e.g., `1.1`, `1.2`, …).
32
+ - Major structural rewrites **SHOULD** increment the major version (e.g., `2.0`).
33
+ - The **Author** column **MUST** include the name of the person or agent responsible for the change (e.g., `@username`, `developer-agent`, `planner-agent`).
34
+
35
+ ```markdown
36
+ ## Changelog
37
+
38
+ | Version | Date | Summary | Author |
39
+ | ------- | ---------- | --------------- | ------------------ |
40
+ | 1.0 | YYYY-MM-DD | Initial version | @user / agent-name |
41
+ ```
42
+
43
+ ## Process
44
+
45
+ 1. **Receive References:** User points to the existing PRD and confirms Technical Guidelines are available.
46
+ 2. **Analyze Documents:** You **MUST** read and analyze both the PRD and Technical Guidelines to identify integration points.
47
+ 3. **Ask Specification Questions:** You **SHOULD** ask targeted questions about specific technical decisions and implementation approach.
48
+ 4. **Generate Specification:** You **MUST** create a comprehensive technical specification using the structure below.
49
+ 5. **Save Output.**
50
+
51
+ ## Clarifying Questions
52
+
53
+ Focus on technical decisions and implementation approach:
54
+
55
+ - **Affected Repositories:** "Which repositories are affected? What role does each play (backend, frontend, shared lib, infra)?"
56
+ - **System Design:** "Based on the feature requirements and our technical guidelines, what is the proposed system architecture for this feature?"
57
+ - **Data Model:** "What data entities and relationships are needed? How do they map to our database design?"
58
+ - **API Endpoints:** "What API endpoints will be needed? How do they fit our API design standards?"
59
+ - **Integration Points:** "Which existing systems or services will we integrate with? What integration method?"
60
+ - **Authentication/Authorization:** "How will this feature enforce authentication and authorization per our guidelines?"
61
+ - **Performance Approach:** "How will we ensure performance targets are met? Any caching or optimization strategies?"
62
+ - **Error Handling:** "How should errors be handled and reported to users?"
63
+ - **Validation Logic:** "What validation rules need to be enforced? Client-side and/or server-side?"
64
+ - **External Dependencies:** "Are there new third-party services or tools to integrate?"
65
+ - **Feature Flags:** "Will feature flags or toggles be used for rollout?"
66
+ - **Backward Compatibility:** "Are there backward compatibility concerns with existing APIs or data?"
67
+
68
+ ## Output Structure
69
+
70
+ The generated Specification document **MUST** include:
71
+
72
+ 0. **Changelog** — Version history table (see Document Changelog Convention above)
73
+ 1. **Executive Summary** — How the PRD will be technically implemented (2-3 sentences)
74
+ 2. **Reference Documents** — Links to the PRD and relevant Technical Guidelines sections
75
+ 3. **Affected Repositories** — Table of repositories impacted by this specification. For each repo, describe the role it plays (e.g., API backend, web frontend, shared library) and the scope of changes expected. Format: `| Repository | Role | Scope of Changes |`
76
+ 4. **System Architecture** — Data flow, component interactions, external integrations, how this fits the broader system
77
+ 5. **Data Model & Database Design** — Entity relationships, schema overview, naming conventions, migration strategy
78
+ 6. **API Design** — Endpoint specifications, request/response schemas, auth per endpoint, rate limiting, versioning
79
+ 7. **Authentication & Authorization Design** — Auth implementation, permission matrix, session/token management
80
+ 8. **Business Logic Implementation** — Key algorithms, business rule enforcement locations, validation rules, state machines
81
+ 9. **Integration Details** — Third-party integrations, methods, retry/failure handling, credentials
82
+ 10. **User Interface & Client Behavior** — Page/screen flow, UI components, client-side validation, responsive design
83
+ 11. **Performance & Scalability Approach** — Caching, query optimization, pagination, expected metrics
84
+ 12. **Security Implementation** — Encryption, input sanitization, OWASP considerations, PII handling, audit logging
85
+ 13. **Error Handling & Logging** — Error formats, logging strategy, recovery behavior, monitoring
86
+ 14. **Testing Strategy** — Unit/integration/E2E scope, mock strategy, coverage targets
87
+ 15. **Deployment & Rollout** — Feature flags, migration steps, backward compatibility, rollback plan
88
+ 16. **Dependencies & Risks** — Technology dependencies, known risks, mitigation strategies
89
+ 17. **Open Questions** — Remaining technical decisions
90
+
91
+ ## Diagram Guidelines
92
+
93
+ The specification **MUST** include embedded Mermaid diagrams to visually communicate architecture, data models, and key flows. Use fenced code blocks with the `mermaid` language tag.
94
+
95
+ Required and recommended diagrams:
96
+
97
+ | Diagram Type | Requirement | Target Section |
98
+ | -------------------------------- | ------------------------------------------------------------------ | ------------------------------------------- |
99
+ | **Component / C4-style diagram** | **MUST** include — shows services, repos, and their interactions | System Architecture |
100
+ | **Entity-Relationship diagram** | **MUST** include when new or modified data entities exist | Data Model & Database Design |
101
+ | **Sequence diagram** | **SHOULD** include for key API flows or multi-service interactions | API Design or Business Logic Implementation |
102
+ | **State diagram** | **SHOULD** include when entities have meaningful state transitions | Business Logic Implementation |
103
+ | **Deployment diagram** | **MAY** include for complex multi-environment rollouts | Deployment & Rollout |
104
+
105
+ Rules:
106
+
107
+ - Diagrams **MUST** be embedded inline in the relevant section, not collected at the end.
108
+ - Each diagram **MUST** have a brief introductory sentence explaining what it shows.
109
+ - Keep diagrams focused — one concern per diagram.
110
+ - Use consistent naming across diagrams and prose.
111
+ - ER diagrams **SHOULD** include cardinality and key attributes.
112
+ - Sequence diagrams **SHOULD** include error/alternate paths when relevant.
113
+
114
+ ## Key Synthesis Points
115
+
116
+ The specification **MUST** clearly show how:
117
+
118
+ - Each PRD requirement is addressed technically
119
+ - Technical Guidelines are applied to this specific feature
120
+ - The system integrates with existing architecture
121
+ - Technology stack choices support the requirements
122
+
123
+ ## Output
124
+
125
+ - **Format:** Markdown (`.md`)
126
+ - **Location:** `/workstream/`
127
+ - **Filename:** `specification-[prd-name].md`
128
+
129
+ ## Final Instructions
130
+
131
+ 1. You **MUST NOT** start implementing.
132
+ 2. You **MUST** read the referenced PRD and Technical Guidelines documents.
133
+ 3. You **SHOULD** ask clarifying questions about the technical implementation approach.
134
+ 4. You **MUST** ensure the specification clearly maps PRD requirements to technical solutions.
135
+ 5. You **MUST** present the specification for user review.
136
+ 6. You **MUST** save the finalized version.
137
+ 7. When updating an existing specification, you **MUST** add a new row to the Changelog table with an incremented version, the current date, a summary of changes, and the responsible author/agent.