@dzhechkov/p-replicator 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.
Files changed (92) hide show
  1. package/README.md +314 -0
  2. package/bin/cli.js +4 -0
  3. package/package.json +62 -0
  4. package/src/cli.js +160 -0
  5. package/src/commands/doctor.js +151 -0
  6. package/src/commands/init.js +155 -0
  7. package/src/commands/list.js +133 -0
  8. package/src/commands/remove.js +111 -0
  9. package/src/commands/update.js +102 -0
  10. package/src/utils.js +280 -0
  11. package/templates/.claude/agents/doc-validator.md +92 -0
  12. package/templates/.claude/agents/harvest-coordinator.md +91 -0
  13. package/templates/.claude/agents/product-discoverer.md +57 -0
  14. package/templates/.claude/agents/replicate-coordinator.md +98 -0
  15. package/templates/.claude/commands/harvest.md +106 -0
  16. package/templates/.claude/commands/replicate.md +389 -0
  17. package/templates/.claude/rules/replicate-pipeline.md +92 -0
  18. package/templates/.claude/skills/brutal-honesty-review/README.md +218 -0
  19. package/templates/.claude/skills/brutal-honesty-review/SKILL.md +225 -0
  20. package/templates/.claude/skills/brutal-honesty-review/resources/assessment-rubrics.md +295 -0
  21. package/templates/.claude/skills/brutal-honesty-review/resources/review-template.md +102 -0
  22. package/templates/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +179 -0
  23. package/templates/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +223 -0
  24. package/templates/.claude/skills/cc-toolkit-generator-enhanced/SKILL.md +374 -0
  25. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/claude-md-strategy.md +178 -0
  26. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/enhanced-recommendations.md +416 -0
  27. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/extended-mapping.md +370 -0
  28. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/automation-commands.md +733 -0
  29. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-agents.md +416 -0
  30. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-hooks-commands.md +524 -0
  31. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-skills.md +350 -0
  32. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/enhanced-claude-md.md +235 -0
  33. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-lifecycle-ent.md +400 -0
  34. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-lifecycle.md +325 -0
  35. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-suggestions.md +423 -0
  36. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/insights-system.md +349 -0
  37. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/mcp.md +274 -0
  38. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/start-command.md +283 -0
  39. package/templates/.claude/skills/explore/SKILL.md +215 -0
  40. package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
  41. package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
  42. package/templates/.claude/skills/goap-research-ed25519/SKILL.md +415 -0
  43. package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
  44. package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
  45. package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
  46. package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
  47. package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
  48. package/templates/.claude/skills/knowledge-extractor/SKILL.md +412 -0
  49. package/templates/.claude/skills/knowledge-extractor/examples/rate-limiting-extraction.md +259 -0
  50. package/templates/.claude/skills/knowledge-extractor/modules/01-agent-review.md +192 -0
  51. package/templates/.claude/skills/knowledge-extractor/modules/02-classify.md +122 -0
  52. package/templates/.claude/skills/knowledge-extractor/modules/03-decontextualize.md +156 -0
  53. package/templates/.claude/skills/knowledge-extractor/modules/04-integrate.md +178 -0
  54. package/templates/.claude/skills/knowledge-extractor/references/artifact-categories.md +342 -0
  55. package/templates/.claude/skills/knowledge-extractor/references/decontextualization-guide.md +247 -0
  56. package/templates/.claude/skills/knowledge-extractor/references/maturity-model.md +153 -0
  57. package/templates/.claude/skills/knowledge-extractor/templates/artifact-card.md +60 -0
  58. package/templates/.claude/skills/knowledge-extractor/templates/harvest-report.md +70 -0
  59. package/templates/.claude/skills/knowledge-extractor/templates/toolkit-harvest.md +38 -0
  60. package/templates/.claude/skills/pipeline-forge/SKILL.md +523 -0
  61. package/templates/.claude/skills/pipeline-forge/examples/replicate-analysis.md +291 -0
  62. package/templates/.claude/skills/pipeline-forge/references/patterns-catalog.md +408 -0
  63. package/templates/.claude/skills/pipeline-forge/references/quality-gates.md +268 -0
  64. package/templates/.claude/skills/pipeline-forge/references/skill-anatomy.md +292 -0
  65. package/templates/.claude/skills/pipeline-forge/templates/agent-template.md +60 -0
  66. package/templates/.claude/skills/pipeline-forge/templates/command-template.md +80 -0
  67. package/templates/.claude/skills/pipeline-forge/templates/pipeline-template.md +137 -0
  68. package/templates/.claude/skills/pipeline-forge/templates/skill-template.md +132 -0
  69. package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +562 -0
  70. package/templates/.claude/skills/requirements-validator/SKILL.md +121 -0
  71. package/templates/.claude/skills/requirements-validator/assets/templates/bdd-feature-template.feature +69 -0
  72. package/templates/.claude/skills/requirements-validator/references/bdd-patterns.md +184 -0
  73. package/templates/.claude/skills/requirements-validator/references/invest-criteria.md +121 -0
  74. package/templates/.claude/skills/requirements-validator/references/scoring-system.md +134 -0
  75. package/templates/.claude/skills/requirements-validator/references/smart-criteria.md +130 -0
  76. package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +194 -0
  77. package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-cjm-example.md +100 -0
  78. package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-module1-example.md +88 -0
  79. package/templates/.claude/skills/reverse-engineering-unicorn/modules/01-intelligence.md +328 -0
  80. package/templates/.claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md +221 -0
  81. package/templates/.claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md +206 -0
  82. package/templates/.claude/skills/reverse-engineering-unicorn/modules/03-market-competition.md +402 -0
  83. package/templates/.claude/skills/reverse-engineering-unicorn/modules/04-business-finance.md +287 -0
  84. package/templates/.claude/skills/reverse-engineering-unicorn/modules/05-growth-engine.md +290 -0
  85. package/templates/.claude/skills/reverse-engineering-unicorn/modules/06-playbook-synthesis.md +286 -0
  86. package/templates/.claude/skills/reverse-engineering-unicorn/references/blue-ocean-canvas.md +39 -0
  87. package/templates/.claude/skills/reverse-engineering-unicorn/references/industry-benchmarks.md +67 -0
  88. package/templates/.claude/skills/reverse-engineering-unicorn/references/jtbd-canvas.md +48 -0
  89. package/templates/.claude/skills/sparc-prd-mini/SKILL.md +955 -0
  90. package/templates/.claude/skills/sparc-prd-mini/references/sparc-methodology.md +360 -0
  91. package/templates/.claude/skills/sparc-prd-mini/templates/CLAUDE.md +91 -0
  92. package/templates/.claude/skills/sparc-prd-mini/templates/prd.md +336 -0
@@ -0,0 +1,69 @@
1
+ # Template: BDD Feature File
2
+ # Copy and customize for each user story
3
+
4
+ Feature: [Feature Name]
5
+ As a [actor]
6
+ I want [capability]
7
+ So that [benefit]
8
+
9
+ Background:
10
+ Given [common preconditions]
11
+
12
+ # === HAPPY PATH (1-2 scenarios) ===
13
+
14
+ @happy-path @critical @US-XXX
15
+ Scenario: [Primary success case]
16
+ Given [specific precondition with values]
17
+ When [user action with parameters]
18
+ Then [expected outcome with metrics]
19
+ And [secondary outcome] within [time constraint]
20
+
21
+ # === ERROR HANDLING (2-3 scenarios) ===
22
+
23
+ @error-handling @US-XXX
24
+ Scenario: [Validation error case]
25
+ Given [precondition]
26
+ When [action with invalid input]
27
+ Then [error response with code and message]
28
+ And [recovery option]
29
+
30
+ @error-handling @US-XXX
31
+ Scenario: [System error case]
32
+ Given [precondition leading to system error]
33
+ When [action that triggers error]
34
+ Then [graceful error handling]
35
+ And [error is logged with context]
36
+
37
+ # === EDGE CASES (1-2 scenarios) ===
38
+
39
+ @edge-case @US-XXX
40
+ Scenario: [Boundary condition]
41
+ Given [boundary precondition]
42
+ When [action at boundary]
43
+ Then [expected behavior at boundary]
44
+
45
+ @edge-case @US-XXX
46
+ Scenario: [Concurrent access / Race condition]
47
+ Given [concurrent users/requests]
48
+ When [simultaneous actions]
49
+ Then [consistent behavior]
50
+
51
+ # === SECURITY (if applicable) ===
52
+
53
+ @security @US-XXX
54
+ Scenario: [Authorization check]
55
+ Given [user without permission]
56
+ When [they attempt protected action]
57
+ Then [access denied response]
58
+ And [attempt is logged]
59
+
60
+ # === DATA-DRIVEN EXAMPLES ===
61
+
62
+ @validation @US-XXX
63
+ Scenario Outline: Validate <field> input
64
+ When user enters "<input>" in <field>
65
+ Then they see "<result>"
66
+
67
+ Examples:
68
+ | field | input | result |
69
+ | ... | ... | ... |
@@ -0,0 +1,184 @@
1
+ # BDD Patterns and Gherkin Templates
2
+
3
+ ## Scenario Coverage Requirements
4
+
5
+ For each user story, generate:
6
+
7
+ | Type | Count | Purpose |
8
+ |------|-------|---------|
9
+ | Happy path | 1-2 | Primary success flows |
10
+ | Error handling | 2-3 | Validation, network, server errors |
11
+ | Edge cases | 1-2 | Boundaries, nulls, concurrency |
12
+ | Security | 0-2 | Auth, injection (if applicable) |
13
+
14
+ ## Feature Template
15
+
16
+ ```gherkin
17
+ Feature: [Feature Name from User Story]
18
+ As a [actor from user story]
19
+ I want [action from user story]
20
+ So that [benefit from user story]
21
+
22
+ Background:
23
+ Given [common preconditions]
24
+
25
+ @happy-path @critical
26
+ Scenario: [Primary success case]
27
+ Given [specific precondition]
28
+ When [user action]
29
+ Then [expected outcome with metrics]
30
+
31
+ @error-handling
32
+ Scenario: [Error case name]
33
+ Given [precondition leading to error]
34
+ When [action that triggers error]
35
+ Then [error handling behavior]
36
+
37
+ @edge-case
38
+ Scenario: [Edge case name]
39
+ Given [boundary condition]
40
+ When [action at boundary]
41
+ Then [expected behavior]
42
+ ```
43
+
44
+ ## Common Scenario Patterns
45
+
46
+ ### Authentication
47
+
48
+ ```gherkin
49
+ @happy-path
50
+ Scenario: Successful login
51
+ Given a registered user with email "user@example.com"
52
+ When they enter valid credentials
53
+ And click "Login"
54
+ Then they are redirected to the dashboard within 2s
55
+ And a session is created expiring in 24h
56
+
57
+ @error-handling
58
+ Scenario: Invalid credentials
59
+ Given a registered user
60
+ When they enter incorrect password
61
+ Then they see error "Invalid email or password"
62
+ And no session is created
63
+ And login attempts are logged
64
+
65
+ @security
66
+ Scenario: Account lockout after failed attempts
67
+ Given a registered user
68
+ When they fail login 5 times within 15 minutes
69
+ Then the account is locked for 30 minutes
70
+ And they receive a security alert email
71
+ ```
72
+
73
+ ### CRUD Operations
74
+
75
+ ```gherkin
76
+ @happy-path
77
+ Scenario: Create resource
78
+ Given an authenticated user with create permission
79
+ When they submit valid resource data
80
+ Then the resource is created
81
+ And they receive 201 Created with resource ID
82
+ And the response time is <500ms
83
+
84
+ @error-handling
85
+ Scenario: Create with invalid data
86
+ Given an authenticated user
87
+ When they submit resource with missing required field "name"
88
+ Then they receive 400 Bad Request
89
+ And error message specifies "name is required"
90
+
91
+ @edge-case
92
+ Scenario: Create duplicate resource
93
+ Given an existing resource with name "Test"
94
+ When user creates another resource with name "Test"
95
+ Then they receive 409 Conflict
96
+ And error message specifies the duplicate field
97
+ ```
98
+
99
+ ### Search/Filter
100
+
101
+ ```gherkin
102
+ @happy-path
103
+ Scenario: Search returns results
104
+ Given 100 products in the database
105
+ And 15 products match "laptop"
106
+ When user searches for "laptop"
107
+ Then they see 15 results within 500ms
108
+ And results are paginated with 10 per page
109
+
110
+ @edge-case
111
+ Scenario: Search with no results
112
+ Given 100 products in the database
113
+ When user searches for "xyznonexistent123"
114
+ Then they see "No results found" message
115
+ And search suggestions are displayed
116
+
117
+ @edge-case
118
+ Scenario: Search with special characters
119
+ Given products with names containing quotes
120
+ When user searches for "15\" laptop"
121
+ Then the search handles the quote correctly
122
+ And returns matching products
123
+ ```
124
+
125
+ ### Async Operations
126
+
127
+ ```gherkin
128
+ @happy-path
129
+ Scenario: Async job completion
130
+ Given a user submits a report generation request
131
+ Then they receive 202 Accepted with job ID
132
+ And job status is "processing"
133
+ When the job completes (within 60s)
134
+ Then job status changes to "completed"
135
+ And download link is available
136
+
137
+ @error-handling
138
+ Scenario: Async job timeout
139
+ Given a report generation job
140
+ When processing exceeds 5 minutes
141
+ Then job status changes to "failed"
142
+ And user is notified via email
143
+ And partial results are preserved
144
+ ```
145
+
146
+ ## Tags Reference
147
+
148
+ | Tag | Purpose |
149
+ |-----|---------|
150
+ | @critical | Must pass for release |
151
+ | @happy-path | Primary success flows |
152
+ | @error-handling | Error conditions |
153
+ | @edge-case | Boundary conditions |
154
+ | @security | Security-related |
155
+ | @performance | Has timing requirements |
156
+ | @smoke | Quick sanity check |
157
+ | @regression | Full regression suite |
158
+
159
+ ## Data Table Patterns
160
+
161
+ ```gherkin
162
+ Scenario Outline: Validate input fields
163
+ When user enters <input> in the <field> field
164
+ Then they see <result>
165
+
166
+ Examples:
167
+ | field | input | result |
168
+ | email | valid@email.com | field is valid |
169
+ | email | invalid-email | "Invalid email" |
170
+ | password | short | "Min 8 chars" |
171
+ | password | ValidPass123! | field is valid |
172
+ ```
173
+
174
+ ## Traceability
175
+
176
+ Each scenario should link to its source requirement:
177
+
178
+ ```gherkin
179
+ @US-001 @AC-001
180
+ Scenario: User login success
181
+ ...
182
+ ```
183
+
184
+ This enables bidirectional traceability between requirements and tests.
@@ -0,0 +1,121 @@
1
+ # INVEST Criteria Deep Dive
2
+
3
+ ## Scoring Weights
4
+
5
+ | Criterion | Weight | Max Points |
6
+ |-----------|--------|------------|
7
+ | Independent | 8% | 8 |
8
+ | Negotiable | 8% | 8 |
9
+ | Valuable | 10% | 10 |
10
+ | Estimable | 8% | 8 |
11
+ | Small | 8% | 8 |
12
+ | Testable | 8% | 8 |
13
+ | **Total** | **50%** | **50** |
14
+
15
+ ## Independent (8%)
16
+
17
+ **Definition**: Story can be developed, tested, and delivered separately from other stories.
18
+
19
+ **Pass criteria**:
20
+ - No explicit dependencies on unfinished stories
21
+ - Can be demo'd in isolation
22
+ - No "after X is complete" language
23
+
24
+ **Red flags**:
25
+ - "This story depends on US-XXX"
26
+ - "After the authentication module is done..."
27
+ - "Requires database schema from US-YYY"
28
+
29
+ **Fix pattern**: Split coupled stories or merge if inseparable.
30
+
31
+ ## Negotiable (8%)
32
+
33
+ **Definition**: Implementation details are open to discussion, not prescribed.
34
+
35
+ **Pass criteria**:
36
+ - Describes WHAT, not HOW
37
+ - Leaves room for technical decisions
38
+ - Focuses on outcome, not mechanism
39
+
40
+ **Red flags**:
41
+ - "Must use React"
42
+ - "Implement with microservices"
43
+ - "Store in PostgreSQL table X"
44
+
45
+ **Fix pattern**: Remove implementation details. Move to technical notes if needed.
46
+
47
+ ## Valuable (10%)
48
+
49
+ **Definition**: Delivers clear value to user or business.
50
+
51
+ **Pass criteria**:
52
+ - Has "so that [benefit]" clause
53
+ - Benefit is concrete and measurable
54
+ - Connects to business objective
55
+
56
+ **Red flags**:
57
+ - Missing "so that" clause
58
+ - Vague benefits: "improve experience"
59
+ - Technical tasks disguised as stories
60
+
61
+ **Fix pattern**: Add explicit benefit. If no user value, convert to technical task.
62
+
63
+ ## Estimable (8%)
64
+
65
+ **Definition**: Team can estimate effort with reasonable confidence.
66
+
67
+ **Pass criteria**:
68
+ - Scope is well-defined
69
+ - Technical approach is understood
70
+ - No major unknowns
71
+
72
+ **Red flags**:
73
+ - "System should be fast" (unmeasurable)
74
+ - "Handle all edge cases" (unbounded)
75
+ - References unknown external systems
76
+
77
+ **Fix pattern**: Add specifics. Create spike if too many unknowns.
78
+
79
+ ## Small (8%)
80
+
81
+ **Definition**: Fits within one sprint (typically 1-5 days of work).
82
+
83
+ **Pass criteria**:
84
+ - Single, focused feature
85
+ - Can be completed by 1-2 developers
86
+ - Has finite scope
87
+
88
+ **Red flags**:
89
+ - "Entire module"
90
+ - "All users"
91
+ - "Complete overhaul"
92
+ - Multiple acceptance criteria covering different features
93
+
94
+ **Fix pattern**: Decompose into smaller stories. Use story mapping.
95
+
96
+ ## Testable (8%)
97
+
98
+ **Definition**: Has clear, verifiable acceptance criteria.
99
+
100
+ **Pass criteria**:
101
+ - Acceptance criteria exist
102
+ - Pass/fail is deterministic
103
+ - Can be automated
104
+
105
+ **Red flags**:
106
+ - No acceptance criteria
107
+ - Subjective criteria: "looks good"
108
+ - Unmeasurable outcomes
109
+
110
+ **Fix pattern**: Add Given/When/Then acceptance criteria with specific values.
111
+
112
+ ## Validation Checklist
113
+
114
+ ```
115
+ □ Independent: No blocking dependencies?
116
+ □ Negotiable: Describes outcome, not implementation?
117
+ □ Valuable: Clear user/business benefit?
118
+ □ Estimable: Team can size it?
119
+ □ Small: Fits in one sprint?
120
+ □ Testable: Has verifiable acceptance criteria?
121
+ ```
@@ -0,0 +1,134 @@
1
+ # Testability Scoring System
2
+
3
+ ## Score Calculation Formula
4
+
5
+ ```
6
+ Total Score = INVEST Score (50%) + SMART Score (30%) + Quality Score (20%)
7
+ ```
8
+
9
+ ## INVEST Score Breakdown (50 points max)
10
+
11
+ | Criterion | Weight | Points | Calculation |
12
+ |-----------|--------|--------|-------------|
13
+ | Independent | 8% | 0-8 | Binary: 8 if pass, 0 if fail |
14
+ | Negotiable | 8% | 0-8 | Binary: 8 if pass, 0 if fail |
15
+ | Valuable | 10% | 0-10 | 10 if clear benefit, 5 if vague, 0 if missing |
16
+ | Estimable | 8% | 0-8 | 8 if estimable, 4 if partially, 0 if not |
17
+ | Small | 8% | 0-8 | 8 if sprint-sized, 4 if 2 sprints, 0 if larger |
18
+ | Testable | 8% | 0-8 | 8 if AC exist and clear, 4 if vague AC, 0 if none |
19
+
20
+ ## SMART Score Breakdown (30 points max)
21
+
22
+ | Criterion | Weight | Points | Calculation |
23
+ |-----------|--------|--------|-------------|
24
+ | Specific | 6% | 0-6 | -2 per vague term found |
25
+ | Measurable | 8% | 0-8 | 8 if metrics exist, 4 if partial, 0 if none |
26
+ | Achievable | 6% | 0-6 | 6 if realistic, 3 if stretch, 0 if impossible |
27
+ | Relevant | 5% | 0-5 | 5 if connected to value, 0 if disconnected |
28
+ | Time-bound | 5% | 0-5 | 5 if timing specified, 0 if missing |
29
+
30
+ ## Quality Score Breakdown (20 points max)
31
+
32
+ | Criterion | Weight | Points | Calculation |
33
+ |-----------|--------|--------|-------------|
34
+ | Traceability | 10% | 0-10 | 10 if linked to tests, 5 if partial, 0 if none |
35
+ | Completeness | 10% | 0-10 | See completeness rubric below |
36
+
37
+ ### Completeness Rubric
38
+
39
+ | AC Coverage | Points |
40
+ |-------------|--------|
41
+ | Happy path + errors + edges | 10 |
42
+ | Happy path + errors | 7 |
43
+ | Happy path only | 4 |
44
+ | Incomplete happy path | 2 |
45
+ | No AC | 0 |
46
+
47
+ ## Score Interpretation
48
+
49
+ | Score | Rating | Status | Action |
50
+ |-------|--------|--------|--------|
51
+ | 90-100 | Excellent | ✅ READY | Proceed to development |
52
+ | 70-89 | Good | ⚠️ REVIEW | Fix minor issues, then proceed |
53
+ | 50-69 | Fair | 🔶 REWORK | Significant clarification needed |
54
+ | **0-49** | **Poor** | **🚫 BLOCKED** | **Requires complete rewrite** |
55
+
56
+ ## Quality Gate Rules
57
+
58
+ ### BLOCKED (Score < 50)
59
+
60
+ Requirements scoring below 50 are **automatically blocked** from development.
61
+
62
+ **Mandatory actions**:
63
+ 1. Identify all failing criteria
64
+ 2. Provide specific rewrite suggestions
65
+ 3. Generate improved AC examples
66
+ 4. Require re-validation after fixes
67
+
68
+ ### REVIEW (Score 50-69)
69
+
70
+ **Recommended actions**:
71
+ 1. List all issues clearly
72
+ 2. Suggest specific improvements
73
+ 3. Allow development if product owner accepts risk
74
+
75
+ ### READY (Score 70+)
76
+
77
+ **Actions**:
78
+ 1. Generate BDD scenarios
79
+ 2. Create traceability links
80
+ 3. Proceed to development
81
+
82
+ ## Example Score Calculation
83
+
84
+ **User Story**: "As a user, I want the system to be fast so I can work efficiently"
85
+
86
+ ### INVEST Analysis
87
+
88
+ | Criterion | Score | Reasoning |
89
+ |-----------|-------|-----------|
90
+ | Independent | 8 | No dependencies stated |
91
+ | Negotiable | 8 | Implementation open |
92
+ | Valuable | 5 | Benefit is vague ("efficiently") |
93
+ | Estimable | 0 | Cannot estimate "fast" |
94
+ | Small | 0 | "System" scope undefined |
95
+ | Testable | 0 | No measurable criteria |
96
+ | **Subtotal** | **21/50** | |
97
+
98
+ ### SMART Analysis (for "System responds fast")
99
+
100
+ | Criterion | Score | Reasoning |
101
+ |-----------|-------|-----------|
102
+ | Specific | 0 | "fast" is vague (-6) |
103
+ | Measurable | 0 | No metrics |
104
+ | Achievable | 3 | Probably possible |
105
+ | Relevant | 5 | Performance matters |
106
+ | Time-bound | 0 | No timing specified |
107
+ | **Subtotal** | **8/30** | |
108
+
109
+ ### Quality Analysis
110
+
111
+ | Criterion | Score | Reasoning |
112
+ |-----------|-------|-----------|
113
+ | Traceability | 0 | No test links |
114
+ | Completeness | 2 | Incomplete happy path |
115
+ | **Subtotal** | **2/20** | |
116
+
117
+ ### Final Score
118
+
119
+ ```
120
+ Total = 21 + 8 + 2 = 31/100
121
+ Status: 🚫 BLOCKED
122
+ ```
123
+
124
+ **Rewrite suggestion**:
125
+ "As a customer, I want the product search to return results within 200ms at p95, so I can quickly find items without waiting."
126
+
127
+ **Improved AC**:
128
+ ```gherkin
129
+ Given 1000 concurrent users
130
+ And 100,000 products in the catalog
131
+ When a user searches for "laptop"
132
+ Then 95% of responses complete in <200ms
133
+ And all responses complete in <500ms
134
+ ```
@@ -0,0 +1,130 @@
1
+ # SMART Criteria for Acceptance Criteria
2
+
3
+ ## Scoring Weights
4
+
5
+ | Criterion | Weight | Max Points |
6
+ |-----------|--------|------------|
7
+ | Specific | 6% | 6 |
8
+ | Measurable | 8% | 8 |
9
+ | Achievable | 6% | 6 |
10
+ | Relevant | 5% | 5 |
11
+ | Time-bound | 5% | 5 |
12
+ | **Total** | **30%** | **30** |
13
+
14
+ ## Specific (6%)
15
+
16
+ **Definition**: Clear, unambiguous language with no room for interpretation.
17
+
18
+ **Pass criteria**:
19
+ - Concrete nouns and verbs
20
+ - Exact values and conditions
21
+ - No vague qualifiers
22
+
23
+ **Vague term mapping**:
24
+
25
+ | Vague Term | Specific Alternative |
26
+ |------------|---------------------|
27
+ | fast | <200ms p95 |
28
+ | slow | >2000ms |
29
+ | easy | <3 clicks/steps |
30
+ | user-friendly | 80%+ task completion rate |
31
+ | intuitive | no training required |
32
+ | responsive | <100ms interaction feedback |
33
+ | secure | passes OWASP Top 10 |
34
+ | robust | handles 10x normal load |
35
+ | efficient | <50MB memory usage |
36
+ | simple | single-page form |
37
+
38
+ **Fix pattern**: Replace every vague term with a measurable value.
39
+
40
+ ## Measurable (8%)
41
+
42
+ **Definition**: Has quantifiable success criteria.
43
+
44
+ **Pass criteria**:
45
+ - Contains numbers, percentages, or counts
46
+ - Defines thresholds (min, max, exact)
47
+ - Can be verified automatically
48
+
49
+ **Examples**:
50
+ - ✗ "Page loads quickly" → ✓ "Page loads in <2s at p95"
51
+ - ✗ "Most users succeed" → ✓ "95% of users complete task"
52
+ - ✗ "Handles errors" → ✓ "Returns 4xx/5xx with error code and message"
53
+
54
+ **Fix pattern**: Add "how much", "how many", "how fast" to every criterion.
55
+
56
+ ## Achievable (6%)
57
+
58
+ **Definition**: Technically feasible within constraints.
59
+
60
+ **Pass criteria**:
61
+ - Within current technology stack
62
+ - Resources available
63
+ - No physical impossibilities
64
+
65
+ **Red flags**:
66
+ - "100% uptime" (impossible)
67
+ - "Zero latency" (impossible)
68
+ - "Infinite scalability" (unbounded)
69
+ - "Works on all devices" (untestable)
70
+
71
+ **Fix pattern**: Add realistic bounds. "99.9% uptime" instead of "100%".
72
+
73
+ ## Relevant (5%)
74
+
75
+ **Definition**: Directly supports the user story's value proposition.
76
+
77
+ **Pass criteria**:
78
+ - Connects to "so that" clause
79
+ - Tests user-facing behavior
80
+ - Not implementation detail
81
+
82
+ **Red flags**:
83
+ - Tests internal methods
84
+ - Checks database schemas
85
+ - Verifies code structure
86
+
87
+ **Fix pattern**: Reframe as user-observable behavior.
88
+
89
+ ## Time-bound (5%)
90
+
91
+ **Definition**: Includes timing context where applicable.
92
+
93
+ **Pass criteria**:
94
+ - Response time requirements
95
+ - Timeout specifications
96
+ - Deadline/expiration handling
97
+
98
+ **Examples**:
99
+ - "API responds within 500ms"
100
+ - "Session expires after 30 minutes"
101
+ - "Email sent within 1 minute of registration"
102
+ - "Retry 3 times with 1s backoff"
103
+
104
+ **Fix pattern**: Add "within X time" for async operations and user-facing responses.
105
+
106
+ ## AC Quality Checklist
107
+
108
+ ```
109
+ □ Specific: No vague terms (fast, easy, etc.)?
110
+ □ Measurable: Contains numbers/thresholds?
111
+ □ Achievable: Technically possible?
112
+ □ Relevant: Supports user value?
113
+ □ Time-bound: Has timing requirements?
114
+ ```
115
+
116
+ ## AC Template
117
+
118
+ ```gherkin
119
+ Given [precondition with specific values]
120
+ When [action with specific parameters]
121
+ Then [outcome with measurable result] within [time constraint]
122
+ ```
123
+
124
+ **Example**:
125
+ ```gherkin
126
+ Given a registered user with valid credentials
127
+ When they submit the login form
128
+ Then they are redirected to the dashboard within 2 seconds
129
+ And a session cookie is set expiring in 24 hours
130
+ ```