You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ npx themis test --watch --reporter next
91
91
92
92
## Code Scan
93
93
94
-
Themis can scan your JS/TS source tree and generate deterministic unit-layer tests for exported modules, React components, React hooks, route handlers, and Node services:
94
+
Themis can scan your JS/TS source tree and generate deterministic unit-layer tests for exported modules, React components, React hooks, Next app components, Next route handlers, generic route handlers, and Node services:
95
95
96
96
```bash
97
97
npx themis generate src
@@ -102,7 +102,8 @@ Generated files land under `tests/generated` by default. Each generated test:
102
102
103
103
- checks the scanned export names when Themis can resolve them exactly
104
104
- snapshots a normalized runtime contract for the module surface
105
-
- adds scenario adapters for React components/hooks, route handlers, and service functions when Themis can infer or read useful inputs
105
+
- adds scenario adapters for React components/hooks, Next app/router files, route handlers, and service functions when Themis can infer or read useful inputs
106
+
- captures React interaction and hook state-transition contracts when event handlers or stateful methods are available
106
107
- fails with a regeneration hint when the source drifts after the scan
107
108
108
109
Themis also supports per-file generation hints with sidecars like `src/components/Button.themis.json` so humans and agents can provide props, args, route requests, and route context. When those sidecars do not exist yet, `--write-hints` can scaffold them automatically from the current source analysis.
@@ -118,7 +119,7 @@ Use these flags to control the generation loop:
118
119
-`--clean`: remove generated files for the selected scope
119
120
-`--changed`: target changed files in a git worktree
120
121
-`--write-hints`: scaffold missing `.themis.json` sidecars so the next generate pass has explicit component props, hook args, service args, and route requests
121
-
-`--scenario`: limit generation to one adapter family such as `react-hook`or `route-handler`
122
+
-`--scenario`: limit generation to one adapter family such as `react-hook`, `next-app-component`, or `next-route-handler`
122
123
-`--min-confidence`: keep only entries at or above a confidence threshold
123
124
-`--strict`: fail the generate run on skips, conflicts, or entries below `high` confidence
124
125
-`--fail-on-skips`, `--fail-on-conflicts`: turn unresolved scan debt into a non-zero exit code
@@ -167,6 +168,7 @@ See [`docs/why-themis.md`](docs/why-themis.md) for positioning, differentiators,
167
168
-`npx themis generate src --clean`: removes generated tests for the selected scope.
168
169
-`npx themis generate src --changed`: regenerates against changed files in the current git worktree.
169
170
-`npx themis generate src --scenario react-hook --min-confidence high`: targets one adapter family at a confidence threshold.
171
+
-`npx themis generate app --scenario next-route-handler`: focuses generation on Next app router request handlers.
170
172
-`npx themis generate src --require-confidence high`: enforces a quality bar for all selected generated tests.
171
173
-`npx themis generate src --files src/routes/ping.ts`: targets one or more explicit source files.
172
174
-`npx themis generate src --match-source "routes/" --match-export "GET|POST"`: narrows generation by source path and exported symbol.
@@ -216,8 +218,9 @@ The repo now includes a thin VS Code extension scaffold at [`packages/themis-vsc
216
218
217
219
The extension is intentionally artifact-driven:
218
220
219
-
- reads `.themis/last-run.json`, `.themis/failed-tests.json`, `.themis/run-diff.json`, and `.themis/report.html`
221
+
- reads `.themis/last-run.json`, `.themis/failed-tests.json`, `.themis/run-diff.json`, `.themis/generate-last.json`, `.themis/generate-map.json`, `.themis/generate-backlog.json`, and `.themis/report.html`
220
222
- shows the latest verdict and failures in a sidebar
223
+
- adds generated-review navigation for source/test/hint mappings plus unresolved generation backlog
- scenario adapters cover React components, React hooks, route handlers, and Node service functions when inputs can be inferred or hinted
32
+
- scenario adapters cover React components, React hooks, Next app components, Next route handlers, generic route handlers, and Node service functions when inputs can be inferred or hinted
33
+
- React component and hook adapters also snapshot inferred interaction/state contracts when event handlers or zero-argument stateful methods are available
33
34
-`.themis/generate-map.json` records source-to-generated-test mappings plus scenario metadata
34
35
-`.themis/generate-last.json` stores the full machine-readable generate payload
35
36
-`.themis/generate-handoff.json` stores a compact prompt-ready handoff payload for agents
@@ -71,6 +72,8 @@ Per-file hint sidecars are supported via `<source>.themis.json`. These can provi
71
72
-`excludeExports`
72
73
-`scenarios`
73
74
75
+
`componentProps` and `routeRequests`/`routeContext` also steer Next app component and Next route handler adapters.
0 commit comments