sdlc-workflow 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +6 -6
  2. package/bin/cli.js +123 -63
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -13,7 +13,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
13
13
  - **After completion** → deploy immediately with **Docker Compose** (local/staging) and **Kubernetes** (production) — `docs/sdlc/deploy/`.
14
14
  - **QE (docs)**: Test plan, test cases
15
15
  - **Dev**: After docs phase → **run implementation immediately**. Tech Lead (review, merge) + Senior Dev (implement, Unit Test ≥90%)
16
- - **QE (testing)**: QE Lead (test framework, review) + Senior QE (10+ yrs, write automation tests)
16
+ - **QE (testing)**: QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (10+ yrs, write automation tests)
17
17
 
18
18
  ## Usage
19
19
 
@@ -43,11 +43,11 @@ This creates:
43
43
  docs/sdlc/
44
44
  ├── SDLC-WORKFLOW.md # Main workflow (use with Claude)
45
45
  ├── reference.md
46
- ├── po/ # Product Owner
46
+ ├── po/ # Product Owner (one folder per epic: po/{epic-slug}/)
47
47
  │ ├── epic-brief.template.md
48
48
  │ └── README.md
49
49
  ├── ba/
50
- │ ├── business/ # Business BA
50
+ │ ├── business/ # Business BA (one folder per epic: ba/business/{epic-slug}/)
51
51
  │ │ ├── functional-requirement.template.md
52
52
  │ │ └── README.md
53
53
  │ └── technical/ # Technical BA
@@ -57,12 +57,12 @@ docs/sdlc/
57
57
  ├── architecture/ # Architect
58
58
  │ ├── adr.template.md
59
59
  │ └── README.md
60
- ├── qe/ # QE (docs + testing)
60
+ ├── qe/ # QE (one folder per epic: qe/{epic-slug}/)
61
61
  │ ├── test-case.template.md
62
62
  │ ├── README.md
63
- │ ├── qe-lead/ # QE Lead: test framework, review test code
63
+ │ ├── qe-lead/ # QE Lead 15+ yrs automation: strategy, framework, review (output per epic)
64
64
  │ │ └── README.md
65
- │ └── senior-qe/ # Senior QE 10+ yrs: write automation tests
65
+ │ └── senior-qe/ # Senior QE 10+ yrs: automation (output per epic)
66
66
  │ └── README.md
67
67
  ├── dev/ # Dev team (all Senior 10+ yrs; roles vary by project)
68
68
  │ ├── implementation-roles.template.md
package/bin/cli.js CHANGED
@@ -229,15 +229,15 @@ globs: docs/sdlc/**/*, **/*.md
229
229
 
230
230
  # SDLC Workflow
231
231
 
232
- **On idea/feature request:** Trigger full pipeline (PO → … → Deploy). One sub-agent per phase; run phases in sequence without stopping. See docs/sdlc/SDLC-WORKFLOW.md and docs/sdlc/agents/.
232
+ **On idea/feature request:** Trigger full pipeline (PO → … → Deploy). One role per phase; run phases in sequence. (Single agent = simulate by switching role each phase.) See docs/sdlc/SDLC-WORKFLOW.md and docs/sdlc/agents/.
233
233
 
234
- 1. **PO** — PRD, user stories → docs/sdlc/po/
235
- 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/
234
+ 1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
235
+ 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
236
236
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
237
237
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
238
- 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
238
+ 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
239
239
  6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + implementation roles by project (FE, Backend, Mobile, Embedded, Data/ML, Platform) → docs/sdlc/dev/{role}/
240
- 7. **QE (testing)** — QE Lead (test framework, review) + Senior QE (10+ yrs, automation) → docs/sdlc/qe/{role}/
240
+ 7. **QE (testing)** — QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (10+ yrs, automation) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
241
241
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
242
242
 
243
243
  **Each role runs as a sub-agent.** See docs/sdlc/agents/
@@ -256,10 +256,11 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
256
256
  ## Trigger and orchestration (mandatory)
257
257
 
258
258
  **When the user sends an idea, feature request, or new requirement:**
259
- 1. **Do not** handle it with the main agent only. **Trigger the pipeline** and run it **continuously through deployment** (Phase 1 → 2 → … → 7).
260
- 2. **Per phase = one sub-agent (one role).** For each phase, act only as that role, produce that phase's outputs into the correct folder, then **continue immediately to the next phase** without waiting for the user.
259
+ 1. **Trigger the pipeline** and run it **continuously through deployment** (Phase 1 → 2 → … → 7).
260
+ 2. **One role per phase.** For each phase, act **only** as that role (e.g. only PO in phase 1, only Business BA in phase 2). Produce that phase's outputs into the correct folder, then **continue to the next phase** without waiting for the user.
261
261
  3. **Run in order:** PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy. Do not stop after one phase unless the user explicitly asks to stop.
262
- 4. If the platform supports **sub-agents**, spawn one sub-agent per phase and pass the previous phase's output as input. If not, the main agent must **simulate** by executing each phase in sequence and writing artifacts to docs/sdlc/... then proceeding.
262
+
263
+ **Note:** In Cursor and similar tools there is a single agent per conversation. "Sub-agent" means **one role per phase** — the same agent must adopt exactly one role per phase and run phases in sequence (do not mix roles in one step). If the platform later supports spawning separate agents per phase, use that; otherwise this single agent simulates the pipeline by switching role each phase.
263
264
 
264
265
  **Sub-agent specs**: docs/sdlc/agents/
265
266
 
@@ -282,13 +283,13 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
282
283
 
283
284
  **Role**: Prioritize, clarify business value, create product docs.
284
285
  **Deliverables**: Epic/Feature brief, user stories, acceptance criteria, priority, dependencies.
285
- **Output**: \`docs/sdlc/po/\` — **Handoff to Business BA.**
286
+ **Output**: \`docs/sdlc/po/{epic-slug}/\` — **one folder per epic** (e.g. \`po/job-scheduler-event-bus/epic-brief.md\`). Do not put all epics in one file. **Handoff to Business BA.**
286
287
 
287
288
  ## Phase 2: Business BA (Business Analyst)
288
289
 
289
290
  **Role**: Break down from business perspective.
290
291
  **Deliverables**: Business process flows, functional requirements, use cases, glossary.
291
- **Output**: \`docs/sdlc/ba/business/\` — **Handoff to Architect.**
292
+ **Output**: \`docs/sdlc/ba/business/{epic-slug}/\` — **one folder per epic** (same slug as PO; e.g. \`ba/business/job-scheduler-event-bus/functional-requirements.md\`). Do not merge all epics into one file. **Handoff to Architect.**
292
293
 
293
294
  ## Phase 3: Architect
294
295
 
@@ -306,7 +307,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
306
307
 
307
308
  **Role**: Create test plan, test cases before Dev implements.
308
309
  **Deliverables**: Test plan, test cases.
309
- **Output**: \`docs/sdlc/qe/\` — After docs phase → **Dev team runs implementation immediately** (no extra gate).
310
+ **Output**: \`docs/sdlc/qe/{epic-slug}/\` — **one folder per epic** (same slug as PO/BA). Test plan, test cases inside. Do not put all epics in one file. After docs phase → **Dev team runs implementation immediately** (no extra gate).
310
311
 
311
312
  ## Phase 5b: Dev Teams
312
313
 
@@ -332,8 +333,8 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
332
333
  **Role**: Write and run **automation tests**, sign-off.
333
334
 
334
335
  **Roles**:
335
- - **QE Lead**: Decide test framework; review test code. Docs: \`docs/sdlc/qe/qe-lead/\`
336
- - **Senior QE (10+ yrs)**: Write automation tests. Docs: \`docs/sdlc/qe/senior-qe/\`
336
+ - **QE Lead (15+ yrs automation)**: Test strategy, framework choice, automation architecture, review test code. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
337
+ - **Senior QE (10+ yrs)**: Write automation tests per QE Lead's strategy. Output per epic: \`docs/sdlc/qe/{epic-slug}/\` (e.g. automation/ or test files there)
337
338
 
338
339
  **Output**: Automation tests, test report. **Handoff to Deploy.**
339
340
 
@@ -354,7 +355,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
354
355
  | 4 | Technical BA | API specs, tech breakdown |
355
356
  | 5a | QE (docs) | Test plan, test cases |
356
357
  | 5b | Dev | Code, unit tests (≥90%) |
357
- | 6 | QE (testing) | QE Lead + Senior QE, automation, sign-off |
358
+ | 6 | QE (testing) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, sign-off |
358
359
  | 7 | Deploy | Docker Compose + K8s |
359
360
 
360
361
  **Sub-agents**: Each role = one sub-agent (PO, Business BA, Architect, Technical BA, QE Lead, Senior QE, Tech Lead, Senior Dev). See docs/sdlc/agents/
@@ -363,6 +364,12 @@ See reference.md for templates.
363
364
 
364
365
  const CURSOR_REFERENCE_MD = `# SDLC Workflow — Reference
365
366
 
367
+ ## Folder structure: one per epic/feature (PO and Business BA)
368
+
369
+ - **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic (e.g. \`job-scheduler-event-bus\`). Files: epic-brief.md, user-stories.md. Do not put all epics in one file.
370
+ - **Business BA**: \`docs/sdlc/ba/business/{epic-slug}/\` — same slug as PO. Files: functional-requirements.md, process-flows.md. Do not merge all epics into one file.
371
+ - **QE**: \`docs/sdlc/qe/{epic-slug}/\` — same slug as PO/BA. Files: test-plan.md, test-cases.md, automation artifacts. Do not put all epics in one file.
372
+
366
373
  ## PO: Epic Brief Template
367
374
  # Epic: [Name]
368
375
  ## Problem / Success Metrics / User Stories / Acceptance Criteria / Priority
@@ -379,9 +386,9 @@ POST /api/v1/[resource] — Purpose, Request, Response, Contract
379
386
  ## QE: Test Case
380
387
  TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
381
388
 
382
- ## QE Team
383
- - QE Lead: test framework decision, review test code → docs/sdlc/qe/qe-lead/
384
- - Senior QE (10+ yrs): write automation tests → docs/sdlc/qe/senior-qe/
389
+ ## QE Team (one folder per epic: qe/{epic-slug}/)
390
+ - QE Lead (15+ yrs automation): test strategy, framework, automation architecture, review → docs/sdlc/qe/{epic-slug}/
391
+ - Senior QE (10+ yrs): write automation tests → docs/sdlc/qe/{epic-slug}/
385
392
 
386
393
  ## Dev Team
387
394
  - Tech Lead (15+ yrs): tech stack, review & merge → docs/sdlc/dev/tech-lead/
@@ -401,13 +408,13 @@ const AGENTS_MD_CONTENT = `## SDLC Workflow
401
408
 
402
409
  When working on requirements, features, or handoffs, follow these phases:
403
410
 
404
- 1. **PO** — PRD, user stories → docs/sdlc/po/
405
- 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/
411
+ 1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
412
+ 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
406
413
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
407
414
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
408
- 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
415
+ 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
409
416
  6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
410
- 7. **QE (testing)** — QE Lead + Senior QE (automation)
417
+ 7. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
411
418
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
412
419
 
413
420
  After the docs phase, the Dev team runs implementation immediately. See docs/sdlc/agents/
@@ -415,15 +422,15 @@ After the docs phase, the Dev team runs implementation immediately. See docs/sdl
415
422
 
416
423
  const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
417
424
 
418
- **Trigger on idea:** When the user sends an idea, feature request, or requirement, run the pipeline continuously: Phase 1 (PO) → 2 → … → 7 (Deploy). One sub-agent/role per phase; do not handle the whole flow as the main agent only. Do not stop after one phase unless the user asks.
425
+ **Trigger on idea:** When the user sends an idea, feature request, or requirement, run the pipeline continuously: Phase 1 (PO) → 2 → … → 7 (Deploy). One role per phase (single agent = switch role each phase). Do not stop after one phase unless the user asks.
419
426
 
420
- 1. **PO** — PRD, user stories → docs/sdlc/po/
421
- 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/
427
+ 1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
428
+ 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
422
429
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
423
430
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
424
- 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
431
+ 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
425
432
  6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
426
- 7. **QE (testing)** — QE Lead + Senior QE (automation)
433
+ 7. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
427
434
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
428
435
 
429
436
  After the docs phase (Technical BA + QE docs), the Dev team runs implementation immediately. See docs/sdlc/agents/
@@ -437,7 +444,7 @@ For Cursor, see .cursor/rules/sdlc-workflow.mdc
437
444
  ## Trigger and orchestration
438
445
 
439
446
  - **When the user sends an idea, feature request, or requirement:** Start the pipeline and run it **continuously through deployment** (Phase 1 → 2 → … → 7). Do not handle everything in one main-agent response.
440
- - **One sub-agent (role) per phase:** Execute each phase as that role only; write artifacts to the right folder; then **continue to the next phase** without waiting. If the tool supports sub-agents, spawn one per phase; otherwise the main agent runs each phase in sequence.
447
+ - **One role per phase:** Execute each phase as that role only; write artifacts to the right folder; then continue to the next phase. In Cursor there is one agent it simulates the pipeline by adopting one role per phase in sequence.
441
448
  - **Do not stop** after PO or any single phase unless the user explicitly asks to stop. Run through to Deploy.
442
449
 
443
450
  ## Flow
@@ -457,7 +464,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
457
464
  | 4 | Technical BA | API specs, tech breakdown |
458
465
  | 5a | QE (docs) | Test plan, test cases |
459
466
  | 5b | Dev | Code, unit tests (≥90%) |
460
- | 6 | QE (testing) | QE Lead + Senior QE, automation, sign-off |
467
+ | 6 | QE (testing) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, sign-off |
461
468
  | 7 | Deploy | Docker Compose + K8s |
462
469
 
463
470
  **Sub-agents**: Each role runs as a sub-agent (PO, Business BA, Architect, Technical BA, QE Lead, Senior QE, Tech Lead, Senior Dev). See docs/sdlc/agents/
@@ -466,11 +473,11 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
466
473
 
467
474
  ### Phase 1: PO
468
475
  - Epic brief, user stories, acceptance criteria
469
- - Output: \`docs/sdlc/po/\`
476
+ - Output: \`docs/sdlc/po/{epic-slug}/\` — **one folder per epic**; do not put all epics in one file
470
477
 
471
478
  ### Phase 2: Business BA
472
479
  - Functional requirements, process flows, use cases
473
- - Output: \`docs/sdlc/ba/business/\`
480
+ - Output: \`docs/sdlc/ba/business/{epic-slug}/\` — **one folder per epic** (same slug as PO); do not merge into one file
474
481
 
475
482
  ### Phase 3: Architect
476
483
  - System context, container diagram, ADRs, tech stack
@@ -482,7 +489,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
482
489
 
483
490
  ### Phase 5a: QE (Docs)
484
491
  - Test plan, test cases
485
- - Output: \`docs/sdlc/qe/\`
492
+ - Output: \`docs/sdlc/qe/{epic-slug}/\` — **one folder per epic**; do not put all epics in one file
486
493
  - **After docs phase → Dev team runs implementation immediately** (no extra gate)
487
494
 
488
495
  ### Phase 5b: Dev Teams
@@ -492,8 +499,8 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
492
499
  - **Then**: QE starts testing phase
493
500
 
494
501
  ### Phase 6: QE (Testing — automation)
495
- - **QE Lead**: Test framework decision; review test code. Output: \`docs/sdlc/qe/qe-lead/\`
496
- - **Senior QE (10+ yrs)**: Write automation tests. Output: \`docs/sdlc/qe/senior-qe/\`
502
+ - **QE Lead (15+ yrs automation)**: Test strategy, framework choice, automation architecture; review test code. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
503
+ - **Senior QE (10+ yrs)**: Write automation tests per QE Lead's strategy. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
497
504
 
498
505
  ### Phase 7: Deploy
499
506
  - After pipeline completes → deploy with **Docker Compose** (local/staging) and **Kubernetes** (production)
@@ -508,25 +515,23 @@ const ORCHESTRATION_MD = `# Pipeline orchestration
508
515
 
509
516
  When the user sends an **idea**, **feature request**, or **requirement** (e.g. "I want a login page", "We need an API for X"):
510
517
 
511
- 1. **Do not** answer with the main agent only (e.g. one reply that does a bit of everything).
512
- 2. **Trigger the full pipeline** and run **Phase 1 2 7 in sequence**.
513
- 3. **One role (sub-agent) per phase:** For each phase, act only as that role, write outputs to the correct \`docs/sdlc/...\` folder, then **continue to the next phase** without asking the user to "run next step".
514
- 4. **Run through to Deploy.** Do not stop after PO, BA, or Dev unless the user explicitly says to stop.
518
+ 1. **Trigger the full pipeline** and run **Phase 1 2 7 in sequence**.
519
+ 2. **One role per phase:** For each phase, act only as that role, write outputs to the correct \`docs/sdlc/...\` folder, then **continue to the next phase** without asking the user to "run next step".
520
+ 3. **Run through to Deploy.** Do not stop after PO, BA, or Dev unless the user explicitly says to stop.
515
521
 
516
- ## How to run (by platform)
522
+ ## How it runs (Cursor and similar)
517
523
 
518
- - **If the tool has sub-agents:** Spawn one sub-agent per phase; pass previous phase output as input; run in order.
519
- - **If only one agent:** Simulate by executing Phase 1 (PO) → write \`docs/sdlc/po/...\` → then Phase 2 (Business BA) → … → Phase 7 (Deploy). One continuous run or explicit "Phase 1 done, starting Phase 2" steps.
524
+ There is **one agent** per conversation. It simulates the pipeline by **adopting one role per phase** in order: Phase 1 as PO only → Phase 2 as Business BA only → … → Phase 7 as Deploy. Do not mix roles in one step. If the tool later supports separate agents per phase, use that; otherwise this single-agent simulation is correct.
520
525
 
521
526
  ## Checklist per run
522
527
 
523
- - [ ] Phase 1 PO: artifacts in \`docs/sdlc/po/\`
524
- - [ ] Phase 2 Business BA: \`docs/sdlc/ba/business/\`
528
+ - [ ] Phase 1 PO: artifacts in \`docs/sdlc/po/{epic-slug}/\` (one folder per epic)
529
+ - [ ] Phase 2 Business BA: \`docs/sdlc/ba/business/{epic-slug}/\` (one folder per epic)
525
530
  - [ ] Phase 3 Architect: \`docs/sdlc/architecture/\`
526
531
  - [ ] Phase 4 Technical BA: \`docs/sdlc/ba/technical/\`
527
- - [ ] Phase 5a QE docs: \`docs/sdlc/qe/\`
532
+ - [ ] Phase 5a QE docs: \`docs/sdlc/qe/{epic-slug}/\` (one folder per epic)
528
533
  - [ ] Phase 5b Dev: code + unit tests, \`docs/sdlc/dev/\`
529
- - [ ] Phase 6 QE testing: automation, sign-off
534
+ - [ ] Phase 6 QE testing: automation, sign-off → \`docs/sdlc/qe/{epic-slug}/\`
530
535
  - [ ] Phase 7 Deploy: \`docs/sdlc/deploy/\`, Docker Compose + K8s
531
536
  `;
532
537
 
@@ -536,6 +541,12 @@ Templates and examples. Use \`*.template.md\` as starting points.
536
541
  Templates are written for all project types: web, mobile, API-only, library/SDK, CLI, data/ML, platform/infra.
537
542
  Sub-agents: docs/sdlc/agents/
538
543
  Deploy: docs/sdlc/deploy/ (Docker Compose + K8s)
544
+
545
+ ## Folder structure: one per epic/feature
546
+
547
+ - **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic (e.g. \`job-scheduler-event-bus\`). Files inside: epic-brief.md, user-stories.md, etc. Do not put all epics in one file.
548
+ - **Business BA**: \`docs/sdlc/ba/business/{epic-slug}/\` — same slug as PO. Files: functional-requirements.md, process-flows.md, etc. Do not merge all epics into one file.
549
+ - **QE**: \`docs/sdlc/qe/{epic-slug}/\` — same slug as PO/BA. Files: test-plan.md, test-cases.md, automation. Do not put all epics in one file.
539
550
  `;
540
551
 
541
552
  const AGENTS_README = `# Sub-Agents
@@ -544,11 +555,11 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
544
555
 
545
556
  | Role | Sub-agent | Input | Output |
546
557
  |------|-----------|--------|--------|
547
- | PO | po | User request | docs/sdlc/po/ |
548
- | Business BA | business-ba | docs/sdlc/po/ | docs/sdlc/ba/business/ |
558
+ | PO | po | User request | docs/sdlc/po/{epic-slug}/ (one folder per epic) |
559
+ | Business BA | business-ba | docs/sdlc/po/{epic-slug}/ | docs/sdlc/ba/business/{epic-slug}/ (one folder per epic) |
549
560
  | Architect | architect | docs/sdlc/ba/business/ | docs/sdlc/architecture/ |
550
561
  | Technical BA | technical-ba | docs/sdlc/architecture/ | docs/sdlc/ba/technical/ |
551
- | QE (docs) | qe-docs | docs/sdlc/ba/technical/ | docs/sdlc/qe/ (test plan) |
562
+ | QE (docs) | qe-docs | docs/sdlc/ba/technical/ | docs/sdlc/qe/{epic-slug}/ (one folder per epic) |
552
563
  | Tech Lead | tech-lead | Technical spec | Review, merge, docs/sdlc/dev/tech-lead/ |
553
564
  | Senior Dev | senior-dev | Spec + test plan | After docs → run implementation immediately. Code, unit tests (≥90%) |
554
565
  | Senior Frontend | frontend | UI spec, API contract | Web UI, docs/sdlc/dev/frontend/ |
@@ -557,13 +568,13 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
557
568
  | Senior Embedded | embedded | HW/spec, interfaces | Firmware, IoT, docs/sdlc/dev/embedded/ |
558
569
  | Senior Data/ML | data-ml | Data spec, models | ETL, models, docs/sdlc/dev/data-ml/ |
559
570
  | Senior Platform | platform | Infra spec | CI/CD, observability, docs/sdlc/dev/platform/ |
560
- | QE Lead | qe-lead | Test plan | Test framework, review, docs/sdlc/qe/qe-lead/ |
561
- | Senior QE | senior-qe | Test plan + framework | Automation tests, docs/sdlc/qe/senior-qe/ |
571
+ | QE Lead | qe-lead | Test plan | 15+ yrs automation: strategy, framework, review docs/sdlc/qe/{epic-slug}/ |
572
+ | Senior QE | senior-qe | Test plan + framework | Automation tests docs/sdlc/qe/{epic-slug}/ |
562
573
  | Deploy | deploy | QE sign-off | Docker Compose + K8s, docs/sdlc/deploy/ |
563
574
 
564
575
  Orchestrator: run each sub-agent in order; hand off output → input of the next sub-agent.
565
576
 
566
- **Trigger:** On user idea/request, run the full pipeline (see docs/sdlc/ORCHESTRATION.md). Do not run the whole flow as the main agent only; do not stop after one phase until Deploy unless the user asks.
577
+ **Trigger:** On user idea/request, run the full pipeline (see docs/sdlc/ORCHESTRATION.md). One role per phase; single agent simulates by switching role each phase. Do not stop after one phase until Deploy unless the user asks.
567
578
  `;
568
579
 
569
580
  const DEPLOY_README = `# Deploy
@@ -686,8 +697,24 @@ Must have / Should have / Could have
686
697
 
687
698
  const PO_README = `# PO (Product Owner)
688
699
 
689
- Create PRD, epic briefs, user stories here.
690
- Use epic-brief.template.md as starting point.
700
+ **One folder per epic/feature.** Do not put all epics in one file.
701
+
702
+ - Create a folder per epic: \`docs/sdlc/po/{epic-slug}/\`
703
+ - Folder name = epic/feature slug (e.g. \`job-scheduler-event-bus\`, \`user-auth\`).
704
+ - Inside that folder: \`epic-brief.md\`, \`user-stories.md\`, \`prd.md\` (or similar) for that epic only.
705
+
706
+ Example:
707
+ \`\`\`
708
+ docs/sdlc/po/
709
+ job-scheduler-event-bus/
710
+ epic-brief.md
711
+ user-stories.md
712
+ user-auth/
713
+ epic-brief.md
714
+ user-stories.md
715
+ \`\`\`
716
+
717
+ Use epic-brief.template.md as starting point for each epic.
691
718
  `;
692
719
 
693
720
  const BA_FR_TEMPLATE = `## FR-001: [Title]
@@ -713,8 +740,22 @@ const BA_FR_TEMPLATE = `## FR-001: [Title]
713
740
 
714
741
  const BA_BUSINESS_README = `# Business BA
715
742
 
716
- Functional requirements, process flows, use cases.
717
- Use functional-requirement.template.md for FRS items.
743
+ **One folder per epic/feature.** Do not put all epics/features in one file.
744
+
745
+ - Use the same epic/feature slug as PO: \`docs/sdlc/ba/business/{epic-slug}/\`
746
+ - Inside that folder: \`functional-requirements.md\`, \`process-flows.md\`, \`use-cases.md\` (or similar) for that epic only.
747
+
748
+ Example:
749
+ \`\`\`
750
+ docs/sdlc/ba/business/
751
+ job-scheduler-event-bus/
752
+ functional-requirements.md
753
+ process-flows.md
754
+ user-auth/
755
+ functional-requirements.md
756
+ \`\`\`
757
+
758
+ Use functional-requirement.template.md for FRS items. One file per epic, or one folder per epic with multiple files.
718
759
  `;
719
760
 
720
761
  const TECH_API_TEMPLATE = `# Interface / contract spec
@@ -863,23 +904,42 @@ const QE_TC_TEMPLATE = `## TC-001: [Scenario]
863
904
 
864
905
  const QE_README = `# QE (Quality Engineering)
865
906
 
907
+ **One folder per epic/feature.** Do not put all epics in one file.
908
+
909
+ - Use the same epic/feature slug as PO and Business BA: \`docs/sdlc/qe/{epic-slug}/\`
910
+ - Inside that folder: \`test-plan.md\`, \`test-cases.md\` (Phase 5a), and for Phase 6: automation notes, framework decision for that epic, etc.
911
+
912
+ Example:
913
+ \`\`\`
914
+ docs/sdlc/qe/
915
+ job-scheduler-event-bus/
916
+ test-plan.md
917
+ test-cases.md
918
+ automation/ (Phase 6: Senior QE output)
919
+ user-auth/
920
+ test-plan.md
921
+ test-cases.md
922
+ \`\`\`
923
+
866
924
  Two phases:
867
- 1. **Docs phase** — Test plan, test cases. Done → **Dev runs implementation immediately**.
868
- 2. **Testing phase** — After Dev completes unit tests: QE team writes automation tests.
869
- - **QE Lead**: Decide test framework; review test code → docs/sdlc/qe/qe-lead/
870
- - **Senior QE (10+ yrs)**: Write automation tests → docs/sdlc/qe/senior-qe/
925
+ 1. **Docs phase** — Test plan, test cases per epic in \`qe/{epic-slug}/\`. Done → **Dev runs implementation immediately**.
926
+ 2. **Testing phase** — After Dev completes unit tests: QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (automation) output to the same \`qe/{epic-slug}/\` (or subfolders there).
871
927
 
872
928
  Use test-case.template.md for test cases.
873
929
  `;
874
930
 
875
- const QE_LEAD_README = `# QE Lead
931
+ const QE_LEAD_README = `# QE Lead (15+ years exp in test automation)
932
+
933
+ **Profile**: 15+ years of experience in test automation, test strategy, and quality engineering. Owns test automation strategy, framework selection, and quality gates across the project.
876
934
 
877
935
  **Responsibilities**:
878
- - Decide test framework (e.g. Playwright, Cypress, Jest, etc.)
879
- - Review test code
880
- - Ensure automation quality and coverage
936
+ - **Test automation strategy**: Define scope of automation (unit, integration, E2E, API, performance), pyramid and tooling alignment with tech stack.
937
+ - **Framework and tooling**: Decide and document test frameworks (e.g. Playwright, Cypress, Jest, RestAssured, K6) and CI integration; justify choices in ADRs.
938
+ - **Automation architecture**: Design test structure, layers, fixtures, reporting, and flake prevention (retries, stability, env handling).
939
+ - **Review and standards**: Review test code for coverage, maintainability, and alignment with framework; define coding and naming standards for tests.
940
+ - **Quality gates**: Define and enforce gates (e.g. coverage thresholds, required suites before merge, regression criteria).
881
941
 
882
- **Docs**: Test framework ADR, review checklist.
942
+ **Output**: Test framework ADR, automation strategy doc, review checklist, and per-epic guidance in \`docs/sdlc/qe/{epic-slug}/\`.
883
943
  `;
884
944
 
885
945
  const QE_SENIOR_README = `# Senior QE (10+ years exp)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Scaffold SDLC workflow docs and templates for Cursor, Claude, and dev teams",
5
5
  "type": "module",
6
6
  "bin": {