Add deep-tier hook/composable detection to patterns analyzer
The scan knows what libraries a project installs but not how those libraries shape the client-side architecture. `@tanstack/react-query` in deps doesn't tell Build agents "use `useQuery` for all fetching" — it just says the package exists, which deps already show. Tree-sitter confirmation of actual hook/composable call sites bridges the gap between "installed" and "this is how the project works."
verdict PASSscore 35 / 35findings 3 (0 risk · 0 debt · 3 obs)duration 46mrejection cycles 0shipped Apr 16, 2026
Pipeline timeline
Intent to proven code in 46m across Think, Plan, Build, and Verify.
Think7m
Plan7m
Build32m
Verify0m
Assertion ledger
35 claims, each independently verified. Showing 8 — show all →
| ID | Says | Matcher | |
|---|---|---|---|
| A001 | PatternAnalysis schema accepts dataFetching field | verified | ok |
| A002 | PatternAnalysis schema accepts stateManagement field | verified | ok |
| A003 | PatternAnalysis schema accepts formHandling field | verified | ok |
| A004 | React Query dependency triggers data fetching detection | verified | ok |
| A005 | SWR dependency triggers data fetching detection | verified | ok |
| A006 | Zustand dependency triggers state management detection | verified | ok |
| A007 | Pinia dependency triggers state management detection | verified | ok |
| A008 | Redux Toolkit dependency triggers state management detection | verified | ok |
Findings 3 total
obspackages/cli/src/engine/analyzers/patterns/confirmation.ts→ closed
- **Component file heuristic may over-count:** confirmation.ts:797-811 `isComponentFile` excludes test files but includes any .tsx/.jsx/.vue file regardless of purpose. A file like `utils/formatters.tsx` would count as a component file, slightly inflating dominance percentages. Not blocking — dominance is still directionally correct. - **Nuxt detection deviates from spec:** Spec said to use regex on raw file content because ParsedFile.functions captures definitions not calls. Implementation uses import matching instead (confirmation.ts:885-888). This is actually MORE reliable — it won't match comments or strings. The deviation improves the implementation.
obspackages/cli/src/engine/types/patterns.ts→ closed
- **No @ana tags for 8 assertions:** A001-A003 (schema), A025-A028 (skills display), A029 (empty analysis) have no @ana tags. The functionality exists and is tested — but pre-check can't track coverage. Future cycles should add tags to: patterns.ts schema tests, skills.test.ts display tests. - **Dominance boundary tests use round numbers:** Tests use 40%, 20%, 5% which are safely inside boundaries. No tests at exact boundary (30%, 10%). The boundary behavior is correct per code inspection, but boundary tests would strengthen confidence.
obs→ closed
- **Spec suggested regex but import matching is better:** The spec's concern about ParsedFile.functions was valid, but the suggested solution (regex) was suboptimal. Import matching is cleaner. This is a positive deviation but worth noting for future specs.
Integrity seal
scopesha256:de77e0a97b049...
contractsha256:9f0529af05d05...
plansha256:8e3665da41364...
specsha256:1908108cca3da...
build-reportsha256:134be77980921...
audit cmd$ ana proof audit add-hook-detection → all hashes match