sdlc-workflow 1.0.5 → 1.0.7

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 +11 -5
  2. package/bin/cli.js +296 -32
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -8,6 +8,7 @@ Scaffold SDLC workflow docs and templates into your project. Works with **Cursor
8
8
  User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
9
9
  ```
10
10
 
11
+ - **Trigger:** When you send an **idea** or **feature request**, the agent should run the **full pipeline** (PO → … → Deploy) in sequence, one sub-agent/role per phase — not handle everything in one go or stop after one phase. See `docs/sdlc/ORCHESTRATION.md`.
11
12
  - **Each role runs as a sub-agent** (see `docs/sdlc/agents/`).
12
13
  - **After completion** → deploy immediately with **Docker Compose** (local/staging) and **Kubernetes** (production) — `docs/sdlc/deploy/`.
13
14
  - **QE (docs)**: Test plan, test cases
@@ -63,11 +64,16 @@ docs/sdlc/
63
64
  │ │ └── README.md
64
65
  │ └── senior-qe/ # Senior QE 10+ yrs: write automation tests
65
66
  │ └── README.md
66
- ├── dev/ # Dev team (per role)
67
- │ ├── tech-lead/ # Tech Lead 15+ yrs: tech stack, review & merge
68
- │ └── README.md
69
- └── senior-developer/ # Senior Dev 10+ yrs: implement, Unit Test ≥90%
70
- └── README.md
67
+ ├── dev/ # Dev team (all Senior 10+ yrs; roles vary by project)
68
+ │ ├── implementation-roles.template.md
69
+ ├── tech-lead/ # Tech Lead 15+ yrs
70
+ ├── senior-developer/ # Senior Dev 10+ yrs (generic)
71
+ ├── frontend/ # Senior Frontend 10+ yrs — Web UI
72
+ │ ├── backend/ # Senior Backend 10+ yrs
73
+ │ ├── mobile/ # Senior Mobile 10+ yrs
74
+ │ ├── embedded/ # Senior Embedded 10+ yrs — firmware, IoT
75
+ │ ├── data-ml/ # Senior Data/ML 10+ yrs
76
+ │ └── platform/ # Senior Platform 10+ yrs — CI/CD, infra
71
77
  ├── agents/ # Sub-agent specs (each role = sub-agent)
72
78
  │ └── README.md
73
79
  └── deploy/ # After completion → Docker Compose + K8s
package/bin/cli.js CHANGED
@@ -153,6 +153,12 @@ async function generateFromInline(cwd) {
153
153
  join(base, "qe", "senior-qe"),
154
154
  join(base, "dev", "tech-lead"),
155
155
  join(base, "dev", "senior-developer"),
156
+ join(base, "dev", "frontend"),
157
+ join(base, "dev", "backend"),
158
+ join(base, "dev", "mobile"),
159
+ join(base, "dev", "embedded"),
160
+ join(base, "dev", "data-ml"),
161
+ join(base, "dev", "platform"),
156
162
  join(base, "agents"),
157
163
  join(base, "deploy"),
158
164
  join(base, "deploy", "k8s"),
@@ -164,6 +170,7 @@ async function generateFromInline(cwd) {
164
170
 
165
171
  const files = [
166
172
  ["SDLC-WORKFLOW.md", SDLC_WORKFLOW_MD],
173
+ ["ORCHESTRATION.md", ORCHESTRATION_MD],
167
174
  ["reference.md", REFERENCE_MD],
168
175
  ["po/epic-brief.template.md", PO_EPIC_TEMPLATE],
169
176
  ["po/README.md", PO_README],
@@ -180,6 +187,13 @@ async function generateFromInline(cwd) {
180
187
  ["qe/senior-qe/README.md", QE_SENIOR_README],
181
188
  ["dev/tech-lead/README.md", DEV_TECH_LEAD_README],
182
189
  ["dev/senior-developer/README.md", DEV_SENIOR_README],
190
+ ["dev/implementation-roles.template.md", DEV_IMPLEMENTATION_ROLES_TEMPLATE],
191
+ ["dev/frontend/README.md", DEV_FRONTEND_README],
192
+ ["dev/backend/README.md", DEV_BACKEND_README],
193
+ ["dev/mobile/README.md", DEV_MOBILE_README],
194
+ ["dev/embedded/README.md", DEV_EMBEDDED_README],
195
+ ["dev/data-ml/README.md", DEV_DATA_ML_README],
196
+ ["dev/platform/README.md", DEV_PLATFORM_README],
183
197
  ["agents/README.md", AGENTS_README],
184
198
  ["deploy/README.md", DEPLOY_README],
185
199
  ["deploy/docker-compose.yml.template", DOCKER_COMPOSE_TEMPLATE],
@@ -196,19 +210,21 @@ async function generateFromInline(cwd) {
196
210
  }
197
211
 
198
212
  const CURSOR_RULE_CONTENT = `---
199
- description: SDLC multi-role workflow (PO BA Architect Tech BA → QE docs → Dev → QE testing)
213
+ description: SDLC multi-role workflow; on idea/request trigger pipeline through deployment (sub-agent per phase)
200
214
  alwaysApply: false
201
215
  globs: docs/sdlc/**/*, **/*.md
202
216
  ---
203
217
 
204
218
  # SDLC Workflow
205
219
 
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/.
221
+
206
222
  1. **PO** — PRD, user stories → docs/sdlc/po/
207
223
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/
208
224
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
209
225
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
210
226
  5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
211
- 6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead (review, merge) + Senior Dev (implement, ≥90% unit test) → docs/sdlc/dev/{role}/
227
+ 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}/
212
228
  7. **QE (testing)** — QE Lead (test framework, review) + Senior QE (10+ yrs, automation) → docs/sdlc/qe/{role}/
213
229
  8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
214
230
 
@@ -218,21 +234,30 @@ Full workflow: docs/sdlc/SDLC-WORKFLOW.md
218
234
 
219
235
  const CURSOR_SKILL_MD = `---
220
236
  name: sdlc-workflow
221
- description: Multi-role SDLC workflow from user requirements through PO, Business BA, Architect, Technical BA, Dev teams, and QE. Use when user mentions SDLC, requirements, PO, BA, Architect, technical spec, phased development, or handoff between roles.
237
+ description: Multi-role SDLC workflow from user requirements through PO, Business BA, Architect, Technical BA, Dev teams, and QE. Use when user sends an idea, feature request, or requirement — trigger full pipeline through deployment. Use when user mentions SDLC, requirements, PO, BA, Architect, technical spec, phased development, or handoff between roles.
222
238
  ---
223
239
 
224
240
  # SDLC Workflow (Multi-Role)
225
241
 
226
242
  Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs/artifacts for the next. After completion → deploy with **Docker Compose** and **K8s** (docs/sdlc/deploy/).
227
243
 
244
+ ## Trigger and orchestration (mandatory)
245
+
246
+ **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.
249
+ 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.
251
+
252
+ **Sub-agent specs**: docs/sdlc/agents/
253
+
228
254
  ## Flow Overview
229
255
 
230
256
  \`\`\`
231
257
  User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
232
258
  \`\`\`
233
259
 
234
- **Determine current phase** before acting. If unsure, ask: "Which phase are we in?"
235
- **Sub-agent specs**: docs/sdlc/agents/
260
+ **Determine current phase** before acting. If user sent an idea, assume Phase 0 and start from Phase 1.
236
261
 
237
262
  ---
238
263
 
@@ -275,9 +300,15 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
275
300
 
276
301
  **Trigger**: After docs are done (Technical BA + QE docs). **Dev runs implementation immediately.**
277
302
 
278
- **Roles**:
279
- - **Tech Lead (15+ yrs)**: Decide tech stack, libraries; review & merge code. Docs: \`docs/sdlc/dev/tech-lead/\`
280
- - **Senior Developer (10+ yrs)**: Implement features per spec. Docs: \`docs/sdlc/dev/senior-developer/\`
303
+ **Roles** (vary by project — use only what applies; see \`docs/sdlc/dev/implementation-roles.template.md\`). All implementation roles are **Senior (10+ yrs)**:
304
+ - **Tech Lead (15+ yrs)**: Tech stack, review & merge. Docs: \`docs/sdlc/dev/tech-lead/\`
305
+ - **Senior Developer (10+ yrs)**: Implement per spec (generic). Docs: \`docs/sdlc/dev/senior-developer/\`
306
+ - **Senior Frontend (10+ yrs)**: Web UI. Docs: \`docs/sdlc/dev/frontend/\`
307
+ - **Senior Backend (10+ yrs)**: API, services. Docs: \`docs/sdlc/dev/backend/\`
308
+ - **Senior Mobile (10+ yrs)**: iOS/Android/cross-platform. Docs: \`docs/sdlc/dev/mobile/\`
309
+ - **Senior Embedded (10+ yrs)**: Firmware, IoT. Docs: \`docs/sdlc/dev/embedded/\`
310
+ - **Senior Data/ML (10+ yrs)**: ETL, models. Docs: \`docs/sdlc/dev/data-ml/\`
311
+ - **Senior Platform (10+ yrs)**: Infra, CI/CD. Docs: \`docs/sdlc/dev/platform/\`
281
312
 
282
313
  **Requirements**: Unit Test coverage **≥ 90%**.
283
314
 
@@ -341,8 +372,9 @@ TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
341
372
  - Senior QE (10+ yrs): write automation tests → docs/sdlc/qe/senior-qe/
342
373
 
343
374
  ## Dev Team
344
- - Tech Lead (15+ yrs): tech stack, libraries, review & merge → docs/sdlc/dev/tech-lead/
375
+ - Tech Lead (15+ yrs): tech stack, review & merge → docs/sdlc/dev/tech-lead/
345
376
  - Senior Dev (10+ yrs): implement, Unit Test ≥90% → docs/sdlc/dev/senior-developer/
377
+ - By project (all Senior 10+ yrs): Senior Frontend, Backend, Mobile, Embedded, Data/ML, Platform → docs/sdlc/dev/{role}/
346
378
 
347
379
  ## Sub-agents
348
380
  Each role = sub-agent. See docs/sdlc/agents/
@@ -353,6 +385,8 @@ After completion → Docker Compose + K8s. See docs/sdlc/deploy/
353
385
 
354
386
  const AGENTS_MD_CONTENT = `## SDLC Workflow
355
387
 
388
+ **Trigger:** When the user sends an **idea**, **feature request**, or **requirement**, run the full pipeline (Phase 1 → 7) in sequence. One role (sub-agent) per phase; produce outputs then continue to the next. Do not stop after one phase until deployment unless the user asks to stop.
389
+
356
390
  When working on requirements, features, or handoffs, follow these phases:
357
391
 
358
392
  1. **PO** — PRD, user stories → docs/sdlc/po/
@@ -369,6 +403,8 @@ After the docs phase, the Dev team runs implementation immediately. See docs/sdl
369
403
 
370
404
  const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
371
405
 
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.
407
+
372
408
  1. **PO** — PRD, user stories → docs/sdlc/po/
373
409
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/
374
410
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
@@ -386,6 +422,12 @@ const SDLC_WORKFLOW_MD = `# SDLC Workflow (Multi-Role)
386
422
  Use this doc with **Claude** (copy to Custom Instructions / Projects) or **@ mention** in chat.
387
423
  For Cursor, see .cursor/rules/sdlc-workflow.mdc
388
424
 
425
+ ## Trigger and orchestration
426
+
427
+ - **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.
429
+ - **Do not stop** after PO or any single phase unless the user explicitly asks to stop. Run through to Deploy.
430
+
389
431
  ## Flow
390
432
 
391
433
  \`\`\`
@@ -432,8 +474,8 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
432
474
  - **After docs phase → Dev team runs implementation immediately** (no extra gate)
433
475
 
434
476
  ### Phase 5b: Dev Teams
435
- - **Tech Lead (15+ yrs)**: Tech stack, libraries; review & merge. Output: \`docs/sdlc/dev/tech-lead/\`
436
- - **Senior Developer (10+ yrs)**: Implement features. Output: \`docs/sdlc/dev/senior-developer/\`
477
+ - **Tech Lead (15+ yrs)**: Tech stack, review & merge. Output: \`docs/sdlc/dev/tech-lead/\`
478
+ - **Implementation roles** (all Senior 10+ yrs; use only what applies): Senior Dev, Senior Frontend, Senior Backend, Senior Mobile, Senior Embedded, Senior Data/ML, Senior Platform → \`docs/sdlc/dev/{role}/\`. See \`implementation-roles.template.md\`.
437
479
  - **Requirement**: Unit Test coverage **≥ 90%**
438
480
  - **Then**: QE starts testing phase
439
481
 
@@ -448,9 +490,38 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
448
490
  See [reference.md](./reference.md) for templates.
449
491
  `;
450
492
 
493
+ const ORCHESTRATION_MD = `# Pipeline orchestration
494
+
495
+ ## Trigger
496
+
497
+ When the user sends an **idea**, **feature request**, or **requirement** (e.g. "I want a login page", "We need an API for X"):
498
+
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.
503
+
504
+ ## How to run (by platform)
505
+
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.
508
+
509
+ ## Checklist per run
510
+
511
+ - [ ] Phase 1 PO: artifacts in \`docs/sdlc/po/\`
512
+ - [ ] Phase 2 Business BA: \`docs/sdlc/ba/business/\`
513
+ - [ ] Phase 3 Architect: \`docs/sdlc/architecture/\`
514
+ - [ ] Phase 4 Technical BA: \`docs/sdlc/ba/technical/\`
515
+ - [ ] Phase 5a QE docs: \`docs/sdlc/qe/\`
516
+ - [ ] Phase 5b Dev: code + unit tests, \`docs/sdlc/dev/\`
517
+ - [ ] Phase 6 QE testing: automation, sign-off
518
+ - [ ] Phase 7 Deploy: \`docs/sdlc/deploy/\`, Docker Compose + K8s
519
+ `;
520
+
451
521
  const REFERENCE_MD = `# SDLC Workflow — Reference
452
522
 
453
523
  Templates and examples. Use \`*.template.md\` as starting points.
524
+ Templates are written for all project types: web, mobile, API-only, library/SDK, CLI, data/ML, platform/infra.
454
525
  Sub-agents: docs/sdlc/agents/
455
526
  Deploy: docs/sdlc/deploy/ (Docker Compose + K8s)
456
527
  `;
@@ -468,11 +539,19 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
468
539
  | QE (docs) | qe-docs | docs/sdlc/ba/technical/ | docs/sdlc/qe/ (test plan) |
469
540
  | Tech Lead | tech-lead | Technical spec | Review, merge, docs/sdlc/dev/tech-lead/ |
470
541
  | Senior Dev | senior-dev | Spec + test plan | After docs → run implementation immediately. Code, unit tests (≥90%) |
542
+ | Senior Frontend | frontend | UI spec, API contract | Web UI, docs/sdlc/dev/frontend/ |
543
+ | Senior Backend | backend | API spec, DB schema | API, services, docs/sdlc/dev/backend/ |
544
+ | Senior Mobile | mobile | API contract, design | App (iOS/Android), docs/sdlc/dev/mobile/ |
545
+ | Senior Embedded | embedded | HW/spec, interfaces | Firmware, IoT, docs/sdlc/dev/embedded/ |
546
+ | Senior Data/ML | data-ml | Data spec, models | ETL, models, docs/sdlc/dev/data-ml/ |
547
+ | Senior Platform | platform | Infra spec | CI/CD, observability, docs/sdlc/dev/platform/ |
471
548
  | QE Lead | qe-lead | Test plan | Test framework, review, docs/sdlc/qe/qe-lead/ |
472
549
  | Senior QE | senior-qe | Test plan + framework | Automation tests, docs/sdlc/qe/senior-qe/ |
473
550
  | Deploy | deploy | QE sign-off | Docker Compose + K8s, docs/sdlc/deploy/ |
474
551
 
475
552
  Orchestrator: run each sub-agent in order; hand off output → input of the next sub-agent.
553
+
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.
476
555
  `;
477
556
 
478
557
  const DEPLOY_README = `# Deploy
@@ -490,7 +569,8 @@ After the pipeline completes (QE sign-off), deploy immediately with:
490
569
  - \`k8s/ingress.yaml.template\` — Ingress (optional)
491
570
  `;
492
571
 
493
- const DOCKER_COMPOSE_TEMPLATE = `# Copy to docker-compose.yml and adjust image, env, ports
572
+ const DOCKER_COMPOSE_TEMPLATE = `# Copy to docker-compose.yml and adjust image, env, ports.
573
+ # Single service (API, CLI, app) or add more services (api, worker, frontend, db) as needed.
494
574
  services:
495
575
  app:
496
576
  image: your-registry/your-app:latest
@@ -500,9 +580,13 @@ services:
500
580
  environment:
501
581
  - NODE_ENV=production
502
582
  restart: unless-stopped
583
+ # Optional: add worker, frontend, db, etc.
584
+ # worker:
585
+ # image: your-registry/worker:latest
586
+ # depends_on: [app]
503
587
  `;
504
588
 
505
- const K8S_DEPLOYMENT_TEMPLATE = `# deployment.yaml - adjust name, image, replicas
589
+ const K8S_DEPLOYMENT_TEMPLATE = `# deployment.yaml adjust name, image, replicas. Duplicate for multi-service (api, worker, etc.).
506
590
  apiVersion: apps/v1
507
591
  kind: Deployment
508
592
  metadata:
@@ -560,6 +644,9 @@ spec:
560
644
 
561
645
  const PO_EPIC_TEMPLATE = `# Epic: [Name]
562
646
 
647
+ ## Project type
648
+ [Web app | Mobile app | API/backend only | Library/SDK | CLI/tool | Data/ML | Platform/infra | Mixed — pick one or describe]
649
+
563
650
  ## Problem
564
651
  [What problem are we solving?]
565
652
 
@@ -567,8 +654,11 @@ const PO_EPIC_TEMPLATE = `# Epic: [Name]
567
654
  - [Metric 1]
568
655
  - [Metric 2]
569
656
 
570
- ## User Stories
571
- 1. As [persona], I want [action] so that [benefit].
657
+ ## User Stories (or equivalent)
658
+ - **Web/Mobile**: As [persona], I want [action] so that [benefit].
659
+ - **API/Library**: As [consumer/integrator], I need [capability] so that [outcome].
660
+ - **CLI/Internal**: As [operator/developer], I run [command/workflow] to [result].
661
+ 1. ...
572
662
  2. ...
573
663
 
574
664
  ## Acceptance Criteria (High-level)
@@ -590,9 +680,11 @@ Use epic-brief.template.md as starting point.
590
680
 
591
681
  const BA_FR_TEMPLATE = `## FR-001: [Title]
592
682
 
683
+ **Type**: [Feature | API/Contract | Data/Report | Compliance | Non-functional — pick one]
684
+
593
685
  **Description**: [What the system must do]
594
686
 
595
- **Trigger**: [When does this apply?]
687
+ **Trigger**: [When does this apply? — e.g. user action, API call, schedule, event]
596
688
 
597
689
  **Process Flow**:
598
690
  1. Step 1
@@ -602,6 +694,9 @@ const BA_FR_TEMPLATE = `## FR-001: [Title]
602
694
  **Output**: [Result]
603
695
 
604
696
  **Constraints**: [Compliance, SLA, etc.]
697
+
698
+ ---
699
+ *Use for any project type: product feature (UI/API), library behaviour, CLI behaviour, data pipeline, or platform capability.*
605
700
  `;
606
701
 
607
702
  const BA_BUSINESS_README = `# Business BA
@@ -610,38 +705,113 @@ Functional requirements, process flows, use cases.
610
705
  Use functional-requirement.template.md for FRS items.
611
706
  `;
612
707
 
613
- const TECH_API_TEMPLATE = `## POST /api/v1/[resource]
708
+ const TECH_API_TEMPLATE = `# Interface / contract spec
614
709
 
710
+ Use the section that matches your project. Delete the rest.
711
+
712
+ ---
713
+
714
+ ## HTTP API (backend, BFF, webhooks)
715
+ ### POST /api/v1/[resource]
615
716
  **Purpose**: [One-line]
717
+ **Request**: Body (JSON schema), Headers (Auth, Content-Type)
718
+ **Response**: 200 payload, 4xx/5xx error format
719
+ **Contract**: OpenAPI spec
720
+
721
+ ### GET /api/v1/[resource] (add other methods as needed)
722
+ **Purpose**: ...
723
+ **Query params**: ...
724
+ **Response**: ...
725
+
726
+ ---
616
727
 
617
- **Request**:
618
- - Body: JSON schema
619
- - Headers: Auth, Content-Type
728
+ ## Library / SDK (public API surface)
729
+ ### Module/Class: [Name]
730
+ **Purpose**: [One-line]
731
+ **Input**: [Params, types]
732
+ **Output**: [Return type, behaviour]
733
+ **Contract**: TS types / JSDoc / docstring
620
734
 
621
- **Response**:
622
- - 200: Success payload
623
- - 4xx/5xx: Error format
735
+ ---
624
736
 
625
- **Contract**: See OpenAPI spec
737
+ ## CLI (commands, flags)
738
+ ### Command: \`[cmd] [sub] [flags]\`
739
+ **Purpose**: [One-line]
740
+ **Args**: [positional]
741
+ **Flags**: [--opt, env vars]
742
+ **Exit codes**: 0 success, non-zero errors
743
+ **Contract**: \`--help\` output / man page
626
744
  `;
627
745
 
628
- const TECH_TEAM_TEMPLATE = `| Team | Scope | Dependencies |
629
- |---------|--------------------------|------------------------|
630
- | Backend | API, DB, business logic | Technical spec |
631
- | Frontend| UI, API integration | API contract |
632
- | Mobile | App UI, API integration | API contract |
746
+ const TECH_TEAM_TEMPLATE = `# Team breakdown
747
+
748
+ Use only the rows that apply to your project. Remove or leave blank unused teams.
749
+
750
+ ## By project type
751
+
752
+ ### Web / full‑stack (UI + API)
753
+ | Team | Scope | Dependencies |
754
+ |----------|--------------------------------|-------------------|
755
+ | Backend | API, DB, business logic | Technical spec |
756
+ | Frontend | Web UI, API integration | API contract |
757
+
758
+ ### Mobile
759
+ | Team | Scope | Dependencies |
760
+ |----------|--------------------------------|-------------------|
761
+ | Backend | API, DB, business logic | Technical spec |
762
+ | Mobile | App UI (iOS / Android / cross-platform), API integration | API contract |
763
+
764
+ ### API / backend only (no UI)
765
+ | Team | Scope | Dependencies |
766
+ |----------|--------------------------------|-------------------|
767
+ | Backend | API, DB, business logic, workers | Technical spec |
768
+
769
+ ### Library / SDK
770
+ | Team | Scope | Dependencies |
771
+ |----------|--------------------------------|-------------------|
772
+ | Core | Library/SDK implementation, public API | Technical spec |
773
+ | Bindings | Language bindings, wrappers (optional) | Core API spec |
774
+
775
+ ### CLI / tooling
776
+ | Team | Scope | Dependencies |
777
+ |----------|--------------------------------|-------------------|
778
+ | CLI | CLI app, commands, config | Technical spec |
779
+
780
+ ### Data / ML / analytics
781
+ | Team | Scope | Dependencies |
782
+ |----------|--------------------------------|-------------------|
783
+ | Backend | APIs, pipelines, storage | Technical spec |
784
+ | Data/ML | Models, ETL, analytics, reporting | Data spec, API contract |
785
+
786
+ ### DevOps / platform / infra
787
+ | Team | Scope | Dependencies |
788
+ |----------|--------------------------------|-------------------|
789
+ | Platform | Infra, CI/CD, observability | Technical spec |
790
+ | Backend | APIs, services (if any) | Technical spec |
791
+
792
+ ### Mixed (pick and combine)
793
+ | Team | Scope | Dependencies |
794
+ |----------|--------------------------------|-------------------|
795
+ | Backend | API, DB, business logic | Technical spec |
796
+ | Frontend | Web UI, API integration | API contract |
797
+ | Mobile | App UI, API integration | API contract |
798
+ | Data/ML | Models, ETL, analytics | Data spec, API |
799
+ | Platform | Infra, CI/CD, deploy | Technical spec |
633
800
  `;
634
801
 
635
802
  const BA_TECH_README = `# Technical BA
636
803
 
637
- API specs, DB schema, team breakdown.
638
- Use templates as starting points.
804
+ API/interface specs, DB schema, team breakdown.
805
+ Templates support: HTTP API, library/SDK, CLI, and all project types (see api-spec and team-breakdown).
639
806
  `;
640
807
 
641
808
  const ARCH_ADR_TEMPLATE = `# ADR-001: [Decision Title]
642
809
 
643
810
  ## Status
644
- Accepted
811
+ [Proposed | Accepted | Deprecated | Superseded by ADR-xxx]
812
+
813
+ ## Scope
814
+ [backend | frontend | mobile | library | CLI | data/ML | platform/infra | cross-cutting — one or more]
645
815
 
646
816
  ## Context
647
817
  [Why we need this decision]
@@ -662,6 +832,8 @@ Use adr.template.md for new ADRs.
662
832
 
663
833
  const QE_TC_TEMPLATE = `## TC-001: [Scenario]
664
834
 
835
+ **Type**: [API | UI/E2E | Unit | Contract | CLI | Data/Regression — pick one]
836
+
665
837
  **Precondition**: [State before test]
666
838
 
667
839
  **Steps**:
@@ -672,6 +844,9 @@ const QE_TC_TEMPLATE = `## TC-001: [Scenario]
672
844
  **Expected**: [Expected result]
673
845
 
674
846
  **Links to**: AC-001, Story #42
847
+
848
+ ---
849
+ *API: send request, assert status/body. UI: interact, assert DOM/visibility. CLI: run command, assert stdout/exit code. Contract: consumer/provider expectations.*
675
850
  `;
676
851
 
677
852
  const QE_README = `# QE (Quality Engineering)
@@ -725,4 +900,93 @@ const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
725
900
  **Docs**: Implementation notes, API usage.
726
901
  `;
727
902
 
903
+ const DEV_IMPLEMENTATION_ROLES_TEMPLATE = `# Implementation roles by project type
904
+
905
+ Use only the roles that apply. Remove or ignore the rest. Tech Lead is cross-cutting; add discipline roles as needed.
906
+
907
+ ## By project type
908
+
909
+ | Project type | Roles to use (all Senior 10+ except Tech Lead 15+) |
910
+ |---------------------|----------------------------------------------------|
911
+ | Web / full-stack | Tech Lead, Senior Frontend, Senior Backend |
912
+ | Mobile | Tech Lead, Senior Mobile, Senior Backend |
913
+ | API / backend only | Tech Lead, Senior Backend |
914
+ | Library / SDK | Tech Lead, Senior Dev (or Senior Backend) |
915
+ | CLI / tooling | Tech Lead, Senior Dev (or Senior Backend) |
916
+ | Data / ML | Tech Lead, Senior Backend, Senior Data/ML |
917
+ | Embedded / IoT | Tech Lead, Senior Embedded (+ Senior Backend if needed) |
918
+ | Platform / infra | Tech Lead, Senior Platform (+ Senior Backend if needed) |
919
+ | Mixed | Tech Lead + any of: Senior Frontend, Backend, Mobile, Embedded, Data/ML, Platform |
920
+
921
+ ## Role folders (all implementation roles are Senior 10+ yrs)
922
+
923
+ - \`tech-lead/\` — Tech Lead (15+ yrs): tech stack, review & merge (all projects)
924
+ - \`senior-developer/\` — Senior Developer: generic implementation
925
+ - \`frontend/\` — Senior Frontend: Web UI
926
+ - \`backend/\` — Senior Backend: API, services, DB
927
+ - \`mobile/\` — Senior Mobile: iOS, Android, cross-platform
928
+ - \`embedded/\` — Senior Embedded: firmware, IoT
929
+ - \`data-ml/\` — Senior Data/ML: ETL, models, analytics
930
+ - \`platform/\` — Senior Platform: CI/CD, infra, observability
931
+ `;
932
+
933
+ const DEV_FRONTEND_README = `# Senior Frontend (10+ years exp) — Web UI
934
+
935
+ **Responsibilities**:
936
+ - Implement web UI per design and API contract
937
+ - Unit Test coverage **≥ 90%**
938
+ - Follow Tech Lead's stack (e.g. React, Vue, Angular)
939
+
940
+ **Docs**: Component docs, integration notes.
941
+ `;
942
+
943
+ const DEV_BACKEND_README = `# Senior Backend (10+ years exp) — API, services
944
+
945
+ **Responsibilities**:
946
+ - Implement API, services, DB layer per Technical BA spec
947
+ - Unit Test coverage **≥ 90%**
948
+ - Follow Tech Lead's stack
949
+
950
+ **Docs**: API implementation notes, DB changes.
951
+ `;
952
+
953
+ const DEV_MOBILE_README = `# Senior Mobile (10+ years exp) — iOS / Android / cross-platform
954
+
955
+ **Responsibilities**:
956
+ - Implement app UI and API integration per spec
957
+ - Unit Test coverage **≥ 90%**
958
+ - Follow Tech Lead's stack (e.g. React Native, Flutter, native)
959
+
960
+ **Docs**: Screen/module docs, integration notes.
961
+ `;
962
+
963
+ const DEV_EMBEDDED_README = `# Senior Embedded (10+ years exp) — firmware, IoT
964
+
965
+ **Responsibilities**:
966
+ - Implement firmware, drivers, hardware interfaces per spec
967
+ - Tests as appropriate for target (unit, HW-in-loop)
968
+ - Follow Tech Lead's stack and safety constraints
969
+
970
+ **Docs**: Module design, interface specs.
971
+ `;
972
+
973
+ const DEV_DATA_ML_README = `# Senior Data/ML (10+ years exp)
974
+
975
+ **Responsibilities**:
976
+ - Implement ETL, models, analytics pipelines per spec
977
+ - Tests and validation for data and model quality
978
+ - Follow Tech Lead's stack (e.g. Python, Spark, ML frameworks)
979
+
980
+ **Docs**: Pipeline design, model cards.
981
+ `;
982
+
983
+ const DEV_PLATFORM_README = `# Senior Platform (10+ years exp) — infra, CI/CD
984
+
985
+ **Responsibilities**:
986
+ - Implement CI/CD, infra as code, observability per spec
987
+ - Follow Tech Lead's stack and security requirements
988
+
989
+ **Docs**: Runbooks, pipeline and infra docs.
990
+ `;
991
+
728
992
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Scaffold SDLC workflow docs and templates for Cursor, Claude, and dev teams",
5
5
  "type": "module",
6
6
  "bin": {