reflection-check 0.0.1 → 0.0.3

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.
Files changed (37) hide show
  1. package/dist/cli.js +11 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/doctor.d.ts +2 -1
  4. package/dist/commands/doctor.js +109 -2
  5. package/dist/commands/doctor.js.map +1 -1
  6. package/dist/commands/init.d.ts +6 -0
  7. package/dist/commands/init.js +59 -0
  8. package/dist/commands/init.js.map +1 -0
  9. package/dist/commands/run.js +1 -2
  10. package/dist/commands/run.js.map +1 -1
  11. package/dist/commands/update.js +6 -0
  12. package/dist/commands/update.js.map +1 -1
  13. package/dist/contracts/browser/browser-contract.d.ts +2 -1
  14. package/dist/contracts/browser/browser-contract.js +2 -1
  15. package/dist/contracts/browser/browser-contract.js.map +1 -1
  16. package/dist/contracts/browser/route-runner.d.ts +6 -0
  17. package/dist/contracts/browser/route-runner.js +42 -1
  18. package/dist/contracts/browser/route-runner.js.map +1 -1
  19. package/dist/contracts/visual/baseline-compare.js +9 -1
  20. package/dist/contracts/visual/baseline-compare.js.map +1 -1
  21. package/dist/core/baseline-store.d.ts +2 -1
  22. package/dist/core/baseline-store.js +1 -1
  23. package/dist/core/baseline-store.js.map +1 -1
  24. package/dist/core/config.d.ts +8 -0
  25. package/dist/core/config.js +11 -2
  26. package/dist/core/config.js.map +1 -1
  27. package/dist/core/report-schema.d.ts +11 -10
  28. package/dist/core/report-schema.js +47 -1
  29. package/dist/core/report-schema.js.map +1 -1
  30. package/docs/agent-workflows.md +13 -5
  31. package/docs/browser-contract.md +31 -0
  32. package/docs/ci.md +11 -1
  33. package/docs/configuration.md +26 -0
  34. package/docs/getting-started.md +17 -3
  35. package/docs/plans/reflection-dogfood-feedback-implementation-guide.md +639 -0
  36. package/docs/validation-process.md +16 -7
  37. package/package.json +1 -1
@@ -5,7 +5,7 @@ Reflection is meant to be a validation protocol that humans, agents, and CI can
5
5
  The command split is intentional:
6
6
 
7
7
  ```bash
8
- reflection doctor # lightweight CLI/setup check; project contracts run through --config
8
+ reflection doctor # runtime check; pass --config for project preflight
9
9
  reflection run # produce evidence and report.json; pass --config for project contracts
10
10
  reflection review # summarize the latest evidence for humans/agents
11
11
  reflection update # accept intentional visual changes; never automatic
@@ -16,7 +16,7 @@ reflection update # accept intentional visual changes; never automatic
16
16
  Use this loop before claiming frontend work is complete:
17
17
 
18
18
  ```bash
19
- reflection doctor
19
+ reflection doctor --config reflection.config.ts
20
20
  reflection run --config reflection.config.ts --mode smoke
21
21
  reflection review --json
22
22
  ```
@@ -25,7 +25,7 @@ If Reflection is being run from this repository during development, build first
25
25
 
26
26
  ```bash
27
27
  pnpm build
28
- node dist/cli.js doctor
28
+ node dist/cli.js doctor --config examples/basic-react/reflection.config.ts
29
29
  node dist/cli.js run --config examples/basic-react/reflection.config.ts --mode smoke
30
30
  node dist/cli.js review --json
31
31
  ```
@@ -38,13 +38,22 @@ Interpret the review result as the contract:
38
38
 
39
39
  Always include the `reportPath`, blocking failures, review items, and artifact paths when reporting results to a human.
40
40
 
41
+ ## Suggested next steps
42
+
43
+ Reports include derived next steps based on the run result:
44
+
45
+ - Blocking failures: fix the named blocking checks before considering visual baseline updates.
46
+ - Missing baselines: inspect the actual screenshots, then use `reflection update --dry-run --case <caseId> --from-run latest` for intentional first baselines.
47
+ - Review-only visual diffs: inspect expected, actual, and diff artifacts before proposing a targeted dry-run update.
48
+ - Passing runs: no action is required; expand route or visual coverage only when useful.
49
+
41
50
  ## Agent instructions
42
51
 
43
52
  Agents should treat Reflection as an evidence gate, not as a self-healing tool.
44
53
 
45
54
  Required agent behavior:
46
55
 
47
- 1. Run `reflection doctor` before the validation flow when setup may be uncertain. It is currently a lightweight setup check; the configured project contract is exercised by `reflection run --config ...`.
56
+ 1. Run `reflection doctor --config reflection.config.ts` before the validation flow when setup may be uncertain. It validates config loading/schema, summarizes configured contracts, checks runtime readiness, and remains read-only.
48
57
  2. Run `reflection run --config reflection.config.ts --mode smoke` to generate current evidence.
49
58
  3. Run `reflection review --json` to get the machine-readable summary.
50
59
  4. Fix blocking failures before finishing the task.
@@ -78,7 +87,7 @@ CI should generate and publish evidence, but must never update baselines.
78
87
  Recommended CI command shape:
79
88
 
80
89
  ```bash
81
- reflection doctor
90
+ reflection doctor --config reflection.config.ts
82
91
  reflection run --ci --config reflection.config.ts --mode smoke
83
92
  reflection review --report-dir artifacts/reflection --json
84
93
  ```
@@ -90,7 +99,7 @@ For this repository's built CLI:
90
99
  ```bash
91
100
  pnpm install --frozen-lockfile
92
101
  pnpm build
93
- node dist/cli.js doctor
102
+ node dist/cli.js doctor --config examples/basic-react/reflection.config.ts
94
103
  node dist/cli.js run --ci --config examples/basic-react/reflection.config.ts --mode smoke
95
104
  node dist/cli.js review --report-dir artifacts/reflection --json
96
105
  ```
@@ -139,7 +148,7 @@ Use Reflection as the UI evidence gate before claiming frontend work is complete
139
148
  Run:
140
149
 
141
150
  ```bash
142
- reflection doctor
151
+ reflection doctor --config reflection.config.ts
143
152
  reflection run --config reflection.config.ts --mode smoke
144
153
  reflection review --json
145
154
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reflection-check",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "CLI for evidence-backed rendered UI validation.",
5
5
  "license": "MIT",
6
6
  "type": "module",