sdlc-workflow 1.0.8 → 1.0.10

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 +246 -73
  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
+ ## Detailed tasks
707
+
708
+ - [ ] **Clarify vision**: Capture business problem, goals, success metrics
709
+ - [ ] **Define scope**: Boundaries, in/out of scope, MVP vs later
710
+ - [ ] **Write epic brief**: Problem, success metrics, high-level approach, project type
711
+ - [ ] **Break into user stories**: As a [role], I want [goal] so that [benefit]; acceptance criteria per story
712
+ - [ ] **Prioritize**: Must / Should / Could have; order by value and risk
713
+ - [ ] **Identify dependencies**: External teams, systems, blockers
714
+ - [ ] **Call out risks**: Technical, schedule, compliance
715
+ - [ ] **Handoff to Business BA**: Deliverables in \`po/{epic-slug}/\`
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,7 +740,31 @@ 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.
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
+ ## Detailed tasks
759
+
760
+ - [ ] **Read PO outputs**: Epic brief, user stories, acceptance criteria
761
+ - [ ] **Define functional requirements**: For each requirement: type, description, trigger, process flow, output, constraints (use FR-001, FR-002...)
762
+ - [ ] **Document process flows**: Step-by-step business flows (e.g. BPMN, flowcharts, numbered lists)
763
+ - [ ] **Write use cases**: Actor, goal, preconditions, main/alternate flows, postconditions
764
+ - [ ] **Maintain glossary**: Business terms, definitions, acronyms
765
+ - [ ] **Map to user stories**: Trace FRs to user stories / AC
766
+ - [ ] **Handoff to Architect**: Deliverables in \`ba/business/{epic-slug}/\`
767
+
717
768
  Use functional-requirement.template.md for FRS items.
718
769
  `;
719
770
 
@@ -815,6 +866,15 @@ const BA_TECH_README = `# Technical BA
815
866
 
816
867
  API/interface specs, DB schema, team breakdown.
817
868
  Templates support: HTTP API, library/SDK, CLI, and all project types (see api-spec and team-breakdown).
869
+
870
+ ## Detailed tasks
871
+
872
+ - [ ] **Read Architect outputs**: ADRs, context/container diagrams, tech stack
873
+ - [ ] **API/interface spec**: For each endpoint/class/command: purpose, request/response, contract (OpenAPI, TS types, CLI help)
874
+ - [ ] **DB schema**: Tables, columns, indexes, constraints; migrations approach
875
+ - [ ] **Team breakdown**: Map scope to teams (Backend, Frontend, Mobile, etc.) per project type; dependencies
876
+ - [ ] **Trace to FRs**: Map technical specs to functional requirements
877
+ - [ ] **Handoff to QE + Dev**: API spec, team breakdown in \`ba/technical/\`
818
878
  `;
819
879
 
820
880
  const ARCH_ADR_TEMPLATE = `# ADR-001: [Decision Title]
@@ -836,10 +896,20 @@ const ARCH_ADR_TEMPLATE = `# ADR-001: [Decision Title]
836
896
  - Negative: ...
837
897
  `;
838
898
 
839
- const ARCH_README = `# Architecture
899
+ const ARCH_README = `# Architect
840
900
 
841
901
  ADRs, system diagrams, tech stack decisions.
842
902
  Use adr.template.md for new ADRs.
903
+
904
+ ## Detailed tasks
905
+
906
+ - [ ] **Read Business BA outputs**: Functional requirements, process flows, use cases
907
+ - [ ] **Context diagram**: System boundary, external actors, integrations
908
+ - [ ] **Container diagram**: Main components/services and their responsibilities
909
+ - [ ] **Tech stack decisions**: Languages, frameworks, databases; document in ADRs
910
+ - [ ] **ADR per decision**: Context, decision, consequences (scope: backend, frontend, mobile, etc.)
911
+ - [ ] **Non-functional alignment**: Performance, security, scalability, compliance
912
+ - [ ] **Handoff to Technical BA**: Architecture docs, ADRs in \`architecture/\`
843
913
  `;
844
914
 
845
915
  const QE_TC_TEMPLATE = `## TC-001: [Scenario]
@@ -863,23 +933,64 @@ const QE_TC_TEMPLATE = `## TC-001: [Scenario]
863
933
 
864
934
  const QE_README = `# QE (Quality Engineering)
865
935
 
936
+ **One folder per epic/feature.** Do not put all epics in one file.
937
+
938
+ - Use the same epic/feature slug as PO and Business BA: \`docs/sdlc/qe/{epic-slug}/\`
939
+ - Inside that folder: \`test-plan.md\`, \`test-cases.md\` (Phase 5a), and for Phase 6: automation notes, framework decision for that epic, etc.
940
+
941
+ ## Detailed tasks (Docs phase — Phase 5a)
942
+
943
+ - [ ] **Read Technical BA spec**: API, team breakdown, FRs
944
+ - [ ] **Test plan**: Scope (unit, integration, E2E), coverage goals, risks
945
+ - [ ] **Test cases**: TC-001, TC-002... — precondition, steps, expected, links to AC
946
+ - [ ] **Handoff to Dev**: Test plan + test cases in \`qe/{epic-slug}/\` → Dev runs implementation
947
+
948
+ ## Detailed tasks (Testing phase — Phase 6)
949
+
950
+ - [ ] **QE Lead**: Test strategy, framework, review test code
951
+ - [ ] **Senior QE**: Write automation tests per test plan
952
+ - [ ] **Sign-off**: Regression, coverage, release readiness in \`qe/{epic-slug}/\`
953
+
954
+ Example:
955
+ \`\`\`
956
+ docs/sdlc/qe/
957
+ job-scheduler-event-bus/
958
+ test-plan.md
959
+ test-cases.md
960
+ automation/ (Phase 6: Senior QE output)
961
+ user-auth/
962
+ test-plan.md
963
+ test-cases.md
964
+ \`\`\`
965
+
866
966
  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/
967
+ 1. **Docs phase** — Test plan, test cases per epic in \`qe/{epic-slug}/\`. Done → **Dev runs implementation immediately**.
968
+ 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
969
 
872
970
  Use test-case.template.md for test cases.
873
971
  `;
874
972
 
875
- const QE_LEAD_README = `# QE Lead
973
+ const QE_LEAD_README = `# QE Lead (15+ years exp in test automation)
876
974
 
877
- **Responsibilities**:
878
- - Decide test framework (e.g. Playwright, Cypress, Jest, etc.)
879
- - Review test code
880
- - Ensure automation quality and coverage
975
+ **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.
881
976
 
882
- **Docs**: Test framework ADR, review checklist.
977
+ **Responsibilities**:
978
+ - **Test automation strategy**: Define scope of automation (unit, integration, E2E, API, performance), pyramid and tooling alignment with tech stack.
979
+ - **Framework and tooling**: Decide and document test frameworks (e.g. Playwright, Cypress, Jest, RestAssured, K6) and CI integration; justify choices in ADRs.
980
+ - **Automation architecture**: Design test structure, layers, fixtures, reporting, and flake prevention (retries, stability, env handling).
981
+ - **Review and standards**: Review test code for coverage, maintainability, and alignment with framework; define coding and naming standards for tests.
982
+ - **Quality gates**: Define and enforce gates (e.g. coverage thresholds, required suites before merge, regression criteria).
983
+
984
+ **Output**: Test framework ADR, automation strategy doc, review checklist, and per-epic guidance in \`docs/sdlc/qe/{epic-slug}/\`.
985
+
986
+ ## Detailed tasks
987
+
988
+ - [ ] **Test automation strategy**: Document scope (unit/integration/E2E/API/performance), pyramid, alignment with tech stack
989
+ - [ ] **Framework ADR**: Choose and justify frameworks (Playwright, Cypress, Jest, etc.); document in ADR
990
+ - [ ] **Automation architecture**: Design folder structure, layers, fixtures, reporting, retries, env handling
991
+ - [ ] **Review checklist**: Coverage, maintainability, naming, alignment with framework
992
+ - [ ] **Quality gates**: Define thresholds (coverage, required suites before merge), regression criteria
993
+ - [ ] **Per-epic guidance**: Output to \`qe/{epic-slug}/\` per epic
883
994
  `;
884
995
 
885
996
  const QE_SENIOR_README = `# Senior QE (10+ years exp)
@@ -889,7 +1000,14 @@ const QE_SENIOR_README = `# Senior QE (10+ years exp)
889
1000
  - Implement E2E, integration, regression tests
890
1001
  - Follow QE Lead's framework decisions
891
1002
 
892
- **Docs**: Automation test design, framework usage.
1003
+ ## Detailed tasks
1004
+
1005
+ - [ ] **Read test plan**: Scope, coverage goals, test case IDs
1006
+ - [ ] **Implement E2E tests**: UI flows, critical paths per QE Lead's framework
1007
+ - [ ] **Implement API/integration tests**: Request/response, contracts
1008
+ - [ ] **Implement regression suite**: Add to CI; ensure stability (retries, waits)
1009
+ - [ ] **Report coverage**: Align with QE Lead's quality gates
1010
+ - [ ] **Output**: Automation code and docs in \`qe/{epic-slug}/\`
893
1011
  `;
894
1012
 
895
1013
  const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
@@ -899,7 +1017,15 @@ const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
899
1017
  - Review and merge code
900
1018
  - Ensure architecture alignment
901
1019
 
902
- **Docs**: ADRs, tech decisions, review checklist.
1020
+ ## Detailed tasks
1021
+
1022
+ - [ ] **Read architecture and Technical BA spec**: ADRs, API spec, team breakdown
1023
+ - [ ] **Tech stack decision**: Languages, frameworks, libraries; document in ADR
1024
+ - [ ] **Project setup**: Repo structure, tooling, lint, format, CI baseline
1025
+ - [ ] **Code review**: Architecture alignment, patterns, test coverage, security
1026
+ - [ ] **Merge approval**: Enforce quality gates before merge
1027
+ - [ ] **Tech guidance**: Resolve technical disputes; mentor team
1028
+ - [ ] **Output**: ADRs, review checklist in \`dev/tech-lead/\`
903
1029
  `;
904
1030
 
905
1031
  const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
@@ -909,7 +1035,13 @@ const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
909
1035
  - Write code with Unit Test coverage **≥ 90%**
910
1036
  - Follow Tech Lead's tech decisions
911
1037
 
912
- **Docs**: Implementation notes, API usage.
1038
+ ## Detailed tasks
1039
+
1040
+ - [ ] **Read Technical BA spec**: API, schema, team breakdown
1041
+ - [ ] **Implement feature**: Code per spec; follow Tech Lead stack
1042
+ - [ ] **Unit tests**: Coverage **≥ 90%**; edge cases, error paths
1043
+ - [ ] **PR**: Lint, tests passing; request Tech Lead review
1044
+ - [ ] **Output**: Code + implementation notes in \`dev/senior-developer/\`
913
1045
  `;
914
1046
 
915
1047
  const DEV_IMPLEMENTATION_ROLES_TEMPLATE = `# Implementation roles by project type
@@ -949,7 +1081,14 @@ const DEV_FRONTEND_README = `# Senior Frontend (10+ years exp) — Web UI
949
1081
  - Unit Test coverage **≥ 90%**
950
1082
  - Follow Tech Lead's stack (e.g. React, Vue, Angular)
951
1083
 
952
- **Docs**: Component docs, integration notes.
1084
+ ## Detailed tasks
1085
+
1086
+ - [ ] **Read Technical BA spec**: API contract, design (if any)
1087
+ - [ ] **Implement components/screens**: Per spec; responsive, accessible
1088
+ - [ ] **API integration**: Fetch, state, error handling
1089
+ - [ ] **Unit tests**: Components, hooks, utils — coverage **≥ 90%**
1090
+ - [ ] **PR**: Lint, tests; Tech Lead review
1091
+ - [ ] **Output**: Code + component/integration docs in \`dev/frontend/\`
953
1092
  `;
954
1093
 
955
1094
  const DEV_BACKEND_README = `# Senior Backend (10+ years exp) — API, services
@@ -959,7 +1098,14 @@ const DEV_BACKEND_README = `# Senior Backend (10+ years exp) — API, services
959
1098
  - Unit Test coverage **≥ 90%**
960
1099
  - Follow Tech Lead's stack
961
1100
 
962
- **Docs**: API implementation notes, DB changes.
1101
+ ## Detailed tasks
1102
+
1103
+ - [ ] **Read Technical BA spec**: API spec, DB schema
1104
+ - [ ] **Implement endpoints**: Per spec; validation, auth, error responses
1105
+ - [ ] **Implement DB layer**: Migrations, queries, transactions
1106
+ - [ ] **Unit tests**: Services, controllers, DB — coverage **≥ 90%**
1107
+ - [ ] **PR**: Lint, tests; Tech Lead review
1108
+ - [ ] **Output**: Code + API/DB implementation notes in \`dev/backend/\`
963
1109
  `;
964
1110
 
965
1111
  const DEV_MOBILE_README = `# Senior Mobile (10+ years exp) — iOS / Android / cross-platform
@@ -969,7 +1115,14 @@ const DEV_MOBILE_README = `# Senior Mobile (10+ years exp) — iOS / Android / c
969
1115
  - Unit Test coverage **≥ 90%**
970
1116
  - Follow Tech Lead's stack (e.g. React Native, Flutter, native)
971
1117
 
972
- **Docs**: Screen/module docs, integration notes.
1118
+ ## Detailed tasks
1119
+
1120
+ - [ ] **Read Technical BA spec**: API contract, screen flows
1121
+ - [ ] **Implement screens/modules**: Per spec; platform parity (iOS/Android)
1122
+ - [ ] **API integration**: Auth, state, offline (if required)
1123
+ - [ ] **Unit tests**: Components, logic — coverage **≥ 90%**
1124
+ - [ ] **PR**: Lint, tests; Tech Lead review
1125
+ - [ ] **Output**: Code + screen/module docs in \`dev/mobile/\`
973
1126
  `;
974
1127
 
975
1128
  const DEV_EMBEDDED_README = `# Senior Embedded (10+ years exp) — firmware, IoT
@@ -979,7 +1132,13 @@ const DEV_EMBEDDED_README = `# Senior Embedded (10+ years exp) — firmware, IoT
979
1132
  - Tests as appropriate for target (unit, HW-in-loop)
980
1133
  - Follow Tech Lead's stack and safety constraints
981
1134
 
982
- **Docs**: Module design, interface specs.
1135
+ ## Detailed tasks
1136
+
1137
+ - [ ] **Read Technical BA spec**: Interfaces, timing, constraints
1138
+ - [ ] **Implement modules/drivers**: Per spec; safety-critical compliance
1139
+ - [ ] **Tests**: Unit, HW-in-loop as feasible
1140
+ - [ ] **PR**: Lint, tests; Tech Lead review
1141
+ - [ ] **Output**: Code + module/interface docs in \`dev/embedded/\`
983
1142
  `;
984
1143
 
985
1144
  const DEV_DATA_ML_README = `# Senior Data/ML (10+ years exp)
@@ -989,7 +1148,14 @@ const DEV_DATA_ML_README = `# Senior Data/ML (10+ years exp)
989
1148
  - Tests and validation for data and model quality
990
1149
  - Follow Tech Lead's stack (e.g. Python, Spark, ML frameworks)
991
1150
 
992
- **Docs**: Pipeline design, model cards.
1151
+ ## Detailed tasks
1152
+
1153
+ - [ ] **Read Technical BA spec**: Data spec, API contract
1154
+ - [ ] **Implement ETL/pipelines**: Ingestion, transforms, storage
1155
+ - [ ] **Implement models**: Training, evaluation; model cards
1156
+ - [ ] **Tests**: Data validation, model quality metrics
1157
+ - [ ] **PR**: Lint, tests; Tech Lead review
1158
+ - [ ] **Output**: Code + pipeline/model docs in \`dev/data-ml/\`
993
1159
  `;
994
1160
 
995
1161
  const DEV_PLATFORM_README = `# Senior Platform (10+ years exp) — infra, CI/CD
@@ -998,7 +1164,14 @@ const DEV_PLATFORM_README = `# Senior Platform (10+ years exp) — infra, CI/CD
998
1164
  - Implement CI/CD, infra as code, observability per spec
999
1165
  - Follow Tech Lead's stack and security requirements
1000
1166
 
1001
- **Docs**: Runbooks, pipeline and infra docs.
1167
+ ## Detailed tasks
1168
+
1169
+ - [ ] **Read Technical BA spec**: Infra, deploy, observability requirements
1170
+ - [ ] **Implement CI/CD**: Build, test, deploy pipelines
1171
+ - [ ] **Infra as code**: Terraform/Pulumi/CloudFormation per spec
1172
+ - [ ] **Observability**: Logging, metrics, traces, alerts
1173
+ - [ ] **PR**: Lint; Tech Lead review
1174
+ - [ ] **Output**: Pipelines, infra code, runbooks in \`dev/platform/\`
1002
1175
  `;
1003
1176
 
1004
1177
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Scaffold SDLC workflow docs and templates for Cursor, Claude, and dev teams",
5
5
  "type": "module",
6
6
  "bin": {