azcodr 1.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.
- package/.agents/skills/agentic-architect/SKILL.md +118 -0
- package/.agents/skills/agentic-architect/references/agents_md_template.md +59 -0
- package/.agents/skills/agentic-architect/references/refinement_workflow.md +32 -0
- package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +63 -0
- package/.agents/skills/agentic-architect/references/skill_template.md +55 -0
- package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +163 -0
- package/.agents/skills/clean-code-refactor/SKILL.md +91 -0
- package/.agents/skills/clean-code-refactor/references/clean_code_smells.md +27 -0
- package/.agents/skills/clean-code-refactor/references/design_patterns_ts.md +65 -0
- package/.agents/skills/compliance-audit/SKILL.md +120 -0
- package/.agents/skills/compliance-audit/references/owasp_top10_controls.md +16 -0
- package/.agents/skills/compliance-audit/references/soc2_iso_controls.md +28 -0
- package/.agents/skills/lets-build/SKILL.md +164 -0
- package/.agents/skills/lets-build/references/architecture_interview_matrix.md +188 -0
- package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +113 -0
- package/.agents/skills/lets-build/references/project_readme_template.md +79 -0
- package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +68 -0
- package/.agents/skills/merge-ai/SKILL.md +90 -0
- package/.agents/skills/merge-ai/scripts/audit_divergence.sh +108 -0
- package/.agents/skills/merge-ai/scripts/resolve_repo.sh +177 -0
- package/.agents/skills/product-analyst/SKILL.md +143 -0
- package/.agents/skills/product-analyst/references/backlog_ordering_techniques.md +107 -0
- package/.agents/skills/product-analyst/references/gherkin_patterns.md +46 -0
- package/.agents/skills/product-analyst/references/invest_checklist.md +38 -0
- package/.agents/skills/product-analyst/references/okr_alignment_guide.md +76 -0
- package/.agents/skills/product-analyst/references/smart_tasks.md +59 -0
- package/.agents/skills/relentless-questioner/SKILL.md +120 -0
- package/.agents/skills/relentless-questioner/references/adaptive_question_trees.md +84 -0
- package/.gitignore +20 -0
- package/AGENTS.md +119 -0
- package/LICENSE +21 -0
- package/README.md +184 -0
- package/bin/azcodr.js +151 -0
- package/docs/knowledge/dos_and_donts.md +540 -0
- package/docs/knowledge/issue_log.md +25 -0
- package/docs/knowledge/knowledge_graph.md +188 -0
- package/docs/knowledge/lessons_learned.md +107 -0
- package/docs/knowledge/ubiquitous_language.md +23 -0
- package/docs/rules/accessibility.md +31 -0
- package/docs/rules/advanced_api_patterns.md +104 -0
- package/docs/rules/agentic_configuration.md +168 -0
- package/docs/rules/api_versioning.md +128 -0
- package/docs/rules/application_security.md +23 -0
- package/docs/rules/architecture_decision_records.md +42 -0
- package/docs/rules/authentication.md +76 -0
- package/docs/rules/authorization.md +75 -0
- package/docs/rules/caching.md +52 -0
- package/docs/rules/clean_code.md +25 -0
- package/docs/rules/cloud_native.md +43 -0
- package/docs/rules/compliance.md +25 -0
- package/docs/rules/container_infrastructure.md +32 -0
- package/docs/rules/continuous_deployment.md +24 -0
- package/docs/rules/continuous_integration.md +20 -0
- package/docs/rules/continuous_learning.md +29 -0
- package/docs/rules/database_integrity.md +88 -0
- package/docs/rules/database_migrations.md +41 -0
- package/docs/rules/database_operations.md +27 -0
- package/docs/rules/database_performance.md +44 -0
- package/docs/rules/database_transactions.md +81 -0
- package/docs/rules/design_patterns.md +40 -0
- package/docs/rules/devsecops.md +33 -0
- package/docs/rules/domain_driven_design.md +84 -0
- package/docs/rules/domain_expertise.md +42 -0
- package/docs/rules/error_handling.md +39 -0
- package/docs/rules/feature_flags.md +42 -0
- package/docs/rules/gof_design_patterns_reference.md +70 -0
- package/docs/rules/multitenancy_isolation.md +86 -0
- package/docs/rules/product_ownership.md +150 -0
- package/docs/rules/project_management.md +66 -0
- package/docs/rules/react.md +88 -0
- package/docs/rules/relentless_questioning.md +48 -0
- package/docs/rules/requirements_engineering.md +113 -0
- package/docs/rules/rest_api_conventions.md +62 -0
- package/docs/rules/server_driven_ui.md +71 -0
- package/docs/rules/tenant_dynamic_schemas.md +88 -0
- package/docs/rules/tenant_pluggable_logic.md +59 -0
- package/docs/rules/test_driven_development.md +106 -0
- package/docs/rules/test_isolation.md +26 -0
- package/docs/rules/transactional_email.md +20 -0
- package/docs/rules/typescript.md +55 -0
- package/docs/rules/ui_navigation.md +20 -0
- package/docs/rules/ui_ux_architecture.md +168 -0
- package/docs/rules/upstream_synchronization.md +66 -0
- package/docs/rules/workflow_state_machines.md +118 -0
- package/docs/rules/workspace_isolation.md +25 -0
- package/lib/index.js +5 -0
- package/lib/scaffold.js +177 -0
- package/memory.md +262 -0
- package/package.json +49 -0
|
@@ -0,0 +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.
|
|
@@ -0,0 +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
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# INVEST Checklist & Vertical Slicing Reference
|
|
2
|
+
|
|
3
|
+
Use this checklist to evaluate whether a user story is ready for development, adheres to Bill Wake's original INVEST model, and embodies Ron Jeffries' 3 C's.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. The 3 C's Pre-Flight Check
|
|
8
|
+
|
|
9
|
+
- [ ] **Card:** Does the physical card or issue title capture the essential intent without drowning in premature implementation details?
|
|
10
|
+
- [ ] **Conversation:** Has there been a collaborative discussion between the Product Owner, domain expert, and engineers to co-create details and discover edge cases?
|
|
11
|
+
- [ ] **Confirmation:** Are there concrete, executable acceptance criteria (Gherkin scenarios) that prove whether the story is satisfied?
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. INVEST Evaluation Matrix
|
|
16
|
+
|
|
17
|
+
| Criterion | Evaluation Question | Pass / Fail Check |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| **I - Independent** | Can this story be scheduled, implemented, and released independently of parallel stories? Does it avoid tight coupling or circular dependency? | [ ] No blocking dependencies on concurrent in-flight stories. |
|
|
20
|
+
| **N - Negotiable** | Does the story focus on the user need and business value rather than prescribing rigid code syntax or immutable UI design? | [ ] Leaves implementation discovery and technical details open to the engineering pair. |
|
|
21
|
+
| **V - Valuable** | Is the customer value observable? Does it slice vertically through the "multi-layer cake" (UI, API, Domain, DB)? | [ ] Sliced vertically; delivers usable, working software to the end user. |
|
|
22
|
+
| **E - Estimable** | Is the scope sufficiently bounded and understood by the team to gauge complexity? | [ ] Architectural unknowns isolated; time-boxed spike completed if necessary. |
|
|
23
|
+
| **S - Small** | Is the slice small enough to be completed within 1–2 development days? | [ ] Not a multi-week epic; decomposed into fine-grained vertical increments. |
|
|
24
|
+
| **T - Testable** | Are there unambiguous pass/fail criteria? Are non-functional requirements (NFRs) operationalized as tests? | [ ] Executable Gherkin scenarios defined; verifiable via automated acceptance tests. |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 3. The Multi-Layer Cake Slicing Test
|
|
29
|
+
|
|
30
|
+
When decomposing epics into stories, visualize a multi-layer cake with presentation, business logic, domain entities, and persistence layers.
|
|
31
|
+
|
|
32
|
+
### Slicing Violations (Reject immediately)
|
|
33
|
+
- ❌ *"Create database migration and table schema for resources"* (Horizontal layer: Zero customer value).
|
|
34
|
+
- ❌ *"Build UI form components for resource review"* (Horizontal layer: Dummy mock with zero persistence).
|
|
35
|
+
- ❌ *"Write backend REST controller for submitting actions"* (Horizontal layer: Orphaned API endpoint).
|
|
36
|
+
|
|
37
|
+
### Slicing Success (Accept)
|
|
38
|
+
- ✅ *"Self-service resource review and approval execution"* (Vertical slice: User reviews terms in UI ➔ Submits confirmation ➔ API verifies actor ➔ Domain validates state invariants ➔ Record persisted with audit trail ➔ Transactional confirmation notification dispatched).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# OKR Alignment & Product Goal Formulation Guide
|
|
2
|
+
|
|
3
|
+
> **Core Concept:** Connect high-level business strategy to agile sprint execution using the Objectives and Key Results (OKR) framework (pioneered by Andy Grove at Intel, popularized by John Doerr, and standardized by the OKR Institute).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. The Strategic Hierarchy
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Company Vision & Strategy
|
|
11
|
+
│
|
|
12
|
+
▼
|
|
13
|
+
Strategic OKRs (Annual / Quarterly)
|
|
14
|
+
│
|
|
15
|
+
▼
|
|
16
|
+
Product Goal (Long-Term Commitment per Scrum Guide)
|
|
17
|
+
│
|
|
18
|
+
▼
|
|
19
|
+
Product Backlog Items (Kano / MoSCoW / RICE ordered)
|
|
20
|
+
│
|
|
21
|
+
▼
|
|
22
|
+
Sprint Goal (Tactical Incremental Commitment)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Anatomy of an Effective OKR
|
|
28
|
+
|
|
29
|
+
### Objective (O)
|
|
30
|
+
- **Definition:** A qualitative, memorable, inspiring, and time-bound statement defining **WHAT** the team wants to achieve.
|
|
31
|
+
- **Criteria:**
|
|
32
|
+
- Aggressive yet realistic (aiming for 70% achievement on stretch goals).
|
|
33
|
+
- Concise and easy for anyone on the team to recite.
|
|
34
|
+
- Concrete and action-oriented.
|
|
35
|
+
- Free from numeric metrics (numbers belong in Key Results).
|
|
36
|
+
|
|
37
|
+
### Key Results (KRs)
|
|
38
|
+
- **Definition:** 2 to 5 quantitative, outcome-driven metrics defining **HOW** progress toward the Objective is measured.
|
|
39
|
+
- **Criteria:**
|
|
40
|
+
- Must measure **Outcomes** (changes in customer behavior, business performance, or operational velocity), **NEVER Activities or Outputs**.
|
|
41
|
+
- Must be measurable with a clear baseline and target (e.g., *from X to Y*).
|
|
42
|
+
- Verifiable with objective data.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 3. The OKR vs. Activity Trap
|
|
47
|
+
|
|
48
|
+
| Faulty Activity Key Result (Anti-Pattern) | Outcome-Driven Key Result (Golden Standard) |
|
|
49
|
+
|---|---|
|
|
50
|
+
| ❌ "Build the digital contract execution feature" | ✅ "Increase contract completion rate from 45% to 85%" |
|
|
51
|
+
| ❌ "Deploy payment integration with Stripe" | ✅ "Reduce overdue invoice settlements by 40% through self-service digital payments" |
|
|
52
|
+
| ❌ "Write 20 user stories for support tickets" | ✅ "Decrease average time-to-first-response on critical incidents from 24h to 2h" |
|
|
53
|
+
| ❌ "Send marketing emails to 5,000 customers" | ✅ "Achieve an 80% self-service portal adoption rate within 30 days of registration" |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 4. OKRs vs. KPIs
|
|
58
|
+
|
|
59
|
+
| Dimension | Key Performance Indicators (KPIs) | Objectives & Key Results (OKRs) |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| **Role in Business** | Health monitoring ("Dashboard gauges" / "Vital signs"). | Strategic vehicle for change and transformation. |
|
|
62
|
+
| **Question Answered** | *"Are our ongoing systems and processes running smoothly?"* | *"What critical breakthrough must we achieve next?"* |
|
|
63
|
+
| **Measurement Target** | Maintain within normal operating limits (e.g., 99.9% uptime, latency < 100ms). | Stretch beyond status quo (e.g., expand into 3 new markets, 2x conversion). |
|
|
64
|
+
| **Action on Deficit** | Remedial maintenance / incident response. | Strategic pivot, retrospective root cause analysis. |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 5. Formulating the Product Goal from Strategic OKRs
|
|
69
|
+
|
|
70
|
+
In Scrum, the **Product Goal** describes a future state of the product which can serve as a target for the Scrum Team to plan against. The Product Goal is in the Product Backlog. The rest of the Product Backlog emerges to define "what" will fulfill the Product Goal.
|
|
71
|
+
|
|
72
|
+
### Product Goal Formulation Template
|
|
73
|
+
> **"For [target user segment], our product will [core capability / transformation], enabling [measurable business outcome], verified by [primary Key Result]."**
|
|
74
|
+
|
|
75
|
+
#### Example:
|
|
76
|
+
> *"For enterprise operators and self-service customers, our platform will eliminate manual paper-based onboarding and invoice reconciliation by providing an instant, self-service digital portal, verified by achieving an end-to-end customer activation time of under 24 hours with zero manual administrative overhead."*
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# SMART Developer Tasks Reference
|
|
2
|
+
|
|
3
|
+
> **Core Concept:** While user stories represent customer-facing value (evaluated via the **INVEST** model), engineering execution requires breaking each story down into technical developer tasks. Apply Bill Wake's **SMART** acronym to ensure tasks are clear, bounded, and actionable.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. The SMART Developer Task Framework
|
|
8
|
+
|
|
9
|
+
| Letter | Attribute | Description & Quality Standard | Anti-Pattern to Avoid |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| **S** | **Specific** | The task scope is crystal clear and bounded. Everyone on the team understands exactly what needs to be created or modified. | Vague tasks like *"Fix auth issues"* or *"Refactor backend"*. |
|
|
12
|
+
| **M** | **Measurable** | Answers: *"Can we objectively mark it as done?"* Completion requires working behavior, automated tests passing, clean code, and zero lint/type errors. | Tasks marked "done" when code is written but tests are unwritten or failing. |
|
|
13
|
+
| **A** | **Achievable** | The developer or pair has the capability, permissions, and tools to complete it. Team norm: anyone can ask for help immediately without stigma. | Assigning a complex cryptographic or database optimization task without necessary context or pairing support. |
|
|
14
|
+
| **R** | **Relevant** | The task directly contributes to delivering the parent user story. Every developer task must be justifiable to the customer's value proposition. | Building gold-plated utility libraries, speculative abstractions, or unrequested features. |
|
|
15
|
+
| **T** | **Time-Boxed** | The task has an explicit bounded duration expectation (typically 2–4 hours, never exceeding 1 working day). Exceeding the time-box triggers a pause, task splitting, or pairing. | Open-ended tasks that span multiple days without intermediate commits or observable progress. |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 2. Example: Decomposing an INVEST Story into SMART Tasks
|
|
20
|
+
|
|
21
|
+
### Parent Story: Customer Digital Agreement Execution
|
|
22
|
+
- **Story Description:** *As an approved prospective customer, I want to review my agreement terms and digitally execute the contract in the portal, so that my subscription becomes active immediately.*
|
|
23
|
+
|
|
24
|
+
### Decomposed SMART Tasks:
|
|
25
|
+
|
|
26
|
+
#### Task 1: Domain Entity Invariants & Digital Signature Value Object
|
|
27
|
+
- **Specific:** Add `Signature` value interface to `Agreement` entity; validate signer name presence and actor ID consistency in `Agreement.sign()`.
|
|
28
|
+
- **Measurable:** 100% unit test coverage in `agreement_domain.test.ts` testing valid signatures, empty signer name throws, and unauthorized actor rejection.
|
|
29
|
+
- **Achievable:** Developer familiar with TypeScript domain models and Vitest.
|
|
30
|
+
- **Relevant:** Core business invariant required to make digital execution legally defensible.
|
|
31
|
+
- **Time-Boxed:** 2 hours.
|
|
32
|
+
|
|
33
|
+
#### Task 2: Persistence Schema Evolution & Repository Implementation
|
|
34
|
+
- **Specific:** Add `termsJson` and `signatureJson` to persistence schema; update repository to serialize/deserialize signature JSON.
|
|
35
|
+
- **Measurable:** Database schema sync clean; repository integration tests pass; round-trip serialization verified.
|
|
36
|
+
- **Achievable:** Standard persistence repository workflow in monorepo.
|
|
37
|
+
- **Relevant:** Persists the legal audit trail in the primary database.
|
|
38
|
+
- **Time-Boxed:** 2 hours.
|
|
39
|
+
|
|
40
|
+
#### Task 3: Use Case State Transition & Async Event Notification
|
|
41
|
+
- **Specific:** Add `signAgreement()` to `AgreementUseCase`; enqueue `agreement.signed` on `JobQueuePort`; register event handler in `EventNotificationDispatcher` to send confirmation notification.
|
|
42
|
+
- **Measurable:** Integration test verifies confirmation notification delivery to customer upon signing; tests green.
|
|
43
|
+
- **Achievable:** Uses existing `JobQueuePort` and notification adapters.
|
|
44
|
+
- **Relevant:** Provides transactional transparency to both customer and operator.
|
|
45
|
+
- **Time-Boxed:** 3 hours.
|
|
46
|
+
|
|
47
|
+
#### Task 4: REST API Endpoint & Error Handling
|
|
48
|
+
- **Specific:** Add `POST /api/v1/agreements/:id/sign` route to HTTP controller; validate request body; return RFC 7807 problem details on failure.
|
|
49
|
+
- **Measurable:** API acceptance tests pass; covers 200, 400 (validation), 404 (not found).
|
|
50
|
+
- **Achievable:** Standard HTTP controller pattern.
|
|
51
|
+
- **Relevant:** Exposes digital signing capability to web clients.
|
|
52
|
+
- **Time-Boxed:** 2 hours.
|
|
53
|
+
|
|
54
|
+
#### Task 5: Consumer Portal UI Integration & Document Download
|
|
55
|
+
- **Specific:** Connect `CustomerAgreementPage.tsx` to TanStack `useMutation`; build terms review section, legal acknowledgment checkbox, typed signature modal, and receipt download.
|
|
56
|
+
- **Measurable:** Component builds without TypeScript errors; visual smoke test verifies interactive signing workflow.
|
|
57
|
+
- **Achievable:** Uses existing design system and UI primitives.
|
|
58
|
+
- **Relevant:** Final customer-facing touchpoint closing the satisfaction gap.
|
|
59
|
+
- **Time-Boxed:** 3 hours.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relentless-questioner
|
|
3
|
+
description: Use when initiating a new feature, complex user story, architectural mutation, or ambiguous task to execute a context-aware relentless questioning loop that dynamically adapts subsequent questions based on user answers before planning or coding. Do not use for routine bug fixes with obvious solutions, minor typo corrections, or running tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Relentless Questioner: Context-Aware Dynamic Interrogation Skill
|
|
7
|
+
|
|
8
|
+
> **Core Purpose:** Eliminate ambiguity, hidden assumptions, and premature coding by executing an interactive, context-aware interrogation loop where every subsequent question directly adapts to the user's previous answers, producing an unambiguous Feature Alignment Specification (FAS) before implementation begins.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. When to Use This Skill
|
|
13
|
+
|
|
14
|
+
- When starting any non-trivial feature, API endpoint, or database modification.
|
|
15
|
+
- When user requirements are high-level, ambiguous, or open-ended (e.g. *"add webhook support"*, *"create billing integration"*, *"allow users to export reports"*).
|
|
16
|
+
- When a task involves conflicting architectural trade-offs (consistency vs latency, synchronous vs asynchronous).
|
|
17
|
+
- When explicitly triggered via slash command `/grill-me`, `/interrogate`, or `/relentless-questioning`.
|
|
18
|
+
- **Do NOT use for**:
|
|
19
|
+
- Routine typo fixes, dependency version bumps, or minor formatting changes.
|
|
20
|
+
- Trivial bugs where the defect, root cause, and fix are already verified and obvious.
|
|
21
|
+
- Routine test execution or build script maintenance.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Step-by-Step Execution Workflow
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
1. CLASSIFY (Detect Archetype) ──► 2. ADAPTIVE DRILL-DOWN (Chained Questions) ──► 3. RECONCILE (Rule Invariants) ──► 4. CONVERGE (Signed-Off FAS)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### Phase 1: Intent & Technical Archetype Classification
|
|
34
|
+
Upon receiving a user task or feature prompt, classify the functional archetype into one or more categories using [references/adaptive_question_trees.md](./references/adaptive_question_trees.md):
|
|
35
|
+
- **Archetype A: State Mutations & Financials** (balances, orders, payments, inventories)
|
|
36
|
+
- **Archetype B: Multi-Tenancy & Authorization** (tenant boundaries, custom fields, permissions)
|
|
37
|
+
- **Archetype C: Asynchronous & Event Streaming** (background jobs, webhooks, queues, pub/sub)
|
|
38
|
+
- **Archetype D: 3rd-Party & External Integrations** (external APIs, payment gateways, mailers)
|
|
39
|
+
- **Archetype E: Read Performance & Search** (dashboards, aggregations, high-scale read traffic)
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Phase 2: Context-Aware Dynamic Interrogation
|
|
44
|
+
Do NOT dump a massive 20-question static checklist. Execute the interview in **dynamic batches of 2–3 questions**:
|
|
45
|
+
|
|
46
|
+
1. **Initial Archetype Branch**: Ask the foundational branching questions for the detected archetype.
|
|
47
|
+
2. **Contextual Chaining (The Adaptive Rule)**:
|
|
48
|
+
- Carefully parse the user's response.
|
|
49
|
+
- **Every subsequent question MUST build on the previous answer**:
|
|
50
|
+
`"Because you specified [Choice A], how should we handle [Specific Consequence / Failure Mode B]?"`
|
|
51
|
+
- If the user selects a synchronous API integration, branch into timeouts and circuit breakers; do NOT ask about background queue retries.
|
|
52
|
+
- If the user selects an asynchronous queue, branch into at-least-once delivery, idempotency, and dead-letter queues.
|
|
53
|
+
3. **Negative Scope Interrogation**:
|
|
54
|
+
- Always ask: *"What is explicitly OUT OF SCOPE for this initial increment (Non-Goals)?"*
|
|
55
|
+
4. **Error Matrix Interrogation**:
|
|
56
|
+
- Always ask: *"What are the expected client and server error states and corresponding status codes?"*
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### Phase 3: Architectural Friction & Rule Reconciliation
|
|
61
|
+
Check the user's proposed answers against the **47 Atomic Domain Rules** in `docs/rules/`:
|
|
62
|
+
- If the user proposes writing to the database and publishing an event sequentially ➔ **Flag the dual-write anti-pattern** and mandate the Transactional Outbox pattern ([`database_transactions.md`](../../../docs/rules/database_transactions.md)).
|
|
63
|
+
- If the user proposes storing tenant data without an isolation mechanism ➔ **Flag the tenant leak risk** and mandate an isolation model ([`multitenancy_isolation.md`](../../../docs/rules/multitenancy_isolation.md)).
|
|
64
|
+
- If the user proposes arbitrary untrusted script execution ➔ **Flag the host security vulnerability** and mandate Wasm sandboxing ([`tenant_pluggable_logic.md`](../../../docs/rules/tenant_pluggable_logic.md)).
|
|
65
|
+
- Reconcile the conflict collaboratively before proceeding.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### Phase 4: Convergence & Feature Alignment Specification (FAS)
|
|
70
|
+
Synthesize the answers into an unambiguous **Feature Alignment Specification (FAS)** using the template in Section 4.
|
|
71
|
+
**STOP AND ASK FOR CONFIRMATION**: Present the FAS to the user and obtain explicit sign-off before writing any production code or plans.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 3. Gotchas & What NOT to Do
|
|
76
|
+
|
|
77
|
+
- **DO NOT** use static checklists that ignore user responses. Every question turn must reflect the user's prior answers.
|
|
78
|
+
- **DO NOT** ask 10+ questions at once. Keep batches small (2–3 questions) to maintain a collaborative conversation.
|
|
79
|
+
- **DO NOT** start coding or planning in parallel while the interrogation is in progress.
|
|
80
|
+
- **DO NOT** let the user bypass critical failure branches (e.g. *"we'll handle errors later"*). Insist on defining failure states.
|
|
81
|
+
- **DO NOT** compromise on the 41 atomic rules. If a user request introduces an architectural violation, surface it immediately.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 4. Structured Output Templates
|
|
86
|
+
|
|
87
|
+
### Feature Alignment Specification (FAS) Template
|
|
88
|
+
```markdown
|
|
89
|
+
# Feature Alignment Specification (FAS): [Feature Name]
|
|
90
|
+
|
|
91
|
+
## 1. Domain Purpose & Value
|
|
92
|
+
- **User Story:** As a [role], I want [capability], so that [benefit].
|
|
93
|
+
- **Core Invariant:** [Immutable business rule that must never be violated].
|
|
94
|
+
|
|
95
|
+
## 2. Technical Decisions & Boundaries
|
|
96
|
+
- **Interaction Archetype:** [Mutating / Read-Only / Async Event / 3rd-Party]
|
|
97
|
+
- **Tenant Isolation Model:** [AST Interceptor / DB RLS / Schema / Instance]
|
|
98
|
+
- **Transaction Boundary:** [Isolation level, timeouts, Outbox requirements]
|
|
99
|
+
- **Port/Adapter Boundary:** [Project-owned interface for any external dependency]
|
|
100
|
+
|
|
101
|
+
## 3. Negative Scope (Non-Goals)
|
|
102
|
+
- [Explicitly excluded feature 1]
|
|
103
|
+
- [Explicitly excluded feature 2]
|
|
104
|
+
|
|
105
|
+
## 4. Error & Edge Case Matrix
|
|
106
|
+
| Scenario | Error Code | HTTP / RPC Status | Recovery Action |
|
|
107
|
+
|---|---|---|---|
|
|
108
|
+
| [Scenario 1] | `RESOURCE_CONFLICT` | 409 Conflict | Return latest version |
|
|
109
|
+
| [Scenario 2] | `TENANT_NOT_FOUND` | 404 Not Found | Terminate request |
|
|
110
|
+
|
|
111
|
+
## 5. Verification & Acceptance Criteria
|
|
112
|
+
- **Outside-In Acceptance Scenario (Gherkin):**
|
|
113
|
+
```gherkin
|
|
114
|
+
Scenario: [Name]
|
|
115
|
+
Given [Precondition]
|
|
116
|
+
When [Action]
|
|
117
|
+
Then [Observable Outcome]
|
|
118
|
+
```
|
|
119
|
+
- **Test Strategy:** [Contract / Integration / Unit tests required for 100% coverage]
|
|
120
|
+
```
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Adaptive Questioning Trees & Contextual Branching Matrices
|
|
2
|
+
|
|
3
|
+
> **Core Purpose:** Detailed decision trees for the `relentless-questioner` skill, demonstrating how subsequent questions adapt dynamically based on previous user responses.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Decision Tree 1: Mutating Operations & State Changes
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
flowchart TD
|
|
11
|
+
Q1["Does the operation mutate database state?"]
|
|
12
|
+
Q1 -->|Yes| Q2["Does it involve multiple tables, monetary balances, or inventory?"]
|
|
13
|
+
Q1 -->|No / Read Only| Q_Read["Branch: Read Performance & Consistency"]
|
|
14
|
+
|
|
15
|
+
Q2 -->|Yes: Financial / Inventory| Q_Acid["1. Transaction Isolation: REPEATABLE READ or SERIALIZABLE?\n2. Lock Ordering: How to prevent deadlocks?\n3. Concurrency: Optimistic Concurrency Control (version) or pessimistic locking?"]
|
|
16
|
+
Q2 -->|No: Standard Entity CRUD| Q_Crud["1. Soft delete or hard delete?\n2. Unique constraints across tenant?\n3. Cascading relations?"]
|
|
17
|
+
|
|
18
|
+
Q_Acid --> Q3["Does the mutation emit domain events or notify external systems?"]
|
|
19
|
+
Q_Crud --> Q3
|
|
20
|
+
|
|
21
|
+
Q3 -->|Yes| Q_Outbox["How is the dual-write avoided?\n(Enforce Transactional Outbox pattern before broker publish)"]
|
|
22
|
+
Q3 -->|No| Q4["Idempotency: Is an Idempotency-Key header required to guard against network retries?"]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Decision Tree 2: Multi-Tenancy & Authorization Boundaries
|
|
28
|
+
|
|
29
|
+
```mermaid
|
|
30
|
+
flowchart TD
|
|
31
|
+
Q1["Who executes this action and across which boundary?"]
|
|
32
|
+
Q1 -->|End User via Web/API| Q_Auth["1. What roles are permitted (ADMIN, MEMBER, CUSTOMER)?\n2. Are dynamic ABAC attributes involved (e.g. order value threshold)?\n3. Can a user act across multiple tenants (switch tenant)?"]
|
|
33
|
+
Q1 -->|System / Background Job| Q_Worker["1. How is tenant context established without an HTTP session?\n2. What service principal / token credentials are used?"]
|
|
34
|
+
|
|
35
|
+
Q_Auth --> Q2["What happens if an unauthorized tenant accesses this resource ID?"]
|
|
36
|
+
Q2 --> Q_Sec["1. Return 404 Not Found (enumeration masking) or 403 Forbidden?\n2. Is isolation enforced at the DB layer (RLS / AST interceptor)?"]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Decision Tree 3: External Integrations & 3rd-Party APIs
|
|
42
|
+
|
|
43
|
+
```mermaid
|
|
44
|
+
flowchart TD
|
|
45
|
+
Q1["Does the feature integrate with an external SaaS or network endpoint?"]
|
|
46
|
+
Q1 -->|Yes| Q2["What is the failure tolerance of the integration?"]
|
|
47
|
+
|
|
48
|
+
Q2 -->|Synchronous / Critical| Q_Sync["1. What is the strict HTTP timeout (e.g. 3000ms)?\n2. What is the circuit breaker threshold before fast-failing?\n3. What fallback response is served if the 3rd-party is down?"]
|
|
49
|
+
Q2 -->|Asynchronous / Event-Driven| Q_Async["1. Does the external system provide webhooks?\n2. How are webhook signatures cryptographically verified?\n3. What is the retry backoff and dead-letter queue (DLQ) policy?"]
|
|
50
|
+
|
|
51
|
+
Q_Sync --> Q_Port["How is the external SDK isolated?\n(Enforce application-owned Port interface so domain never imports SDK)"]
|
|
52
|
+
Q_Async --> Q_Port
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Decision Tree 4: Read Performance, Caching & Search
|
|
58
|
+
|
|
59
|
+
```mermaid
|
|
60
|
+
flowchart TD
|
|
61
|
+
Q1["What is the expected read volume and latency requirement?"]
|
|
62
|
+
Q1 -->|High Volume / Sub-50ms Latency| Q2["Is stale data acceptable for seconds/minutes?"]
|
|
63
|
+
|
|
64
|
+
Q2 -->|Yes| Q_Cache["1. What is the cache TTL and jitter window?\n2. What domain events trigger cache eviction?\n3. Is probabilistic early expiration (XFetch) needed?"]
|
|
65
|
+
Q2 -->|No: Strict Read-After-Write Consistency| Q_Consistent["1. Read from primary database instance for 2s after mutation\n2. Bypass read replicas during write session"]
|
|
66
|
+
|
|
67
|
+
Q_Cache --> Q_Page["Pagination Strategy: Enforce keyset/cursor pagination over OFFSET"]
|
|
68
|
+
Q_Consistent --> Q_Page
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Contextual Follow-Up Patterns
|
|
74
|
+
|
|
75
|
+
When conducting the interview, use this exact syntax pattern to chain questions adaptively:
|
|
76
|
+
|
|
77
|
+
1. **Acknowledge and Pin Previous Answer**:
|
|
78
|
+
`"Understood, you specified [Option A] for [Requirement X]."`
|
|
79
|
+
2. **Surface Immediate Architectural Implication**:
|
|
80
|
+
`"Because of [Option A], [Potential Failure / Edge Case Y] becomes the primary risk."`
|
|
81
|
+
3. **Ask Context-Dependent Question**:
|
|
82
|
+
`"How should the system behave when [Condition Y] occurs? Specifically:"`
|
|
83
|
+
- *Sub-question 1*
|
|
84
|
+
- *Sub-question 2*
|
package/.gitignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Node dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
npm-debug.log*
|
|
4
|
+
yarn-debug.log*
|
|
5
|
+
yarn-error.log*
|
|
6
|
+
|
|
7
|
+
# Test coverage
|
|
8
|
+
coverage/
|
|
9
|
+
|
|
10
|
+
# Pack tarballs
|
|
11
|
+
*.tgz
|
|
12
|
+
|
|
13
|
+
# OS files
|
|
14
|
+
.DS_Store
|
|
15
|
+
Thumbs.db
|
|
16
|
+
|
|
17
|
+
# Local environment
|
|
18
|
+
.env
|
|
19
|
+
.env.local
|
|
20
|
+
.env.*.local
|