$npx -y skills add parcadei/Continuous-Claude-v3 --skill completion-checkCompletion Check: Verify Infrastructure Is Wired
| 1 | # Completion Check: Verify Infrastructure Is Wired |
| 2 | |
| 3 | When building infrastructure, verify it's actually connected to the system before marking as complete. |
| 4 | |
| 5 | ## Pattern |
| 6 | |
| 7 | Infrastructure is not done when the code is written - it's done when it's wired into the system and actively used. Dead code (built but never called) is wasted effort. |
| 8 | |
| 9 | ## DO |
| 10 | |
| 11 | 1. **Trace the execution path** - Follow from user intent to actual code execution: |
| 12 | ```bash |
| 13 | # Example: Verify Task tool spawns correctly |
| 14 | grep -r "claude -p" src/ |
| 15 | grep -r "Task(" src/ |
| 16 | ``` |
| 17 | |
| 18 | 2. **Check hooks are registered**, not just implemented: |
| 19 | ```bash |
| 20 | # Hook exists? |
| 21 | ls -la .claude/hooks/my-hook.sh |
| 22 | |
| 23 | # Hook registered in settings? |
| 24 | grep "my-hook" .claude/settings.json |
| 25 | ``` |
| 26 | |
| 27 | 3. **Verify database connections** - Ensure infrastructure uses the right backend: |
| 28 | ```bash |
| 29 | # Check connection strings |
| 30 | grep -r "postgresql://" src/ |
| 31 | grep -r "sqlite:" src/ # Should NOT find if PostgreSQL expected |
| 32 | ``` |
| 33 | |
| 34 | 4. **Test end-to-end** - Run the feature and verify infrastructure is invoked: |
| 35 | ```bash |
| 36 | # Add debug logging |
| 37 | echo "DEBUG: DAG spawn invoked" >> /tmp/debug.log |
| 38 | |
| 39 | # Trigger feature |
| 40 | uv run python -m my_feature |
| 41 | |
| 42 | # Verify infrastructure was called |
| 43 | cat /tmp/debug.log |
| 44 | ``` |
| 45 | |
| 46 | 5. **Search for orphaned implementations**: |
| 47 | ```bash |
| 48 | # Find functions defined but never called |
| 49 | ast-grep --pattern 'async function $NAME() { $$$ }' | \ |
| 50 | xargs -I {} grep -r "{}" src/ |
| 51 | ``` |
| 52 | |
| 53 | ## DON'T |
| 54 | |
| 55 | - Mark infrastructure "complete" without testing execution path |
| 56 | - Assume code is wired just because it exists |
| 57 | - Build parallel systems (Task tool vs claude -p spawn) |
| 58 | - Use wrong backends (SQLite when PostgreSQL is architected) |
| 59 | - Skip end-to-end testing ("it compiles" ≠ "it runs") |
| 60 | |
| 61 | ## Completion Checklist |
| 62 | |
| 63 | Before declaring infrastructure complete: |
| 64 | |
| 65 | - [ ] Traced execution path from entry point to infrastructure |
| 66 | - [ ] Verified hooks are registered in .claude/settings.json |
| 67 | - [ ] Confirmed correct database/backend in use |
| 68 | - [ ] Ran end-to-end test showing infrastructure invoked |
| 69 | - [ ] Searched for dead code or parallel implementations |
| 70 | - [ ] Checked configuration files match implementation |
| 71 | |
| 72 | ## Example: DAG Task Graph |
| 73 | |
| 74 | **Wrong approach:** |
| 75 | ``` |
| 76 | ✓ Built BeadsTaskGraph class |
| 77 | ✓ Implemented DAG dependencies |
| 78 | ✓ Added spawn logic |
| 79 | ✗ Never wired - Task tool still runs instead |
| 80 | ✗ Used SQLite instead of PostgreSQL |
| 81 | ``` |
| 82 | |
| 83 | **Right approach:** |
| 84 | ``` |
| 85 | ✓ Built BeadsTaskGraph class |
| 86 | ✓ Wired into Task tool execution path |
| 87 | ✓ Verified claude -p spawn is called |
| 88 | ✓ Confirmed PostgreSQL backend in use |
| 89 | ✓ Tested: user calls Task() → DAG spawns → beads execute |
| 90 | ✓ No parallel implementations found |
| 91 | ``` |
| 92 | |
| 93 | ## Source Sessions |
| 94 | |
| 95 | - This session: Architecture gap discovery - DAG built but not wired, Task tool runs instead of spawn, SQLite used instead of PostgreSQL |