@dedesfr/prompter 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cli/index.js +1 -57
- 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/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 +20 -16
- 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 +1 -64
- package/src/commands/epic-generator.ts +118 -0
- package/src/commands/story-generator.ts +118 -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 +20 -16
- package/src/core/prompt-templates.ts +348 -0
- package/src/core/templates/slash-command-templates.ts +5 -1
|
@@ -9,7 +9,7 @@ export interface SlashCommandTarget {
|
|
|
9
9
|
kind: 'slash';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const ALL_COMMANDS: SlashCommandId[] = ['enhance', 'prd-generator', 'prd-agent-generator', 'product-brief', 'epic-single', 'story-single', 'qa-test-scenario', 'skill-creator', 'ai-humanizer', 'api-contract-generator', 'erd-generator', 'fsd-generator', 'tdd-generator', 'tdd-lite-generator', 'wireframe-generator', 'document-explainer'];
|
|
12
|
+
const ALL_COMMANDS: SlashCommandId[] = ['enhance', 'prd-generator', 'prd-agent-generator', 'product-brief', 'epic-single', 'epic-generator', 'story-single', 'story-generator', 'qa-test-scenario', 'skill-creator', 'ai-humanizer', 'api-contract-generator', 'erd-generator', 'fsd-generator', 'tdd-generator', 'tdd-lite-generator', 'wireframe-generator', 'document-explainer'];
|
|
13
13
|
|
|
14
14
|
export abstract class SlashCommandConfigurator {
|
|
15
15
|
abstract readonly toolId: string;
|
|
@@ -7,7 +7,9 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
7
7
|
'prd-agent-generator': '.claude/commands/prompter/prd-agent-generator.md',
|
|
8
8
|
'product-brief': '.claude/commands/prompter/product-brief.md',
|
|
9
9
|
'epic-single': '.claude/commands/prompter/epic-single.md',
|
|
10
|
+
'epic-generator': '.claude/commands/prompter/epic-generator.md',
|
|
10
11
|
'story-single': '.claude/commands/prompter/story-single.md',
|
|
12
|
+
'story-generator': '.claude/commands/prompter/story-generator.md',
|
|
11
13
|
'qa-test-scenario': '.claude/commands/prompter/qa-test-scenario.md',
|
|
12
14
|
'skill-creator': '.claude/commands/prompter/skill-creator.md',
|
|
13
15
|
'ai-humanizer': '.claude/commands/prompter/ai-humanizer.md',
|
|
@@ -26,7 +28,9 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
26
28
|
'prd-agent-generator': 'Generate a PRD with autonomous assumptions (non-interactive mode)',
|
|
27
29
|
'product-brief': 'Generate an executive-level product brief (1-page summary)',
|
|
28
30
|
'epic-single': 'Generate a single well-defined Jira Epic',
|
|
31
|
+
'epic-generator': 'Generate a comprehensive set of EPICs from documentation',
|
|
29
32
|
'story-single': 'Generate a single Jira User Story from requirements',
|
|
33
|
+
'story-generator': 'Generate comprehensive user stories from EPICs and FSD',
|
|
30
34
|
'qa-test-scenario': 'Generate focused QA test scenarios from PRD',
|
|
31
35
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
32
36
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
@@ -7,7 +7,9 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
7
7
|
'prd-agent-generator': '.codex/prompts/prd-agent-generator.md',
|
|
8
8
|
'product-brief': '.codex/prompts/product-brief.md',
|
|
9
9
|
'epic-single': '.codex/prompts/epic-single.md',
|
|
10
|
+
'epic-generator': '.codex/prompts/epic-generator.md',
|
|
10
11
|
'story-single': '.codex/prompts/story-single.md',
|
|
12
|
+
'story-generator': '.codex/prompts/story-generator.md',
|
|
11
13
|
'qa-test-scenario': '.codex/prompts/qa-test-scenario.md',
|
|
12
14
|
'skill-creator': '.codex/prompts/skill-creator.md',
|
|
13
15
|
'ai-humanizer': '.codex/prompts/ai-humanizer.md',
|
|
@@ -26,7 +28,9 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
26
28
|
'prd-agent-generator': 'Generate a PRD with autonomous assumptions (non-interactive mode)',
|
|
27
29
|
'product-brief': 'Generate an executive-level product brief (1-page summary)',
|
|
28
30
|
'epic-single': 'Generate a single well-defined Jira Epic',
|
|
31
|
+
'epic-generator': 'Generate a comprehensive set of EPICs from documentation',
|
|
29
32
|
'story-single': 'Generate a single Jira User Story from requirements',
|
|
33
|
+
'story-generator': 'Generate comprehensive user stories from EPICs and FSD',
|
|
30
34
|
'qa-test-scenario': 'Generate focused QA test scenarios from PRD',
|
|
31
35
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
32
36
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
@@ -10,7 +10,9 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
10
10
|
'prd-agent-generator': '.github/prompts/prd-agent-generator.prompt.md',
|
|
11
11
|
'product-brief': '.github/prompts/product-brief.prompt.md',
|
|
12
12
|
'epic-single': '.github/prompts/epic-single.prompt.md',
|
|
13
|
+
'epic-generator': '.github/prompts/epic-generator.prompt.md',
|
|
13
14
|
'story-single': '.github/prompts/story-single.prompt.md',
|
|
15
|
+
'story-generator': '.github/prompts/story-generator.prompt.md',
|
|
14
16
|
'qa-test-scenario': '.github/prompts/qa-test-scenario.prompt.md',
|
|
15
17
|
'skill-creator': '.github/prompts/skill-creator.prompt.md',
|
|
16
18
|
'ai-humanizer': '.github/prompts/ai-humanizer.prompt.md',
|
|
@@ -29,7 +31,9 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
29
31
|
'prd-agent-generator': 'Generate a PRD with autonomous assumptions (non-interactive mode)',
|
|
30
32
|
'product-brief': 'Generate an executive-level product brief (1-page summary)',
|
|
31
33
|
'epic-single': 'Generate a single well-defined Jira Epic',
|
|
34
|
+
'epic-generator': 'Generate a comprehensive set of EPICs from documentation',
|
|
32
35
|
'story-single': 'Generate a single Jira User Story from requirements',
|
|
36
|
+
'story-generator': 'Generate comprehensive user stories from EPICs and FSD',
|
|
33
37
|
'qa-test-scenario': 'Generate focused QA test scenarios from PRD',
|
|
34
38
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
35
39
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
@@ -7,7 +7,9 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
7
7
|
'prd-agent-generator': '.kilocode/workflows/prd-agent-generator.md',
|
|
8
8
|
'product-brief': '.kilocode/workflows/product-brief.md',
|
|
9
9
|
'epic-single': '.kilocode/workflows/epic-single.md',
|
|
10
|
+
'epic-generator': '.kilocode/workflows/epic-generator.md',
|
|
10
11
|
'story-single': '.kilocode/workflows/story-single.md',
|
|
12
|
+
'story-generator': '.kilocode/workflows/story-generator.md',
|
|
11
13
|
'qa-test-scenario': '.kilocode/workflows/qa-test-scenario.md',
|
|
12
14
|
'skill-creator': '.kilocode/workflows/skill-creator.md',
|
|
13
15
|
'ai-humanizer': '.kilocode/workflows/ai-humanizer.md',
|
|
@@ -26,7 +28,9 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
26
28
|
'prd-agent-generator': 'Generate a PRD with autonomous assumptions (non-interactive mode)',
|
|
27
29
|
'product-brief': 'Generate an executive-level product brief (1-page summary)',
|
|
28
30
|
'epic-single': 'Generate a single well-defined Jira Epic',
|
|
31
|
+
'epic-generator': 'Generate a comprehensive set of EPICs from documentation',
|
|
29
32
|
'story-single': 'Generate a single Jira User Story from requirements',
|
|
33
|
+
'story-generator': 'Generate comprehensive user stories from EPICs and FSD',
|
|
30
34
|
'qa-test-scenario': 'Generate focused QA test scenarios from PRD',
|
|
31
35
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
32
36
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
@@ -2,22 +2,24 @@ import { SlashCommandConfigurator } from './base.js';
|
|
|
2
2
|
import { SlashCommandId } from '../../templates/index.js';
|
|
3
3
|
|
|
4
4
|
const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
5
|
-
enhance: '.opencode/
|
|
6
|
-
'prd-generator': '.opencode/
|
|
7
|
-
'prd-agent-generator': '.opencode/
|
|
8
|
-
'product-brief': '.opencode/
|
|
9
|
-
'epic-single': '.opencode/
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
5
|
+
enhance: '.opencode/command/prompter-enhance.md',
|
|
6
|
+
'prd-generator': '.opencode/command/prd-generator.md',
|
|
7
|
+
'prd-agent-generator': '.opencode/command/prd-agent-generator.md',
|
|
8
|
+
'product-brief': '.opencode/command/product-brief.md',
|
|
9
|
+
'epic-single': '.opencode/command/epic-single.md',
|
|
10
|
+
'epic-generator': '.opencode/command/epic-generator.md',
|
|
11
|
+
'story-single': '.opencode/command/story-single.md',
|
|
12
|
+
'story-generator': '.opencode/command/story-generator.md',
|
|
13
|
+
'qa-test-scenario': '.opencode/command/qa-test-scenario.md',
|
|
14
|
+
'skill-creator': '.opencode/command/skill-creator.md',
|
|
15
|
+
'ai-humanizer': '.opencode/command/ai-humanizer.md',
|
|
16
|
+
'api-contract-generator': '.opencode/command/api-contract-generator.md',
|
|
17
|
+
'erd-generator': '.opencode/command/erd-generator.md',
|
|
18
|
+
'fsd-generator': '.opencode/command/fsd-generator.md',
|
|
19
|
+
'tdd-generator': '.opencode/command/tdd-generator.md',
|
|
20
|
+
'tdd-lite-generator': '.opencode/command/tdd-lite-generator.md',
|
|
21
|
+
'wireframe-generator': '.opencode/command/wireframe-generator.md',
|
|
22
|
+
'document-explainer': '.opencode/command/document-explainer.md'
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
@@ -26,7 +28,9 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
26
28
|
'prd-agent-generator': 'Generate a PRD with autonomous assumptions (non-interactive mode)',
|
|
27
29
|
'product-brief': 'Generate an executive-level product brief (1-page summary)',
|
|
28
30
|
'epic-single': 'Generate a single well-defined Jira Epic',
|
|
31
|
+
'epic-generator': 'Generate a comprehensive set of EPICs from documentation',
|
|
29
32
|
'story-single': 'Generate a single Jira User Story from requirements',
|
|
33
|
+
'story-generator': 'Generate comprehensive user stories from EPICs and FSD',
|
|
30
34
|
'qa-test-scenario': 'Generate focused QA test scenarios from PRD',
|
|
31
35
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
32
36
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
@@ -1443,6 +1443,352 @@ The story must:
|
|
|
1443
1443
|
Return **ONLY the completed story in Markdown**, nothing else.
|
|
1444
1444
|
`;
|
|
1445
1445
|
|
|
1446
|
+
export const EPIC_GENERATOR_TEMPLATE = `# EPIC Generation Prompt
|
|
1447
|
+
|
|
1448
|
+
# Role & Expertise
|
|
1449
|
+
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.
|
|
1450
|
+
|
|
1451
|
+
# Context
|
|
1452
|
+
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.
|
|
1453
|
+
|
|
1454
|
+
# Primary Objective
|
|
1455
|
+
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.
|
|
1456
|
+
|
|
1457
|
+
# Input Documents
|
|
1458
|
+
1. **FSD (Functional Specification Document)** - PRIMARY
|
|
1459
|
+
- Business requirements and functional capabilities
|
|
1460
|
+
- User workflows and business rules
|
|
1461
|
+
- Acceptance criteria foundations
|
|
1462
|
+
|
|
1463
|
+
2. **TDD (Technical Design Document)** - PRIMARY
|
|
1464
|
+
- System architecture components
|
|
1465
|
+
- Integration points and APIs
|
|
1466
|
+
- Technical constraints and dependencies
|
|
1467
|
+
|
|
1468
|
+
3. **UI Wireframes** - SUPPLEMENTARY
|
|
1469
|
+
- User interface flows
|
|
1470
|
+
- Screen-level functionality
|
|
1471
|
+
- User interaction patterns
|
|
1472
|
+
|
|
1473
|
+
# Process
|
|
1474
|
+
|
|
1475
|
+
## Phase 1: Document Analysis
|
|
1476
|
+
1. Extract all functional requirements from FSD
|
|
1477
|
+
- Identify business capabilities
|
|
1478
|
+
- Map user journeys and workflows
|
|
1479
|
+
- Note business rules and validations
|
|
1480
|
+
2. Extract technical components from TDD
|
|
1481
|
+
- Identify system modules and services
|
|
1482
|
+
- Map integration dependencies
|
|
1483
|
+
- Note technical constraints
|
|
1484
|
+
3. Cross-reference UI Wireframes
|
|
1485
|
+
- Link screens to functional requirements
|
|
1486
|
+
- Identify user-facing features
|
|
1487
|
+
- Note UI-specific requirements
|
|
1488
|
+
|
|
1489
|
+
## Phase 2: EPIC Identification
|
|
1490
|
+
1. Group related requirements into logical feature areas
|
|
1491
|
+
2. Identify natural boundaries based on:
|
|
1492
|
+
- Business domain separation
|
|
1493
|
+
- Technical component boundaries
|
|
1494
|
+
- User journey completeness
|
|
1495
|
+
- Dependency chains
|
|
1496
|
+
3. Validate each EPIC can be independently deliverable
|
|
1497
|
+
|
|
1498
|
+
## Phase 3: EPIC Definition
|
|
1499
|
+
For each identified EPIC, define:
|
|
1500
|
+
- Clear business value statement
|
|
1501
|
+
- Scope boundaries (in/out)
|
|
1502
|
+
- High-level acceptance criteria
|
|
1503
|
+
- Dependencies and prerequisites
|
|
1504
|
+
- Estimated complexity tier
|
|
1505
|
+
|
|
1506
|
+
## Phase 4: Validation
|
|
1507
|
+
1. Verify complete coverage of all requirements
|
|
1508
|
+
2. Check for gaps between documents
|
|
1509
|
+
3. Identify any conflicting requirements
|
|
1510
|
+
4. Flag assumptions made
|
|
1511
|
+
|
|
1512
|
+
# Output Format
|
|
1513
|
+
|
|
1514
|
+
## Executive Summary
|
|
1515
|
+
- Total EPICs identified: [number]
|
|
1516
|
+
- Complexity distribution: [High/Medium/Low counts]
|
|
1517
|
+
- Key dependencies identified: [summary]
|
|
1518
|
+
- Coverage gaps or conflicts: [if any]
|
|
1519
|
+
|
|
1520
|
+
## EPIC Catalog
|
|
1521
|
+
|
|
1522
|
+
### EPIC-[XXX]: [EPIC Title]
|
|
1523
|
+
|
|
1524
|
+
**Business Value Statement:**
|
|
1525
|
+
[2-3 sentences describing the business outcome and user benefit]
|
|
1526
|
+
|
|
1527
|
+
**Description:**
|
|
1528
|
+
[Detailed description of what this EPIC delivers]
|
|
1529
|
+
|
|
1530
|
+
**Source Traceability:**
|
|
1531
|
+
| Document | Reference | Section/Page |
|
|
1532
|
+
|----------|-----------|--------------|
|
|
1533
|
+
| FSD | [Requirement ID] | [Location] |
|
|
1534
|
+
| TDD | [Component/Section] | [Location] |
|
|
1535
|
+
| Wireframe | [Screen Name] | [If applicable] |
|
|
1536
|
+
|
|
1537
|
+
**Scope Definition:**
|
|
1538
|
+
| In Scope | Out of Scope |
|
|
1539
|
+
|----------|--------------|
|
|
1540
|
+
| [Item 1] | [Item 1] |
|
|
1541
|
+
| [Item 2] | [Item 2] |
|
|
1542
|
+
|
|
1543
|
+
**High-Level Acceptance Criteria:**
|
|
1544
|
+
- [ ] [Criterion 1]
|
|
1545
|
+
- [ ] [Criterion 2]
|
|
1546
|
+
- [ ] [Criterion 3]
|
|
1547
|
+
- [ ] [Criterion 4]
|
|
1548
|
+
|
|
1549
|
+
**Dependencies:**
|
|
1550
|
+
- **Prerequisite EPICs:** [EPIC-XXX, EPIC-XXX] or None
|
|
1551
|
+
- **External Dependencies:** [Systems, teams, data]
|
|
1552
|
+
- **Technical Prerequisites:** [Infrastructure, APIs, etc.]
|
|
1553
|
+
|
|
1554
|
+
**Complexity Assessment:**
|
|
1555
|
+
- **Size:** [S / M / L / XL]
|
|
1556
|
+
- **Technical Complexity:** [Low / Medium / High]
|
|
1557
|
+
- **Integration Complexity:** [Low / Medium / High]
|
|
1558
|
+
- **Estimated Story Count:** [Range]
|
|
1559
|
+
|
|
1560
|
+
**Risks & Assumptions:**
|
|
1561
|
+
- **Assumptions:** [List key assumptions]
|
|
1562
|
+
- **Risks:** [List identified risks]
|
|
1563
|
+
|
|
1564
|
+
---
|
|
1565
|
+
|
|
1566
|
+
[Repeat for each EPIC]
|
|
1567
|
+
|
|
1568
|
+
## Dependency Map
|
|
1569
|
+
|
|
1570
|
+
[Visual or text representation of EPIC dependencies]
|
|
1571
|
+
EPIC-001 ──► EPIC-003
|
|
1572
|
+
EPIC-002 ──► EPIC-003
|
|
1573
|
+
EPIC-003 ──► EPIC-005
|
|
1574
|
+
|
|
1575
|
+
## Traceability Matrix
|
|
1576
|
+
| Requirement ID | FSD Section | TDD Component | Wireframe | EPIC |
|
|
1577
|
+
|----------------|-------------|---------------|-----------|------|
|
|
1578
|
+
| [REQ-001] | [Section] | [Component] | [Screen] | [EPIC-XXX] |
|
|
1579
|
+
|
|
1580
|
+
## Gaps & Recommendations
|
|
1581
|
+
1. **Identified Gaps:** [Requirements not fully covered]
|
|
1582
|
+
2. **Conflicts Found:** [Contradictions between documents]
|
|
1583
|
+
3. **Recommendations:** [Suggested clarifications needed]
|
|
1584
|
+
|
|
1585
|
+
# Quality Standards
|
|
1586
|
+
- Every functional requirement must map to at least one EPIC
|
|
1587
|
+
- Each EPIC must have clear, measurable acceptance criteria
|
|
1588
|
+
- Dependencies must form a valid directed acyclic graph (no circular dependencies)
|
|
1589
|
+
- EPIC sizing should allow decomposition into 5-15 user stories
|
|
1590
|
+
- Business value must be articulated in user/business terms, not technical terms
|
|
1591
|
+
- All assumptions must be explicitly stated
|
|
1592
|
+
|
|
1593
|
+
# Special Instructions
|
|
1594
|
+
- If FSD and TDD conflict, note the conflict and use FSD as the authority for functional scope
|
|
1595
|
+
- If wireframes show features not in FSD/TDD, flag as "Potential Scope Addition"
|
|
1596
|
+
- Group infrastructure/DevOps requirements into dedicated technical EPICs
|
|
1597
|
+
- Non-functional requirements (security, performance) should be integrated into relevant EPICs AND have a dedicated NFR EPIC if substantial
|
|
1598
|
+
- Use consistent naming convention: EPIC-[3-digit number]: [Verb] [Object] [Qualifier]
|
|
1599
|
+
|
|
1600
|
+
# Verification Checklist
|
|
1601
|
+
After generating EPICs, verify:
|
|
1602
|
+
- [ ] 100% of FSD functional requirements are covered
|
|
1603
|
+
- [ ] All TDD components have corresponding EPICs
|
|
1604
|
+
- [ ] No orphaned wireframe screens
|
|
1605
|
+
- [ ] Dependency chain is logical and achievable
|
|
1606
|
+
- [ ] Each EPIC is independently valuable
|
|
1607
|
+
- [ ] Complexity assessments are consistent
|
|
1608
|
+
- [ ] Traceability is complete and accurate
|
|
1609
|
+
`;
|
|
1610
|
+
|
|
1611
|
+
export const STORY_GENERATOR_TEMPLATE = `# Story Generation Prompt
|
|
1612
|
+
|
|
1613
|
+
# Role & Expertise
|
|
1614
|
+
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.
|
|
1615
|
+
|
|
1616
|
+
# Context
|
|
1617
|
+
You will receive two primary inputs:
|
|
1618
|
+
1. **Epics** (Primary Resource) - High-level feature descriptions defining the scope
|
|
1619
|
+
2. **FSD (Functional Specification Document)** (Secondary Resource) - Detailed functional requirements, business rules, and technical specifications
|
|
1620
|
+
|
|
1621
|
+
Your task is to synthesize these inputs into complete, development-ready user stories.
|
|
1622
|
+
|
|
1623
|
+
# Primary Objective
|
|
1624
|
+
Generate comprehensive user stories from provided Epics, enriched with details from the FSD, following industry-standard Agile practices.
|
|
1625
|
+
|
|
1626
|
+
# Process
|
|
1627
|
+
1. **Epic Analysis**
|
|
1628
|
+
- Identify the core business value and user need
|
|
1629
|
+
- Determine story boundaries and natural decomposition points
|
|
1630
|
+
- Map dependencies between potential stories
|
|
1631
|
+
|
|
1632
|
+
2. **FSD Integration**
|
|
1633
|
+
- Extract relevant functional requirements for each story
|
|
1634
|
+
- Identify business rules that impact acceptance criteria
|
|
1635
|
+
- Note technical constraints and integration points
|
|
1636
|
+
- Pull UI/UX specifications where applicable
|
|
1637
|
+
|
|
1638
|
+
3. **Story Construction**
|
|
1639
|
+
- Write clear user story statements
|
|
1640
|
+
- Define comprehensive acceptance criteria
|
|
1641
|
+
- Add technical notes and dependencies
|
|
1642
|
+
- Estimate relative complexity
|
|
1643
|
+
|
|
1644
|
+
4. **Quality Verification**
|
|
1645
|
+
- Ensure stories follow INVEST principles
|
|
1646
|
+
- Verify traceability back to Epic and FSD
|
|
1647
|
+
- Confirm acceptance criteria are testable
|
|
1648
|
+
|
|
1649
|
+
# Input Specifications
|
|
1650
|
+
**Epic Format Expected:**
|
|
1651
|
+
- Epic ID/Name
|
|
1652
|
+
- Description/Goal
|
|
1653
|
+
- Business Value
|
|
1654
|
+
- Scope boundaries (in/out)
|
|
1655
|
+
|
|
1656
|
+
**FSD Format Expected:**
|
|
1657
|
+
- Functional requirements
|
|
1658
|
+
- Business rules
|
|
1659
|
+
- User flows/workflows
|
|
1660
|
+
- Data requirements
|
|
1661
|
+
- Integration specifications
|
|
1662
|
+
- UI/UX requirements (if available)
|
|
1663
|
+
|
|
1664
|
+
# Output Requirements
|
|
1665
|
+
|
|
1666
|
+
For each Epic, generate stories in this exact format:
|
|
1667
|
+
|
|
1668
|
+
---
|
|
1669
|
+
|
|
1670
|
+
## Epic: [Epic Name/ID]
|
|
1671
|
+
|
|
1672
|
+
### Story [Number]: [Concise Story Title]
|
|
1673
|
+
|
|
1674
|
+
**User Story:**
|
|
1675
|
+
As a [specific user role],
|
|
1676
|
+
I want to [action/capability],
|
|
1677
|
+
So that [business value/outcome].
|
|
1678
|
+
|
|
1679
|
+
**Description:**
|
|
1680
|
+
[2-3 sentences providing additional context, referencing FSD sections where applicable]
|
|
1681
|
+
|
|
1682
|
+
**Acceptance Criteria:**
|
|
1683
|
+
\`\`\`gherkin
|
|
1684
|
+
GIVEN [precondition/context]
|
|
1685
|
+
WHEN [action/trigger]
|
|
1686
|
+
THEN [expected outcome]
|
|
1687
|
+
|
|
1688
|
+
GIVEN [precondition/context]
|
|
1689
|
+
WHEN [alternative action]
|
|
1690
|
+
THEN [expected outcome]
|
|
1691
|
+
\`\`\`
|
|
1692
|
+
|
|
1693
|
+
**Business Rules:**
|
|
1694
|
+
- BR-1: [Rule from FSD]
|
|
1695
|
+
- BR-2: [Rule from FSD]
|
|
1696
|
+
|
|
1697
|
+
**Technical Notes:**
|
|
1698
|
+
- [Integration requirements]
|
|
1699
|
+
- [Data considerations]
|
|
1700
|
+
- [API/System dependencies]
|
|
1701
|
+
|
|
1702
|
+
**FSD Reference:** [Section/Requirement IDs traced from FSD]
|
|
1703
|
+
|
|
1704
|
+
**Dependencies:** [Other story IDs or external dependencies]
|
|
1705
|
+
|
|
1706
|
+
**Story Points:** [Fibonacci estimate: 1, 2, 3, 5, 8, 13]
|
|
1707
|
+
|
|
1708
|
+
**Priority:** [Must Have / Should Have / Could Have / Won't Have]
|
|
1709
|
+
|
|
1710
|
+
---
|
|
1711
|
+
|
|
1712
|
+
# Quality Standards
|
|
1713
|
+
- **INVEST Compliant:** Each story must be Independent, Negotiable, Valuable, Estimable, Small, Testable
|
|
1714
|
+
- **Acceptance Criteria:** Minimum 3 criteria per story, written in Gherkin format (Given/When/Then)
|
|
1715
|
+
- **Traceability:** Every story must reference source Epic and relevant FSD sections
|
|
1716
|
+
- **Granularity:** Stories should be completable within a single sprint (typically 1-8 story points)
|
|
1717
|
+
- **Completeness:** Include edge cases and error scenarios in acceptance criteria
|
|
1718
|
+
|
|
1719
|
+
# Special Instructions
|
|
1720
|
+
1. **Decomposition Rules:**
|
|
1721
|
+
- If an Epic contains multiple user roles, create separate stories per role
|
|
1722
|
+
- If workflows have distinct phases, split into sequential stories
|
|
1723
|
+
- CRUD operations should be separate stories unless trivially simple
|
|
1724
|
+
|
|
1725
|
+
2. **Acceptance Criteria Guidelines:**
|
|
1726
|
+
- Include happy path scenarios
|
|
1727
|
+
- Include at least one error/edge case scenario
|
|
1728
|
+
- Include validation rules from FSD
|
|
1729
|
+
- Make criteria specific and measurable
|
|
1730
|
+
|
|
1731
|
+
3. **When FSD Details Are Missing:**
|
|
1732
|
+
- Flag with "[CLARIFICATION NEEDED]" tag
|
|
1733
|
+
- Provide reasonable assumption with "[ASSUMPTION]" tag
|
|
1734
|
+
- Continue with story generation
|
|
1735
|
+
|
|
1736
|
+
4. **Output Organization:**
|
|
1737
|
+
- Group stories by Epic
|
|
1738
|
+
- Order stories by logical implementation sequence
|
|
1739
|
+
- Highlight cross-Epic dependencies
|
|
1740
|
+
|
|
1741
|
+
# Example Output
|
|
1742
|
+
|
|
1743
|
+
## Epic: User Authentication
|
|
1744
|
+
|
|
1745
|
+
### Story 1: User Login with Email
|
|
1746
|
+
|
|
1747
|
+
**User Story:**
|
|
1748
|
+
As a registered user,
|
|
1749
|
+
I want to log in using my email and password,
|
|
1750
|
+
So that I can access my personalized dashboard securely.
|
|
1751
|
+
|
|
1752
|
+
**Description:**
|
|
1753
|
+
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.
|
|
1754
|
+
|
|
1755
|
+
**Acceptance Criteria:**
|
|
1756
|
+
\`\`\`gherkin
|
|
1757
|
+
GIVEN I am on the login page
|
|
1758
|
+
WHEN I enter valid email and password and click "Login"
|
|
1759
|
+
THEN I am redirected to my dashboard and see a welcome message
|
|
1760
|
+
|
|
1761
|
+
GIVEN I am on the login page
|
|
1762
|
+
WHEN I enter invalid credentials and click "Login"
|
|
1763
|
+
THEN I see an error message "Invalid email or password" and remain on login page
|
|
1764
|
+
|
|
1765
|
+
GIVEN I have failed login 5 times
|
|
1766
|
+
WHEN I attempt to login again
|
|
1767
|
+
THEN my account is temporarily locked for 15 minutes per BR-AUTH-03
|
|
1768
|
+
\`\`\`
|
|
1769
|
+
|
|
1770
|
+
**Business Rules:**
|
|
1771
|
+
- BR-AUTH-01: Passwords must be minimum 8 characters
|
|
1772
|
+
- BR-AUTH-03: Account lockout after 5 failed attempts
|
|
1773
|
+
|
|
1774
|
+
**Technical Notes:**
|
|
1775
|
+
- Integrate with OAuth 2.0 service (per FSD 3.2.4)
|
|
1776
|
+
- Session timeout: 30 minutes of inactivity
|
|
1777
|
+
- Password hashing: bcrypt with salt
|
|
1778
|
+
|
|
1779
|
+
**FSD Reference:** Section 3.2, Requirements FR-AUTH-001 through FR-AUTH-008
|
|
1780
|
+
|
|
1781
|
+
**Dependencies:** None (foundational story)
|
|
1782
|
+
|
|
1783
|
+
**Story Points:** 5
|
|
1784
|
+
|
|
1785
|
+
**Priority:** Must Have
|
|
1786
|
+
|
|
1787
|
+
---
|
|
1788
|
+
|
|
1789
|
+
Now process the provided Epic(s) and FSD to generate comprehensive user stories.
|
|
1790
|
+
`;
|
|
1791
|
+
|
|
1446
1792
|
export const API_CONTRACT_GENERATOR_TEMPLATE = `# API Contract Generator Prompt
|
|
1447
1793
|
|
|
1448
1794
|
# Role & Expertise
|
|
@@ -2725,6 +3071,7 @@ export const PROMPT_TEMPLATES: Record<string, string> = {
|
|
|
2725
3071
|
'ai-humanizer': AI_HUMANIZER_TEMPLATE,
|
|
2726
3072
|
'api-contract-generator': API_CONTRACT_GENERATOR_TEMPLATE,
|
|
2727
3073
|
'document-explainer': DOCUMENT_EXPLAINER_TEMPLATE,
|
|
3074
|
+
'epic-generator': EPIC_GENERATOR_TEMPLATE,
|
|
2728
3075
|
'epic-single': EPIC_SINGLE_TEMPLATE,
|
|
2729
3076
|
'erd-generator': ERD_GENERATOR_TEMPLATE,
|
|
2730
3077
|
'fsd-generator': FSD_GENERATOR_TEMPLATE,
|
|
@@ -2733,6 +3080,7 @@ export const PROMPT_TEMPLATES: Record<string, string> = {
|
|
|
2733
3080
|
'product-brief': PRODUCT_BRIEF_TEMPLATE,
|
|
2734
3081
|
'qa-test-scenario': QA_TEST_SCENARIO_TEMPLATE,
|
|
2735
3082
|
'skill-creator': SKILL_CREATOR_TEMPLATE,
|
|
3083
|
+
'story-generator': STORY_GENERATOR_TEMPLATE,
|
|
2736
3084
|
'story-single': STORY_SINGLE_TEMPLATE,
|
|
2737
3085
|
'tdd-generator': TDD_GENERATOR_TEMPLATE,
|
|
2738
3086
|
'tdd-lite-generator': TDD_LITE_GENERATOR_TEMPLATE,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
API_CONTRACT_GENERATOR_TEMPLATE,
|
|
3
|
+
EPIC_GENERATOR_TEMPLATE,
|
|
3
4
|
ERD_GENERATOR_TEMPLATE,
|
|
4
5
|
FSD_GENERATOR_TEMPLATE,
|
|
6
|
+
STORY_GENERATOR_TEMPLATE,
|
|
5
7
|
TDD_GENERATOR_TEMPLATE,
|
|
6
8
|
TDD_LITE_GENERATOR_TEMPLATE,
|
|
7
9
|
WIREFRAME_GENERATOR_TEMPLATE,
|
|
8
10
|
DOCUMENT_EXPLAINER_TEMPLATE
|
|
9
11
|
} from '../prompt-templates.js';
|
|
10
12
|
|
|
11
|
-
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'story-single' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'erd-generator' | 'fsd-generator' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
13
|
+
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'epic-generator' | 'story-single' | 'story-generator' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'erd-generator' | 'fsd-generator' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
12
14
|
|
|
13
15
|
const enhanceWorkflow = `## MUST FOLLOW
|
|
14
16
|
- Response Language: {User Request Language}
|
|
@@ -1032,7 +1034,9 @@ export const slashCommandBodies: Record<SlashCommandId, string> = {
|
|
|
1032
1034
|
'prd-agent-generator': prdAgentGeneratorWorkflow,
|
|
1033
1035
|
'product-brief': productBriefWorkflow,
|
|
1034
1036
|
'epic-single': epicSingleWorkflow,
|
|
1037
|
+
'epic-generator': EPIC_GENERATOR_TEMPLATE,
|
|
1035
1038
|
'story-single': storySingleWorkflow,
|
|
1039
|
+
'story-generator': STORY_GENERATOR_TEMPLATE,
|
|
1036
1040
|
'qa-test-scenario': qaTestScenarioWorkflow,
|
|
1037
1041
|
'skill-creator': skillCreatorWorkflow,
|
|
1038
1042
|
'ai-humanizer': aiHumanizerWorkflow,
|