sdlc-workflow 1.0.7 → 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 +138 -66
  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
@@ -15,10 +15,22 @@ async function main() {
15
15
  const args = process.argv.slice(2);
16
16
  const command = args[0] || "init";
17
17
 
18
+ if (command === "version" || command === "--version" || command === "-v") {
19
+ const pkg = JSON.parse(await readFile(join(PKG_ROOT, "package.json"), "utf8"));
20
+ console.log(pkg.version);
21
+ process.exit(0);
22
+ }
23
+
18
24
  if (command !== "init") {
19
- console.log("Usage: npx sdlc-workflow init");
20
- console.log(" Scaffolds SDLC docs and templates into current project.");
21
- console.log(" Installs for: Cursor, Claude, Antigravity, Codex.");
25
+ console.log("Usage: npx sdlc-workflow <command>");
26
+ console.log("");
27
+ console.log("Commands:");
28
+ console.log(" init Scaffold SDLC docs and templates (Cursor, Claude, Antigravity, Codex)");
29
+ console.log(" version Print current version");
30
+ console.log("");
31
+ console.log("Examples:");
32
+ console.log(" npx sdlc-workflow init");
33
+ console.log(" npx sdlc-workflow version");
22
34
  process.exit(1);
23
35
  }
24
36
 
@@ -217,15 +229,15 @@ globs: docs/sdlc/**/*, **/*.md
217
229
 
218
230
  # SDLC Workflow
219
231
 
220
- **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/.
221
233
 
222
- 1. **PO** — PRD, user stories → docs/sdlc/po/
223
- 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)
224
236
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
225
237
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
226
- 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)
227
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}/
228
- 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)
229
241
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
230
242
 
231
243
  **Each role runs as a sub-agent.** See docs/sdlc/agents/
@@ -244,10 +256,11 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
244
256
  ## Trigger and orchestration (mandatory)
245
257
 
246
258
  **When the user sends an idea, feature request, or new requirement:**
247
- 1. **Do not** handle it with the main agent only. **Trigger the pipeline** and run it **continuously through deployment** (Phase 1 → 2 → … → 7).
248
- 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.
249
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.
250
- 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.
251
264
 
252
265
  **Sub-agent specs**: docs/sdlc/agents/
253
266
 
@@ -270,13 +283,13 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
270
283
 
271
284
  **Role**: Prioritize, clarify business value, create product docs.
272
285
  **Deliverables**: Epic/Feature brief, user stories, acceptance criteria, priority, dependencies.
273
- **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.**
274
287
 
275
288
  ## Phase 2: Business BA (Business Analyst)
276
289
 
277
290
  **Role**: Break down from business perspective.
278
291
  **Deliverables**: Business process flows, functional requirements, use cases, glossary.
279
- **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.**
280
293
 
281
294
  ## Phase 3: Architect
282
295
 
@@ -294,7 +307,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
294
307
 
295
308
  **Role**: Create test plan, test cases before Dev implements.
296
309
  **Deliverables**: Test plan, test cases.
297
- **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).
298
311
 
299
312
  ## Phase 5b: Dev Teams
300
313
 
@@ -320,8 +333,8 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
320
333
  **Role**: Write and run **automation tests**, sign-off.
321
334
 
322
335
  **Roles**:
323
- - **QE Lead**: Decide test framework; review test code. Docs: \`docs/sdlc/qe/qe-lead/\`
324
- - **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)
325
338
 
326
339
  **Output**: Automation tests, test report. **Handoff to Deploy.**
327
340
 
@@ -342,7 +355,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
342
355
  | 4 | Technical BA | API specs, tech breakdown |
343
356
  | 5a | QE (docs) | Test plan, test cases |
344
357
  | 5b | Dev | Code, unit tests (≥90%) |
345
- | 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 |
346
359
  | 7 | Deploy | Docker Compose + K8s |
347
360
 
348
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/
@@ -351,6 +364,12 @@ See reference.md for templates.
351
364
 
352
365
  const CURSOR_REFERENCE_MD = `# SDLC Workflow — Reference
353
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
+
354
373
  ## PO: Epic Brief Template
355
374
  # Epic: [Name]
356
375
  ## Problem / Success Metrics / User Stories / Acceptance Criteria / Priority
@@ -367,9 +386,9 @@ POST /api/v1/[resource] — Purpose, Request, Response, Contract
367
386
  ## QE: Test Case
368
387
  TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
369
388
 
370
- ## QE Team
371
- - QE Lead: test framework decision, review test code → docs/sdlc/qe/qe-lead/
372
- - 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}/
373
392
 
374
393
  ## Dev Team
375
394
  - Tech Lead (15+ yrs): tech stack, review & merge → docs/sdlc/dev/tech-lead/
@@ -389,13 +408,13 @@ const AGENTS_MD_CONTENT = `## SDLC Workflow
389
408
 
390
409
  When working on requirements, features, or handoffs, follow these phases:
391
410
 
392
- 1. **PO** — PRD, user stories → docs/sdlc/po/
393
- 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)
394
413
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
395
414
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
396
- 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)
397
416
  6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
398
- 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)
399
418
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
400
419
 
401
420
  After the docs phase, the Dev team runs implementation immediately. See docs/sdlc/agents/
@@ -403,15 +422,15 @@ After the docs phase, the Dev team runs implementation immediately. See docs/sdl
403
422
 
404
423
  const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
405
424
 
406
- **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.
407
426
 
408
- 1. **PO** — PRD, user stories → docs/sdlc/po/
409
- 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)
410
429
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
411
430
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
412
- 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)
413
432
  6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
414
- 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)
415
434
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
416
435
 
417
436
  After the docs phase (Technical BA + QE docs), the Dev team runs implementation immediately. See docs/sdlc/agents/
@@ -425,7 +444,7 @@ For Cursor, see .cursor/rules/sdlc-workflow.mdc
425
444
  ## Trigger and orchestration
426
445
 
427
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.
428
- - **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.
429
448
  - **Do not stop** after PO or any single phase unless the user explicitly asks to stop. Run through to Deploy.
430
449
 
431
450
  ## Flow
@@ -445,7 +464,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
445
464
  | 4 | Technical BA | API specs, tech breakdown |
446
465
  | 5a | QE (docs) | Test plan, test cases |
447
466
  | 5b | Dev | Code, unit tests (≥90%) |
448
- | 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 |
449
468
  | 7 | Deploy | Docker Compose + K8s |
450
469
 
451
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/
@@ -454,11 +473,11 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
454
473
 
455
474
  ### Phase 1: PO
456
475
  - Epic brief, user stories, acceptance criteria
457
- - Output: \`docs/sdlc/po/\`
476
+ - Output: \`docs/sdlc/po/{epic-slug}/\` — **one folder per epic**; do not put all epics in one file
458
477
 
459
478
  ### Phase 2: Business BA
460
479
  - Functional requirements, process flows, use cases
461
- - 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
462
481
 
463
482
  ### Phase 3: Architect
464
483
  - System context, container diagram, ADRs, tech stack
@@ -470,7 +489,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
470
489
 
471
490
  ### Phase 5a: QE (Docs)
472
491
  - Test plan, test cases
473
- - Output: \`docs/sdlc/qe/\`
492
+ - Output: \`docs/sdlc/qe/{epic-slug}/\` — **one folder per epic**; do not put all epics in one file
474
493
  - **After docs phase → Dev team runs implementation immediately** (no extra gate)
475
494
 
476
495
  ### Phase 5b: Dev Teams
@@ -480,8 +499,8 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
480
499
  - **Then**: QE starts testing phase
481
500
 
482
501
  ### Phase 6: QE (Testing — automation)
483
- - **QE Lead**: Test framework decision; review test code. Output: \`docs/sdlc/qe/qe-lead/\`
484
- - **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}/\`
485
504
 
486
505
  ### Phase 7: Deploy
487
506
  - After pipeline completes → deploy with **Docker Compose** (local/staging) and **Kubernetes** (production)
@@ -496,25 +515,23 @@ const ORCHESTRATION_MD = `# Pipeline orchestration
496
515
 
497
516
  When the user sends an **idea**, **feature request**, or **requirement** (e.g. "I want a login page", "We need an API for X"):
498
517
 
499
- 1. **Do not** answer with the main agent only (e.g. one reply that does a bit of everything).
500
- 2. **Trigger the full pipeline** and run **Phase 1 2 7 in sequence**.
501
- 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".
502
- 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.
503
521
 
504
- ## How to run (by platform)
522
+ ## How it runs (Cursor and similar)
505
523
 
506
- - **If the tool has sub-agents:** Spawn one sub-agent per phase; pass previous phase output as input; run in order.
507
- - **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.
508
525
 
509
526
  ## Checklist per run
510
527
 
511
- - [ ] Phase 1 PO: artifacts in \`docs/sdlc/po/\`
512
- - [ ] 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)
513
530
  - [ ] Phase 3 Architect: \`docs/sdlc/architecture/\`
514
531
  - [ ] Phase 4 Technical BA: \`docs/sdlc/ba/technical/\`
515
- - [ ] Phase 5a QE docs: \`docs/sdlc/qe/\`
532
+ - [ ] Phase 5a QE docs: \`docs/sdlc/qe/{epic-slug}/\` (one folder per epic)
516
533
  - [ ] Phase 5b Dev: code + unit tests, \`docs/sdlc/dev/\`
517
- - [ ] Phase 6 QE testing: automation, sign-off
534
+ - [ ] Phase 6 QE testing: automation, sign-off → \`docs/sdlc/qe/{epic-slug}/\`
518
535
  - [ ] Phase 7 Deploy: \`docs/sdlc/deploy/\`, Docker Compose + K8s
519
536
  `;
520
537
 
@@ -524,6 +541,12 @@ Templates and examples. Use \`*.template.md\` as starting points.
524
541
  Templates are written for all project types: web, mobile, API-only, library/SDK, CLI, data/ML, platform/infra.
525
542
  Sub-agents: docs/sdlc/agents/
526
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.
527
550
  `;
528
551
 
529
552
  const AGENTS_README = `# Sub-Agents
@@ -532,11 +555,11 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
532
555
 
533
556
  | Role | Sub-agent | Input | Output |
534
557
  |------|-----------|--------|--------|
535
- | PO | po | User request | docs/sdlc/po/ |
536
- | 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) |
537
560
  | Architect | architect | docs/sdlc/ba/business/ | docs/sdlc/architecture/ |
538
561
  | Technical BA | technical-ba | docs/sdlc/architecture/ | docs/sdlc/ba/technical/ |
539
- | 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) |
540
563
  | Tech Lead | tech-lead | Technical spec | Review, merge, docs/sdlc/dev/tech-lead/ |
541
564
  | Senior Dev | senior-dev | Spec + test plan | After docs → run implementation immediately. Code, unit tests (≥90%) |
542
565
  | Senior Frontend | frontend | UI spec, API contract | Web UI, docs/sdlc/dev/frontend/ |
@@ -545,13 +568,13 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
545
568
  | Senior Embedded | embedded | HW/spec, interfaces | Firmware, IoT, docs/sdlc/dev/embedded/ |
546
569
  | Senior Data/ML | data-ml | Data spec, models | ETL, models, docs/sdlc/dev/data-ml/ |
547
570
  | Senior Platform | platform | Infra spec | CI/CD, observability, docs/sdlc/dev/platform/ |
548
- | QE Lead | qe-lead | Test plan | Test framework, review, docs/sdlc/qe/qe-lead/ |
549
- | 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}/ |
550
573
  | Deploy | deploy | QE sign-off | Docker Compose + K8s, docs/sdlc/deploy/ |
551
574
 
552
575
  Orchestrator: run each sub-agent in order; hand off output → input of the next sub-agent.
553
576
 
554
- **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.
555
578
  `;
556
579
 
557
580
  const DEPLOY_README = `# Deploy
@@ -674,8 +697,24 @@ Must have / Should have / Could have
674
697
 
675
698
  const PO_README = `# PO (Product Owner)
676
699
 
677
- Create PRD, epic briefs, user stories here.
678
- 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.
679
718
  `;
680
719
 
681
720
  const BA_FR_TEMPLATE = `## FR-001: [Title]
@@ -701,8 +740,22 @@ const BA_FR_TEMPLATE = `## FR-001: [Title]
701
740
 
702
741
  const BA_BUSINESS_README = `# Business BA
703
742
 
704
- Functional requirements, process flows, use cases.
705
- 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.
706
759
  `;
707
760
 
708
761
  const TECH_API_TEMPLATE = `# Interface / contract spec
@@ -851,23 +904,42 @@ const QE_TC_TEMPLATE = `## TC-001: [Scenario]
851
904
 
852
905
  const QE_README = `# QE (Quality Engineering)
853
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
+
854
924
  Two phases:
855
- 1. **Docs phase** — Test plan, test cases. Done → **Dev runs implementation immediately**.
856
- 2. **Testing phase** — After Dev completes unit tests: QE team writes automation tests.
857
- - **QE Lead**: Decide test framework; review test code → docs/sdlc/qe/qe-lead/
858
- - **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).
859
927
 
860
928
  Use test-case.template.md for test cases.
861
929
  `;
862
930
 
863
- 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.
864
934
 
865
935
  **Responsibilities**:
866
- - Decide test framework (e.g. Playwright, Cypress, Jest, etc.)
867
- - Review test code
868
- - 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).
869
941
 
870
- **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}/\`.
871
943
  `;
872
944
 
873
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.7",
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": {