sdlc-workflow 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +356 -169
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -252,25 +252,84 @@ globs: docs/sdlc/**/*, **/*.md
|
|
|
252
252
|
|
|
253
253
|
# SDLC Workflow
|
|
254
254
|
|
|
255
|
-
**On idea/feature request:** Trigger full pipeline
|
|
255
|
+
**On idea/feature request:** Trigger full pipeline continuously through deployment. Do not stop after one phase unless the user asks.
|
|
256
256
|
|
|
257
257
|
**Memory requirement:** Before executing any new action, recall relevant memories (project context, user preferences, past decisions) to ensure continuity and avoid repeating mistakes.
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
259
|
+
**Parallel by default, sequential only when required:** If two workstreams do NOT depend on each other's output, they MUST run in parallel.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Sequential (dependency chain)
|
|
264
|
+
|
|
265
|
+
Phase 0 → Phase 1 [PO] → Phase 2 [BA] → Phase 3 [UX] → Phase 4 [SA] → Phase 5 Technical [BA]
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## ⚡ Parallel Track A (Technical BA complete → spawn immediately)
|
|
270
|
+
|
|
271
|
+
> [DEV] AND [QE] run simultaneously. Do NOT wait for one to finish before starting the other.
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
Technical BA complete
|
|
275
|
+
├──→ [DEV] implementation (all roles: [FE]/[BE]/[MOBILE]/[EMB]/[DATA]/[PLATFORM])
|
|
276
|
+
└──→ [QE] test plan + test cases
|
|
277
|
+
Both complete → Phase 8
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## ⚡ Parallel Track B ([DEV] complete → spawn immediately)
|
|
283
|
+
|
|
284
|
+
> [QE] + [SEC] + [PERF] audit the same artifact simultaneously.
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
[DEV] complete
|
|
288
|
+
├──→ [QE] test execution
|
|
289
|
+
├──→ [SEC] security audit ← ALL IN PARALLEL
|
|
290
|
+
└──→ [PERF] performance audit
|
|
291
|
+
↓ Merge gate (sequential)
|
|
292
|
+
✅ QUALITY GATE PASSED → [OPS] Deploy
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Phase sequence
|
|
298
|
+
|
|
299
|
+
1. **Phase 1** [PO] — PRD, user stories, feasibility → docs/sdlc/po/{epic-slug}/
|
|
300
|
+
2. **Phase 2** [BA] — FRS, NFR, Gherkin, process flows → docs/sdlc/ba/business/{epic-slug}/
|
|
301
|
+
3. **Phase 3** [UX] (if app/web) — Design specs + wireframes; [PO]+[BA] review until approved → docs/sdlc/design/{epic-slug}/
|
|
302
|
+
4. **Phase 4** [SA] — ADRs, C4 diagrams, security by design → docs/sdlc/architecture/
|
|
303
|
+
5. **Phase 5** Technical [BA] — API specs (OpenAPI 3.x), team breakdown → docs/sdlc/ba/technical/
|
|
304
|
+
6. **⚡ Phase 5a** [QE] + **⚡ Phase 5b** [DEV] — parallel after Technical BA
|
|
305
|
+
7. **⚡ Phase 8** [QE] + [SEC] + [PERF] — parallel audits after [DEV] complete → merge gate
|
|
306
|
+
8. **Phase 9** [OPS] — Docker Compose + K8s + IaC → docs/sdlc/deploy/
|
|
307
|
+
9. **Phase 10** — SHIPPED ✅
|
|
308
|
+
10. **Phase 11** Maintenance — monitoring, bug fixes, patches
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Quality standards
|
|
313
|
+
|
|
314
|
+
| Role | Standard |
|
|
315
|
+
|------|----------|
|
|
316
|
+
| [PO] | Every requirement traces to a business KPI |
|
|
317
|
+
| [BA] | Every user story has Gherkin AC + edge case |
|
|
318
|
+
| [UX] | Every screen: WCAG 2.1 AA + mobile-first |
|
|
319
|
+
| [SA] | Every ADR has rationale + trade-off |
|
|
320
|
+
| [DEV] | Every function: docstring + error handling + unit test (100%) |
|
|
321
|
+
| [QE] | 100% branch coverage; ≥3 negative paths per happy path |
|
|
322
|
+
| [SEC] | Zero Critical; High must have mitigation or accepted-risk doc |
|
|
323
|
+
| [PERF] | p95 < 500ms for API; no N+1 queries |
|
|
324
|
+
| [OPS] | Secrets in Vault/SSM; no hardcoded credentials; IaC passes tfsec |
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Remediation loop
|
|
329
|
+
|
|
330
|
+
Every issue must have an Issue ID (e.g. SEC-001). Track: 🔁 CYCLE 1 → 🔁 CYCLE 2 → 🔁 CYCLE 3. Max 3 cycles per issue.
|
|
331
|
+
|
|
332
|
+
**Each role runs as a sub-agent.** Design before Architect (UX drives tech). See docs/sdlc/SDLC-WORKFLOW.md and docs/sdlc/agents/
|
|
274
333
|
`;
|
|
275
334
|
|
|
276
335
|
const CURSOR_SKILL_MD = `---
|
|
@@ -280,25 +339,28 @@ description: Multi-role SDLC workflow from user requirements through PO, Busines
|
|
|
280
339
|
|
|
281
340
|
# SDLC Workflow (Multi-Role)
|
|
282
341
|
|
|
283
|
-
|
|
342
|
+
**Parallel by default, sequential only when required.** Each role runs as a sub-agent. Design before Architect (UX drives tech). After docs phase → Dev runs immediately.
|
|
284
343
|
|
|
285
344
|
## Trigger and orchestration (mandatory)
|
|
286
345
|
|
|
287
346
|
**When the user sends an idea, feature request, or new requirement:**
|
|
288
347
|
1. **Recall memory** — Before executing any new action, recall relevant memories (project context, user preferences, past decisions) to ensure continuity and avoid repeating mistakes.
|
|
289
|
-
2. **Trigger the pipeline** and run it **continuously through deployment
|
|
290
|
-
3. **One role per phase
|
|
291
|
-
3. **Run in order:** PO → Business BA → **Design (if app/web, PO+BA review loop)** → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → **QE bug-fix loop until 0 bugs → Security + Principle Engineer audit → fix → retest → re-audit loop until 0 issues** → Deploy → Maintenance. Do not stop after one phase unless the user explicitly asks to stop.
|
|
348
|
+
2. **Trigger the pipeline** and run it **continuously through deployment**.
|
|
349
|
+
3. **One role per phase** for sequential phases. **Spawn parallel workstreams** when dependencies are independent.
|
|
292
350
|
|
|
293
|
-
**
|
|
351
|
+
**Parallel tracks:**
|
|
352
|
+
- Track A (after Technical BA): [DEV] implementation + [QE] test plan — run SIMULTANEOUSLY
|
|
353
|
+
- Track B (after Dev complete): [QE] + [SEC] + [PERF] audits — run SIMULTANEOUSLY
|
|
354
|
+
|
|
355
|
+
**Note:** In Cursor there is a single agent per conversation. Adopt one role per sequential phase; spawn parallel tasks for Track A and Track B.
|
|
294
356
|
|
|
295
357
|
**Sub-agent specs**: docs/sdlc/agents/
|
|
296
358
|
|
|
297
359
|
## Flow Overview
|
|
298
360
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
361
|
+
Sequential: Phase 0 → Phase 1 [PO] → Phase 2 [BA] → Phase 3 [UX] → Phase 4 [SA] → Phase 5 Technical [BA]
|
|
362
|
+
Parallel Track A: Technical BA complete → [DEV] + [QE] simultaneously
|
|
363
|
+
Parallel Track B: Dev complete → [QE] + [SEC] + [PERF] simultaneously → merge gate → [OPS] Deploy
|
|
302
364
|
|
|
303
365
|
**Determine current phase** before acting. If user sent an idea, assume Phase 0 and start from Phase 1.
|
|
304
366
|
|
|
@@ -353,48 +415,39 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
|
|
|
353
415
|
|
|
354
416
|
**Role**: Create test plan, test cases before Dev implements.
|
|
355
417
|
**Deliverables**: Test plan, test cases.
|
|
356
|
-
**Output**: \`docs/sdlc/qe/{epic-slug}/\` — **one folder per epic** (same slug as PO/BA).
|
|
418
|
+
**Output**: \`docs/sdlc/qe/{epic-slug}/\` — **one folder per epic** (same slug as PO/BA).
|
|
419
|
+
**⚡ Parallel with Phase 5b**: [DEV] starts implementation immediately after Technical BA — do NOT wait for QE docs to finish.
|
|
357
420
|
|
|
358
421
|
## Phase 5b: Dev Teams
|
|
359
422
|
|
|
360
|
-
**Trigger**: After
|
|
423
|
+
**Trigger**: After Technical BA is complete (not after QE docs). **Dev runs implementation immediately.**
|
|
424
|
+
**⚡ Parallel with Phase 5a**: [DEV] AND [QE] test plan run simultaneously.
|
|
361
425
|
|
|
362
|
-
**Roles** (vary by project — use only what applies
|
|
363
|
-
- **Tech Lead (15+ yrs)** — **highest model** (e.g. Opus): Planning, logic analysis, architecture decisions, tech stack, code review & merge.
|
|
364
|
-
- **Senior
|
|
365
|
-
- **Senior
|
|
366
|
-
- **Senior
|
|
367
|
-
- **Senior
|
|
368
|
-
- **Senior
|
|
369
|
-
- **Senior
|
|
370
|
-
- **Senior Platform (10+ yrs)**: Infra, CI/CD. Docs: \`docs/sdlc/dev/platform/\`
|
|
426
|
+
**Roles** (vary by project — use only what applies). All implementation roles are **Senior (10+ yrs)**:
|
|
427
|
+
- **Tech Lead (15+ yrs)** — **highest model** (e.g. Opus): Planning, logic analysis, architecture decisions, tech stack, code review & merge.
|
|
428
|
+
- **Senior Frontend (10+ yrs)**: Web UI.
|
|
429
|
+
- **Senior Backend (10+ yrs)**: API, services, DB.
|
|
430
|
+
- **Senior Mobile (10+ yrs)**: iOS/Android/cross-platform.
|
|
431
|
+
- **Senior Embedded (10+ yrs)**: Firmware, IoT.
|
|
432
|
+
- **Senior Data/ML (10+ yrs)**: ETL, models, analytics.
|
|
433
|
+
- **Senior Platform (10+ yrs)**: CI/CD, infra.
|
|
371
434
|
|
|
372
|
-
|
|
435
|
+
**⚡ All implementation roles run in parallel** — frontend does NOT wait for backend; they coordinate via API contract from Technical BA.
|
|
373
436
|
|
|
374
437
|
**Requirements**: Unit Test coverage **100%** (TDD/BDD); Clean Code, SOLID, DRY, KISS, SoC, POLS.
|
|
438
|
+
**Output**: Code + unit tests. **Handoff to Phase 8.**
|
|
375
439
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
## Phase 6: QE (Testing phase — automation + UAT) → bug-fix loop
|
|
379
|
-
|
|
380
|
-
**Trigger**: After Dev completes unit tests.
|
|
381
|
-
**Role**: Write and run **automation tests** + **UAT**, sign-off.
|
|
440
|
+
## Phase 8: [QE] + [SEC] + [PERF] Quality Gates (⚡ fully parallel audits)
|
|
382
441
|
|
|
383
|
-
**
|
|
384
|
-
|
|
385
|
-
- **Senior QE (10+ yrs)** — **cost-efficient model** (e.g. Haiku): Write automation tests per QE Lead's strategy. Output per epic: \`docs/sdlc/qe/{epic-slug}/\` (e.g. automation/ or test files there)
|
|
386
|
-
- **UAT**: Verify implementation against original user stories and acceptance criteria from PO.
|
|
442
|
+
**Trigger**: After Dev completes implementation (code + 100% coverage).
|
|
443
|
+
**⚡ All three audits run SIMULTANEOUSLY on the same artifact.** Do NOT wait for one to finish before starting another.
|
|
387
444
|
|
|
388
|
-
|
|
445
|
+
- **[QE]**: Execute all test suites, enforce 100% coverage gate, report bugs (QE-001...).
|
|
446
|
+
- **[SEC]**: OWASP Top 10, STRIDE threat model, CVE scan, compliance (GDPR/PCI/SOC2). Report: SEC-001...
|
|
447
|
+
- **[PERF]**: Latency benchmarks (p95<500ms), N+1 detection, k6 load test. Report: PERF-001...
|
|
389
448
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
**Trigger**: After QE testing sign-off (0 open bugs).
|
|
393
|
-
**Roles** (can run in parallel):
|
|
394
|
-
- **Security team**: Audit security risk (OWASP, auth, secrets, infra). Output: \`docs/sdlc/security/\`
|
|
395
|
-
- **Principle Engineer**: Audit logic, architecture alignment, correctness. Output: \`docs/sdlc/principle-engineer/\`
|
|
396
|
-
|
|
397
|
-
**Fix → retest → re-audit loop**: If issues/vulnerabilities found → **Dev fixes** → **QE retests** (verify fix, no regression) → **Security + PE re-audit**. **Repeat until 0 issues/vulnerabilities remain.** Only when sign-off → **Handoff to Deploy.**
|
|
449
|
+
**Merge gate**: Collect all findings from all three. If Critical/High → 🔁 REMEDIATION LOOP → [DEV] fix → [QE] retest → re-audit. Max 3 cycles per issue.
|
|
450
|
+
**Quality Gate PASSED** → [OPS] Deploy.
|
|
398
451
|
|
|
399
452
|
## Phase 9: Deploy
|
|
400
453
|
|
|
@@ -425,12 +478,23 @@ See reference.md for templates.
|
|
|
425
478
|
|
|
426
479
|
const CURSOR_REFERENCE_MD = `# SDLC Workflow — Reference
|
|
427
480
|
|
|
428
|
-
##
|
|
481
|
+
## Execution model
|
|
482
|
+
|
|
483
|
+
**Parallel by default, sequential only when required.**
|
|
484
|
+
|
|
485
|
+
| Decision | Rule |
|
|
486
|
+
|----------|------|
|
|
487
|
+
| Sequential phases | Phase 0 → 1 → 2 → 3 → 4 → 5 Technical BA |
|
|
488
|
+
| Track A (after Technical BA) | [DEV] + [QE] run SIMULTANEOUSLY — do NOT wait |
|
|
489
|
+
| Dev parallel roles | [FE] + [BE] + [MOBILE] + [EMB] + [DATA] + [PLATFORM] all run simultaneously |
|
|
490
|
+
| Track B (after Dev complete) | [QE] + [SEC] + [PERF] run SIMULTANEOUSLY — merge gate only after all report |
|
|
491
|
+
|
|
492
|
+
## Folder structure: one per epic/feature
|
|
429
493
|
|
|
430
494
|
- **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic. Files: epic-brief.md, user-stories.md. Do not put all epics in one file.
|
|
431
495
|
- **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.
|
|
432
496
|
- **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Design specs (Markdown) + optional HTML wireframes; PO+BA review until approved.
|
|
433
|
-
- **QE**: \`docs/sdlc/qe/{epic-slug}/\` — same slug as PO/BA. Files: test-plan.md, test-cases.md, automation
|
|
497
|
+
- **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.
|
|
434
498
|
|
|
435
499
|
## PO: Epic Brief Template
|
|
436
500
|
# Epic: [Name]
|
|
@@ -460,13 +524,14 @@ TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
|
|
|
460
524
|
- Senior Dev (10+ yrs) — **cost-efficient model** (e.g. Haiku): execute code from Tech Lead specs, Unit Test 100% → docs/sdlc/dev/senior-developer/
|
|
461
525
|
- By project (all Senior 10+ yrs, cost-efficient model): Senior Frontend, Backend, Mobile, Embedded, Data/ML, Platform → docs/sdlc/dev/{role}/
|
|
462
526
|
|
|
463
|
-
## Security + Principle Engineer (after implementation)
|
|
464
|
-
- Security team:
|
|
465
|
-
- Principle Engineer:
|
|
466
|
-
-
|
|
527
|
+
## Security + Principle Engineer + Performance (after implementation)
|
|
528
|
+
- Security team [SEC]: OWASP Top 10, STRIDE, CVE, compliance → docs/sdlc/security/
|
|
529
|
+
- Principle Engineer [PE]: logic, architecture → docs/sdlc/principle-engineer/
|
|
530
|
+
- Performance Auditor [PERF]: p95<500ms, N+1, k6 → docs/sdlc/security/
|
|
531
|
+
- **Remediation loop**: Every issue has ID (SEC-001, PERF-003...). 🔁 CYCLE 1 → 2 → 3. Max 3 per issue.
|
|
467
532
|
|
|
468
533
|
## Deploy
|
|
469
|
-
After
|
|
534
|
+
After all Phase 8 issues resolved → Docker Compose + K8s + IaC. See docs/sdlc/deploy/
|
|
470
535
|
|
|
471
536
|
## Maintenance
|
|
472
537
|
After Deploy → ongoing: monitoring, bug fixes, patches, dependency updates, performance tuning. Significant new features → loop back to PO for new epic. See docs/sdlc/maintenance/
|
|
@@ -474,25 +539,24 @@ After Deploy → ongoing: monitoring, bug fixes, patches, dependency updates, pe
|
|
|
474
539
|
|
|
475
540
|
const AGENTS_MD_CONTENT = `## SDLC Workflow
|
|
476
541
|
|
|
477
|
-
**Trigger:** When the user sends an **idea**, **feature request**, or **requirement**, run the full pipeline
|
|
542
|
+
**Trigger:** When the user sends an **idea**, **feature request**, or **requirement**, run the full pipeline continuously through deployment. Do not stop after one phase unless the user asks.
|
|
478
543
|
|
|
479
544
|
**Memory requirement:** Before executing any new action, recall relevant memories (project context, user preferences, past decisions) to ensure continuity and avoid repeating mistakes.
|
|
480
545
|
|
|
481
|
-
|
|
546
|
+
**Parallel by default, sequential only when required.**
|
|
482
547
|
|
|
483
|
-
1. **
|
|
484
|
-
2. **
|
|
485
|
-
3. **
|
|
486
|
-
4. **
|
|
487
|
-
5. **Technical BA
|
|
488
|
-
6.
|
|
489
|
-
7.
|
|
490
|
-
8. **
|
|
491
|
-
9. **
|
|
492
|
-
10. **
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
Design before Architect (UX drives tech). After the docs phase, the Dev team runs implementation immediately. See docs/sdlc/agents/
|
|
548
|
+
1. **Phase 1** [PO] — PRD, user stories, feasibility → docs/sdlc/po/{epic-slug}/
|
|
549
|
+
2. **Phase 2** [BA] — FRS, NFR, Gherkin, process flows → docs/sdlc/ba/business/{epic-slug}/
|
|
550
|
+
3. **Phase 3** [UX] (if app/web) — Design specs + wireframes; [PO]+[BA] review until approved → docs/sdlc/design/{epic-slug}/
|
|
551
|
+
4. **Phase 4** [SA] — ADRs, C4 diagrams, security by design → docs/sdlc/architecture/
|
|
552
|
+
5. **Phase 5** Technical [BA] — API specs (OpenAPI 3.x), team breakdown → docs/sdlc/ba/technical/
|
|
553
|
+
6. **⚡ Phase 5a** [QE] + **⚡ Phase 5b** [DEV] — parallel after Technical BA
|
|
554
|
+
7. **⚡ Phase 8** [QE] + [SEC] + [PERF] — parallel audits after [DEV] complete → merge gate
|
|
555
|
+
8. **Phase 9** [OPS] — Docker Compose + K8s + IaC → docs/sdlc/deploy/
|
|
556
|
+
9. **Phase 10** — SHIPPED ✅
|
|
557
|
+
10. **Phase 11** Maintenance — monitoring, bug fixes, patches
|
|
558
|
+
|
|
559
|
+
Design before Architect (UX drives tech). After Technical BA, [DEV] runs immediately — parallel with [QE] docs. See docs/sdlc/agents/
|
|
496
560
|
`;
|
|
497
561
|
|
|
498
562
|
const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
|
|
@@ -501,19 +565,23 @@ const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
|
|
|
501
565
|
|
|
502
566
|
**Memory requirement:** Before executing any new action, recall relevant memories (project context, user preferences, past decisions) to ensure continuity and avoid repeating mistakes.
|
|
503
567
|
|
|
568
|
+
**Parallel by default, sequential only when required:** If two workstreams do NOT depend on each other's output, they MUST run in parallel.
|
|
569
|
+
|
|
504
570
|
1. **PO** — PRD, user stories, feasibility assessment → docs/sdlc/po/{epic-slug}/ (one folder per epic)
|
|
505
|
-
2. **Business BA** — FRS, NFR, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
|
|
571
|
+
2. **Business BA** — FRS, NFR, Gherkin, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
|
|
506
572
|
3. **Design (if app/web)** — Design specs + wireframes (**Anti AI**: no AI-looking designs) → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
|
|
507
|
-
4. **Architect** — ADRs, diagrams, security by design, engineering principles (SOLID, DRY, KISS, CQRS, Zero Trust, EDA, HA) → docs/sdlc/architecture/
|
|
508
|
-
5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
|
|
509
|
-
6.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
573
|
+
4. **Architect** — ADRs, C4 diagrams, security by design, engineering principles (SOLID, DRY, KISS, CQRS, Zero Trust, EDA, HA) → docs/sdlc/architecture/
|
|
574
|
+
5. **Technical BA** — API specs (OpenAPI 3.x), team breakdown → docs/sdlc/ba/technical/
|
|
575
|
+
6. **⚡ Phase 5a [QE]** + **⚡ Phase 5b [DEV]** — run in PARALLEL after Technical BA:
|
|
576
|
+
- [QE]: test plan + test cases → docs/sdlc/qe/{epic-slug}/ (100% coverage target)
|
|
577
|
+
- [DEV]: code + unit tests (100%) → docs/sdlc/dev/{role}/ — start immediately, do NOT wait for QE docs
|
|
578
|
+
7. **⚡ Phase 8** — [QE] + [SEC] + [PERF] audit SIMULTANEOUSLY after Dev complete:
|
|
579
|
+
- Bug-fix loop → [DEV] fix → [QE] retest until 0 bugs
|
|
580
|
+
- 🔁 Remediation loop: issue ID per finding, max 3 cycles, until 0 Critical/High issues
|
|
581
|
+
8. **Deploy** — Docker Compose + K8s + IaC → docs/sdlc/deploy/ (after all Phase 8 issues resolved)
|
|
582
|
+
9. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
|
|
583
|
+
|
|
584
|
+
Design before Architect (UX drives tech). After Technical BA, Dev runs immediately — parallel with QE docs. See docs/sdlc/agents/
|
|
517
585
|
`;
|
|
518
586
|
|
|
519
587
|
const SDLC_WORKFLOW_MD = `# SDLC Workflow (Multi-Role)
|
|
@@ -615,134 +683,253 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
|
|
|
615
683
|
See [reference.md](./reference.md) for templates.
|
|
616
684
|
`;
|
|
617
685
|
|
|
618
|
-
const ORCHESTRATION_MD = `# Pipeline
|
|
686
|
+
const ORCHESTRATION_MD = `# Pipeline Orchestration
|
|
619
687
|
|
|
620
688
|
## Trigger
|
|
621
689
|
|
|
622
|
-
When the user sends an **idea**, **feature request**, or **requirement
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
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".
|
|
690
|
+
When the user sends an **idea**, **feature request**, or **requirement**:
|
|
691
|
+
1. **Trigger the full pipeline** and run continuously through deployment.
|
|
692
|
+
2. **One role per phase** for sequential phases. **Spawn parallel workstreams** when dependencies are independent.
|
|
626
693
|
3. **Run through to Maintenance.** Do not stop after PO, BA, or Dev unless the user explicitly says to stop.
|
|
627
694
|
|
|
628
|
-
##
|
|
695
|
+
## 🚦 The Orchestrator's Most Important Rule
|
|
696
|
+
|
|
697
|
+
> **Parallel by default. Sequential only when required.**
|
|
629
698
|
|
|
630
|
-
|
|
699
|
+
Before running any two workstreams, ask: "Does workstream B depend on workstream A's output?"
|
|
700
|
+
- **Yes** → Run sequentially (A first, then B)
|
|
701
|
+
- **No** → **Run in parallel immediately**
|
|
702
|
+
|
|
703
|
+
## Execution Map
|
|
704
|
+
|
|
705
|
+
Sequential: Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5 Technical BA
|
|
706
|
+
Parallel Track A: Technical BA complete → [DEV] + [QE] simultaneously
|
|
707
|
+
Parallel Track B: Dev complete → [QE] + [SEC] + [PERF] simultaneously → merge gate → [OPS] Deploy
|
|
631
708
|
|
|
632
709
|
## Checklist per run
|
|
633
710
|
|
|
634
|
-
|
|
635
|
-
- [ ] Phase
|
|
636
|
-
- [ ] Phase
|
|
637
|
-
- [ ] Phase
|
|
638
|
-
- [ ] Phase
|
|
639
|
-
- [ ] Phase
|
|
640
|
-
- [ ] Phase
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
- [ ]
|
|
644
|
-
- [ ]
|
|
711
|
+
### Sequential phases
|
|
712
|
+
- [ ] Phase 0 Discovery: raw request captured
|
|
713
|
+
- [ ] Phase 1 [PO]: artifacts in \`docs/sdlc/po/{epic-slug}/\`
|
|
714
|
+
- [ ] Phase 2 [BA]: \`docs/sdlc/ba/business/{epic-slug}/\`
|
|
715
|
+
- [ ] Phase 3 [UX] (if app/web): \`docs/sdlc/design/{epic-slug}/\`; [PO]+[BA] review until approved
|
|
716
|
+
- [ ] Phase 4 [SA]: \`docs/sdlc/architecture/\`
|
|
717
|
+
- [ ] Phase 5 Technical [BA]: \`docs/sdlc/ba/technical/\`
|
|
718
|
+
|
|
719
|
+
### ⚡ Parallel Track A (spawn immediately after Phase 5)
|
|
720
|
+
- [ ] Spawn [DEV] implementation (all roles: [FE]/[BE]/[MOBILE]/[EMB]/[DATA]/[PLATFORM])
|
|
721
|
+
- [ ] Spawn [QE] test plan + test cases in parallel
|
|
722
|
+
- [ ] Do NOT wait for one to finish before starting the other
|
|
723
|
+
|
|
724
|
+
### ⚡ Parallel Track B (spawn when [DEV] is complete)
|
|
725
|
+
- [ ] Spawn [QE] test execution
|
|
726
|
+
- [ ] Spawn [SEC] security audit
|
|
727
|
+
- [ ] Spawn [PERF] performance audit
|
|
728
|
+
- [ ] All three run simultaneously — merge gate only after all complete
|
|
729
|
+
|
|
730
|
+
### Post-merge
|
|
731
|
+
- [ ] Phase 9 [OPS]: \`docs/sdlc/deploy/\`
|
|
732
|
+
- [ ] Phase 10: Project Completion Package → SHIPPED ✅
|
|
733
|
+
- [ ] Phase 11 Maintenance
|
|
645
734
|
`;
|
|
646
735
|
|
|
647
736
|
const REFERENCE_MD = `# SDLC Workflow — Reference
|
|
648
737
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
738
|
+
## Execution model
|
|
739
|
+
|
|
740
|
+
**Parallel by default, sequential only when required.**
|
|
741
|
+
|
|
742
|
+
| Decision | Rule |
|
|
743
|
+
|----------|------|
|
|
744
|
+
| Sequential phases | Phase 0 → 1 → 2 → 3 → 4 → 5 Technical BA |
|
|
745
|
+
| Track A (after Technical BA) | [DEV] + [QE] run SIMULTANEOUSLY |
|
|
746
|
+
| Dev parallel roles | [FE] + [BE] + [MOBILE] + [EMB] + [DATA] + [PLATFORM] all simultaneously |
|
|
747
|
+
| Track B (after Dev complete) | [QE] + [SEC] + [PERF] run SIMULTANEOUSLY — merge gate after all report |
|
|
653
748
|
|
|
654
749
|
## Folder structure: one per epic/feature
|
|
655
750
|
|
|
656
751
|
- **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic. Files: epic-brief.md, user-stories.md. Do not put all epics in one file.
|
|
657
752
|
- **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.
|
|
658
|
-
- **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` —
|
|
753
|
+
- **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Design specs (Markdown) + optional HTML wireframes; PO+BA review until approved.
|
|
659
754
|
- **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.
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
755
|
+
|
|
756
|
+
## Quality standards
|
|
757
|
+
|
|
758
|
+
| Role | Standard |
|
|
759
|
+
|------|----------|
|
|
760
|
+
| [PO] | Every requirement traces to a business KPI |
|
|
761
|
+
| [BA] | Every user story has Gherkin AC + edge case |
|
|
762
|
+
| [UX] | Every screen: WCAG 2.1 AA + mobile-first |
|
|
763
|
+
| [SA] | Every ADR has rationale + trade-off |
|
|
764
|
+
| [DEV] | Every function: docstring + error handling + unit test (100%) |
|
|
765
|
+
| [QE] | 100% branch coverage; ≥3 negative paths per happy path |
|
|
766
|
+
| [SEC] | Zero Critical; High must have mitigation or accepted-risk doc |
|
|
767
|
+
| [PERF] | p95 < 500ms for API; no N+1 queries |
|
|
768
|
+
| [OPS] | Secrets in Vault/SSM; no hardcoded credentials; IaC passes tfsec |
|
|
769
|
+
|
|
770
|
+
## Remediation loop
|
|
771
|
+
|
|
772
|
+
Every issue must have an Issue ID (e.g. SEC-001). Track: 🔁 CYCLE 1 → 🔁 CYCLE 2 → 🔁 CYCLE 3. Max 3 cycles per issue.
|
|
663
773
|
`;
|
|
664
774
|
|
|
665
775
|
const AGENTS_README = `# Sub-Agents
|
|
666
776
|
|
|
667
777
|
Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corresponding sub-agent.
|
|
778
|
+
**Role badges are mandatory** — every artifact must identify which \`[ROLE]\` produced it.
|
|
779
|
+
|
|
780
|
+
## 🚦 Parallel vs Sequential Orchestrator Rules
|
|
781
|
+
|
|
782
|
+
**The cardinal rule:** If two workstreams do NOT depend on each other's output, they MUST run in parallel.
|
|
783
|
+
|
|
784
|
+
### Sequential (mandatory — dependency chain)
|
|
785
|
+
|
|
786
|
+
Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5 Technical BA
|
|
787
|
+
Each phase's output is the next phase's input. Skipping or reordering causes rework.
|
|
788
|
+
|
|
789
|
+
### Parallel: Track A — Implementation + Test Plan
|
|
790
|
+
|
|
791
|
+
> **Spawn immediately when Technical BA completes.** Do NOT wait for one to finish before starting the other.
|
|
792
|
+
|
|
793
|
+
Technical BA complete → [DEV] implementation + [QE] test plan run SIMULTANEOUSLY.
|
|
794
|
+
All implementation roles ([FE]/[BE]/[MOBILE]/[EMB]/[DATA]/[PLATFORM]) also run in parallel.
|
|
795
|
+
|
|
796
|
+
### Parallel: Track B — Quality Gates
|
|
797
|
+
|
|
798
|
+
> **Spawn immediately when [DEV] is complete.** All three agents audit the same artifact simultaneously.
|
|
799
|
+
|
|
800
|
+
[DEV] complete → [QE] + [SEC] + [PERF] run SIMULTANEOUSLY → merge gate → Deploy.
|
|
801
|
+
|
|
802
|
+
### Remediation Loop
|
|
803
|
+
|
|
804
|
+
Every issue must have an Issue ID (e.g. SEC-001). Track: 🔁 CYCLE 1 → 🔁 CYCLE 2 → 🔁 CYCLE 3. Max 3 cycles per issue.
|
|
805
|
+
|
|
806
|
+
## Role Sub-Agent Table
|
|
807
|
+
|
|
808
|
+
| Role | Input | Output | Parallel? |
|
|
809
|
+
|------|-------|--------|-----------|
|
|
810
|
+
| [PO] | User request | docs/sdlc/po/{epic-slug}/ | Sequential |
|
|
811
|
+
| [BA] | PO output | docs/sdlc/ba/business/{epic-slug}/ | Sequential |
|
|
812
|
+
| [UX] | BA output | docs/sdlc/design/{epic-slug}/ | Sequential |
|
|
813
|
+
| [SA] | BA + UX | docs/sdlc/architecture/ | Sequential |
|
|
814
|
+
| [BA] Tech | SA output | docs/sdlc/ba/technical/ | Sequential |
|
|
815
|
+
| [DEV] | Tech BA | docs/sdlc/dev/{role}/ | ⚡ Parallel with [QE] |
|
|
816
|
+
| [QE] | Tech BA | docs/sdlc/qe/{epic-slug}/ | ⚡ Parallel with [DEV] |
|
|
817
|
+
| [QE]+[SEC]+[PERF] | Dev output | TER, SAR, PAR | ⚡ Fully parallel |
|
|
818
|
+
| [OPS] | All Phase 8 passed | docs/sdlc/deploy/ | Sequential |
|
|
819
|
+
|
|
820
|
+
## Quality Standards
|
|
668
821
|
|
|
669
|
-
| Role |
|
|
670
|
-
|
|
671
|
-
| PO |
|
|
672
|
-
|
|
|
673
|
-
|
|
|
674
|
-
|
|
|
675
|
-
|
|
|
676
|
-
| QE
|
|
677
|
-
|
|
|
678
|
-
|
|
|
679
|
-
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
822
|
+
| Role | Standard |
|
|
823
|
+
|------|----------|
|
|
824
|
+
| [PO] | Every requirement traces to a business KPI |
|
|
825
|
+
| [BA] | Every user story has Gherkin AC + edge case |
|
|
826
|
+
| [UX] | Every screen: WCAG 2.1 AA + mobile-first |
|
|
827
|
+
| [SA] | Every ADR has rationale + trade-off |
|
|
828
|
+
| [DEV] | Every function: docstring + error handling + unit test (100%) |
|
|
829
|
+
| [QE] | 100% branch coverage; ≥3 negative paths per happy path |
|
|
830
|
+
| [SEC] | Zero Critical; High must have mitigation or accepted-risk doc |
|
|
831
|
+
| [PERF] | p95 < 500ms for API; no N+1 queries |
|
|
832
|
+
| [OPS] | Secrets in Vault/SSM; no hardcoded credentials; IaC passes tfsec |
|
|
833
|
+
|
|
834
|
+
## Response Format (Mandatory)
|
|
835
|
+
|
|
836
|
+
\`\`\`
|
|
837
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
838
|
+
🏢 APEX — [PHASE NAME] | [ROLE BADGE]
|
|
839
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
840
|
+
|
|
841
|
+
📋 INPUT RECEIVED
|
|
842
|
+
[What was received from previous phase or business]
|
|
843
|
+
|
|
844
|
+
🔄 PROCESSING
|
|
845
|
+
[Current role's analysis/work]
|
|
846
|
+
|
|
847
|
+
📤 OUTPUT ARTIFACT: [Artifact Name]
|
|
848
|
+
[Full artifact content]
|
|
849
|
+
|
|
850
|
+
🚦 GATE STATUS
|
|
851
|
+
[ ] Pending review [✅] Approved [🔴] Blocked — reason: ...
|
|
852
|
+
|
|
853
|
+
⏭️ NEXT ACTION
|
|
854
|
+
[What triggers next, which role activates, what they need]
|
|
855
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
856
|
+
\`\`\`
|
|
857
|
+
|
|
858
|
+
See docs/sdlc/SDLC-WORKFLOW.md for full phase details.
|
|
695
859
|
`;
|
|
696
860
|
|
|
697
|
-
const SECURITY_README = `# Security Team
|
|
861
|
+
const SECURITY_README = `# Security Team | [SEC]
|
|
698
862
|
|
|
699
|
-
**When:** After
|
|
863
|
+
**When:** After [QE] quality gate passed (0 open bugs + 100% coverage). Runs **parallel** with [PERF] audit. **Before** Deploy.
|
|
700
864
|
|
|
701
|
-
**
|
|
865
|
+
**Quality Standard:** Zero tolerance for Critical severity. High must have documented mitigation or accepted-risk doc.
|
|
702
866
|
|
|
703
|
-
|
|
867
|
+
## Detailed Tasks
|
|
704
868
|
|
|
705
|
-
|
|
869
|
+
- [ ] **OWASP Top 10 checklist:** A01 Broken Access Control → A10 SSRF
|
|
870
|
+
- [ ] **STRIDE threat model:** Spoofing, Tampering, Repudiation, Information Disclosure, DoS, Elevation of Privilege
|
|
871
|
+
- [ ] **SAST findings:** Static analysis (Semgrep, SonarQube, Bandit)
|
|
872
|
+
- [ ] **CVE scan:** npm audit / pip audit / trivy
|
|
873
|
+
- [ ] **Auth/Authorization review:** JWT, sessions, RBAC
|
|
874
|
+
- [ ] **Secrets management:** No hardcoded credentials; verify Vault/SSM
|
|
875
|
+
- [ ] **Compliance notes:** GDPR / PCI-DSS / SOC2 / HIPAA (activate per project type)
|
|
876
|
+
|
|
877
|
+
## Issue Tracking
|
|
706
878
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
879
|
+
Issue ID (SEC-001...), Severity (Critical/High/Medium/Low), Status, Owner, Mitigation.
|
|
880
|
+
|
|
881
|
+
## Merge Gate
|
|
882
|
+
|
|
883
|
+
Critical → 🔴 BLOCK. High without mitigation → 🔴 BLOCK. High with accepted-risk → ⚠️ CONDITIONAL.
|
|
884
|
+
|
|
885
|
+
See docs/sdlc/SDLC-WORKFLOW.md for full audit details.
|
|
712
886
|
`;
|
|
713
887
|
|
|
714
888
|
const PRINCIPLE_ENGINEER_README = `# Principle Engineer
|
|
715
889
|
|
|
716
|
-
**When:** After
|
|
890
|
+
**When:** After [QE] quality gate passed. Runs **parallel** with [SEC] + [PERF]. **Before** Deploy.
|
|
717
891
|
|
|
718
|
-
|
|
892
|
+
## Detailed Tasks
|
|
719
893
|
|
|
720
|
-
|
|
894
|
+
- [ ] **Logic audit:** Business logic correctness, edge cases, error handling, data flow
|
|
895
|
+
- [ ] **Architecture audit:** Alignment with ADRs, patterns, scalability, maintainability
|
|
896
|
+
- [ ] **Report:** Findings, recommendations → docs/sdlc/principle-engineer/
|
|
721
897
|
|
|
722
|
-
##
|
|
898
|
+
## Issue Tracking
|
|
899
|
+
|
|
900
|
+
Issue ID (PE-001...), Severity, Status, Owner.
|
|
901
|
+
|
|
902
|
+
## Merge Gate
|
|
723
903
|
|
|
724
|
-
|
|
725
|
-
- [ ] **Logic audit**: Business logic correctness, edge cases, error handling, data flow
|
|
726
|
-
- [ ] **Architecture audit**: Alignment with ADRs, patterns, scalability, maintainability
|
|
727
|
-
- [ ] **Report**: Findings, recommendations; output to \`docs/sdlc/principle-engineer/\`
|
|
728
|
-
- [ ] **Fix → retest → re-audit loop**: If logic/arch issues found → Dev fixes → **QE retests** (confirm fix, no regression) → PE re-audit. **Repeat until 0 issues remain**; then sign-off to Deploy.
|
|
904
|
+
Critical/High logic issues → 🔴 BLOCK → 🔁 CYCLE 1 → [DEV] fix → [QE] retest → re-audit. Max 3 cycles.
|
|
729
905
|
`;
|
|
730
906
|
|
|
731
|
-
const DEPLOY_README = `#
|
|
907
|
+
const DEPLOY_README = `# [OPS] — Infrastructure & Deployment
|
|
908
|
+
|
|
909
|
+
**When:** After [SEC] + [PERF] + [PE] sign-off (all Critical/High = 0). **Before** Maintenance.
|
|
910
|
+
|
|
911
|
+
**Quality Standard:** All secrets in Vault/SSM. No hardcoded credentials. IaC must pass tfsec/checkov.
|
|
912
|
+
|
|
913
|
+
## Deployment
|
|
914
|
+
|
|
915
|
+
\`\`\`bash
|
|
916
|
+
docker compose up -d # local / staging
|
|
917
|
+
kubectl apply -f k8s/ # production
|
|
918
|
+
\`\`\`
|
|
732
919
|
|
|
733
|
-
|
|
920
|
+
## Deliverables
|
|
734
921
|
|
|
735
|
-
**
|
|
922
|
+
- **Docker Compose + Kubernetes:** docker-compose.yml, k8s/deployment.yaml, service.yaml, ingress.yaml
|
|
923
|
+
- **Terraform (optional):** VPC, ECS/EKS, RDS, IAM, SSL, remote state backend
|
|
924
|
+
- **Ansible (optional):** Inventory, roles, playbooks, zero-downtime rolling deploy
|
|
925
|
+
- **CI/CD:** lint → test (100% coverage gate) → build → scan → deploy → smoke-test
|
|
926
|
+
- **IaC security:** tfsec / checkov — block if HIGH severity
|
|
736
927
|
|
|
737
|
-
|
|
738
|
-
- **Kubernetes** — production: \`kubectl apply -f k8s/\`
|
|
928
|
+
## Gate
|
|
739
929
|
|
|
740
|
-
|
|
930
|
+
tfsec/checkov HIGH → 🔴 BLOCK. Secrets in source → 🔴 BLOCK. [SEC]/[PERF] unresolved → 🔴 BLOCK.
|
|
741
931
|
|
|
742
|
-
|
|
743
|
-
- \`k8s/deployment.yaml.template\` — Deployment
|
|
744
|
-
- \`k8s/service.yaml.template\` — Service
|
|
745
|
-
- \`k8s/ingress.yaml.template\` — Ingress (optional)
|
|
932
|
+
See docs/sdlc/SDLC-WORKFLOW.md for full details.
|
|
746
933
|
`;
|
|
747
934
|
|
|
748
935
|
const DOCKER_COMPOSE_TEMPLATE = `# Copy to docker-compose.yml and adjust image, env, ports.
|