azcodr 1.5.2 → 2.0.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 (93) hide show
  1. package/.agents/hooks.json +42 -42
  2. package/.agents/hooks.json.example +42 -42
  3. package/.agents/mcp_config.json.example +29 -29
  4. package/.agents/scripts/safety_guard.sh +143 -34
  5. package/.agents/scripts/verify_completion.sh +90 -27
  6. package/.agents/skills/agentic-architect/SKILL.md +125 -125
  7. package/.agents/skills/agentic-architect/references/agents_md_template.md +62 -62
  8. package/.agents/skills/agentic-architect/references/refinement_workflow.md +32 -32
  9. package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +63 -63
  10. package/.agents/skills/agentic-architect/references/skill_template.md +56 -56
  11. package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +402 -402
  12. package/.agents/skills/clean-code-refactor/SKILL.md +91 -91
  13. package/.agents/skills/clean-code-refactor/references/clean_code_smells.md +27 -27
  14. package/.agents/skills/clean-code-refactor/references/design_patterns_ts.md +65 -65
  15. package/.agents/skills/compliance-audit/SKILL.md +120 -120
  16. package/.agents/skills/compliance-audit/references/owasp_top10_controls.md +16 -16
  17. package/.agents/skills/compliance-audit/references/soc2_iso_controls.md +28 -28
  18. package/.agents/skills/lets-build/SKILL.md +173 -173
  19. package/.agents/skills/lets-build/references/architecture_interview_matrix.md +115 -115
  20. package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +160 -160
  21. package/.agents/skills/lets-build/references/project_readme_template.md +79 -79
  22. package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +419 -255
  23. package/.agents/skills/product-analyst/SKILL.md +154 -154
  24. package/.agents/skills/product-analyst/references/backlog_ordering_techniques.md +107 -107
  25. package/.agents/skills/product-analyst/references/gherkin_patterns.md +46 -46
  26. package/.agents/skills/product-analyst/references/invest_checklist.md +38 -38
  27. package/.agents/skills/product-analyst/references/okr_alignment_guide.md +76 -76
  28. package/.agents/skills/product-analyst/references/smart_tasks.md +59 -59
  29. package/.agents/skills/relentless-questioner/SKILL.md +128 -128
  30. package/.agents/skills/relentless-questioner/references/adaptive_question_trees.md +102 -102
  31. package/.editorconfig +19 -19
  32. package/.github/workflows/ci.yml +167 -78
  33. package/.github/workflows/publish.yml +200 -0
  34. package/.gitignore +40 -25
  35. package/AGENTS.md +103 -102
  36. package/LICENSE +21 -21
  37. package/README.md +168 -165
  38. package/bin/azcodr.js +14 -228
  39. package/docs/knowledge/ubiquitous_language.md +31 -18
  40. package/docs/rules/agentic_configuration.md +259 -259
  41. package/docs/rules/api_architecture.md +179 -179
  42. package/docs/rules/authentication.md +76 -76
  43. package/docs/rules/authorization.md +75 -75
  44. package/docs/rules/caching.md +69 -69
  45. package/docs/rules/clean_code.md +62 -62
  46. package/docs/rules/cloud_native.md +41 -41
  47. package/docs/rules/cqrs.md +203 -203
  48. package/docs/rules/database_design.md +125 -125
  49. package/docs/rules/database_operations.md +69 -69
  50. package/docs/rules/design_patterns.md +98 -98
  51. package/docs/rules/devops_ci_cd.md +76 -76
  52. package/docs/rules/domain_driven_design.md +122 -122
  53. package/docs/rules/error_handling.md +54 -52
  54. package/docs/rules/feature_flags.md +59 -59
  55. package/docs/rules/frontend_architecture.md +157 -157
  56. package/docs/rules/multitenancy_architecture.md +98 -98
  57. package/docs/rules/product_ownership.md +127 -127
  58. package/docs/rules/project_management.md +49 -49
  59. package/docs/rules/relentless_questioning.md +52 -52
  60. package/docs/rules/requirements_engineering.md +98 -98
  61. package/docs/rules/security_compliance.md +53 -53
  62. package/docs/rules/server_driven_ui.md +88 -88
  63. package/docs/rules/test_driven_development.md +185 -185
  64. package/docs/rules/transactional_email.md +27 -27
  65. package/docs/rules/type_safety.md +65 -65
  66. package/docs/rules/ui_ux_architecture.md +150 -150
  67. package/docs/rules/workflow_state_machines.md +117 -117
  68. package/lib/cli-parse.js +51 -0
  69. package/lib/cli-target.js +109 -0
  70. package/lib/cli.js +180 -0
  71. package/lib/errors.js +28 -0
  72. package/lib/git.js +29 -0
  73. package/lib/guards.js +96 -0
  74. package/lib/index.d.ts +199 -134
  75. package/lib/index.js +5 -5
  76. package/lib/links.js +123 -0
  77. package/lib/permissions.js +44 -0
  78. package/lib/repo.js +90 -0
  79. package/lib/scaffold.js +238 -448
  80. package/memory.md +119 -36
  81. package/package.json +65 -62
  82. package/scripts/test_coverage.js +66 -38
  83. package/scripts/validate/adr.js +151 -0
  84. package/scripts/validate/io.js +84 -0
  85. package/scripts/validate/links.js +167 -0
  86. package/scripts/validate/parity.js +124 -0
  87. package/scripts/validate/root.js +184 -0
  88. package/scripts/validate/rules.js +44 -0
  89. package/scripts/validate/skills.js +96 -0
  90. package/scripts/validate/text.js +29 -0
  91. package/scripts/validate-cli.js +13 -0
  92. package/scripts/validate.js +140 -258
  93. package/.github/copilot-instructions.md +0 -1
@@ -1,154 +1,154 @@
1
- ---
2
- name: product-analyst
3
- description: Use when analyzing product requirements, aligning features with OKRs and Product Goals, prioritizing backlogs with Kano/MoSCoW/RICE, decomposing epics into INVEST user stories and SMART tasks, authoring Gherkin Given-When-Then acceptance criteria, or mapping domain models and failure edge cases. Do not use for writing application code, debugging implementation bugs, or running tests.
4
- ---
5
-
6
- # Product Analyst & Requirements Architect Skill
7
-
8
- > **Core Purpose:** Bridge strategic business intent and engineering execution by grounding feature requirements in OKRs, maximizing product value via empirical backlog ordering (Kano, MoSCoW, RICE), and decomposing scope into vertically sliced INVEST user stories with Gherkin acceptance criteria and SMART developer tasks.
9
-
10
- ---
11
-
12
- ## 1. When to Use This Skill
13
- - Decomposing a broad business request, feature idea, or PRD into actionable vertical slices.
14
- - Evaluating alignment with strategic **Objectives & Key Results (OKRs)** and the overarching **Product Goal**.
15
- - Ordering and prioritizing Product Backlog items using **Kano**, **MoSCoW**, **RICE**, or **Buy a Feature**.
16
- - Distinguishing user-facing stories from non-story requirements (system invariants, NFRs, architectural spikes).
17
- - Formulating Gherkin acceptance tests before kicking off Outside-In TDD.
18
- - Decomposing INVEST stories into actionable, time-boxed **SMART developer tasks**.
19
- - Establishing Ubiquitous Language definitions for new domain models.
20
-
21
- ---
22
-
23
- ## 2. Step-by-Step Analysis Workflow
24
-
25
- ```
26
- 1. OKR & Goal Alignment ──► 2. Backlog Triage & Ordering ──► 3. Story vs. NFR Classification ──► 4. INVEST Stories & Gherkin ──► 5. SMART Tasks & Edge Cases
27
- ```
28
-
29
- ### Step 1: Align with OKRs & the Product Goal
30
- - **Product Goal Validation:** Verify how this feature advances the long-term Product Goal.
31
- - **OKR Mapping:** Map the feature to a specific **Objective** (qualitative "what") and its associated **Key Results** (quantitative "how").
32
- - **Satisfaction Gap Check:** Identify which customer pain point or satisfaction gap is addressed:
33
- $$\text{Satisfaction Gap} = \text{Desired Customer Experience} - \text{Current Customer Experience}$$
34
- - **Deciding What NOT to Do:** Explicitly identify and eliminate speculative, low-impact sub-features.
35
-
36
- ### Step 2: Prioritize via Backlog Ordering Models
37
- Consult [`references/backlog_ordering_techniques.md`](./references/backlog_ordering_techniques.md) to apply the optimal prioritization model:
38
- - **Kano Model:** Classify as *Must-be* (table stakes), *Performance* (linear satisfaction), or *Attractive* (delighter). Reject *Indifferent* or *Reverse* items.
39
- - **MoSCoW:** Categorize into *Must*, *Should*, *Could*, or *Won't have this time*.
40
- - **RICE Scoring:** Compute $(Reach \times Impact \times Confidence) / Effort$ to break ranking ties objectively.
41
-
42
- ### Step 3: Classify User Stories vs. Non-Story Requirements
43
- Recognize that **user stories are not requirements**, but a technique to express them:
44
- - **User Story (3 C's: Card, Conversation, Confirmation):** Fits user-facing features where customer/business perspective is translated into software behavior via a "pidgin language".
45
- - **Non-Story Requirements:** If the requirement represents a system invariant, data integrity rule, security policy (OWASP), latency SLA, or an architectural spike, model it directly as a technical specification, architectural fitness test, or spike task rather than forcing an artificial `"As a user..."` persona.
46
-
47
- ### Step 4: Author User Stories (INVEST Framework & Vertical Cake Slicing)
48
- Ensure every user story conforms to Bill Wake's **INVEST** criteria:
49
- - **Independent:** Sliced vertically through all layers (UI ➔ API ➔ Domain ➔ DB) without circular dependencies.
50
- - **Negotiable:** Captures essence and value, leaving implementation details open for pairing co-creation.
51
- - **Valuable:** Delivers observable benefit to the customer or business stakeholder.
52
- - **Estimable:** Right-sized and bounded. Spikes used for major unknowns.
53
- - **Small:** Sized to be completable in 1–2 development days.
54
- - **Testable:** Accompanied by executable, unambiguous Gherkin acceptance criteria.
55
-
56
- **The Multi-Layer Cake Rule & UI Integration:**
57
- - **Never slice horizontally** (e.g. *"Create database schema only"* or *"Create backend API only"*). Always slice vertically through the full stack so that every story delivers working software.
58
- - **Mandatory UI/UX Triage Gate for User-Facing Applications:** If the project has a frontend or user interface (Fullstack Web SaaS, Extension, Desktop), execute the **7-Pillar Design Architecture Triage Gate** ([`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md)) before finalizing stories:
59
- 1. *Role & Identity:* Define who the user is and their operational boundary.
60
- 2. *Information Architecture:* Define how the view fits into the Persistent App Shell vs Dynamic Canvas.
61
- 3. *Experience Duality:* Clarify whether the screen belongs to an Enterprise Operator Workspace or Consumer Portal.
62
- 4. *Navigation & Wayfinding:* Specify sidebar route, active tab, breadcrumbs, and command palette entries.
63
- 5. *State & URL Synchronization:* Specify query params (`?tab=`, `?q=`, `?page=`, `?modal=`).
64
- 6. *Access Control:* Specify route guards and permission checks.
65
- 7. *Accessibility & Feedback:* Specify accessible notifications, focus trapping, and zero native alerts.
66
- - **Every user-facing story MUST specify:** (1) The UI view/component & user interaction, (2) The API Command/Query DTO, (3) The core domain invariant, and (4) The persistence change.
67
-
68
- ### Step 5: Decompose Stories into SMART Developer Tasks
69
- For engineering execution, translate INVEST user stories into Bill Wake's **SMART** developer tasks:
70
- - **S - Specific:** Unambiguous scope without conceptual overlap.
71
- - **M - Measurable:** Clear pass/fail criteria (tests pass, clean code, DoD met).
72
- - **A - Achievable:** Realistically executable; triggers early help request if blocked.
73
- - **R - Relevant:** Justified by direct contribution to parent story.
74
- - **T - Time-boxed:** Limited to 2–4 hours (never exceeding 1 day).
75
-
76
- ### Step 6: Construct the Edge Case & Failure Matrix
77
- Map all failure paths to HTTP status codes (`400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`) and RFC 7807 problem details.
78
-
79
- ---
80
-
81
- ## 3. Gotchas & What NOT to Do
82
-
83
- - **DO NOT** confuse output (features shipped, story points burned) with outcome (value delivered, satisfaction gap closed).
84
- - **DO NOT** write horizontal, technical user stories (e.g., *"As a developer, I want a database table"* or *"As an API, I want a REST endpoint"*).
85
- - **DO NOT** author backend-only user stories or ignore the UI when analyzing a user-facing system. If the system has a web frontend or client interface, slicing must start with user interactions and views.
86
- - **DO NOT** force technical constraints, security policies, or infrastructure upgrades into user story syntax. Treat them as non-story requirements or architectural spikes.
87
- - **DO NOT** omit the Out-of-Scope ("Won't Have this time") section. Lack of negative boundaries causes runaway scope bloat.
88
- - **DO NOT** allow developer tasks to be open-ended without a measurable time-box. If a task exceeds 4 hours, it must be split or paired.
89
- - **DO NOT** skip failure paths in Gherkin scenarios. Happy-path-only requirements lead to production defects.
90
-
91
- ---
92
-
93
- ## 4. Structured Output Template
94
-
95
- ```markdown
96
- # Product Specification: [Feature Name]
97
-
98
- ## 1. Strategic Alignment & Product Goal
99
- - **Product Goal:** [Target milestone / commitment]
100
- - **Target OKR:**
101
- - **Objective:** [Qualitative, inspiring What]
102
- - **Key Result(s):** [Quantitative, measurable outcome How]
103
- - **Target Satisfaction Gap:** [Customer pain point addressed]
104
- - **Prioritization Category:** [Kano: Must-be / Performance / Attractive | MoSCoW: Must / Should | RICE Score: X]
105
-
106
- ## 2. In-Scope vs. Out-of-Scope (Non-Goals)
107
- - **In-Scope (Must/Should):** ...
108
- - **Out-of-Scope (Won't Have This Time):** ...
109
-
110
- ## 3. Ubiquitous Language & Entity Relationships
111
- - **[Term 1]**: [Definition grounded in domain invariants]
112
- - **[Term 2]**: [Definition grounded in domain invariants]
113
-
114
- ## 4. User Stories & Gherkin Acceptance Scenarios
115
-
116
- ### US-01: [User Story Title]
117
- **As a** [role]
118
- **I want to** [action]
119
- **So that** [value]
120
-
121
- ```gherkin
122
- Scenario: [Happy path]
123
- Given ...
124
- When ...
125
- Then ...
126
-
127
- Scenario: [Edge case / Failure path]
128
- Given ...
129
- When ...
130
- Then ...
131
- ```
132
-
133
- ## 5. SMART Developer Tasks (Inner-Loop Breakdown)
134
- - [ ] **Task 1 [Specific & Time-boxed: 2h]:** [Technical description, e.g. Domain entity and value object invariants with unit test RED-GREEN]
135
- - [ ] **Task 2 [Specific & Time-boxed: 3h]:** [Use case & secondary repository implementation with integration tests]
136
- - [ ] **Task 3 [Specific & Time-boxed: 2h]:** [HTTP controller endpoint & RFC 7807 error handling]
137
- - [ ] **Task 4 [Specific & Time-boxed: 3h]:** [UI view integration, TanStack query hooks, accessible Radix primitives]
138
-
139
- ## 6. Edge Case & Error Response Matrix
140
- | Condition | HTTP Status | Error Code | Expected Behavior |
141
- |---|---|---|---|
142
- | Invalid payload | 400 | `VALIDATION_ERROR` | Return field errors |
143
- | Cross-tenant attempt | 403 / 404 | `FORBIDDEN` | Mask existence or block |
144
- | Duplicate invariant | 409 | `CONFLICT` | Prevent double-submission |
145
- ```
146
-
147
- ---
148
-
149
- ## 5. Subdirectories & Progressive Resources
150
- - [references/invest_checklist.md](./references/invest_checklist.md): Checklist for evaluating user stories against Bill Wake's INVEST criteria and cake-slicing rules.
151
- - [references/smart_tasks.md](./references/smart_tasks.md): Guide and patterns for breaking stories into SMART developer tasks.
152
- - [references/backlog_ordering_techniques.md](./references/backlog_ordering_techniques.md): Matrix and decision trees for Kano, MoSCoW, RICE, and Buy a Feature.
153
- - [references/okr_alignment_guide.md](./references/okr_alignment_guide.md): Framework for authoring Objectives, Key Results, and connecting them to Product Goals.
154
- - [references/gherkin_patterns.md](./references/gherkin_patterns.md): Reusable Gherkin scenario patterns for REST APIs and UI interactions.
1
+ ---
2
+ name: product-analyst
3
+ description: Use when analyzing product requirements, aligning features with OKRs and Product Goals, prioritizing backlogs with Kano/MoSCoW/RICE, decomposing epics into INVEST user stories and SMART tasks, authoring Gherkin Given-When-Then acceptance criteria, or mapping domain models and failure edge cases. Do not use for writing application code, debugging implementation bugs, or running tests.
4
+ ---
5
+
6
+ # Product Analyst & Requirements Architect Skill
7
+
8
+ > **Core Purpose:** Bridge strategic business intent and engineering execution by grounding feature requirements in OKRs, maximizing product value via empirical backlog ordering (Kano, MoSCoW, RICE), and decomposing scope into vertically sliced INVEST user stories with Gherkin acceptance criteria and SMART developer tasks.
9
+
10
+ ---
11
+
12
+ ## 1. When to Use This Skill
13
+ - Decomposing a broad business request, feature idea, or PRD into actionable vertical slices.
14
+ - Evaluating alignment with strategic **Objectives & Key Results (OKRs)** and the overarching **Product Goal**.
15
+ - Ordering and prioritizing Product Backlog items using **Kano**, **MoSCoW**, **RICE**, or **Buy a Feature**.
16
+ - Distinguishing user-facing stories from non-story requirements (system invariants, NFRs, architectural spikes).
17
+ - Formulating Gherkin acceptance tests before kicking off Outside-In TDD.
18
+ - Decomposing INVEST stories into actionable, time-boxed **SMART developer tasks**.
19
+ - Establishing Ubiquitous Language definitions for new domain models.
20
+
21
+ ---
22
+
23
+ ## 2. Step-by-Step Analysis Workflow
24
+
25
+ ```
26
+ 1. OKR & Goal Alignment ──► 2. Backlog Triage & Ordering ──► 3. Story vs. NFR Classification ──► 4. INVEST Stories & Gherkin ──► 5. SMART Tasks & Edge Cases
27
+ ```
28
+
29
+ ### Step 1: Align with OKRs & the Product Goal
30
+ - **Product Goal Validation:** Verify how this feature advances the long-term Product Goal.
31
+ - **OKR Mapping:** Map the feature to a specific **Objective** (qualitative "what") and its associated **Key Results** (quantitative "how").
32
+ - **Satisfaction Gap Check:** Identify which customer pain point or satisfaction gap is addressed:
33
+ $$\text{Satisfaction Gap} = \text{Desired Customer Experience} - \text{Current Customer Experience}$$
34
+ - **Deciding What NOT to Do:** Explicitly identify and eliminate speculative, low-impact sub-features.
35
+
36
+ ### Step 2: Prioritize via Backlog Ordering Models
37
+ Consult [`references/backlog_ordering_techniques.md`](./references/backlog_ordering_techniques.md) to apply the optimal prioritization model:
38
+ - **Kano Model:** Classify as *Must-be* (table stakes), *Performance* (linear satisfaction), or *Attractive* (delighter). Reject *Indifferent* or *Reverse* items.
39
+ - **MoSCoW:** Categorize into *Must*, *Should*, *Could*, or *Won't have this time*.
40
+ - **RICE Scoring:** Compute $(Reach \times Impact \times Confidence) / Effort$ to break ranking ties objectively.
41
+
42
+ ### Step 3: Classify User Stories vs. Non-Story Requirements
43
+ Recognize that **user stories are not requirements**, but a technique to express them:
44
+ - **User Story (3 C's: Card, Conversation, Confirmation):** Fits user-facing features where customer/business perspective is translated into software behavior via a "pidgin language".
45
+ - **Non-Story Requirements:** If the requirement represents a system invariant, data integrity rule, security policy (OWASP), latency SLA, or an architectural spike, model it directly as a technical specification, architectural fitness test, or spike task rather than forcing an artificial `"As a user..."` persona.
46
+
47
+ ### Step 4: Author User Stories (INVEST Framework & Vertical Cake Slicing)
48
+ Ensure every user story conforms to Bill Wake's **INVEST** criteria:
49
+ - **Independent:** Sliced vertically through all layers (UI ➔ API ➔ Domain ➔ DB) without circular dependencies.
50
+ - **Negotiable:** Captures essence and value, leaving implementation details open for pairing co-creation.
51
+ - **Valuable:** Delivers observable benefit to the customer or business stakeholder.
52
+ - **Estimable:** Right-sized and bounded. Spikes used for major unknowns.
53
+ - **Small:** Sized to be completable in 1–2 development days.
54
+ - **Testable:** Accompanied by executable, unambiguous Gherkin acceptance criteria.
55
+
56
+ **The Multi-Layer Cake Rule & UI Integration:**
57
+ - **Never slice horizontally** (e.g. *"Create database schema only"* or *"Create backend API only"*). Always slice vertically through the full stack so that every story delivers working software.
58
+ - **Mandatory UI/UX Triage Gate for User-Facing Applications:** If the project has a frontend or user interface (Fullstack Web SaaS, Extension, Desktop), execute the **7-Pillar Design Architecture Triage Gate** ([`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md)) before finalizing stories:
59
+ 1. *Role & Identity:* Define who the user is and their operational boundary.
60
+ 2. *Information Architecture:* Define how the view fits into the Persistent App Shell vs Dynamic Canvas.
61
+ 3. *Experience Duality:* Clarify whether the screen belongs to an Enterprise Operator Workspace or Consumer Portal.
62
+ 4. *Navigation & Wayfinding:* Specify sidebar route, active tab, breadcrumbs, and command palette entries.
63
+ 5. *State & URL Synchronization:* Specify query params (`?tab=`, `?q=`, `?page=`, `?modal=`).
64
+ 6. *Access Control:* Specify route guards and permission checks.
65
+ 7. *Accessibility & Feedback:* Specify accessible notifications, focus trapping, and zero native alerts.
66
+ - **Every user-facing story MUST specify:** (1) The UI view/component & user interaction, (2) The API Command/Query DTO, (3) The core domain invariant, and (4) The persistence change.
67
+
68
+ ### Step 5: Decompose Stories into SMART Developer Tasks
69
+ For engineering execution, translate INVEST user stories into Bill Wake's **SMART** developer tasks:
70
+ - **S - Specific:** Unambiguous scope without conceptual overlap.
71
+ - **M - Measurable:** Clear pass/fail criteria (tests pass, clean code, DoD met).
72
+ - **A - Achievable:** Realistically executable; triggers early help request if blocked.
73
+ - **R - Relevant:** Justified by direct contribution to parent story.
74
+ - **T - Time-boxed:** Limited to 2–4 hours (never exceeding 1 day).
75
+
76
+ ### Step 6: Construct the Edge Case & Failure Matrix
77
+ Map all failure paths to HTTP status codes (`400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`) and RFC 9457 problem details.
78
+
79
+ ---
80
+
81
+ ## 3. Gotchas & What NOT to Do
82
+
83
+ - **DO NOT** confuse output (features shipped, story points burned) with outcome (value delivered, satisfaction gap closed).
84
+ - **DO NOT** write horizontal, technical user stories (e.g., *"As a developer, I want a database table"* or *"As an API, I want a REST endpoint"*).
85
+ - **DO NOT** author backend-only user stories or ignore the UI when analyzing a user-facing system. If the system has a web frontend or client interface, slicing must start with user interactions and views.
86
+ - **DO NOT** force technical constraints, security policies, or infrastructure upgrades into user story syntax. Treat them as non-story requirements or architectural spikes.
87
+ - **DO NOT** omit the Out-of-Scope ("Won't Have this time") section. Lack of negative boundaries causes runaway scope bloat.
88
+ - **DO NOT** allow developer tasks to be open-ended without a measurable time-box. If a task exceeds 4 hours, it must be split or paired.
89
+ - **DO NOT** skip failure paths in Gherkin scenarios. Happy-path-only requirements lead to production defects.
90
+
91
+ ---
92
+
93
+ ## 4. Structured Output Template
94
+
95
+ ```markdown
96
+ # Product Specification: [Feature Name]
97
+
98
+ ## 1. Strategic Alignment & Product Goal
99
+ - **Product Goal:** [Target milestone / commitment]
100
+ - **Target OKR:**
101
+ - **Objective:** [Qualitative, inspiring What]
102
+ - **Key Result(s):** [Quantitative, measurable outcome How]
103
+ - **Target Satisfaction Gap:** [Customer pain point addressed]
104
+ - **Prioritization Category:** [Kano: Must-be / Performance / Attractive | MoSCoW: Must / Should | RICE Score: X]
105
+
106
+ ## 2. In-Scope vs. Out-of-Scope (Non-Goals)
107
+ - **In-Scope (Must/Should):** ...
108
+ - **Out-of-Scope (Won't Have This Time):** ...
109
+
110
+ ## 3. Ubiquitous Language & Entity Relationships
111
+ - **[Term 1]**: [Definition grounded in domain invariants]
112
+ - **[Term 2]**: [Definition grounded in domain invariants]
113
+
114
+ ## 4. User Stories & Gherkin Acceptance Scenarios
115
+
116
+ ### US-01: [User Story Title]
117
+ **As a** [role]
118
+ **I want to** [action]
119
+ **So that** [value]
120
+
121
+ ```gherkin
122
+ Scenario: [Happy path]
123
+ Given ...
124
+ When ...
125
+ Then ...
126
+
127
+ Scenario: [Edge case / Failure path]
128
+ Given ...
129
+ When ...
130
+ Then ...
131
+ ```
132
+
133
+ ## 5. SMART Developer Tasks (Inner-Loop Breakdown)
134
+ - [ ] **Task 1 [Specific & Time-boxed: 2h]:** [Technical description, e.g. Domain entity and value object invariants with unit test RED-GREEN]
135
+ - [ ] **Task 2 [Specific & Time-boxed: 3h]:** [Use case & secondary repository implementation with integration tests]
136
+ - [ ] **Task 3 [Specific & Time-boxed: 2h]:** [HTTP controller endpoint & RFC 9457 error handling]
137
+ - [ ] **Task 4 [Specific & Time-boxed: 3h]:** [UI view integration, TanStack query hooks, accessible Radix primitives]
138
+
139
+ ## 6. Edge Case & Error Response Matrix
140
+ | Condition | HTTP Status | Error Code | Expected Behavior |
141
+ |---|---|---|---|
142
+ | Invalid payload | 400 | `VALIDATION_ERROR` | Return field errors |
143
+ | Cross-tenant attempt | 403 / 404 | `FORBIDDEN` | Mask existence or block |
144
+ | Duplicate invariant | 409 | `CONFLICT` | Prevent double-submission |
145
+ ```
146
+
147
+ ---
148
+
149
+ ## 5. Subdirectories & Progressive Resources
150
+ - [references/invest_checklist.md](./references/invest_checklist.md): Checklist for evaluating user stories against Bill Wake's INVEST criteria and cake-slicing rules.
151
+ - [references/smart_tasks.md](./references/smart_tasks.md): Guide and patterns for breaking stories into SMART developer tasks.
152
+ - [references/backlog_ordering_techniques.md](./references/backlog_ordering_techniques.md): Matrix and decision trees for Kano, MoSCoW, RICE, and Buy a Feature.
153
+ - [references/okr_alignment_guide.md](./references/okr_alignment_guide.md): Framework for authoring Objectives, Key Results, and connecting them to Product Goals.
154
+ - [references/gherkin_patterns.md](./references/gherkin_patterns.md): Reusable Gherkin scenario patterns for REST APIs and UI interactions.
@@ -1,107 +1,107 @@
1
- # Product Backlog Ordering & Prioritization Techniques
2
-
3
- > **Core Concept:** Prioritizing product backlog items (PBIs) requires disciplined, objective frameworks rather than arbitrary stakeholder pressure. Use this guide to select and apply the right prioritization technique for the product stage.
4
-
5
- ---
6
-
7
- ## 1. Prioritization Framework Comparison Matrix
8
-
9
- | Framework | Primary Focus | Best Used When... | Key Metric / Input |
10
- |---|---|---|---|
11
- | **The Kano Model** | Customer emotional satisfaction vs. investment level | Discovering baseline expectations vs. competitive differentiators | Functional vs. Dysfunctional customer responses |
12
- | **MoSCoW** | Release scope packaging & non-negotiable boundaries | Planning fixed-date releases or MVP feature gating | Critical path vs. optional enhancements |
13
- | **RICE Scoring** | Objective algorithmic ranking based on measurable impact | Resolving prioritization disputes across diverse feature requests | $(Reach \times Impact \times Confidence) / Effort$ |
14
- | **Buy a Feature** | Stakeholder consensus under budget constraints | Engaging cross-functional stakeholders or customer advisory boards | Constrained allocation of currency |
15
-
16
- ---
17
-
18
- ## 2. The Kano Model
19
-
20
- Categorizes features based on how customer satisfaction correlates with implementation completeness:
21
-
22
- ```
23
- Satisfaction (Delighted)
24
- ▲
25
- │ Attractive (Delighters)
26
- │ /
27
- │ / Performance (Linear)
28
- │ / /
29
- │ / /
30
- │ / /
31
- ──────────┼────/────/────────────────────────► Completeness (Invested)
32
- │ / /
33
- │ / /
34
- │ / / Must-be (Basic Expectations)
35
- │/____/
36
- ▼
37
- Dissatisfaction (Frustrated)
38
- ```
39
-
40
- ### The 5 Kano Categories
41
- 1. **Must-be (Basic / Threshold):** Table stakes. Taken for granted when present, but causes catastrophic dissatisfaction when absent (e.g., database ACID transactions, secure authentication, password resets). *Rule: Must be fully delivered before optimizing performance.*
42
- 2. **Performance (One-Dimensional):** Satisfaction is linearly proportional to execution (e.g., faster page load, higher search speed, larger export limits). *Rule: Optimize strategically where competitive advantage exists.*
43
- 3. **Attractive (Delighters / Excitement):** Unexpected innovations that trigger disproportionate joy and buzz (e.g., instant one-click self-service onboarding, predictive issue alerts). *Rule: Include at least one delighter per major release to drive adoption.*
44
- 4. **Indifferent:** Features that customers do not care about either way. *Rule: Eliminate immediately; do not waste engineering capacity.*
45
- 5. **Reverse:** Features that actively cause frustration if added (e.g., excessive mandatory onboarding modals, invasive popups). *Rule: Avoid or remove.*
46
-
47
- ---
48
-
49
- ## 3. MoSCoW Prioritization
50
-
51
- Essential for packaging release increments and enforcing negative scope:
52
-
53
- - **Must Have (M):**
54
- - Non-negotiable core invariants.
55
- - Without this, the system cannot operate legally, securely, or fundamentally.
56
- - *Example:* "Users must be able to view their pending agreement."
57
- - **Should Have (S):**
58
- - Highly important and valuable, but not critical for launch; a temporary workaround exists.
59
- - *Example:* "Automated transactional notifications upon signing" (workaround: manual status check).
60
- - **Could Have (C):**
61
- - Desirable enhancements that provide delight, but are easily deferred if time is constrained.
62
- - *Example:* "Downloadable execution certificate with custom styling."
63
- - **Won't Have This Time (W):**
64
- - Explicitly agreed as out-of-scope for the current release. Protects the team from scope creep.
65
- - *Example:* "Multi-party commercial co-signer execution flows."
66
-
67
- ---
68
-
69
- ## 4. RICE Scoring Framework
70
-
71
- When competing stakeholder requests clash, calculate the objective RICE score:
72
-
73
- $$\text{RICE Score} = \frac{\text{Reach} \times \text{Impact} \times \text{Confidence}}{\text{Effort}}$$
74
-
75
- ### Component Definitions & Scoring Scales
76
- 1. **Reach (R):** Number of users or events impacted over a defined timeframe (e.g., per month).
77
- - *Example:* 500 active customers signing agreements per quarter $\rightarrow Reach = 500$.
78
- 2. **Impact (I):** Qualitative impact on individual users or conversion:
79
- - $3.0$ = Massive impact
80
- - $2.0$ = High impact
81
- - $1.0$ = Medium impact
82
- - $0.5$ = Low impact
83
- - $0.25$ = Minimal impact
84
- 3. **Confidence (C):** Percentage reflecting empirical backing vs. speculation:
85
- - $100\%$ = High confidence (backed by verified user interviews and analytics)
86
- - $80\%$ = Medium confidence (backed by qualitative feedback)
87
- - $50\%$ = Low confidence (speculative assumption / gut feeling)
88
- 4. **Effort (E):** Estimated development effort in person-weeks or person-sprints:
89
- - *Example:* 1 person-week of engineering $\rightarrow Effort = 1$.
90
-
91
- ### Example Calculation:
92
- - **Feature A (Digital Agreement Execution):**
93
- - $R = 500$, $I = 3.0$, $C = 100\%$, $E = 1.0 \rightarrow \text{RICE} = \frac{500 \times 3.0 \times 1.0}{1.0} = 1500$
94
- - **Feature B (Custom Dark Mode Themes):**
95
- - $R = 200$, $I = 0.5$, $C = 50\%$, $E = 2.0 \rightarrow \text{RICE} = \frac{200 \times 0.5 \times 0.5}{2.0} = 25$
96
- - *Conclusion: Feature A takes clear priority.*
97
-
98
- ---
99
-
100
- ## 5. Buy a Feature
101
-
102
- A collaborative budgeting game ideal for quarterly roadmap planning:
103
- 1. List 10–15 candidate features.
104
- 2. Price each feature proportionally to its engineering effort (e.g., Small = \$50, Medium = \$150, Large = \$400).
105
- 3. Allocate each participant (or group) a constrained budget of fictitious currency equal to roughly 50% of the total cost of all features.
106
- 4. Encourage participants to negotiate and pool their funds to "buy" the features that matter most.
107
- 5. High-priced features that get bought through shared pooling reveal true, undeniable consensus value.
1
+ # Product Backlog Ordering & Prioritization Techniques
2
+
3
+ > **Core Concept:** Prioritizing product backlog items (PBIs) requires disciplined, objective frameworks rather than arbitrary stakeholder pressure. Use this guide to select and apply the right prioritization technique for the product stage.
4
+
5
+ ---
6
+
7
+ ## 1. Prioritization Framework Comparison Matrix
8
+
9
+ | Framework | Primary Focus | Best Used When... | Key Metric / Input |
10
+ |---|---|---|---|
11
+ | **The Kano Model** | Customer emotional satisfaction vs. investment level | Discovering baseline expectations vs. competitive differentiators | Functional vs. Dysfunctional customer responses |
12
+ | **MoSCoW** | Release scope packaging & non-negotiable boundaries | Planning fixed-date releases or MVP feature gating | Critical path vs. optional enhancements |
13
+ | **RICE Scoring** | Objective algorithmic ranking based on measurable impact | Resolving prioritization disputes across diverse feature requests | $(Reach \times Impact \times Confidence) / Effort$ |
14
+ | **Buy a Feature** | Stakeholder consensus under budget constraints | Engaging cross-functional stakeholders or customer advisory boards | Constrained allocation of currency |
15
+
16
+ ---
17
+
18
+ ## 2. The Kano Model
19
+
20
+ Categorizes features based on how customer satisfaction correlates with implementation completeness:
21
+
22
+ ```
23
+ Satisfaction (Delighted)
24
+ ▲
25
+ │ Attractive (Delighters)
26
+ │ /
27
+ │ / Performance (Linear)
28
+ │ / /
29
+ │ / /
30
+ │ / /
31
+ ──────────┼────/────/────────────────────────► Completeness (Invested)
32
+ │ / /
33
+ │ / /
34
+ │ / / Must-be (Basic Expectations)
35
+ │/____/
36
+ ▼
37
+ Dissatisfaction (Frustrated)
38
+ ```
39
+
40
+ ### The 5 Kano Categories
41
+ 1. **Must-be (Basic / Threshold):** Table stakes. Taken for granted when present, but causes catastrophic dissatisfaction when absent (e.g., database ACID transactions, secure authentication, password resets). *Rule: Must be fully delivered before optimizing performance.*
42
+ 2. **Performance (One-Dimensional):** Satisfaction is linearly proportional to execution (e.g., faster page load, higher search speed, larger export limits). *Rule: Optimize strategically where competitive advantage exists.*
43
+ 3. **Attractive (Delighters / Excitement):** Unexpected innovations that trigger disproportionate joy and buzz (e.g., instant one-click self-service onboarding, predictive issue alerts). *Rule: Include at least one delighter per major release to drive adoption.*
44
+ 4. **Indifferent:** Features that customers do not care about either way. *Rule: Eliminate immediately; do not waste engineering capacity.*
45
+ 5. **Reverse:** Features that actively cause frustration if added (e.g., excessive mandatory onboarding modals, invasive popups). *Rule: Avoid or remove.*
46
+
47
+ ---
48
+
49
+ ## 3. MoSCoW Prioritization
50
+
51
+ Essential for packaging release increments and enforcing negative scope:
52
+
53
+ - **Must Have (M):**
54
+ - Non-negotiable core invariants.
55
+ - Without this, the system cannot operate legally, securely, or fundamentally.
56
+ - *Example:* "Users must be able to view their pending agreement."
57
+ - **Should Have (S):**
58
+ - Highly important and valuable, but not critical for launch; a temporary workaround exists.
59
+ - *Example:* "Automated transactional notifications upon signing" (workaround: manual status check).
60
+ - **Could Have (C):**
61
+ - Desirable enhancements that provide delight, but are easily deferred if time is constrained.
62
+ - *Example:* "Downloadable execution certificate with custom styling."
63
+ - **Won't Have This Time (W):**
64
+ - Explicitly agreed as out-of-scope for the current release. Protects the team from scope creep.
65
+ - *Example:* "Multi-party commercial co-signer execution flows."
66
+
67
+ ---
68
+
69
+ ## 4. RICE Scoring Framework
70
+
71
+ When competing stakeholder requests clash, calculate the objective RICE score:
72
+
73
+ $$\text{RICE Score} = \frac{\text{Reach} \times \text{Impact} \times \text{Confidence}}{\text{Effort}}$$
74
+
75
+ ### Component Definitions & Scoring Scales
76
+ 1. **Reach (R):** Number of users or events impacted over a defined timeframe (e.g., per month).
77
+ - *Example:* 500 active customers signing agreements per quarter $\rightarrow Reach = 500$.
78
+ 2. **Impact (I):** Qualitative impact on individual users or conversion:
79
+ - $3.0$ = Massive impact
80
+ - $2.0$ = High impact
81
+ - $1.0$ = Medium impact
82
+ - $0.5$ = Low impact
83
+ - $0.25$ = Minimal impact
84
+ 3. **Confidence (C):** Percentage reflecting empirical backing vs. speculation:
85
+ - $100\%$ = High confidence (backed by verified user interviews and analytics)
86
+ - $80\%$ = Medium confidence (backed by qualitative feedback)
87
+ - $50\%$ = Low confidence (speculative assumption / gut feeling)
88
+ 4. **Effort (E):** Estimated development effort in person-weeks or person-sprints:
89
+ - *Example:* 1 person-week of engineering $\rightarrow Effort = 1$.
90
+
91
+ ### Example Calculation:
92
+ - **Feature A (Digital Agreement Execution):**
93
+ - $R = 500$, $I = 3.0$, $C = 100\%$, $E = 1.0 \rightarrow \text{RICE} = \frac{500 \times 3.0 \times 1.0}{1.0} = 1500$
94
+ - **Feature B (Custom Dark Mode Themes):**
95
+ - $R = 200$, $I = 0.5$, $C = 50\%$, $E = 2.0 \rightarrow \text{RICE} = \frac{200 \times 0.5 \times 0.5}{2.0} = 25$
96
+ - *Conclusion: Feature A takes clear priority.*
97
+
98
+ ---
99
+
100
+ ## 5. Buy a Feature
101
+
102
+ A collaborative budgeting game ideal for quarterly roadmap planning:
103
+ 1. List 10–15 candidate features.
104
+ 2. Price each feature proportionally to its engineering effort (e.g., Small = \$50, Medium = \$150, Large = \$400).
105
+ 3. Allocate each participant (or group) a constrained budget of fictitious currency equal to roughly 50% of the total cost of all features.
106
+ 4. Encourage participants to negotiate and pool their funds to "buy" the features that matter most.
107
+ 5. High-priced features that get bought through shared pooling reveal true, undeniable consensus value.
@@ -1,46 +1,46 @@
1
- # Gherkin Scenario Patterns Reference
2
-
3
- Reusable Gherkin acceptance criteria patterns for full-stack and API features.
4
-
5
- ---
6
-
7
- ## 1. REST API CRUD Pattern
8
- ```gherkin
9
- Scenario: Successfully creating a tenant resource
10
- Given an authenticated user with role "ADMIN" in tenant "tenant-123"
11
- When the user sends a "POST" request to "/api/roles" with payload:
12
- """
13
- {
14
- "name": "Editor",
15
- "description": "Content editor role"
16
- }
17
- """
18
- Then the response status should be 201
19
- And the response body should contain the generated "id"
20
- And the role should be persisted in tenant "tenant-123"
21
- ```
22
-
23
- ---
24
-
25
- ## 2. Multi-Tenant Isolation Pattern
26
- ```gherkin
27
- Scenario: Tenant data isolation violation attempt
28
- Given an authenticated user in tenant "tenant-A"
29
- When the user sends a "GET" request to "/api/members" with header "X-Tenant-ID: tenant-B"
30
- Then the response status should be 403
31
- And the response code should be "FORBIDDEN_TENANT_ACCESS"
32
- And a security audit event should be recorded
33
- ```
34
-
35
- ---
36
-
37
- ## 3. UI Interaction & Validation Pattern
38
- ```gherkin
39
- Scenario: Submitting an invalid email address
40
- Given the user is on the login page
41
- When the user enters "invalid-email" into the email input
42
- And clicks the "Sign In" button
43
- Then an alert message "Invalid email address format" should appear
44
- And the email input should have "aria-invalid" set to "true"
45
- And no network request should be dispatched to the server
46
- ```
1
+ # Gherkin Scenario Patterns Reference
2
+
3
+ Reusable Gherkin acceptance criteria patterns for full-stack and API features.
4
+
5
+ ---
6
+
7
+ ## 1. REST API CRUD Pattern
8
+ ```gherkin
9
+ Scenario: Successfully creating a tenant resource
10
+ Given an authenticated user with role "ADMIN" in tenant "tenant-123"
11
+ When the user sends a "POST" request to "/api/roles" with payload:
12
+ """
13
+ {
14
+ "name": "Editor",
15
+ "description": "Content editor role"
16
+ }
17
+ """
18
+ Then the response status should be 201
19
+ And the response body should contain the generated "id"
20
+ And the role should be persisted in tenant "tenant-123"
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 2. Multi-Tenant Isolation Pattern
26
+ ```gherkin
27
+ Scenario: Tenant data isolation violation attempt
28
+ Given an authenticated user in tenant "tenant-A"
29
+ When the user sends a "GET" request to "/api/members" with header "X-Tenant-ID: tenant-B"
30
+ Then the response status should be 403
31
+ And the response code should be "FORBIDDEN_TENANT_ACCESS"
32
+ And a security audit event should be recorded
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 3. UI Interaction & Validation Pattern
38
+ ```gherkin
39
+ Scenario: Submitting an invalid email address
40
+ Given the user is on the login page
41
+ When the user enters "invalid-email" into the email input
42
+ And clicks the "Sign In" button
43
+ Then an alert message "Invalid email address format" should appear
44
+ And the email input should have "aria-invalid" set to "true"
45
+ And no network request should be dispatched to the server
46
+ ```