Claude
Skills
Sign in
Back

quality-verify-implementation-complete

Included with Lifetime
$97 forever

Verifies that implemented code is actually integrated into the system and executes at runtime, preventing "done but not integrated" failures. Use when marking features complete, before moving ADRs to completed status, after implementing new modules/nodes/services, or when claiming "feature works". Triggers on "verify implementation", "is this integrated", "check if code is wired", "prove it runs", or before declaring work complete. Works with Python modules, LangGraph nodes, CLI commands, API endpoints, and service classes. Enforces Creation-Connection-Verification (CCV) principle.

Backend & APIs

What this skill does


# Verify Implementation Complete

## Quick Start

Before claiming any implementation is "done", run this verification:

```bash
# 1. Check if your new module is imported
grep -r "from.*your_module import\|import.*your_module" src/

# 2. Check if your functions are called
grep -r "your_function_name" src/ --include="*.py" | grep -v test | grep -v "def "

# 3. Run integration verification
./scripts/verify_integration.sh  # If available

# 4. Answer the Four Questions (see below)
```

If any check fails or you cannot answer all four questions, **the implementation is NOT complete**.

## Table of Contents

1. When to Use This Skill
2. What This Skill Does
3. The CCV Principle
4. The Four Questions Test
5. Step-by-Step Verification Process
6. Verification by Artifact Type
7. Common Failure Patterns
8. Supporting Files
9. Expected Outcomes
10. Requirements
11. Red Flags to Avoid

## When to Use This Skill

### Explicit Triggers
- "Verify this implementation is complete"
- "Is this code integrated?"
- "Check if my code is wired into the system"
- "Prove this feature runs"
- "Verify integration for [feature/module]"
- "Run implementation completeness check"

### Implicit Triggers
- Before marking any task as "done" or "complete"
- Before moving an ADR from `in_progress/` to `completed/`
- After creating new Python modules, classes, or functions
- After implementing LangGraph nodes, CLI commands, or API endpoints
- Before claiming "feature works" or "implementation successful"
- When self-reviewing code changes

### Debugging Triggers
- "Why isn't my feature working?" (often it's not integrated)
- "Tests pass but feature doesn't run" (classic integration gap)
- "Code exists but nothing happens" (orphaned code)
- "Feature used to work" (regression - connection removed)

## What This Skill Does

This skill enforces the **Creation-Connection-Verification (CCV) Principle** by:

1. **Verifying Creation** - Confirms artifacts exist (files, tests, types)
2. **Verifying Connection** - Confirms artifacts are wired into the system
3. **Verifying Execution** - Confirms artifacts execute at runtime
4. **Providing Evidence** - Generates proof that all three phases are complete

**This skill prevents the ADR-013 failure mode** where code was created and tested but never integrated into `builder.py`, causing the feature to never execute despite passing all quality gates.

## The CCV Principle

### The Formula

```
COMPLETE = CREATION + CONNECTION + VERIFICATION
```

### The Three Phases

| Phase | Proves | Evidence Required |
|-------|--------|-------------------|
| **CREATION** | Artifact exists | File written, tests pass, types check, linting clean |
| **CONNECTION** | Artifact is wired in | Import statement, registration call, configuration entry |
| **VERIFICATION** | Artifact executes | Logs showing execution, output observed, state changes confirmed |

**Missing any phase = Implementation is INCOMPLETE**

### Why All Three Are Required

- **Creation without Connection** → Dead code that never runs
- **Connection without Verification** → Unknown if it actually works
- **Creation + Connection without Verification** → Might work, might not, no proof

## The Four Questions Test

Before claiming "done", you MUST answer ALL FOUR questions:

### Question 1: How do I trigger this?
**What it means:** What user action, CLI command, API call, or system event causes this code to execute?

**Examples:**
- `uv run temet-run -a talky -p "analyze code"`
- `curl -X POST /api/endpoint`
- `from myapp.service import MyService; MyService().method()`

**If you cannot answer:** Feature has no entry point → NOT COMPLETE

### Question 2: What connects it to the system?
**What it means:** Where is the import, registration, or wiring that makes this code reachable?

**Examples:**
- `builder.py line 45: from .architecture_nodes import create_review_node`
- `main.py line 12: app.add_command(my_command)`
- `container.py line 67: container.register(MyService)`

**If you cannot answer:** Code is orphaned → NOT COMPLETE

### Question 3: What evidence proves it runs?
**What it means:** What logs, traces, or observable output demonstrates execution?

**Examples:**
- `[2025-12-07 10:30:45] INFO architecture_review_triggered`
- `✓ Task completed successfully (in CLI output)`
- `HTTP 200 OK (in curl response)`

**If you cannot answer:** No execution proof → NOT COMPLETE

### Question 4: What shows it works correctly?
**What it means:** What output, state change, or behavior proves correct function?

**Examples:**
- `state.architecture_review = ArchitectureReviewResult(status=APPROVED)`
- `Database row inserted with expected values`
- `File created with correct contents`

**If you cannot answer:** No outcome proof → NOT COMPLETE

## Step-by-Step Verification Process

### Phase 1: Verify Creation (Artifacts Exist)

Run standard quality gates:

```bash
# Type checking
uv run mypy src/

# Linting
uv run ruff check .

# Unit tests
uv run pytest tests/unit/ --no-cov -v
```

**Checklist:**
- [ ] Files exist with complete implementations (no stubs/TODOs)
- [ ] Unit tests pass (isolated behavior verified)
- [ ] Type checking passes (no type errors)
- [ ] Linting passes (code style clean)

**If any fail:** Fix before proceeding to Phase 2

### Phase 2: Verify Connection (Wiring Exists)

#### 2.1 Check Import Statements

For a new module `your_module.py`:

```bash
# Find all imports of your module
grep -r "from.*your_module import\|import.*your_module" src/ --include="*.py" | grep -v test
```

**Expected:** At least one import in production code (not just tests)

**If empty:** Module is NOT imported → NOT CONNECTED

#### 2.2 Check Call-Sites

For a new function `your_function`:

```bash
# Find all call-sites
grep -r "your_function" src/ --include="*.py" | grep -v test | grep -v "def your_function"
```

**Expected:** At least one call-site in production code

**If empty:** Function is never called → NOT CONNECTED

#### 2.3 Check Registration (if applicable)

For components that require registration:

```bash
# LangGraph nodes
grep -E "add_node.*your_node|from.*your_module" src/coordination/graph/builder.py

# CLI commands
grep -r "add_command\|@.*\.command\|@click\.command" src/ | grep your_command

# DI container
grep -r "container\.register\|container\.provide" src/ | grep YourService

# API routes
grep -r "router\.add\|@.*\.route\|@app\." src/ | grep your_endpoint
```

**Expected:** Registration code exists

**If empty:** Component is NOT registered → NOT CONNECTED

**Checklist:**
- [ ] Module imported in at least one production file
- [ ] Functions/classes called in at least one production path
- [ ] (If applicable) Component registered in system
- [ ] Can trace path from entry point to your code

**If any fail:** Wire the code before proceeding to Phase 3

### Phase 3: Verify Execution (Runtime Proof)

#### 3.1 Trigger the Feature

Execute the actual entry point:

```bash
# Example: CLI command
uv run temet-run -a talky -p "test command"

# Example: API endpoint
curl -X POST http://localhost:8000/api/endpoint -d '{"test": "data"}'

# Example: Direct invocation
uv run python -c "from myapp.service import MyService; MyService().method()"
```

**Observe:** Command completes without errors

#### 3.2 Capture Execution Evidence

Look for evidence that YOUR code executed:

```bash
# Check logs for your module
grep "your_module\|your_function" logs/daemon.log

# Check structured logs
grep "your_module" logs/*.jsonl | jq .

# Check database for expected changes
sqlite3 app.db "SELECT * FROM your_table WHERE created_at > datetime('now', '-1 minute')"
```

**Expected:** Evidence that your code path was executed

**If no evidence:** Code path was not reached → NOT VERIFIED

#### 3.3 Confirm Correct Behavior

Verify the outcome matches expectations:

```bash
# Check state changes
# Example: LangGraph state field populated
assert result.your_field is not None

# Example: File created
ls -la expected_output_file.txt

# Exam

Related in Backend & APIs