Add delivery validation

From brabos-ai/code-addiction · View interactive version

Add delivery validation is an AI agent skill from the GitHub repository brabos-ai/code-addiction. Product validation: Requirements 100% implemented, prerequisites exist, acceptance criteria pass.

How to use this skill

Skill file

Delivery Validation

<!-- uses:

-->

Skill for PRODUCT validation — checks whether requirements were 100% implemented.

When to Use

Difference from code-review:

| code-review (Technical) | delivery-validation (Product) |

|-------------------------|-------------------------------|

| IoC, SOLID, security | RF/RN implemented? |

| Type contracts | Acceptance criteria passing? |

| Build compiles? | Functionality works end-to-end? |

| Technical patterns | Implicit dependencies created? |

Runtime arm — the QA judgement qa-pipeline adds to /add-review: this skill validates delivery statically (reads the code/docs, checks the RF/RN checklist). /add-review's QA sections are the runtime arm of the same goal (the playwright plugin adds live driving) — it drives the running app to prove functional delivery against about.md acceptance criteria (and UX fidelity vs design.md), producing a _tests/run-NNN/qa-validation-NNN.md audit. With qa-pipeline disabled the runtime arm does not exist and this skill is the only arm there is. Use them together when the feature has UI: this skill confirms the requirements exist in code; the QA judgement confirms they actually work in the browser.

When NOT to Use


Workflow

Phase 1: Load Requirements

# Identify current feature
FEATURE_ID=$(node .codeadd/scripts/status.cjs)

# Load specification
cat .codeadd/docs/features/${FEATURE_ID}/about.md
cat .codeadd/docs/features/${FEATURE_ID}/plan.md 2>/dev/null  # Contracts (prose)
cat .codeadd/docs/features/${FEATURE_ID}/tasks.md 2>/dev/null # Tick state (## Acceptance Checklist)

Extract from about.md:

Extract contracts from plan.md (prose) + tick state from tasks.md → ## Acceptance Checklist:

From plan.md (prose): routes, services, DTOs, guards, migrations, queues — as defined in the plan.

From tasks.md → ## Acceptance Checklist: a checklist where each item ends with (RFNN/RNNN) reference and carries [ ]/[x]/[!] tick state set by add-build validators — add-build is the sole coordinator that merges and writes these ticks.

Map each ## Acceptance Checklist item to the corresponding RF/RN from about.md. Use ## Requirements Coverage from tasks.md as a derived index — every RF/RN must have coverage by ≥1 item from ## Acceptance Checklist.

IF tasks.md or ## Acceptance Checklist does NOT exist (legacy feature, pre-PRD0014):

Phase 2: Build Validation Checklist

For EACH requirement, create a verifiable item:

## Requirements Checklist

### Functional Requirements
- [ ] **RF01:** [description] → [how to verify]
- [ ] **RF02:** [description] → [how to verify]

### Business Rules
- [ ] **RN01:** [condition] → [expected result]
- [ ] **RN02:** [condition] → [expected result]

### Acceptance Criteria
- [ ] [criterion 1] → [how to test]
- [ ] [criterion 2] → [how to test]

Phase 3: Verify Prerequisites (CRITICAL)

For EACH requirement, analyze implicit dependencies:

## Prerequisites Analysis

### RF01: "Check product tier before allowing download"
**Dependency analysis:**
1. Does Product need a `tier` field? → [VERIFY in model]
2. Is there a flow to assign tier? → [VERIFY endpoints]
3. Is tier already populated? → [VERIFY data]

**Status:**
- [ ] tier field exists on Product → ✅/❌
- [ ] Assignment flow exists → ✅/❌
- [ ] Data is consistent → ✅/❌

Key questions for each requirement:

Phase 3.5: Validate Acceptance Checklist (tasks.md → ## Acceptance Checklist)

For EACH item in ## Acceptance Checklist, cross-check tick state vs reality:

| Item (with RF/RN ref) | Tick state | Expected (from plan.md) | Found | Status |

|-----------------------|------------|-------------------------|-------|--------|

| Route POST /billing/webhook/:provider returns 200 (RF02) | [x] | WebhookController.handleWebhook() | POST /webhook (fixed) | ⚠️ DIVERGENT |

| Service WebhookNormalizerService is provider-agnostic (RF02) | [!] | generic, provider-agnostic | StripeWebhookService | ❌ MISSING |

| DTO WebhookEventDto exposes {provider, payload, signature} (RF02) | [ ] | {provider, payload, signature} | WebhookDto {payload} | ⚠️ DIVERGENT |

Status per item:

Mandatory cross-reference: Do all RF/RN from ## Requirements Coverage (tasks.md §1) have a corresponding item in ## Acceptance Checklist (tasks.md §4)?

Phase 4: Validate Implementation

For EACH checklist item (about.md + tasks.md → ## Acceptance Checklist):

  1. Locate code that implements it (grep -r "[key-term]" apps/ libs/ --include="*.ts")
  2. Verify the logic is correct — RN conditions implemented? Edge cases handled? Full end-to-end flow?
  3. Mark status:

Phase 6: Generate Report

Output: validation-report.md

# Delivery Validation: [Feature]

**Date:** [date] | **Status:** ✅ APPROVED / ❌ BLOCKED

## Summary

| Total | Implemented | Partial | Missing | Prerequisites OK |
|-------|-------------|---------|---------|------------------|
| N | N | N | N | true/false |

---

## Functional Requirements

| ID | Requirement | Status | Note |
|----|-------------|--------|------|
| RF01 | [desc] | ✅ | Implemented at `path:line` |
| RF02 | [desc] | ❌ | Not found |

---

## Business Rules

| ID | Rule | Status | Note |
|----|------|--------|------|
| RN01 | [cond] → [result] | ✅ | Logic correct |
| RN02 | [cond] → [result] | ⚠️ | Missing edge case X |

---

## Prerequisites Analysis

| Requirement | Prerequisite | Status | Required Action |
|-------------|--------------|--------|-----------------|
| RF01 | tier field on Product | ❌ | Create field |
| RF01 | Assignment flow | ❌ | Create endpoint |

---

## Acceptance Criteria

- [x] [Criterion 1] - Passed
- [ ] [Criterion 2] - Failed: [reason]

---

## Identified Gaps

### Gap 1: [Title]
**Requirement:** RF01
**Problem:** [gap description]
**Impact:** [what does not work]
**Action:** [what needs to be done]

---

## Decision

**Status:** ✅ APPROVED / ⚠️ NEEDS WORK / ❌ BLOCKED

**If BLOCKED:**
- [ ] Implement [gap 1]
- [ ] Implement [gap 2]

**If APPROVED:**
Feature ready to merge.

Severities & Blocking Rules

| Severity | Meaning | Blocks merge? |

|----------|---------|---------------|

| ✅ Implemented | Requirement 100% met | No |

| ⚠️ Partial | Implemented but incomplete | No — may merge if documented (TODO for non-critical RN) |

| ❌ Missing | RF or critical RN not implemented | Yes — feature incomplete / incorrect behavior |

| 🔗 Prerequisite Missing | Dependency does not exist | Yes — cannot work without it |


Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.