Ref-014: Software Engineering WBS Template

Document Type

Reference / Process Standard

Purpose

Defines the Work Breakdown Structure (WBS) for end-to-end software engineering using the Cognitive Supply Chain. This template implements a MECE Phase-Based TDD Flywheel with case management semantics (CMMN).


1. WBS Philosophy

The “Case File” Metaphor

A Feature is treated as a Case File that moves through the factory floor. The WBS describes the lifecycle of that Case File.

TDD Isomorphism

Every phase follows the same pattern:


2. The Six Phases

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
┌──────────────────────────────────────────────────────────────────┐
│                    SOFTWARE ENGINEERING FLYWHEEL                  │
├──────────────────────────────────────────────────────────────────┤
│                                                                  │
│   ┌─────────┐    ┌─────────┐    ┌─────────┐                     │
│   │ PHASE 1 │───▶│ PHASE 2 │───▶│ PHASE 3 │                     │
│   │   REQ   │    │  ARCH   │    │  BUILD  │                     │
│   └─────────┘    └─────────┘    └─────────┘                     │
│        │                              │                          │
│        │                              ▼                          │
│        │         ┌─────────┐    ┌─────────┐                     │
│        │         │ PHASE 6 │◀───│ PHASE 4 │                     │
│        │         │FEEDBACK │    │ INTEGR  │                     │
│        │         └─────────┘    └─────────┘                     │
│        │              │              │                          │
│        │              │              ▼                          │
│        │              │         ┌─────────┐                     │
│        └──────────────┘◀────────│ PHASE 5 │                     │
│           (New Case)            │ DELIVER │                     │
│                                 └─────────┘                     │
└──────────────────────────────────────────────────────────────────┘

3. Phase Details

PHASE 1: CASE INITIALIZATION (Requirement TDD)

Objective: Define the “Gap” in reality. Input: User Intent / Market Signal Output: Validated Case File (PRD) & Acceptance Criteria

Step TDD State Task Artifact
1.1 RED Gap Identification: Define the “failing test” for the product Problem Statement
1.2 GREEN Specification Injection: Create PRD + UAT case_file.prd.md
1.3 REFACTOR Scope Negotiation: Remove non-essential features Refined PRD + Risk Register

Prompt Files:


PHASE 2: STRUCTURAL DESIGN (Architecture TDD)

Objective: Define the “Constraints” of the solution. Input: Validated PRD Output: Executable Specifications (ADR/SDS)

Step TDD State Task Artifact
2.1 RED Constraint Definition: Identify architectural violations ADR (The “Law”)
2.2 GREEN Blueprint Generation: Create SDS within ADR limits design_spec.sds.md
2.3 REFACTOR Design Review: Threat Modeling, Complexity Pruning Signed-off SDS

Prompt Files:


PHASE 3: CONSTRUCTION (Code TDD)

Objective: Synthesize the Logic. Input: SDS + ADR Output: Verified Source Code

Step TDD State Task Artifact
3.1 RED Test Fabrication: Write failing unit/integration tests feature.test.ts
3.2 GREEN Logic Synthesis: Generate code that passes tests feature.ts
3.3 REFACTOR Semantic Grooming: Apply SOLID, update prompts Clean Code + Evolved Prompts

Prompt Files:


PHASE 4: INTEGRATION & VERIFICATION (Pipeline TDD)

Objective: Assemble the System. Input: Verified Source Code Output: Deployable Artifact

Step TDD State Task Artifact
4.1 RED Regression Definition: Define quality gates CI Configuration
4.2 GREEN Artifact Assembly: Build, Lint, Test, Containerize Immutable Docker Image
4.3 REFACTOR Pipeline Optimization: Cache tuning, flake elimination Optimized CI Pipeline

Prompt Files:


PHASE 5: DELIVERY & OBSERVABILITY (Release TDD)

Objective: Validate in Reality. Input: Deployable Artifact Output: User Value + Telemetry

Step TDD State Task Artifact
5.1 RED Environment Provisioning: Define IaC, verify drift main.tf
5.2 GREEN Blue/Green Propagation: Deploy, smoke test Live Feature
5.3 REFACTOR Infrastructure Tuning: Right-sizing, alert tuning Optimized Cloud Spend

Prompt Files:


PHASE 6: FEEDBACK & EVOLUTION (Flywheel Closer)

Objective: Close the Loop. Input: Telemetry / User Feedback Output: New “Red” Signals for Phase 1

Step TDD State Task Artifact
6.1 RED Anomaly Detection: Monitor SLIs/SLOs, find usage gaps Alert Backlog
6.2 GREEN Insight Generation: Post-mortem, value stream mapping Improvement Proposals
6.3 REFACTOR Process Evolution: Update WBS, global prompts Meta-Groomed System

Prompt Files:


4. MECE Verification Matrix

Phase Instructions Agent Prompts Workflow
1. Requirements requirements.instructions.md architect phase-1-requirements/*.prompt.md pr-validation.yml
2. Architecture architecture.instructions.md architect phase-2-architecture/*.prompt.md spec-compliance.yml
3. Implementation implementation.instructions.md implementer, tester phase-3-implementation/*.prompt.md ci.yml
4. Integration testing.instructions.md tester phase-4-integration/*.prompt.md ci.yml
5. Delivery deployment.instructions.md deployer phase-5-delivery/*.prompt.md cd.yml, release.yml
6. Feedback review.instructions.md groomer, compliance phase-6-feedback/*.prompt.md prompt-evolution.yml

Mutually Exclusive: Each file has a single responsibility. No overlap. Collectively Exhaustive: Every state from “Idea” to “Deleted Code” is covered.


5. File Structure Template

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.github/
├── copilot-instructions.md          # Global Constitution
├── AGENTS.md                         # Agent routing rules
│
├── instructions/                     # Phase-specific instructions
│   ├── requirements.instructions.md
│   ├── architecture.instructions.md
│   ├── implementation.instructions.md
│   ├── testing.instructions.md
│   ├── deployment.instructions.md
│   └── review.instructions.md
│
├── agents/                           # Custom agent definitions
│   ├── architect.md
│   ├── implementer.md
│   ├── tester.md
│   ├── reviewer.md
│   ├── deployer.md
│   ├── groomer.md
│   └── compliance.md
│
├── prompts/                          # Phase-organized prompt files
│   ├── phase-1-requirements/
│   ├── phase-2-architecture/
│   ├── phase-3-implementation/
│   ├── phase-4-integration/
│   ├── phase-5-delivery/
│   └── phase-6-feedback/
│
├── workflows/                        # CI/CD automation
│   ├── ci.yml
│   ├── cd.yml
│   ├── pr-validation.yml
│   ├── spec-compliance.yml
│   ├── prompt-evolution.yml
│   └── release.yml
│
└── config/                           # Shared configuration
    ├── mcp.json
    ├── agent-defaults.json
    └── prompt-schema.json