opencodekit 0.20.5 → 0.20.6

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.
@@ -245,6 +245,81 @@ After ANY `task()` subagent returns with "success", follow the **Worker Distrust
245
245
  > check a file, verify a condition, reject if unmet. Don't rely on the agent
246
246
  > "remembering" to follow the rule.
247
247
 
248
+ ## Phantom Completion Detection
249
+
250
+ Tasks can "pass" verification while containing stub implementations. This gate catches completions that are technically correct but substantively empty.
251
+
252
+ ### When to Run
253
+
254
+ - After all PRD tasks are marked complete (during `/ship` Phase 4-5)
255
+ - Before closing any bead
256
+ - When `--full` verification is requested
257
+
258
+ ### Stub Patterns to Detect
259
+
260
+ Scan all files modified in the current task/bead for these phantom indicators:
261
+
262
+ ```bash
263
+ # Run against modified code files only (exclude .md, .json, .yml to avoid false positives)
264
+ git diff --name-only origin/main | grep -E '\.(ts|tsx|js|jsx|py|rs|go|swift|kt|java)$' | xargs grep -nE \
265
+ 'return null|return undefined|return \{\}|return \[\]|onClick=\{?\(\) => \{\}\}?|TODO|FIXME|placeholder|stub|not.?implemented|throw new Error\(.Not implemented' \
266
+ 2>/dev/null
267
+ ```
268
+
269
+ | Pattern | What It Indicates | Severity |
270
+ | -------------------------------------------------------- | ------------------------- | -------- |
271
+ | `return null` / `return undefined` | Empty implementation | HIGH |
272
+ | `return {}` / `return []` | Hollow data | HIGH |
273
+ | `onClick={() => {}}` | No-op handler | HIGH |
274
+ | `<div>Component</div>` / `<div>{/* TODO */}</div>` | Placeholder UI | HIGH |
275
+ | `TODO` / `FIXME` / `HACK` | Acknowledged incomplete | MEDIUM |
276
+ | `placeholder` / `stub` / `not implemented` | Self-documenting stubs | HIGH |
277
+ | `throw new Error("Not implemented")` | Explicit stub | HIGH |
278
+ | `fetch('/api/...')` without `await` or error handling | Disconnected call | MEDIUM |
279
+ | `Response.json({ok: true})` or static hardcoded response | Fake API response | HIGH |
280
+ | `console.log` as only function body | Debug-only implementation | MEDIUM |
281
+
282
+ ### Three-Level Artifact Verification
283
+
284
+ For each file listed in PRD `Affected Files`:
285
+
286
+ | Level | Check | How |
287
+ | ------------------ | ---------------------- | -------------------------------------------------------------------------------------------- |
288
+ | **1: Exists** | File is present | `ls path/to/file.ts` |
289
+ | **2: Substantive** | Not a stub/placeholder | `grep -v "TODO\|FIXME\|return null\|placeholder" path/to/file.ts` — verify real logic exists |
290
+ | **3: Wired** | Connected and used | `grep -r "import.*ExportName" src/` — verify other files import/use it |
291
+
292
+ ### Key Link Verification
293
+
294
+ Check that components are actually connected (not just existing side-by-side):
295
+
296
+ | Connection Type | Check Command |
297
+ | --------------- | -------------------------------------------------------------- |
298
+ | Component → API | `grep -E "fetch.*api/\|axios\|useSWR\|useQuery" Component.tsx` |
299
+ | API → Database | `grep -E "prisma\.\|db\.\|sql\|query" route.ts` |
300
+ | Form → Handler | `grep "onSubmit\|handleSubmit" Component.tsx` |
301
+ | State → Render | `grep "{stateVar}" Component.tsx` |
302
+ | Route → Page | Check router config references the page component |
303
+
304
+ ### Phantom Score
305
+
306
+ After running all checks, report a phantom score:
307
+
308
+ ```
309
+ Phantom Completion Check:
310
+ - Files scanned: [N]
311
+ - Stubs found: [N] (HIGH: [n], MEDIUM: [n])
312
+ - Artifact levels: [N] exist, [M] substantive, [K] wired
313
+ - Key links verified: [N]/[M]
314
+ - Score: [CLEAN | SUSPECT | PHANTOM]
315
+ ```
316
+
317
+ | Score | Criteria | Action |
318
+ | ----------- | ---------------------------------------------- | --------------------------------- |
319
+ | **CLEAN** | 0 HIGH stubs, all artifacts Level 3 | Proceed |
320
+ | **SUSPECT** | 1-2 MEDIUM stubs OR 1 artifact not Level 3 | Report, ask user |
321
+ | **PHANTOM** | Any HIGH stubs OR >2 artifacts not substantive | **BLOCK** — fix before completion |
322
+
248
323
  ## Why This Matters
249
324
 
250
325
  From 24 failure memories:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.20.5",
3
+ "version": "0.20.6",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "keywords": [
6
6
  "agents",