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.

Think
7m
Plan
7m
Build
32m
Verify
0m

Assertion ledger

35 claims, each independently verified. Showing 8 — show all →

IDSaysMatcher
A001PatternAnalysis schema accepts dataFetching fieldverifiedok
A002PatternAnalysis schema accepts stateManagement fieldverifiedok
A003PatternAnalysis schema accepts formHandling fieldverifiedok
A004React Query dependency triggers data fetching detectionverifiedok
A005SWR dependency triggers data fetching detectionverifiedok
A006Zustand dependency triggers state management detectionverifiedok
A007Pinia dependency triggers state management detectionverifiedok
A008Redux Toolkit dependency triggers state management detectionverifiedok

Findings 3 total

obspackages/cli/src/engine/analyzers/patterns/confirmation.tsclosed
- **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.tsclosed
- **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.
obsclosed
- **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