|
| 1 | +# Doxy v0.1 Implementation Plan |
| 2 | + |
| 3 | +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. |
| 4 | +
|
| 5 | +**Goal:** Ship `doxy verify` end-to-end for React and ReactDOM with human, JSON, and JSONL output. |
| 6 | + |
| 7 | +**Architecture:** Build a thin CLI over the existing repo-context, parser, adapter, and authority modules. Add a focused analyzer, config loader, file selection, reporters, and end-to-end fixture tests without implementing cache or multi-command orchestration. |
| 8 | + |
| 9 | +**Tech Stack:** TypeScript, Vitest, SWC, citty, zod |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +### Task 1: Add end-to-end verify tests |
| 14 | + |
| 15 | +**Files:** |
| 16 | +- Modify: `src/test/golden.ts` |
| 17 | +- Create: `src/cli/verify.test.ts` |
| 18 | + |
| 19 | +- [ ] **Step 1: Write the failing verify fixture test** |
| 20 | +- [ ] **Step 2: Run the targeted test and confirm it fails for missing CLI/analyzer code** |
| 21 | +- [ ] **Step 3: Add minimal helpers for invoking verify against fixtures** |
| 22 | +- [ ] **Step 4: Re-run targeted tests and confirm failures are now behavioral** |
| 23 | + |
| 24 | +### Task 2: Build the analyzer and file discovery path |
| 25 | + |
| 26 | +**Files:** |
| 27 | +- Create: `src/core/analyzer/index.ts` |
| 28 | +- Create: `src/core/files/index.ts` |
| 29 | +- Modify: `src/parser/swc-bridge.ts` |
| 30 | +- Modify: `src/core/types/normalized-ast.ts` |
| 31 | + |
| 32 | +- [ ] **Step 1: Write failing analyzer tests for deprecated, removed, future, and wrong-arity findings** |
| 33 | +- [ ] **Step 2: Run targeted tests and confirm they fail** |
| 34 | +- [ ] **Step 3: Implement symbol analysis and message generation** |
| 35 | +- [ ] **Step 4: Extend the parser to capture member references needed for non-call APIs** |
| 36 | +- [ ] **Step 5: Implement file selection for CLI args and config include/exclude patterns** |
| 37 | +- [ ] **Step 6: Re-run analyzer and fixture tests until green** |
| 38 | + |
| 39 | +### Task 3: Add config loading, suppression application, and reporters |
| 40 | + |
| 41 | +**Files:** |
| 42 | +- Create: `src/cli/config.ts` |
| 43 | +- Create: `src/cli/reporters.ts` |
| 44 | +- Create: `src/core/analyzer/messages.ts` |
| 45 | +- Modify: `src/core/suppression/index.ts` |
| 46 | + |
| 47 | +- [ ] **Step 1: Write failing tests for config loading, inline suppression, config suppression, and output modes** |
| 48 | +- [ ] **Step 2: Run targeted tests and confirm they fail** |
| 49 | +- [ ] **Step 3: Implement config loading with defaults and schema validation** |
| 50 | +- [ ] **Step 4: Implement suppression application in the analyzer flow** |
| 51 | +- [ ] **Step 5: Implement human, JSON, and JSONL reporters** |
| 52 | +- [ ] **Step 6: Re-run targeted tests until green** |
| 53 | + |
| 54 | +### Task 4: Wire the CLI command and public entry points |
| 55 | + |
| 56 | +**Files:** |
| 57 | +- Create: `src/cli/index.ts` |
| 58 | +- Create: `src/index.ts` |
| 59 | +- Modify: `package.json` |
| 60 | +- Modify: `README.md` |
| 61 | + |
| 62 | +- [ ] **Step 1: Write failing CLI tests for exit codes and output mode selection** |
| 63 | +- [ ] **Step 2: Run targeted tests and confirm they fail** |
| 64 | +- [ ] **Step 3: Implement `doxy verify [files...]` with citty** |
| 65 | +- [ ] **Step 4: Export a small programmatic API from `src/index.ts`** |
| 66 | +- [ ] **Step 5: Update README to match the actual v0.1 surface** |
| 67 | +- [ ] **Step 6: Run full test, typecheck, lint, and build** |
| 68 | + |
| 69 | +### Task 5: Verify and package the release candidate |
| 70 | + |
| 71 | +**Files:** |
| 72 | +- Modify: `README.md` as needed |
| 73 | + |
| 74 | +- [ ] **Step 1: Run `npm test`** |
| 75 | +- [ ] **Step 2: Run `npm run typecheck`** |
| 76 | +- [ ] **Step 3: Run `npm run lint`** |
| 77 | +- [ ] **Step 4: Run `npm run build`** |
| 78 | +- [ ] **Step 5: Fix any regressions and repeat until clean** |
| 79 | +- [ ] **Step 6: Commit the v0.1 implementation** |
0 commit comments