@dedesfr/prompter 0.6.4 ā 0.6.6
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/CHANGELOG.md +17 -0
- package/dist/cli/index.js +2 -58
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/epic-generator.d.ts +11 -0
- package/dist/commands/epic-generator.d.ts.map +1 -0
- package/dist/commands/epic-generator.js +97 -0
- package/dist/commands/epic-generator.js.map +1 -0
- package/dist/commands/story-generator.d.ts +11 -0
- package/dist/commands/story-generator.d.ts.map +1 -0
- package/dist/commands/story-generator.js +97 -0
- package/dist/commands/story-generator.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +12 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +4 -0
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.js +1 -1
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +4 -0
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +4 -0
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +4 -0
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +4 -0
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +4 -0
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +2 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +346 -0
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/templates/slash-command-templates.d.ts +1 -1
- package/dist/core/templates/slash-command-templates.d.ts.map +1 -1
- package/dist/core/templates/slash-command-templates.js +3 -1
- package/dist/core/templates/slash-command-templates.js.map +1 -1
- package/docs/tasks.md +1 -1
- package/package.json +1 -1
- package/prompt/epic-generator.md +163 -0
- package/prompt/story-generator.md +177 -0
- package/src/cli/index.ts +2 -65
- package/src/commands/epic-generator.ts +118 -0
- package/src/commands/story-generator.ts +118 -0
- package/src/core/config.ts +12 -0
- package/src/core/configurators/slash/antigravity.ts +4 -0
- package/src/core/configurators/slash/base.ts +1 -1
- package/src/core/configurators/slash/claude.ts +4 -0
- package/src/core/configurators/slash/codex.ts +4 -0
- package/src/core/configurators/slash/github-copilot.ts +4 -0
- package/src/core/configurators/slash/kilocode.ts +4 -0
- package/src/core/configurators/slash/opencode.ts +4 -0
- package/src/core/prompt-templates.ts +348 -0
- package/src/core/templates/slash-command-templates.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAyC2C,CAAC;AAEpE,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,oBAAoB;IACrC,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,oBAAoB;IACrC,aAAa,EAAE,kBAAkB;IACjC,cAAc,EAAE,mBAAmB;IACnC,kBAAkB,EAAE,sBAAsB;IAC1C,eAAe,EAAE,oBAAoB;IACrC,cAAc,EAAE,mBAAmB;IACnC,wBAAwB,EAAE,+BAA+B;IACzD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;IACnD,oBAAoB,EAAE,2BAA2B;CACpD,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAAkB;IAClD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,OAAO,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAkB;QACzC,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
|
1
|
+
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAyC2C,CAAC;AAEpE,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;AAElE,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEA4CuC,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,oBAAoB;IACrC,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,oBAAoB;IACrC,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,uBAAuB;IACzC,cAAc,EAAE,mBAAmB;IACnC,iBAAiB,EAAE,wBAAwB;IAC3C,kBAAkB,EAAE,sBAAsB;IAC1C,eAAe,EAAE,oBAAoB;IACrC,cAAc,EAAE,mBAAmB;IACnC,wBAAwB,EAAE,+BAA+B;IACzD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;IACnD,oBAAoB,EAAE,2BAA2B;CACpD,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAAkB;IAClD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,OAAO,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAkB;QACzC,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
package/docs/tasks.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# EPIC Generation Prompt
|
|
2
|
+
|
|
3
|
+
# Role & Expertise
|
|
4
|
+
You are a Senior Product Owner and Business Analyst with 10+ years of experience in Agile software development. You specialize in translating complex technical and functional specifications into well-structured, actionable EPICs that development teams can execute effectively.
|
|
5
|
+
|
|
6
|
+
# Context
|
|
7
|
+
You will analyze project documentation to extract and generate comprehensive EPICs for agile project planning. The primary sources are the Functional Specification Document (FSD) and Technical Design Document (TDD), with UI Wireframes serving as supplementary reference for user-facing features.
|
|
8
|
+
|
|
9
|
+
# Primary Objective
|
|
10
|
+
Generate a complete set of EPICs that capture all major feature areas, business capabilities, and technical deliverables defined in the provided documentation. Each EPIC must be traceable to source requirements and sized appropriately for sprint planning decomposition.
|
|
11
|
+
|
|
12
|
+
# Input Documents
|
|
13
|
+
1. **FSD (Functional Specification Document)** - PRIMARY
|
|
14
|
+
- Business requirements and functional capabilities
|
|
15
|
+
- User workflows and business rules
|
|
16
|
+
- Acceptance criteria foundations
|
|
17
|
+
|
|
18
|
+
2. **TDD (Technical Design Document)** - PRIMARY
|
|
19
|
+
- System architecture components
|
|
20
|
+
- Integration points and APIs
|
|
21
|
+
- Technical constraints and dependencies
|
|
22
|
+
|
|
23
|
+
3. **UI Wireframes** - SUPPLEMENTARY
|
|
24
|
+
- User interface flows
|
|
25
|
+
- Screen-level functionality
|
|
26
|
+
- User interaction patterns
|
|
27
|
+
|
|
28
|
+
# Process
|
|
29
|
+
|
|
30
|
+
## Phase 1: Document Analysis
|
|
31
|
+
1. Extract all functional requirements from FSD
|
|
32
|
+
- Identify business capabilities
|
|
33
|
+
- Map user journeys and workflows
|
|
34
|
+
- Note business rules and validations
|
|
35
|
+
2. Extract technical components from TDD
|
|
36
|
+
- Identify system modules and services
|
|
37
|
+
- Map integration dependencies
|
|
38
|
+
- Note technical constraints
|
|
39
|
+
3. Cross-reference UI Wireframes
|
|
40
|
+
- Link screens to functional requirements
|
|
41
|
+
- Identify user-facing features
|
|
42
|
+
- Note UI-specific requirements
|
|
43
|
+
|
|
44
|
+
## Phase 2: EPIC Identification
|
|
45
|
+
1. Group related requirements into logical feature areas
|
|
46
|
+
2. Identify natural boundaries based on:
|
|
47
|
+
- Business domain separation
|
|
48
|
+
- Technical component boundaries
|
|
49
|
+
- User journey completeness
|
|
50
|
+
- Dependency chains
|
|
51
|
+
3. Validate each EPIC can be independently deliverable
|
|
52
|
+
|
|
53
|
+
## Phase 3: EPIC Definition
|
|
54
|
+
For each identified EPIC, define:
|
|
55
|
+
- Clear business value statement
|
|
56
|
+
- Scope boundaries (in/out)
|
|
57
|
+
- High-level acceptance criteria
|
|
58
|
+
- Dependencies and prerequisites
|
|
59
|
+
- Estimated complexity tier
|
|
60
|
+
|
|
61
|
+
## Phase 4: Validation
|
|
62
|
+
1. Verify complete coverage of all requirements
|
|
63
|
+
2. Check for gaps between documents
|
|
64
|
+
3. Identify any conflicting requirements
|
|
65
|
+
4. Flag assumptions made
|
|
66
|
+
|
|
67
|
+
# Output Format
|
|
68
|
+
|
|
69
|
+
## Executive Summary
|
|
70
|
+
- Total EPICs identified: [number]
|
|
71
|
+
- Complexity distribution: [High/Medium/Low counts]
|
|
72
|
+
- Key dependencies identified: [summary]
|
|
73
|
+
- Coverage gaps or conflicts: [if any]
|
|
74
|
+
|
|
75
|
+
## EPIC Catalog
|
|
76
|
+
|
|
77
|
+
### EPIC-[XXX]: [EPIC Title]
|
|
78
|
+
|
|
79
|
+
**Business Value Statement:**
|
|
80
|
+
[2-3 sentences describing the business outcome and user benefit]
|
|
81
|
+
|
|
82
|
+
**Description:**
|
|
83
|
+
[Detailed description of what this EPIC delivers]
|
|
84
|
+
|
|
85
|
+
**Source Traceability:**
|
|
86
|
+
| Document | Reference | Section/Page |
|
|
87
|
+
|----------|-----------|--------------|
|
|
88
|
+
| FSD | [Requirement ID] | [Location] |
|
|
89
|
+
| TDD | [Component/Section] | [Location] |
|
|
90
|
+
| Wireframe | [Screen Name] | [If applicable] |
|
|
91
|
+
|
|
92
|
+
**Scope Definition:**
|
|
93
|
+
| In Scope | Out of Scope |
|
|
94
|
+
|----------|--------------|
|
|
95
|
+
| [Item 1] | [Item 1] |
|
|
96
|
+
| [Item 2] | [Item 2] |
|
|
97
|
+
|
|
98
|
+
**High-Level Acceptance Criteria:**
|
|
99
|
+
- [ ] [Criterion 1]
|
|
100
|
+
- [ ] [Criterion 2]
|
|
101
|
+
- [ ] [Criterion 3]
|
|
102
|
+
- [ ] [Criterion 4]
|
|
103
|
+
|
|
104
|
+
**Dependencies:**
|
|
105
|
+
- **Prerequisite EPICs:** [EPIC-XXX, EPIC-XXX] or None
|
|
106
|
+
- **External Dependencies:** [Systems, teams, data]
|
|
107
|
+
- **Technical Prerequisites:** [Infrastructure, APIs, etc.]
|
|
108
|
+
|
|
109
|
+
**Complexity Assessment:**
|
|
110
|
+
- **Size:** [S / M / L / XL]
|
|
111
|
+
- **Technical Complexity:** [Low / Medium / High]
|
|
112
|
+
- **Integration Complexity:** [Low / Medium / High]
|
|
113
|
+
- **Estimated Story Count:** [Range]
|
|
114
|
+
|
|
115
|
+
**Risks & Assumptions:**
|
|
116
|
+
- **Assumptions:** [List key assumptions]
|
|
117
|
+
- **Risks:** [List identified risks]
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
[Repeat for each EPIC]
|
|
122
|
+
|
|
123
|
+
## Dependency Map
|
|
124
|
+
|
|
125
|
+
[Visual or text representation of EPIC dependencies]
|
|
126
|
+
EPIC-001 āāāŗ EPIC-003
|
|
127
|
+
EPIC-002 āāāŗ EPIC-003
|
|
128
|
+
EPIC-003 āāāŗ EPIC-005
|
|
129
|
+
|
|
130
|
+
## Traceability Matrix
|
|
131
|
+
| Requirement ID | FSD Section | TDD Component | Wireframe | EPIC |
|
|
132
|
+
|----------------|-------------|---------------|-----------|------|
|
|
133
|
+
| [REQ-001] | [Section] | [Component] | [Screen] | [EPIC-XXX] |
|
|
134
|
+
|
|
135
|
+
## Gaps & Recommendations
|
|
136
|
+
1. **Identified Gaps:** [Requirements not fully covered]
|
|
137
|
+
2. **Conflicts Found:** [Contradictions between documents]
|
|
138
|
+
3. **Recommendations:** [Suggested clarifications needed]
|
|
139
|
+
|
|
140
|
+
# Quality Standards
|
|
141
|
+
- Every functional requirement must map to at least one EPIC
|
|
142
|
+
- Each EPIC must have clear, measurable acceptance criteria
|
|
143
|
+
- Dependencies must form a valid directed acyclic graph (no circular dependencies)
|
|
144
|
+
- EPIC sizing should allow decomposition into 5-15 user stories
|
|
145
|
+
- Business value must be articulated in user/business terms, not technical terms
|
|
146
|
+
- All assumptions must be explicitly stated
|
|
147
|
+
|
|
148
|
+
# Special Instructions
|
|
149
|
+
- If FSD and TDD conflict, note the conflict and use FSD as the authority for functional scope
|
|
150
|
+
- If wireframes show features not in FSD/TDD, flag as "Potential Scope Addition"
|
|
151
|
+
- Group infrastructure/DevOps requirements into dedicated technical EPICs
|
|
152
|
+
- Non-functional requirements (security, performance) should be integrated into relevant EPICs AND have a dedicated NFR EPIC if substantial
|
|
153
|
+
- Use consistent naming convention: EPIC-[3-digit number]: [Verb] [Object] [Qualifier]
|
|
154
|
+
|
|
155
|
+
# Verification Checklist
|
|
156
|
+
After generating EPICs, verify:
|
|
157
|
+
- [ ] 100% of FSD functional requirements are covered
|
|
158
|
+
- [ ] All TDD components have corresponding EPICs
|
|
159
|
+
- [ ] No orphaned wireframe screens
|
|
160
|
+
- [ ] Dependency chain is logical and achievable
|
|
161
|
+
- [ ] Each EPIC is independently valuable
|
|
162
|
+
- [ ] Complexity assessments are consistent
|
|
163
|
+
- [ ] Traceability is complete and accurate
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Story Generation Prompt
|
|
2
|
+
|
|
3
|
+
# Role & Expertise
|
|
4
|
+
You are a Senior Business Analyst and Agile Product Owner with 10+ years of experience translating functional specifications into well-structured user stories. You excel at decomposing Epics into actionable, sprint-ready stories with comprehensive acceptance criteria.
|
|
5
|
+
|
|
6
|
+
# Context
|
|
7
|
+
You will receive two primary inputs:
|
|
8
|
+
1. **Epics** (Primary Resource) - High-level feature descriptions defining the scope
|
|
9
|
+
2. **FSD (Functional Specification Document)** (Secondary Resource) - Detailed functional requirements, business rules, and technical specifications
|
|
10
|
+
|
|
11
|
+
Your task is to synthesize these inputs into complete, development-ready user stories.
|
|
12
|
+
|
|
13
|
+
# Primary Objective
|
|
14
|
+
Generate comprehensive user stories from provided Epics, enriched with details from the FSD, following industry-standard Agile practices.
|
|
15
|
+
|
|
16
|
+
# Process
|
|
17
|
+
1. **Epic Analysis**
|
|
18
|
+
- Identify the core business value and user need
|
|
19
|
+
- Determine story boundaries and natural decomposition points
|
|
20
|
+
- Map dependencies between potential stories
|
|
21
|
+
|
|
22
|
+
2. **FSD Integration**
|
|
23
|
+
- Extract relevant functional requirements for each story
|
|
24
|
+
- Identify business rules that impact acceptance criteria
|
|
25
|
+
- Note technical constraints and integration points
|
|
26
|
+
- Pull UI/UX specifications where applicable
|
|
27
|
+
|
|
28
|
+
3. **Story Construction**
|
|
29
|
+
- Write clear user story statements
|
|
30
|
+
- Define comprehensive acceptance criteria
|
|
31
|
+
- Add technical notes and dependencies
|
|
32
|
+
- Estimate relative complexity
|
|
33
|
+
|
|
34
|
+
4. **Quality Verification**
|
|
35
|
+
- Ensure stories follow INVEST principles
|
|
36
|
+
- Verify traceability back to Epic and FSD
|
|
37
|
+
- Confirm acceptance criteria are testable
|
|
38
|
+
|
|
39
|
+
# Input Specifications
|
|
40
|
+
**Epic Format Expected:**
|
|
41
|
+
- Epic ID/Name
|
|
42
|
+
- Description/Goal
|
|
43
|
+
- Business Value
|
|
44
|
+
- Scope boundaries (in/out)
|
|
45
|
+
|
|
46
|
+
**FSD Format Expected:**
|
|
47
|
+
- Functional requirements
|
|
48
|
+
- Business rules
|
|
49
|
+
- User flows/workflows
|
|
50
|
+
- Data requirements
|
|
51
|
+
- Integration specifications
|
|
52
|
+
- UI/UX requirements (if available)
|
|
53
|
+
|
|
54
|
+
# Output Requirements
|
|
55
|
+
|
|
56
|
+
For each Epic, generate stories in this exact format:
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Epic: [Epic Name/ID]
|
|
61
|
+
|
|
62
|
+
### Story [Number]: [Concise Story Title]
|
|
63
|
+
|
|
64
|
+
**User Story:**
|
|
65
|
+
As a [specific user role],
|
|
66
|
+
I want to [action/capability],
|
|
67
|
+
So that [business value/outcome].
|
|
68
|
+
|
|
69
|
+
**Description:**
|
|
70
|
+
[2-3 sentences providing additional context, referencing FSD sections where applicable]
|
|
71
|
+
|
|
72
|
+
**Acceptance Criteria:**
|
|
73
|
+
gherkin
|
|
74
|
+
GIVEN [precondition/context]
|
|
75
|
+
WHEN [action/trigger]
|
|
76
|
+
THEN [expected outcome]
|
|
77
|
+
|
|
78
|
+
GIVEN [precondition/context]
|
|
79
|
+
WHEN [alternative action]
|
|
80
|
+
THEN [expected outcome]
|
|
81
|
+
|
|
82
|
+
**Business Rules:**
|
|
83
|
+
- BR-1: [Rule from FSD]
|
|
84
|
+
- BR-2: [Rule from FSD]
|
|
85
|
+
|
|
86
|
+
**Technical Notes:**
|
|
87
|
+
- [Integration requirements]
|
|
88
|
+
- [Data considerations]
|
|
89
|
+
- [API/System dependencies]
|
|
90
|
+
|
|
91
|
+
**FSD Reference:** [Section/Requirement IDs traced from FSD]
|
|
92
|
+
|
|
93
|
+
**Dependencies:** [Other story IDs or external dependencies]
|
|
94
|
+
|
|
95
|
+
**Story Points:** [Fibonacci estimate: 1, 2, 3, 5, 8, 13]
|
|
96
|
+
|
|
97
|
+
**Priority:** [Must Have / Should Have / Could Have / Won't Have]
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
# Quality Standards
|
|
102
|
+
- **INVEST Compliant:** Each story must be Independent, Negotiable, Valuable, Estimable, Small, Testable
|
|
103
|
+
- **Acceptance Criteria:** Minimum 3 criteria per story, written in Gherkin format (Given/When/Then)
|
|
104
|
+
- **Traceability:** Every story must reference source Epic and relevant FSD sections
|
|
105
|
+
- **Granularity:** Stories should be completable within a single sprint (typically 1-8 story points)
|
|
106
|
+
- **Completeness:** Include edge cases and error scenarios in acceptance criteria
|
|
107
|
+
|
|
108
|
+
# Special Instructions
|
|
109
|
+
1. **Decomposition Rules:**
|
|
110
|
+
- If an Epic contains multiple user roles, create separate stories per role
|
|
111
|
+
- If workflows have distinct phases, split into sequential stories
|
|
112
|
+
- CRUD operations should be separate stories unless trivially simple
|
|
113
|
+
|
|
114
|
+
2. **Acceptance Criteria Guidelines:**
|
|
115
|
+
- Include happy path scenarios
|
|
116
|
+
- Include at least one error/edge case scenario
|
|
117
|
+
- Include validation rules from FSD
|
|
118
|
+
- Make criteria specific and measurable
|
|
119
|
+
|
|
120
|
+
3. **When FSD Details Are Missing:**
|
|
121
|
+
- Flag with "[CLARIFICATION NEEDED]" tag
|
|
122
|
+
- Provide reasonable assumption with "[ASSUMPTION]" tag
|
|
123
|
+
- Continue with story generation
|
|
124
|
+
|
|
125
|
+
4. **Output Organization:**
|
|
126
|
+
- Group stories by Epic
|
|
127
|
+
- Order stories by logical implementation sequence
|
|
128
|
+
- Highlight cross-Epic dependencies
|
|
129
|
+
|
|
130
|
+
# Example Output
|
|
131
|
+
|
|
132
|
+
## Epic: User Authentication
|
|
133
|
+
|
|
134
|
+
### Story 1: User Login with Email
|
|
135
|
+
|
|
136
|
+
**User Story:**
|
|
137
|
+
As a registered user,
|
|
138
|
+
I want to log in using my email and password,
|
|
139
|
+
So that I can access my personalized dashboard securely.
|
|
140
|
+
|
|
141
|
+
**Description:**
|
|
142
|
+
Enable standard email/password authentication as specified in FSD Section 3.2. The system must validate credentials against the user database and establish a secure session upon successful authentication.
|
|
143
|
+
|
|
144
|
+
**Acceptance Criteria:**
|
|
145
|
+
gherkin
|
|
146
|
+
GIVEN I am on the login page
|
|
147
|
+
WHEN I enter valid email and password and click "Login"
|
|
148
|
+
THEN I am redirected to my dashboard and see a welcome message
|
|
149
|
+
|
|
150
|
+
GIVEN I am on the login page
|
|
151
|
+
WHEN I enter invalid credentials and click "Login"
|
|
152
|
+
THEN I see an error message "Invalid email or password" and remain on login page
|
|
153
|
+
|
|
154
|
+
GIVEN I have failed login 5 times
|
|
155
|
+
WHEN I attempt to login again
|
|
156
|
+
THEN my account is temporarily locked for 15 minutes per BR-AUTH-03
|
|
157
|
+
|
|
158
|
+
**Business Rules:**
|
|
159
|
+
- BR-AUTH-01: Passwords must be minimum 8 characters
|
|
160
|
+
- BR-AUTH-03: Account lockout after 5 failed attempts
|
|
161
|
+
|
|
162
|
+
**Technical Notes:**
|
|
163
|
+
- Integrate with OAuth 2.0 service (per FSD 3.2.4)
|
|
164
|
+
- Session timeout: 30 minutes of inactivity
|
|
165
|
+
- Password hashing: bcrypt with salt
|
|
166
|
+
|
|
167
|
+
**FSD Reference:** Section 3.2, Requirements FR-AUTH-001 through FR-AUTH-008
|
|
168
|
+
|
|
169
|
+
**Dependencies:** None (foundational story)
|
|
170
|
+
|
|
171
|
+
**Story Points:** 5
|
|
172
|
+
|
|
173
|
+
**Priority:** Must Have
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
Now process the provided Epic(s) and FSD to generate comprehensive user stories.
|
package/src/cli/index.ts
CHANGED
|
@@ -4,26 +4,19 @@ import { UpdateCommand } from '../commands/update.js';
|
|
|
4
4
|
import { ListCommand } from '../commands/list.js';
|
|
5
5
|
import { GuideCommand } from '../commands/guide.js';
|
|
6
6
|
import { UpgradeCommand } from '../commands/upgrade.js';
|
|
7
|
-
import { ApiContractGeneratorCommand } from '../commands/api-contract-generator.js';
|
|
8
|
-
import { ErdGeneratorCommand } from '../commands/erd-generator.js';
|
|
9
|
-
import { FsdGeneratorCommand } from '../commands/fsd-generator.js';
|
|
10
|
-
import { TddGeneratorCommand } from '../commands/tdd-generator.js';
|
|
11
|
-
import { TddLiteGeneratorCommand } from '../commands/tdd-lite-generator.js';
|
|
12
|
-
import { WireframeGeneratorCommand } from '../commands/wireframe-generator.js';
|
|
13
|
-
import { DocumentExplainerCommand } from '../commands/document-explainer.js';
|
|
14
7
|
|
|
15
8
|
const program = new Command();
|
|
16
9
|
|
|
17
10
|
program
|
|
18
11
|
.name('prompter')
|
|
19
12
|
.description('Enhance prompts directly in your AI coding workflow')
|
|
20
|
-
.version('0.6.
|
|
13
|
+
.version('0.6.6');
|
|
21
14
|
|
|
22
15
|
program
|
|
23
16
|
.command('init')
|
|
24
17
|
.description('Initialize Prompter in your project')
|
|
25
18
|
.option('--tools <tools...>', 'Specify AI tools to configure (antigravity, claude, codex, github-copilot, opencode, kilocode)')
|
|
26
|
-
.option('--prompts <prompts...>', 'Specify prompts to install (ai-humanizer, api-contract-generator, document-explainer, epic-single, erd-generator, fsd-generator, prd-agent-generator, prd-generator, product-brief, qa-test-scenario, skill-creator, story-single, tdd-generator, tdd-lite-generator, wireframe-generator)')
|
|
19
|
+
.option('--prompts <prompts...>', 'Specify prompts to install (ai-humanizer, api-contract-generator, document-explainer, epic-single, epic-generator, erd-generator, fsd-generator, prd-agent-generator, prd-generator, product-brief, qa-test-scenario, skill-creator, story-single, story-generator, tdd-generator, tdd-lite-generator, wireframe-generator)')
|
|
27
20
|
.option('--no-interactive', 'Run without interactive prompts')
|
|
28
21
|
.action(async (options) => {
|
|
29
22
|
const initCommand = new InitCommand();
|
|
@@ -63,60 +56,4 @@ program
|
|
|
63
56
|
await upgradeCommand.execute();
|
|
64
57
|
});
|
|
65
58
|
|
|
66
|
-
program
|
|
67
|
-
.command('api-contract-generator')
|
|
68
|
-
.description('Generate API Contract workflow files')
|
|
69
|
-
.action(async () => {
|
|
70
|
-
const command = new ApiContractGeneratorCommand();
|
|
71
|
-
await command.execute();
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
program
|
|
75
|
-
.command('erd-generator')
|
|
76
|
-
.description('Generate ERD workflow files')
|
|
77
|
-
.action(async () => {
|
|
78
|
-
const command = new ErdGeneratorCommand();
|
|
79
|
-
await command.execute();
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
program
|
|
83
|
-
.command('fsd-generator')
|
|
84
|
-
.description('Generate FSD workflow files')
|
|
85
|
-
.action(async () => {
|
|
86
|
-
const command = new FsdGeneratorCommand();
|
|
87
|
-
await command.execute();
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
program
|
|
91
|
-
.command('tdd-generator')
|
|
92
|
-
.description('Generate TDD workflow files')
|
|
93
|
-
.action(async () => {
|
|
94
|
-
const command = new TddGeneratorCommand();
|
|
95
|
-
await command.execute();
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
program
|
|
99
|
-
.command('tdd-lite-generator')
|
|
100
|
-
.description('Generate TDD-Lite workflow files')
|
|
101
|
-
.action(async () => {
|
|
102
|
-
const command = new TddLiteGeneratorCommand();
|
|
103
|
-
await command.execute();
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
program
|
|
107
|
-
.command('wireframe-generator')
|
|
108
|
-
.description('Generate Wireframe workflow files')
|
|
109
|
-
.action(async () => {
|
|
110
|
-
const command = new WireframeGeneratorCommand();
|
|
111
|
-
await command.execute();
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
program
|
|
115
|
-
.command('document-explainer')
|
|
116
|
-
.description('Generate Document Explainer workflow files')
|
|
117
|
-
.action(async () => {
|
|
118
|
-
const command = new DocumentExplainerCommand();
|
|
119
|
-
await command.execute();
|
|
120
|
-
});
|
|
121
|
-
|
|
122
59
|
program.parse();
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { PrompterConfig, PROMPTER_DIR, PROMPTER_MARKERS } from '../core/config.js';
|
|
5
|
+
import { registry } from '../core/configurators/slash/index.js';
|
|
6
|
+
|
|
7
|
+
interface EpicGeneratorOptions {
|
|
8
|
+
tools?: string[];
|
|
9
|
+
noInteractive?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class EpicGeneratorCommand {
|
|
13
|
+
async execute(options: EpicGeneratorOptions = {}): Promise<void> {
|
|
14
|
+
const projectPath = process.cwd();
|
|
15
|
+
|
|
16
|
+
// Check if initialized
|
|
17
|
+
if (!await PrompterConfig.prompterDirExists(projectPath)) {
|
|
18
|
+
console.log(chalk.red('\nā Prompter is not initialized in this project.\n'));
|
|
19
|
+
console.log(chalk.gray(' Run `prompter init` first.\n'));
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
console.log(chalk.blue('\nš Generating Epic Generator workflow files...\n'));
|
|
25
|
+
|
|
26
|
+
// Detect currently configured tools
|
|
27
|
+
const configuredTools = await this.detectConfiguredTools(projectPath);
|
|
28
|
+
|
|
29
|
+
if (configuredTools.length === 0) {
|
|
30
|
+
console.log(chalk.yellow('ā ļø No tools configured yet.\n'));
|
|
31
|
+
console.log(chalk.gray(' Run `prompter init` to configure AI tools first.\n'));
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Generate epic-generator workflow files for all configured tools
|
|
37
|
+
let successCount = 0;
|
|
38
|
+
let failCount = 0;
|
|
39
|
+
|
|
40
|
+
for (const toolId of configuredTools) {
|
|
41
|
+
const configurator = registry.get(toolId);
|
|
42
|
+
if (configurator) {
|
|
43
|
+
try {
|
|
44
|
+
// Generate only the epic-generator workflow file
|
|
45
|
+
const body = configurator['getBody']('epic-generator');
|
|
46
|
+
const relativePath = configurator['getRelativePath']('epic-generator');
|
|
47
|
+
const filePath = path.join(projectPath, relativePath);
|
|
48
|
+
|
|
49
|
+
// Ensure directory exists
|
|
50
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
51
|
+
|
|
52
|
+
// Check if file exists
|
|
53
|
+
const fileExists = await this.fileExists(filePath);
|
|
54
|
+
|
|
55
|
+
if (fileExists) {
|
|
56
|
+
console.log(chalk.yellow('ā ļø') + ` ${chalk.cyan(relativePath)} already exists, skipping`);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Get frontmatter if needed
|
|
61
|
+
const frontmatter = configurator['getFrontmatter']('epic-generator');
|
|
62
|
+
const sections: string[] = [];
|
|
63
|
+
if (frontmatter) {
|
|
64
|
+
sections.push(frontmatter.trim());
|
|
65
|
+
}
|
|
66
|
+
sections.push(`${PROMPTER_MARKERS.start}\n${body}\n${PROMPTER_MARKERS.end}`);
|
|
67
|
+
const content = sections.join('\n') + '\n';
|
|
68
|
+
|
|
69
|
+
await fs.writeFile(filePath, content, 'utf-8');
|
|
70
|
+
console.log(chalk.green('ā') + ` Created ${chalk.cyan(relativePath)}`);
|
|
71
|
+
successCount++;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.log(chalk.red('ā') + ` Failed to create files for ${toolId}: ${error}`);
|
|
74
|
+
failCount++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Success message
|
|
80
|
+
console.log(chalk.green(`\nā
Epic Generator workflow files created successfully!\n`));
|
|
81
|
+
console.log(chalk.blue('Next steps:'));
|
|
82
|
+
console.log(chalk.gray(' 1. Use /epic-generator in your AI tool to generate EPICs'));
|
|
83
|
+
console.log(chalk.gray(' 2. EPICs will be saved to prompter/<slug>/epic.md\n'));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
private async fileExists(filePath: string): Promise<boolean> {
|
|
87
|
+
try {
|
|
88
|
+
await fs.access(filePath);
|
|
89
|
+
return true;
|
|
90
|
+
} catch {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private async detectConfiguredTools(projectPath: string): Promise<string[]> {
|
|
96
|
+
const configuredTools: string[] = [];
|
|
97
|
+
const allConfigurators = registry.getAll();
|
|
98
|
+
|
|
99
|
+
for (const configurator of allConfigurators) {
|
|
100
|
+
const targets = configurator.getTargets();
|
|
101
|
+
let hasFiles = false;
|
|
102
|
+
|
|
103
|
+
for (const target of targets) {
|
|
104
|
+
const filePath = path.join(projectPath, target.path);
|
|
105
|
+
if (await this.fileExists(filePath)) {
|
|
106
|
+
hasFiles = true;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (hasFiles) {
|
|
112
|
+
configuredTools.push(configurator.toolId);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return configuredTools;
|
|
117
|
+
}
|
|
118
|
+
}
|