aped-method 1.3.0 → 1.6.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.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { run } from '../src/index.js';
4
+
5
+ run().catch((err) => {
6
+ console.error('\x1b[31mError:\x1b[0m', err.message);
7
+ process.exit(1);
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aped-method",
3
- "version": "1.3.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "description": "Scaffold the APED pipeline (Analyze, PRD, Epics, Dev, Review) into any Claude Code project",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -63,7 +63,7 @@ ${a.lime}${a.bold} M E T H O D${a.reset}
63
63
  ${a.dim} ─────────────────────────────────${a.reset}
64
64
  `;
65
65
 
66
- const PIPELINE = ` ${a.emerald}${a.bold}A${a.reset}${a.dim}nalyze${a.reset} ${a.dim}→${a.reset} ${a.mint}${a.bold}P${a.reset}${a.dim}RD${a.reset} ${a.dim}→${a.reset} ${a.yellow}${a.bold}E${a.reset}${a.dim}pics${a.reset} ${a.dim}→${a.reset} ${a.lime}${a.bold}D${a.reset}${a.dim}ev${a.reset} ${a.dim}→${a.reset} ${a.red}${a.bold}R${a.reset}${a.dim}eview${a.reset}`;
66
+ const PIPELINE = ` ${a.emerald}${a.bold}A${a.reset}${a.dim}nalyze${a.reset} ${a.dim}→${a.reset} ${a.mint}${a.bold}P${a.reset}${a.dim}RD${a.reset} ${a.dim}→${a.reset} ${a.magenta}${a.bold}UX${a.reset} ${a.dim}→${a.reset} ${a.yellow}${a.bold}E${a.reset}${a.dim}pics${a.reset} ${a.dim}→${a.reset} ${a.lime}${a.bold}D${a.reset}${a.dim}ev${a.reset} ${a.dim}→${a.reset} ${a.red}${a.bold}R${a.reset}${a.dim}eview${a.reset}`;
67
67
 
68
68
  // ── Spinner ──
69
69
  const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
@@ -580,15 +580,22 @@ function printDone(created, updated, skipped, mode) {
580
580
  console.log(` ${a.emerald}${a.bold}╚══════════════════════════════════════╝${a.reset}`);
581
581
  console.log('');
582
582
 
583
- console.log(` ${a.bold}Available commands:${a.reset}`);
583
+ console.log(` ${a.bold}Pipeline commands:${a.reset}`);
584
584
  console.log('');
585
- console.log(` ${a.emerald}${a.bold}/aped-a${a.reset} ${dim('Analyze — parallel research → product brief')}`);
586
- console.log(` ${a.mint}${a.bold}/aped-p${a.reset} ${dim('PRD — autonomous generation from brief')}`);
587
- console.log(` ${a.yellow}${a.bold}/aped-e${a.reset} ${dim('Epicsrequirements decomposition')}`);
588
- console.log(` ${a.lime}${a.bold}/aped-d${a.reset} ${dim('DevTDD story implementation')}`);
589
- console.log(` ${a.red}${a.bold}/aped-r${a.reset} ${dim('Reviewadversarial code review')}`);
585
+ console.log(` ${a.emerald}${a.bold}/aped-a${a.reset} ${dim('Analyze — parallel research → product brief')}`);
586
+ console.log(` ${a.mint}${a.bold}/aped-p${a.reset} ${dim('PRD — autonomous generation from brief')}`);
587
+ console.log(` ${a.magenta}${a.bold}/aped-ux${a.reset} ${dim('UXscreen flows, wireframes, components')}`);
588
+ console.log(` ${a.yellow}${a.bold}/aped-e${a.reset} ${dim('Epicsrequirements decomposition')}`);
589
+ console.log(` ${a.lime}${a.bold}/aped-d${a.reset} ${dim('DevTDD story implementation')}`);
590
+ console.log(` ${a.red}${a.bold}/aped-r${a.reset} ${dim('Review — adversarial code review')}`);
590
591
  console.log('');
591
- console.log(` ${a.spring}${a.bold}/aped-quick${a.reset} ${dim('Quick fix/feature — bypass full pipeline')}`);
592
+ console.log(` ${a.bold}Utility commands:${a.reset}`);
593
+ console.log('');
594
+ console.log(` ${a.spring}${a.bold}/aped-s${a.reset} ${dim('Sprint status — progress dashboard')}`);
595
+ console.log(` ${a.spring}${a.bold}/aped-c${a.reset} ${dim('Correct course — manage scope changes')}`);
596
+ console.log(` ${a.spring}${a.bold}/aped-ctx${a.reset} ${dim('Project context — brownfield analysis')}`);
597
+ console.log(` ${a.spring}${a.bold}/aped-qa${a.reset} ${dim('QA — generate E2E & integration tests')}`);
598
+ console.log(` ${a.spring}${a.bold}/aped-quick${a.reset} ${dim('Quick fix/feature — bypass pipeline')}`);
592
599
  console.log(` ${a.spring}${a.bold}/aped-all${a.reset} ${dim('Full pipeline A→P→E→D→R')}`);
593
600
  console.log('');
594
601
  console.log(` ${dim('Guardrail hook active — pipeline coherence enforced')}`);
@@ -5,7 +5,7 @@ export function commands(c) {
5
5
  path: `${c.commandsDir}/aped-a.md`,
6
6
  content: `---
7
7
  name: aped-a
8
- description: 'Analyze project through parallel research. Use when user says "analyze", "research project", or "aped analyze"'
8
+ description: 'Analyzes a new project idea through parallel market, domain, and technical research. Use when user says "research idea", "aped analyze", or invokes /aped-a. Not for existing codebases — use aped-ctx for brownfield projects.'
9
9
  ---
10
10
 
11
11
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-a/SKILL.md
@@ -15,7 +15,7 @@ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-a/SKILL.md
15
15
  path: `${c.commandsDir}/aped-p.md`,
16
16
  content: `---
17
17
  name: aped-p
18
- description: 'Generate PRD from product brief. Use when user says "create PRD", "generate PRD", or "aped prd"'
18
+ description: 'Generates PRD autonomously from product brief. Use when user says "create PRD", "generate PRD", "aped prd", or invokes /aped-p.'
19
19
  ---
20
20
 
21
21
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-p/SKILL.md
@@ -25,7 +25,7 @@ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-p/SKILL.md
25
25
  path: `${c.commandsDir}/aped-e.md`,
26
26
  content: `---
27
27
  name: aped-e
28
- description: 'Create epics and stories from PRD. Use when user says "create epics", "break into stories", or "aped epics"'
28
+ description: 'Creates epics and stories from PRD with full FR coverage. Use when user says "create epics", "break into stories", "aped epics", or invokes /aped-e.'
29
29
  ---
30
30
 
31
31
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-e/SKILL.md
@@ -35,7 +35,7 @@ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-e/SKILL.md
35
35
  path: `${c.commandsDir}/aped-d.md`,
36
36
  content: `---
37
37
  name: aped-d
38
- description: 'Dev sprint - implement next story with TDD. Use when user says "start dev", "implement story", or "aped dev"'
38
+ description: 'Implements next story with TDD red-green-refactor cycle. Use when user says "start dev", "implement story", "aped dev", or invokes /aped-d.'
39
39
  ---
40
40
 
41
41
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-d/SKILL.md
@@ -45,17 +45,67 @@ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-d/SKILL.md
45
45
  path: `${c.commandsDir}/aped-r.md`,
46
46
  content: `---
47
47
  name: aped-r
48
- description: 'Adversarial code review for completed story. Use when user says "review code", "run review", or "aped review"'
48
+ description: 'Reviews completed stories adversarially with minimum 3 findings. Use when user says "review code", "run review", "aped review", or invokes /aped-r.'
49
49
  ---
50
50
 
51
51
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-r/SKILL.md
52
+ `,
53
+ },
54
+ {
55
+ path: `${c.commandsDir}/aped-ux.md`,
56
+ content: `---
57
+ name: aped-ux
58
+ description: 'Designs UX specifications from PRD — screen flows, wireframes, component inventory. Use when user says "design UX", "create wireframes", "UX spec", "aped ux", or invokes /aped-ux. Runs between PRD and Epics phases.'
59
+ ---
60
+
61
+ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-ux/SKILL.md
62
+ `,
63
+ },
64
+ {
65
+ path: `${c.commandsDir}/aped-s.md`,
66
+ content: `---
67
+ name: aped-s
68
+ description: 'Shows sprint status dashboard with progress, blockers, and next actions. Use when user says "sprint status", "show progress", "aped status", or invokes /aped-s.'
69
+ ---
70
+
71
+ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-s/SKILL.md
72
+ `,
73
+ },
74
+ {
75
+ path: `${c.commandsDir}/aped-c.md`,
76
+ content: `---
77
+ name: aped-c
78
+ description: 'Manages scope changes and pivots during development with impact analysis. Use when user says "correct course", "change scope", "pivot", "aped correct", or invokes /aped-c.'
79
+ ---
80
+
81
+ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-c/SKILL.md
82
+ `,
83
+ },
84
+ {
85
+ path: `${c.commandsDir}/aped-ctx.md`,
86
+ content: `---
87
+ name: aped-ctx
88
+ description: 'Analyzes existing codebase to generate project context for brownfield development. Use when user says "document codebase", "project context", "existing project", "aped context", or invokes /aped-ctx. Not for new project ideation — use aped-a for greenfield.'
89
+ ---
90
+
91
+ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-ctx/SKILL.md
92
+ `,
93
+ },
94
+ {
95
+ path: `${c.commandsDir}/aped-qa.md`,
96
+ content: `---
97
+ name: aped-qa
98
+ description: 'Generates E2E and integration tests from acceptance criteria for completed features. Use when user says "generate tests", "E2E tests", "integration tests", "aped qa", or invokes /aped-qa.'
99
+ ---
100
+
101
+ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-qa/SKILL.md
52
102
  `,
53
103
  },
54
104
  {
55
105
  path: `${c.commandsDir}/aped-quick.md`,
56
106
  content: `---
57
107
  name: aped-quick
58
- description: 'Quick fix/feature bypassing full pipeline. Use when user says "quick fix", "quick feature", "aped quick", or "hotfix"'
108
+ description: 'Implements quick fixes and small features bypassing the full pipeline. Use when user says "quick fix", "quick feature", "hotfix", "aped quick", or invokes /aped-quick.'
59
109
  ---
60
110
 
61
111
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-quick/SKILL.md
@@ -65,7 +115,7 @@ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-quick/SKILL.md
65
115
  path: `${c.commandsDir}/aped-all.md`,
66
116
  content: `---
67
117
  name: aped-all
68
- description: 'Run full APED pipeline (Analyze>PRD>Epics>Dev>Review). Use when user says "run full pipeline", "aped all", or "start from scratch"'
118
+ description: 'Runs the full APED pipeline from Analyze through Review with auto-resume. Use when user says "run full pipeline", "aped all", or invokes /aped-all.'
69
119
  ---
70
120
 
71
121
  Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-all/SKILL.md
@@ -73,8 +73,8 @@ HAS_EPICS=false
73
73
  # ── Phase-aware guardrail logic ──
74
74
  WARNINGS=()
75
75
 
76
- # Phase transition map: none → analyze → prd → epics → dev ↔ review → done
77
- PHASE_ORDER="none analyze prd epics dev review done"
76
+ # Phase transition map: none → analyze → prd → ux → epics → dev ↔ review → done
77
+ PHASE_ORDER="none analyze prd ux epics dev review done"
78
78
 
79
79
  phase_index() {
80
80
  local i=0
@@ -46,6 +46,10 @@ export function references(c) {
46
46
  path: `${a}/aped-r/references/review-criteria.md`,
47
47
  content: REVIEW_CRITERIA,
48
48
  },
49
+ {
50
+ path: `${a}/aped-ux/references/ux-patterns.md`,
51
+ content: UX_PATTERNS,
52
+ },
49
53
  ];
50
54
  }
51
55
 
@@ -547,3 +551,84 @@ web_app,"website,webapp,browser,SPA,PWA","SPA or MPA?;Browser support?;SEO neede
547
551
  mobile_app,"iOS,Android,app,mobile,iPhone,iPad","Native or cross-platform?;Offline needed?;Push notifications?;Device features?;Store compliance?","platform_reqs;device_permissions;offline_mode;push_strategy;store_compliance","desktop_features;cli_commands","app store guidelines;platform requirements","Gesture innovation;AR/VR features"
548
552
  saas_b2b,"SaaS,B2B,platform,dashboard,teams,enterprise","Multi-tenant?;Permission model?;Subscription tiers?;Integrations?;Compliance?","tenant_model;rbac_matrix;subscription_tiers;integration_list;compliance_reqs","cli_interface;mobile_first","compliance requirements;integration guides","Workflow automation;AI agents"
549
553
  cli_tool,"CLI,command,terminal,bash,script","Interactive or scriptable?;Output formats?;Config method?;Shell completion?","command_structure;output_formats;config_schema;scripting_support","visual_design;ux_principles;touch_interactions","CLI design patterns;shell integration","Natural language CLI;AI commands"`;
554
+
555
+ const UX_PATTERNS = `# UX Screen Patterns Catalog
556
+
557
+ ## Screen Types
558
+
559
+ ### Form Screens
560
+ - **Login/Register**: email + password, social auth buttons, forgot link
561
+ - **Settings**: grouped sections, save/cancel, inline validation
562
+ - **Wizard/Multi-step**: progress indicator, back/next, step validation
563
+ - **Search + Filters**: search bar, filter sidebar/chips, results list
564
+
565
+ ### List Screens
566
+ - **Data Table**: sortable headers, row actions, pagination, bulk select
567
+ - **Card Grid**: image + title + meta, responsive columns, load more
568
+ - **Feed/Timeline**: chronological, infinite scroll, activity items
569
+
570
+ ### Detail Screens
571
+ - **Profile/Entity**: header (avatar, name, stats), tabbed content, actions
572
+ - **Article/Content**: title, meta, body, sidebar, related items
573
+
574
+ ### Dashboard Screens
575
+ - **Analytics**: stat cards, charts, date range picker, export
576
+ - **Admin**: sidebar nav, content area, notification badge
577
+
578
+ ### Utility Screens
579
+ - **Empty State**: illustration, message, CTA button
580
+ - **Error Page**: error code, message, back/home links
581
+ - **Loading**: skeleton screens, progress bar, spinner
582
+
583
+ ## Layout Patterns
584
+
585
+ ### Navigation
586
+ - **Top Nav**: logo left, nav center/right, avatar far right
587
+ - **Sidebar**: collapsible, icons + labels, active indicator, mobile hamburger
588
+ - **Tab Bar**: bottom tabs (mobile), top tabs (desktop), badge counts
589
+ - **Breadcrumb**: path hierarchy, current page non-linked
590
+
591
+ ### Content Layout
592
+ - **Sidebar + Content**: 240-280px sidebar, fluid content, responsive collapse
593
+ - **Full Width**: max-width container (1200-1440px), centered
594
+ - **Split View**: list left, detail right (email pattern), resizable
595
+ - **Grid**: 12-column, responsive breakpoints (sm/md/lg/xl)
596
+
597
+ ## Interaction Patterns
598
+
599
+ ### Forms
600
+ - **Inline Validation**: validate on blur, show error below field, green checkmark on valid
601
+ - **Progressive Disclosure**: show fields based on previous answers
602
+ - **Autosave**: debounced save, "Saved" indicator, conflict resolution
603
+
604
+ ### Data
605
+ - **Optimistic Updates**: update UI immediately, revert on error
606
+ - **Pagination**: page numbers for known total, infinite scroll for feeds
607
+ - **Search**: debounced input (300ms), loading indicator, clear button
608
+
609
+ ### Feedback
610
+ - **Toast/Snackbar**: bottom-right, auto-dismiss (5s), action button, stacking
611
+ - **Modal/Dialog**: overlay, focus trap, escape to close, confirm/cancel
612
+ - **Inline Alerts**: contextual, dismissible, icon + message + action
613
+
614
+ ## Responsive Breakpoints
615
+
616
+ | Name | Width | Typical |
617
+ |------|-------|---------|
618
+ | sm | < 640px | Mobile portrait |
619
+ | md | 640-1024px | Tablet / mobile landscape |
620
+ | lg | 1024-1440px | Desktop |
621
+ | xl | > 1440px | Large desktop |
622
+
623
+ ## Accessibility Checklist
624
+
625
+ - [ ] All interactive elements keyboard-navigable (Tab, Enter, Escape)
626
+ - [ ] Focus indicator visible on all focusable elements
627
+ - [ ] ARIA labels on icon-only buttons
628
+ - [ ] Color contrast ratio ≥ 4.5:1 (text), ≥ 3:1 (large text)
629
+ - [ ] Form fields have associated labels
630
+ - [ ] Error messages linked to fields via aria-describedby
631
+ - [ ] Skip navigation link for screen readers
632
+ - [ ] Alt text on meaningful images
633
+ - [ ] Touch targets ≥ 44x44px on mobile
634
+ `;
@@ -7,7 +7,7 @@ export function skills(c) {
7
7
  path: `${a}/aped-a/SKILL.md`,
8
8
  content: `---
9
9
  name: aped-a
10
- description: 'Analyze project idea through parallel market, domain, and technical research. Use when user says "analyze project", "research idea", "aped analyze", or invokes /aped-a.'
10
+ description: 'Analyzes a new project idea through parallel market, domain, and technical research. Use when user says "research idea", "aped analyze", or invokes /aped-a. Not for existing codebases — use aped-ctx for brownfield projects.'
11
11
  ---
12
12
 
13
13
  # APED Analyze — Parallel Research to Product Brief
@@ -29,13 +29,23 @@ Ask the user these questions (adapt to \`communication_language\`):
29
29
 
30
30
  Wait for answers before proceeding.
31
31
 
32
+ ## Task Tracking
33
+
34
+ Create tasks to track this phase:
35
+ \`\`\`
36
+ TaskCreate: "Parallel research — Market, Domain, Technical"
37
+ TaskCreate: "Synthesize research into product brief"
38
+ TaskCreate: "Validate brief"
39
+ \`\`\`
40
+
32
41
  ## Parallel Research
33
42
 
34
43
  Read \`${a}/aped-a/references/research-prompts.md\` for detailed agent prompts.
35
44
 
36
- Launch **3 Agent tool calls in parallel** with \`run_in_background: true\`:
45
+ Launch **3 Agent tool calls in a single message** (parallel execution) with \`run_in_background: true\`:
37
46
 
38
47
  ### Agent 1: Market Research
48
+ - \`subagent_type: "Explore"\`
39
49
  - Customer behavior and pain points in the target segment
40
50
  - Competitive landscape: direct and indirect competitors
41
51
  - Market size and growth trajectory
@@ -43,6 +53,7 @@ Launch **3 Agent tool calls in parallel** with \`run_in_background: true\`:
43
53
  - Use WebSearch for current data
44
54
 
45
55
  ### Agent 2: Domain Research
56
+ - \`subagent_type: "Explore"\`
46
57
  - Industry analysis and key trends
47
58
  - Regulatory requirements and compliance needs
48
59
  - Technical trends shaping the domain
@@ -50,12 +61,15 @@ Launch **3 Agent tool calls in parallel** with \`run_in_background: true\`:
50
61
  - Use WebSearch for current data
51
62
 
52
63
  ### Agent 3: Technical Research
64
+ - \`subagent_type: "Explore"\`
53
65
  - Technology stack overview and options
54
66
  - Integration patterns and APIs available
55
67
  - Architecture patterns for similar products
56
68
  - Open-source tools and frameworks relevant
57
69
  - Use WebSearch for current data
58
70
 
71
+ Once all 3 agents return, update task: \`TaskUpdate: "Parallel research" → completed\`
72
+
59
73
  ## Synthesis
60
74
 
61
75
  Ensure output directory exists:
@@ -78,6 +92,12 @@ bash ${a}/aped-a/scripts/validate-brief.sh ${o}/product-brief.md
78
92
 
79
93
  If validation fails: fix missing sections and re-validate.
80
94
 
95
+ Update tasks:
96
+ \`\`\`
97
+ TaskUpdate: "Synthesize research" → completed
98
+ TaskUpdate: "Validate brief" → completed
99
+ \`\`\`
100
+
81
101
  ## State Update
82
102
 
83
103
  Update \`${o}/state.yaml\`:
@@ -100,7 +120,7 @@ Invoke Skill tool with \`skill: "aped-p"\` to proceed to PRD phase.
100
120
  path: `${a}/aped-p/SKILL.md`,
101
121
  content: `---
102
122
  name: aped-p
103
- description: 'Generate PRD autonomously from product brief. Use when user says "create PRD", "generate PRD", "aped prd", or invokes /aped-p.'
123
+ description: 'Generates PRD autonomously from product brief. Use when user says "create PRD", "generate PRD", "aped prd", or invokes /aped-p.'
104
124
  ---
105
125
 
106
126
  # APED PRD — Autonomous PRD Generation
@@ -127,6 +147,19 @@ description: 'Generate PRD autonomously from product brief. Use when user says "
127
147
  - Match against \`detection_signals\`
128
148
  - Note \`required_sections\`, \`skip_sections\`, \`key_questions\`
129
149
 
150
+ ## Task Tracking
151
+
152
+ Create tasks for each generation phase:
153
+ \`\`\`
154
+ TaskCreate: "P1: Foundation — Executive Summary & Vision"
155
+ TaskCreate: "P2: Scope & Journeys"
156
+ TaskCreate: "P3: Domain Requirements (conditional)"
157
+ TaskCreate: "P4: Functional & Non-Functional Requirements"
158
+ TaskCreate: "Validate PRD"
159
+ \`\`\`
160
+
161
+ Update each task to \`completed\` as you finish each phase.
162
+
130
163
  ## PRD Generation (4 compressed phases)
131
164
 
132
165
  Generate the PRD autonomously using \`${a}/templates/prd.md\` as structure.
@@ -174,7 +207,9 @@ pipeline:
174
207
 
175
208
  ## Chain
176
209
 
177
- Invoke Skill tool with \`skill: "aped-e"\` to proceed to Epics phase.
210
+ Ask the user: "Do you want to design the UX before creating epics?"
211
+ - If yes: invoke Skill tool with \`skill: "aped-ux"\`
212
+ - If no: invoke Skill tool with \`skill: "aped-e"\` to skip directly to Epics
178
213
  `,
179
214
  },
180
215
  // ── aped-e ──────────────────────────────────────────────
@@ -182,7 +217,7 @@ Invoke Skill tool with \`skill: "aped-e"\` to proceed to Epics phase.
182
217
  path: `${a}/aped-e/SKILL.md`,
183
218
  content: `---
184
219
  name: aped-e
185
- description: 'Create epics and stories from PRD with full FR coverage. Use when user says "create epics", "break into stories", "aped epics", or invokes /aped-e.'
220
+ description: 'Creates epics and stories from PRD with full FR coverage. Use when user says "create epics", "break into stories", "aped epics", or invokes /aped-e.'
186
221
  ---
187
222
 
188
223
  # APED Epics & Stories — Requirements Decomposition
@@ -200,6 +235,18 @@ description: 'Create epics and stories from PRD with full FR coverage. Use when
200
235
  - If no prd phase in state: ask user for PRD path
201
236
  - Extract ALL FRs and NFRs by number
202
237
 
238
+ ## Task Tracking
239
+
240
+ \`\`\`
241
+ TaskCreate: "Extract FRs and NFRs from PRD"
242
+ TaskCreate: "Design epics (user-value grouping)"
243
+ TaskCreate: "Create stories with ACs and tasks"
244
+ TaskCreate: "FR coverage validation"
245
+ TaskCreate: "Write story files"
246
+ \`\`\`
247
+
248
+ Update each to \`completed\` as you progress.
249
+
203
250
  ## Epic Design
204
251
 
205
252
  Read \`${a}/aped-e/references/epic-rules.md\` for design principles.
@@ -265,7 +312,8 @@ Invoke Skill tool with \`skill: "aped-d"\` to proceed to Dev Sprint.
265
312
  path: `${a}/aped-d/SKILL.md`,
266
313
  content: `---
267
314
  name: aped-d
268
- description: 'Dev sprint - implement next story with TDD red-green-refactor. Use when user says "start dev", "implement story", "aped dev", or invokes /aped-d.'
315
+ description: 'Implements next story with TDD red-green-refactor cycle. Use when user says "start dev", "implement story", "aped dev", or invokes /aped-d.'
316
+ disable-model-invocation: true
269
317
  ---
270
318
 
271
319
  # APED Dev Sprint — TDD Story Implementation
@@ -290,17 +338,35 @@ If story has \`[AI-Review]\` items: address them BEFORE regular tasks.
290
338
 
291
339
  Update \`${o}/state.yaml\`: story — \`in-progress\`, epic — \`in-progress\` if first story.
292
340
 
341
+ ## Task Tracking
342
+
343
+ Create a task for each story task checkbox:
344
+ \`\`\`
345
+ For each "- [ ] task description [AC: AC#]" in story:
346
+ TaskCreate: "task description" (status: todo)
347
+ \`\`\`
348
+ Update each to \`in_progress\` when starting RED, \`completed\` when GATE passes.
349
+
293
350
  ## Context Gathering
294
351
 
352
+ Launch **2 Agent tool calls in parallel** for context:
353
+
354
+ ### Agent 1: Code Context
355
+ - \`subagent_type: "Explore"\`
295
356
  - Read story Dev Notes for architecture, file paths, dependencies
296
- - Use MCP context7 for library docs mentioned in Dev Notes
297
357
  - Read existing code files mentioned in story
358
+ - Map the current state of files to modify
359
+
360
+ ### Agent 2: Library Docs (if dependencies listed)
361
+ - \`subagent_type: "general-purpose"\`
362
+ - Use MCP context7 (\`resolve-library-id\` then \`query-docs\`) for libraries in Dev Notes
363
+ - Extract relevant API patterns and usage examples
298
364
 
299
365
  ## TDD Implementation
300
366
 
301
367
  Read \`${a}/aped-d/references/tdd-engine.md\` for detailed rules.
302
368
 
303
- For each task:
369
+ For each task (update TaskUpdate to \`in_progress\` when starting):
304
370
 
305
371
  ### RED
306
372
  Write failing tests first. Run: \`bash ${a}/aped-d/scripts/run-tests.sh\`
@@ -328,7 +394,7 @@ Read \`git_provider\` and \`ticket_system\` from config:
328
394
 
329
395
  1. Update story: mark tasks \`[x]\`, fill Dev Agent Record
330
396
  2. Update \`${o}/state.yaml\`: story — \`review\`
331
- 3. Chain to \`/aped-r\`
397
+ 3. Invoke Skill tool with \`skill: "aped-r"\` to proceed to Review phase
332
398
  `,
333
399
  },
334
400
  // ── aped-r ──────────────────────────────────────────────
@@ -336,7 +402,8 @@ Read \`git_provider\` and \`ticket_system\` from config:
336
402
  path: `${a}/aped-r/SKILL.md`,
337
403
  content: `---
338
404
  name: aped-r
339
- description: 'Adversarial code review for completed stories. Use when user says "review code", "run review", "aped review", or invokes /aped-r.'
405
+ description: 'Reviews completed stories adversarially with minimum 3 findings. Use when user says "review code", "run review", "aped review", or invokes /aped-r.'
406
+ disable-model-invocation: true
340
407
  ---
341
408
 
342
409
  # APED Review — Adversarial Code Review
@@ -357,20 +424,33 @@ Read story from \`${o}/stories/{story-key}.md\`
357
424
  bash ${a}/aped-r/scripts/git-audit.sh ${o}/stories/{story-key}.md
358
425
  \`\`\`
359
426
 
427
+ ## Task Tracking
428
+
429
+ \`\`\`
430
+ TaskCreate: "Git audit"
431
+ TaskCreate: "AC validation"
432
+ TaskCreate: "Task audit"
433
+ TaskCreate: "Code quality review"
434
+ TaskCreate: "Generate review report"
435
+ \`\`\`
436
+
360
437
  ## Adversarial Review
361
438
 
362
439
  Read \`${a}/aped-r/references/review-criteria.md\` for detailed criteria.
363
440
 
364
- ### 1. AC Validation
365
- For each AC: search code for evidence (file:line). Rate: IMPLEMENTED / PARTIAL / MISSING.
441
+ Launch **2 Agent tool calls in parallel** for the review:
442
+
443
+ ### Agent 1: AC & Task Validation (\`subagent_type: "feature-dev:code-explorer"\`)
444
+ - For each AC: search code for evidence (file:line). Rate: IMPLEMENTED / PARTIAL / MISSING
445
+ - For each \`[x]\` task: find proof in code. No evidence = **CRITICAL**
366
446
 
367
- ### 2. Task Audit
368
- For each \`[x]\` task: find proof in code. No evidence = **CRITICAL**.
447
+ ### Agent 2: Code Quality (\`subagent_type: "feature-dev:code-reviewer"\`)
448
+ - Security, Performance, Reliability, Test Quality
449
+ - Focus on files listed in the story's File List section
369
450
 
370
- ### 3. Code Quality
371
- Security, Performance, Reliability, Test Quality.
451
+ Once both agents return, merge findings. Update tasks to \`completed\`.
372
452
 
373
- ### 4. Minimum 3 findings enforced.
453
+ ### Minimum 3 findings enforced.
374
454
 
375
455
  ## Report
376
456
 
@@ -383,7 +463,545 @@ Severity: CRITICAL > HIGH > MEDIUM > LOW. Format: \`[Severity] Description [file
383
463
 
384
464
  ## State Update
385
465
 
386
- Update \`${o}/state.yaml\`. If more stories chain to \`/aped-d\`. If all done report completion.
466
+ Update \`${o}/state.yaml\`. If more stories remain: invoke Skill tool with \`skill: "aped-d"\`. If all stories done: report pipeline completion.
467
+ `,
468
+ },
469
+ // ── aped-ux ─────────────────────────────────────────────
470
+ {
471
+ path: `${a}/aped-ux/SKILL.md`,
472
+ content: `---
473
+ name: aped-ux
474
+ description: 'Designs UX specifications from PRD — screen flows, wireframes, component inventory. Use when user says "design UX", "create wireframes", "UX spec", "aped ux", or invokes /aped-ux. Runs between PRD and Epics phases.'
475
+ ---
476
+
477
+ # APED UX — Spec-First UX Design
478
+
479
+ Generates UX specifications from the PRD before epics creation. Produces screen flows, wireframes (ASCII), component inventories, and interaction specs that \`/aped-e\` consumes to enrich stories with visual context.
480
+
481
+ ## Setup
482
+
483
+ 1. Read \`${a}/config.yaml\` — extract config
484
+ 2. Read \`${o}/state.yaml\` — check pipeline state
485
+ - If \`pipeline.phases.ux.status\` is \`done\`: ask user — redo or skip?
486
+ - If user skips: invoke Skill tool with \`skill: "aped-e"\` and stop
487
+ 3. Read \`${a}/aped-ux/references/ux-patterns.md\` for design patterns catalog
488
+
489
+ ## Task Tracking
490
+
491
+ \`\`\`
492
+ TaskCreate: "Analyze PRD user journeys"
493
+ TaskCreate: "Define screen inventory"
494
+ TaskCreate: "Design screen flows"
495
+ TaskCreate: "Create wireframes"
496
+ TaskCreate: "Build component inventory"
497
+ TaskCreate: "Write interaction specs"
498
+ TaskCreate: "Validate UX spec"
499
+ \`\`\`
500
+
501
+ ## Load PRD
502
+
503
+ - Read PRD from \`pipeline.phases.prd.output\`
504
+ - Extract: user journeys, FRs grouped by capability, actors, key workflows
505
+
506
+ ## Phase 1: Screen Inventory
507
+
508
+ For each user journey in the PRD:
509
+
510
+ 1. **Map the journey** to concrete screens (1 journey = 1+ screens)
511
+ 2. **Name each screen** with a slug: \`{area}-{action}\` (e.g., \`auth-login\`, \`dashboard-overview\`, \`settings-profile\`)
512
+ 3. **Classify screen type**: form, list, detail, dashboard, wizard, modal, empty-state, error
513
+ 4. **Map FR coverage**: which FRs are satisfied by which screen
514
+
515
+ Output: screen inventory table.
516
+
517
+ ## Phase 2: Screen Flows
518
+
519
+ For each major workflow:
520
+
521
+ 1. **Draw flow diagram** in text format:
522
+ \`\`\`
523
+ [Landing] → [Login] → [Dashboard]
524
+ ↓ ↓
525
+ [Register] [Settings]
526
+
527
+ [Verify Email] → [Dashboard]
528
+ \`\`\`
529
+
530
+ 2. **Document transitions**: what triggers navigation (button click, form submit, auto-redirect)
531
+ 3. **Identify shared patterns**: navigation, auth guards, error states, loading states
532
+
533
+ ## Phase 3: Wireframes (ASCII)
534
+
535
+ For each screen, produce an ASCII wireframe:
536
+
537
+ \`\`\`
538
+ ┌─────────────────────────────────┐
539
+ │ [Logo] [Nav] [Avatar] │
540
+ ├─────────────────────────────────┤
541
+ │ │
542
+ │ ┌──────────┐ ┌──────────────┐ │
543
+ │ │ Sidebar │ │ Content │ │
544
+ │ │ │ │ │ │
545
+ │ │ • Item 1 │ │ ┌────────┐ │ │
546
+ │ │ • Item 2 │ │ │ Card 1 │ │ │
547
+ │ │ • Item 3 │ │ └────────┘ │ │
548
+ │ │ │ │ ┌────────┐ │ │
549
+ │ │ │ │ │ Card 2 │ │ │
550
+ │ └──────────┘ │ └────────┘ │ │
551
+ │ └──────────────┘ │
552
+ ├─────────────────────────────────┤
553
+ │ [Footer] │
554
+ └─────────────────────────────────┘
555
+ \`\`\`
556
+
557
+ Rules:
558
+ - Use box drawing characters (┌ ─ ┐ │ └ ┘ ├ ┤)
559
+ - Label every zone with its purpose
560
+ - Show content hierarchy (headings, lists, cards, forms)
561
+ - Annotate interactive elements: \`[Button]\`, \`(Input)\`, \`{Dropdown}\`
562
+ - Include responsive notes: "sidebar collapses to hamburger on mobile"
563
+
564
+ ## Phase 4: Component Inventory
565
+
566
+ Analyze all wireframes and extract:
567
+
568
+ ### Component Tree
569
+ \`\`\`
570
+ App
571
+ ├── Layout
572
+ │ ├── Header (logo, nav, avatar)
573
+ │ ├── Sidebar (nav items, collapsible)
574
+ │ └── Footer
575
+ ├── Shared
576
+ │ ├── Button (primary, secondary, ghost, danger)
577
+ │ ├── Input (text, email, password, search)
578
+ │ ├── Card (title, body, actions)
579
+ │ ├── Modal (header, body, footer)
580
+ │ └── Toast (success, error, warning, info)
581
+ └── Feature-specific
582
+ ├── UserAvatar (image, initials fallback)
583
+ ├── DataTable (sortable, filterable, paginated)
584
+ └── StatsCard (value, label, trend)
585
+ \`\`\`
586
+
587
+ ### Component Spec (for each)
588
+ - **Props**: name, type, required, default
589
+ - **States**: default, hover, active, disabled, loading, error
590
+ - **Variants**: size (sm/md/lg), color (primary/secondary/danger)
591
+ - **Accessibility**: ARIA role, keyboard navigation, focus management
592
+
593
+ ## Phase 5: Interaction Specs
594
+
595
+ For each screen, document:
596
+
597
+ 1. **Loading states**: skeleton, spinner, progressive
598
+ 2. **Empty states**: first-use, no-results, error
599
+ 3. **Error handling**: inline validation, toast, error page
600
+ 4. **Animations**: page transitions, micro-interactions (optional)
601
+ 5. **Responsive behavior**: breakpoints, layout changes, touch targets
602
+
603
+ ## Validation
604
+
605
+ Check completeness:
606
+ - [ ] Every FR from PRD maps to at least one screen
607
+ - [ ] Every screen has a wireframe
608
+ - [ ] Every interactive element has states defined
609
+ - [ ] Flows cover happy path + error paths
610
+ - [ ] Component inventory covers all wireframe elements
611
+ - [ ] No orphan screens (unreachable from any flow)
612
+
613
+ ## Output
614
+
615
+ \`\`\`bash
616
+ mkdir -p ${o}/ux
617
+ \`\`\`
618
+
619
+ Write to \`${o}/ux/\`:
620
+ 1. \`screen-inventory.md\` — table of all screens with FR mapping
621
+ 2. \`flows.md\` — all screen flow diagrams
622
+ 3. \`wireframes.md\` — ASCII wireframes for every screen
623
+ 4. \`components.md\` — component tree + specs
624
+ 5. \`interactions.md\` — states, errors, responsive, animations
625
+
626
+ ## State Update
627
+
628
+ Update \`${o}/state.yaml\`:
629
+ \`\`\`yaml
630
+ pipeline:
631
+ current_phase: "ux"
632
+ phases:
633
+ ux:
634
+ status: "done"
635
+ output: "${o}/ux/"
636
+ \`\`\`
637
+
638
+ ## Chain
639
+
640
+ Invoke Skill tool with \`skill: "aped-e"\` to proceed to Epics phase.
641
+ \`/aped-e\` will read UX specs to enrich stories with wireframe refs, component specs, and interaction requirements in Dev Notes.
642
+ `,
643
+ },
644
+ // ── aped-s ──────────────────────────────────────────────
645
+ {
646
+ path: `${a}/aped-s/SKILL.md`,
647
+ content: `---
648
+ name: aped-s
649
+ description: 'Shows sprint status dashboard with progress, blockers, and next actions. Use when user says "sprint status", "show progress", "aped status", or invokes /aped-s.'
650
+ allowed-tools: Read, Grep, Glob, Bash
651
+ ---
652
+
653
+ # APED Status — Sprint Dashboard
654
+
655
+ ## Setup
656
+
657
+ 1. Read \`${a}/config.yaml\` — extract \`communication_language\`, \`ticket_system\`
658
+ 2. Read \`${o}/state.yaml\` — load full pipeline and sprint state
659
+
660
+ ## Pipeline Overview
661
+
662
+ Display current pipeline phase and completion status:
663
+
664
+ \`\`\`
665
+ Pipeline: A[✓] → P[✓] → E[✓] → D[▶] → R[ ]
666
+ \`\`\`
667
+
668
+ For each completed phase, show the output artifact path.
669
+
670
+ ## Sprint Progress
671
+
672
+ For each epic in \`sprint.stories\`:
673
+
674
+ 1. Count stories by status: \`done\`, \`in-progress\`, \`review\`, \`ready-for-dev\`, \`backlog\`
675
+ 2. Calculate completion percentage
676
+ 3. Display as progress bar:
677
+
678
+ \`\`\`
679
+ Epic 1: User Authentication [████████░░] 80% (4/5 stories)
680
+ ✓ 1-1-project-setup done
681
+ ✓ 1-2-user-registration done
682
+ ✓ 1-3-login-flow done
683
+ ✓ 1-4-password-reset done
684
+ ▶ 1-5-session-management in-progress
685
+ \`\`\`
686
+
687
+ ## Blockers Detection
688
+
689
+ Scan for:
690
+ - Stories with \`[AI-Review]\` items → **Review blockers**
691
+ - Stories \`in-progress\` for more than 1 session → **Stuck stories**
692
+ - Missing dependencies between stories → **Dependency blockers**
693
+ - HALT conditions logged in Dev Agent Record → **Dev halts**
694
+
695
+ ## Next Actions
696
+
697
+ Based on current state, suggest the next logical command:
698
+ - If stories \`ready-for-dev\`: suggest \`/aped-d\`
699
+ - If stories in \`review\`: suggest \`/aped-r\`
700
+ - If all stories \`done\`: suggest pipeline complete
701
+ - If blockers found: describe resolution path
702
+
703
+ ## Ticket System Integration
704
+
705
+ If \`ticket_system\` is not \`none\`:
706
+ - Show ticket references alongside story statuses
707
+ - Note any stories without ticket references
708
+
709
+ ## Output
710
+
711
+ Display only — no file writes, no state changes. Pure read-only dashboard.
712
+ `,
713
+ },
714
+ // ── aped-c ──────────────────────────────────────────────
715
+ {
716
+ path: `${a}/aped-c/SKILL.md`,
717
+ content: `---
718
+ name: aped-c
719
+ description: 'Manages scope changes and pivots during development with impact analysis. Use when user says "correct course", "change scope", "pivot", "aped correct", or invokes /aped-c.'
720
+ disable-model-invocation: true
721
+ ---
722
+
723
+ # APED Correct Course — Managed Pivot
724
+
725
+ Use when requirements change, priorities shift, or the current approach needs rethinking mid-pipeline.
726
+
727
+ ## Setup
728
+
729
+ 1. Read \`${a}/config.yaml\` — extract config
730
+ 2. Read \`${o}/state.yaml\` — understand current pipeline state
731
+ 3. Read existing artifacts: brief, PRD, epics, stories
732
+
733
+ ## Impact Assessment
734
+
735
+ Ask the user:
736
+ 1. **What changed?** — New requirement, removed feature, architectural pivot, priority shift
737
+ 2. **Why?** — User feedback, market shift, technical limitation, stakeholder decision
738
+
739
+ Then analyze impact:
740
+
741
+ ### Scope Change Matrix
742
+
743
+ | What changed | Artifacts affected | Action required |
744
+ |---|---|---|
745
+ | New feature added | PRD, Epics | Add FRs → create new stories |
746
+ | Feature removed | PRD, Epics | Remove FRs → archive stories |
747
+ | Architecture change | PRD NFRs, All stories | Update NFRs → review all Dev Notes |
748
+ | Priority reorder | Epics, Sprint | Reorder stories → update sprint |
749
+ | Complete pivot | Everything | Reset to /aped-a |
750
+
751
+ ## Change Execution
752
+
753
+ ### Minor change (new/removed feature)
754
+ 1. Update PRD: add/remove FRs, update scope
755
+ 2. Re-run validation: \`bash ${a}/aped-p/scripts/validate-prd.sh ${o}/prd.md\`
756
+ 3. Update epics: add/archive affected stories
757
+ 4. Re-run coverage: \`bash ${a}/aped-e/scripts/validate-coverage.sh ${o}/epics.md ${o}/prd.md\`
758
+ 5. Update \`${o}/state.yaml\`: mark affected stories as \`backlog\`
759
+
760
+ ### Major change (architecture/pivot)
761
+ 1. Confirm with user: "This invalidates in-progress work. Proceed?"
762
+ 2. Archive current artifacts to \`${o}/archive/{date}/\`
763
+ 3. Update PRD or restart from \`/aped-a\`
764
+ 4. Regenerate affected downstream artifacts
765
+
766
+ ## Story Impact Report
767
+
768
+ For each in-progress or completed story:
769
+ - **Safe**: story not affected by change
770
+ - **Needs update**: story Dev Notes or ACs need modification
771
+ - **Invalidated**: story no longer relevant — archive it
772
+
773
+ ## State Update
774
+
775
+ Update \`${o}/state.yaml\`:
776
+ - Reset affected stories to \`backlog\` or \`ready-for-dev\`
777
+ - If major change: reset \`current_phase\` to appropriate earlier phase
778
+ - Log the correction in pipeline phases:
779
+ \`\`\`yaml
780
+ corrections:
781
+ - date: "{date}"
782
+ type: "{minor|major}"
783
+ reason: "{user's reason}"
784
+ affected_stories: [...]
785
+ \`\`\`
786
+
787
+ ## Guard Against Scope Creep
788
+
789
+ After applying changes, verify:
790
+ - Total FR count still within 10-80 range
791
+ - No epic became too large (>8 stories)
792
+ - No story became too large (>8 tasks)
793
+ - Changed stories still fit single-session size
794
+ `,
795
+ },
796
+ // ── aped-ctx ────────────────────────────────────────────
797
+ {
798
+ path: `${a}/aped-ctx/SKILL.md`,
799
+ content: `---
800
+ name: aped-ctx
801
+ description: 'Analyzes existing codebase to generate project context for brownfield development. Use when user says "document codebase", "project context", "existing project", "aped context", or invokes /aped-ctx. Not for new project ideation — use aped-a for greenfield.'
802
+ allowed-tools: Read, Grep, Glob, Bash
803
+ ---
804
+
805
+ # APED Context — Brownfield Project Analysis
806
+
807
+ Use on existing codebases to generate project context before running the APED pipeline. Essential for brownfield projects where you're adding features to existing code.
808
+
809
+ ## Setup
810
+
811
+ 1. Read \`${a}/config.yaml\` — extract config
812
+ 2. Verify this is a brownfield project (existing code, not greenfield)
813
+
814
+ ## Codebase Analysis
815
+
816
+ ### Phase 1: Structure Discovery
817
+
818
+ Scan the project root:
819
+ - Detect language/framework from config files (package.json, Cargo.toml, go.mod, pyproject.toml, etc.)
820
+ - Map directory structure (max 3 levels deep)
821
+ - Identify entry points, main modules, config files
822
+ - Count: files, LOC, languages used
823
+
824
+ ### Phase 2: Architecture Mapping
825
+
826
+ - Identify architectural pattern (MVC, hexagonal, microservices, monolith, etc.)
827
+ - Map data flow: entry point → processing → storage → response
828
+ - List external dependencies and integrations (APIs, databases, queues, caches)
829
+ - Identify test framework and coverage approach
830
+
831
+ ### Phase 3: Convention Extraction
832
+
833
+ - Naming conventions (files, functions, variables, classes)
834
+ - Code organization patterns (feature-based, layer-based, domain-based)
835
+ - Error handling patterns
836
+ - Logging approach
837
+ - Config management (env vars, config files, secrets)
838
+
839
+ ### Phase 4: Dependency Audit
840
+
841
+ - List production dependencies with versions
842
+ - Flag outdated or deprecated packages
843
+ - Identify security advisories (if available)
844
+ - Note lock file type (package-lock, yarn.lock, pnpm-lock, etc.)
845
+
846
+ ## Output
847
+
848
+ Write project context to \`${o}/project-context.md\`:
849
+
850
+ \`\`\`markdown
851
+ # Project Context: {project_name}
852
+
853
+ ## Tech Stack
854
+ - Language: {lang} {version}
855
+ - Framework: {framework} {version}
856
+ - Database: {db}
857
+ - Test Framework: {test_framework}
858
+
859
+ ## Architecture
860
+ - Pattern: {pattern}
861
+ - Entry Point: {entry}
862
+ - Key Modules: {modules}
863
+
864
+ ## Conventions
865
+ - File naming: {convention}
866
+ - Code style: {style}
867
+ - Error handling: {pattern}
868
+
869
+ ## Dependencies
870
+ | Package | Version | Purpose |
871
+ |---------|---------|---------|
872
+
873
+ ## Integration Points
874
+ - {service}: {purpose}
875
+
876
+ ## Notes for Development
877
+ - {important context for new feature development}
878
+ \`\`\`
879
+
880
+ ## State Update
881
+
882
+ Update \`${o}/state.yaml\`:
883
+ \`\`\`yaml
884
+ project_context:
885
+ generated: true
886
+ path: "${o}/project-context.md"
887
+ type: "brownfield"
888
+ \`\`\`
889
+
890
+ ## Next Steps
891
+
892
+ Suggest:
893
+ - If no brief exists: run \`/aped-a\` with project context loaded
894
+ - If brief exists: context will inform \`/aped-p\` and \`/aped-d\` decisions
895
+ `,
896
+ },
897
+ // ── aped-qa ─────────────────────────────────────────────
898
+ {
899
+ path: `${a}/aped-qa/SKILL.md`,
900
+ content: `---
901
+ name: aped-qa
902
+ description: 'Generates E2E and integration tests from acceptance criteria for completed features. Use when user says "generate tests", "E2E tests", "integration tests", "aped qa", or invokes /aped-qa.'
903
+ ---
904
+
905
+ # APED QA — E2E & Integration Test Generation
906
+
907
+ Generate comprehensive end-to-end and integration tests for completed stories or epics. Complements the unit tests written during /aped-d TDD.
908
+
909
+ ## Setup
910
+
911
+ 1. Read \`${a}/config.yaml\` — extract config
912
+ 2. Read \`${o}/state.yaml\` — find completed stories/epics
913
+
914
+ ## Scope Selection
915
+
916
+ Ask the user:
917
+ 1. **What to test?** — specific story, full epic, or all completed work
918
+ 2. **Test type?** — E2E (user journeys), Integration (API/service), or Both
919
+
920
+ ## Story/Epic Analysis
921
+
922
+ For the selected scope:
923
+ 1. Read story files from \`${o}/stories/\`
924
+ 2. Extract all Acceptance Criteria (Given/When/Then)
925
+ 3. Map user journeys across stories (multi-step flows)
926
+ 4. Identify integration points (APIs, databases, external services)
927
+
928
+ ## Task Tracking
929
+
930
+ \`\`\`
931
+ TaskCreate: "Analyze stories and extract ACs"
932
+ TaskCreate: "Generate E2E tests"
933
+ TaskCreate: "Generate integration tests"
934
+ TaskCreate: "Run and verify all tests"
935
+ TaskCreate: "Write QA report"
936
+ \`\`\`
937
+
938
+ ## Test Generation
939
+
940
+ Launch **2 Agent tool calls in parallel**:
941
+
942
+ ### Agent 1: E2E Tests (\`subagent_type: "general-purpose"\`)
943
+
944
+ For each user journey that spans one or more stories:
945
+
946
+ 1. Map the full flow: entry → steps → expected outcome
947
+ 2. Generate test using the project's test framework
948
+ 3. Each AC's Given/When/Then becomes a test step
949
+ 4. Include:
950
+ - Happy path (main flow)
951
+ - Error paths (invalid input, unauthorized, not found)
952
+ - Edge cases (empty data, concurrent access, timeouts)
953
+
954
+ ### Agent 2: Integration Tests (\`subagent_type: "general-purpose"\`)
955
+
956
+ For each integration point:
957
+
958
+ 1. Test request/response contracts
959
+ 2. Test error handling (service down, timeout, malformed response)
960
+ 3. Test data consistency (DB state before/after)
961
+ 4. Test authentication/authorization boundaries
962
+
963
+ Once both agents return, update tasks to \`completed\`.
964
+
965
+ ### Test Naming Convention
966
+
967
+ \`\`\`
968
+ {test-type}/{epic-slug}/{story-slug}.test.{ext}
969
+ \`\`\`
970
+
971
+ ## Framework Detection
972
+
973
+ Read project config to auto-detect:
974
+ - **Node.js**: Playwright, Cypress, or Puppeteer for E2E; Supertest for API
975
+ - **Python**: Pytest + httpx for API; Playwright for E2E
976
+ - **Go**: Go test + httptest for API
977
+ - **Rust**: reqwest for API tests
978
+
979
+ Use \`bash ${a}/aped-d/scripts/run-tests.sh\` to verify tests pass.
980
+
981
+ ## Test Coverage Report
982
+
983
+ After generation:
984
+ - List ACs covered vs uncovered
985
+ - List user journeys tested
986
+ - List integration points tested
987
+ - Flag any untestable ACs (and why)
988
+
989
+ ## Output
990
+
991
+ 1. Write tests to project test directory (detect convention)
992
+ 2. Write QA report to \`${o}/qa-report.md\`:
993
+ - Stories tested
994
+ - Tests generated (count by type)
995
+ - Coverage gaps
996
+ - Manual test suggestions (for things that can't be automated)
997
+
998
+ ## No State Change
999
+
1000
+ QA doesn't affect pipeline state — it's an additive quality layer.
1001
+
1002
+ ## Next Steps
1003
+
1004
+ Suggest running \`/aped-s\` to view updated sprint status with QA coverage noted.
387
1005
  `,
388
1006
  },
389
1007
  // ── aped-quick ────────────────────────────────────────────
@@ -391,7 +1009,7 @@ Update \`${o}/state.yaml\`. If more stories — chain to \`/aped-d\`. If all don
391
1009
  path: `${a}/aped-quick/SKILL.md`,
392
1010
  content: `---
393
1011
  name: aped-quick
394
- description: 'Quick feature/fix implementation bypassing full pipeline. Use when user says "quick fix", "quick feature", "aped quick", or invokes /aped-quick.'
1012
+ description: 'Implements quick fixes and small features bypassing the full pipeline. Use when user says "quick fix", "quick feature", "hotfix", "aped quick", or invokes /aped-quick.'
395
1013
  ---
396
1014
 
397
1015
  # APED Quick — Fast Track for Small Changes
@@ -462,7 +1080,8 @@ Read \`ticket_system\` and \`git_provider\` from config.
462
1080
  path: `${a}/aped-all/SKILL.md`,
463
1081
  content: `---
464
1082
  name: aped-all
465
- description: 'Run full APED pipeline from Analyze through Review. Use when user says "run full pipeline", "aped all", "start from scratch", or invokes /aped-all.'
1083
+ description: 'Runs the full APED pipeline from Analyze through Review with auto-resume. Use when user says "run full pipeline", "aped all", or invokes /aped-all.'
1084
+ disable-model-invocation: true
466
1085
  ---
467
1086
 
468
1087
  # APED Pipeline — Full Orchestrator
@@ -477,13 +1096,28 @@ description: 'Run full APED pipeline from Analyze through Review. Use when user
477
1096
  | No state / \`current_phase: "none"\` | Start from \`/aped-a\` |
478
1097
  | Any phase \`in-progress\` | Re-invoke that phase (ask user: resume or restart?) |
479
1098
  | analyze \`done\`, prd missing | Invoke \`/aped-p\` |
480
- | prd \`done\`, epics missing | Invoke \`/aped-e\` |
1099
+ | prd \`done\`, ux missing | Invoke \`/aped-ux\` (optional — ask user: design UX or skip to epics?) |
1100
+ | ux \`done\` or skipped, epics missing | Invoke \`/aped-e\` |
481
1101
  | epics \`done\` | Loop: \`/aped-d\` — \`/aped-r\` until all stories \`done\` |
482
1102
  | All stories \`done\` | Report pipeline complete |
483
1103
 
1104
+ ## Task Tracking
1105
+
1106
+ Create a task per pipeline phase:
1107
+ \`\`\`
1108
+ TaskCreate: "Phase A — Analyze"
1109
+ TaskCreate: "Phase P — PRD"
1110
+ TaskCreate: "Phase UX — UX Design (optional)"
1111
+ TaskCreate: "Phase E — Epics"
1112
+ TaskCreate: "Phase D — Dev Sprint"
1113
+ TaskCreate: "Phase R — Review"
1114
+ \`\`\`
1115
+
1116
+ Update each to \`in_progress\` when invoking, \`completed\` when phase returns done.
1117
+
484
1118
  ## Execution
485
1119
 
486
- Use the Skill tool to invoke each phase: aped-a, aped-p, aped-e, aped-d, aped-r.
1120
+ Use the Skill tool to invoke each phase: aped-a, aped-p, aped-ux (optional), aped-e, aped-d, aped-r.
487
1121
  Each phase updates \`${o}/state.yaml\` and chains automatically.
488
1122
 
489
1123
  ## Interruption Handling