reflection-check 0.0.2 → 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.
@@ -18,8 +18,8 @@ This guide must be updated during implementation:
18
18
  - Record timestamps on phase completions for velocity tracking.
19
19
  - Update the test coverage map as tests are written.
20
20
 
21
- **Last updated:** 2026-06-01
22
- **Current phase:** Patch 0.0.2 candidate
21
+ **Last updated:** 2026-06-02
22
+ **Current phase:** Complete
23
23
 
24
24
  ---
25
25
 
@@ -109,7 +109,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
109
109
 
110
110
  **Goal:** Fix the Sourcer-discovered limitation where missing-baseline dry-run/update could not promote the current actual screenshot.
111
111
  **Depends on:** Current `0.0.1` package shape
112
- **Status:** Complete in working tree, pending full release validation and publish
112
+ **Status:** Complete in working tree; full package validation passed. The combined release candidate is now `reflection-check@0.0.3`, and `npm publish --dry-run --access public` passes.
113
113
 
114
114
  #### Inputs
115
115
 
@@ -157,10 +157,10 @@ Convert feedback into small, test-first package improvements. Prioritize improve
157
157
  #### Patch Exit Criteria
158
158
 
159
159
  - [x] Focused visual/update tests pass.
160
- - [ ] Full validation passes.
161
- - [ ] Version bumped for patch release.
160
+ - [x] Full validation passes.
161
+ - [x] Version bumped for patch release.
162
162
  - [ ] Sourcer verifies first login baseline dry-run against the patched package.
163
- - [ ] Guide updated with publish outcome.
163
+ - [x] Guide updated with publish outcome.
164
164
 
165
165
  #### Failure Protocol
166
166
 
@@ -174,16 +174,16 @@ Convert feedback into small, test-first package improvements. Prioritize improve
174
174
 
175
175
  ### Phase 1: Useful `doctor --config`
176
176
 
177
- **Goal:** Turn `doctor` from a placeholder into a real read-only preflight for consuming repos.
177
+ **Goal:** Turn `doctor` from a shallow status command into a real read-only preflight for consuming repos.
178
178
  **Depends on:** Current `0.0.1` package shape
179
- **Status:** Not started
179
+ **Status:** Complete
180
180
 
181
181
  #### Inputs
182
182
 
183
183
  - Existing `src/commands/doctor.ts`.
184
184
  - Existing config loader in `src/core/config.ts`.
185
185
  - Server readiness behavior in `src/core/server-manager.ts`.
186
- - Sourcer feedback: doctor currently only prints a placeholder.
186
+ - Sourcer feedback: doctor previously only printed a one-line status message.
187
187
 
188
188
  #### Outputs
189
189
 
@@ -205,38 +205,45 @@ Convert feedback into small, test-first package improvements. Prioritize improve
205
205
 
206
206
  #### Tasks
207
207
 
208
- - [ ] Add failing unit tests for valid config, missing config, invalid config, and config summary output.
208
+ - [x] Add failing unit tests for valid config, missing config, invalid config, and config summary output.
209
209
  - **Tool:** edit
210
210
  - **Verify:** `pnpm exec vitest run tests/unit/doctor-command.test.ts`
211
211
 
212
- - [ ] Implement config-aware doctor output.
212
+ - [x] Implement config-aware doctor output.
213
213
  - **Tool:** edit
214
214
  - **Verify:** focused doctor tests pass.
215
215
 
216
- - [ ] Add runtime checks that do not mutate or start target state unexpectedly.
216
+ - [x] Add runtime checks that do not mutate or start target state unexpectedly.
217
217
  - **Tool:** edit
218
218
  - **Verify:** tests cover Playwright/package readiness and safe server summary.
219
219
 
220
- - [ ] Update docs to stop calling doctor a placeholder.
220
+ - [x] Update docs to describe doctor as a config-aware preflight.
221
221
  - **Tool:** edit
222
- - **Verify:** `rg "placeholder|lightweight" docs src tests`
222
+ - **Verify:** stale doctor wording search returns no matches in active docs, source, or tests.
223
+
224
+ #### Implementation Notes
225
+
226
+ - `reflection doctor --config` now validates config presence/import/schema and exits with `ExitCode.ToolOrConfigError` for invalid config.
227
+ - `doctor` reports Node version, Playwright package readiness, Chromium executable presence when available, enabled contract counts, base URL, and server configuration.
228
+ - Doctor remains read-only: it does not start configured servers, mutate baselines, or write reports.
229
+ - Added `--check-server` for an explicit one-shot `readyUrl` probe without starting the server.
223
230
 
224
231
  #### Tests for This Phase
225
232
 
226
233
  | Test Type | What to Test | Exists? | Path / Command |
227
234
  |---|---|---|---|
228
- | Unit | Doctor config success/failure summaries | No → create | `tests/unit/doctor-command.test.ts` |
229
- | CLI | `reflection doctor --config` exit behavior | Partial | `tests/unit/cli.test.ts` |
235
+ | Unit | Doctor config success/failure summaries | Yes | `tests/unit/doctor-command.test.ts` |
236
+ | CLI | `reflection doctor --config` exit behavior | Yes | `tests/unit/cli.test.ts` |
230
237
  | Type safety | Doctor options/types | Auto | `pnpm typecheck` |
231
238
  | Package smoke | Installed CLI can run doctor | Yes | `pnpm smoke:package` |
232
239
 
233
240
  #### Phase Exit Criteria
234
241
 
235
- - [ ] `doctor --config` reports meaningful setup information.
236
- - [ ] Invalid config exits non-zero with actionable error.
237
- - [ ] Docs match behavior.
238
- - [ ] `pnpm test`, `pnpm typecheck`, `pnpm smoke:package` pass.
239
- - [ ] Guide updated with completion status.
242
+ - [x] `doctor --config` reports meaningful setup information.
243
+ - [x] Invalid config exits non-zero with actionable error.
244
+ - [x] Docs match behavior.
245
+ - [x] `pnpm test`, `pnpm typecheck`, `pnpm smoke:package` pass.
246
+ - [x] Guide updated with completion status.
240
247
 
241
248
  #### Failure Protocol
242
249
 
@@ -252,7 +259,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
252
259
 
253
260
  **Goal:** Support authenticated app smoke tests without Sourcer-specific hacks.
254
261
  **Depends on:** Phase 1
255
- **Status:** Not started
262
+ **Status:** Complete
256
263
 
257
264
  #### Inputs
258
265
 
@@ -262,7 +269,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
262
269
 
263
270
  #### Outputs
264
271
 
265
- - Config schema supports a safe browser setup mechanism, such as route-level or browser-level `storageState`, `localStorage`, or `beforeNavigate` script.
272
+ - Config schema supports browser-level and route-level `setup.localStorage` / `setup.sessionStorage`.
266
273
  - Route runner applies setup before visiting a route.
267
274
  - Metadata records that setup was applied without logging sensitive values.
268
275
  - Docs include examples for non-secret test tokens and mock/test-mode auth.
@@ -280,38 +287,45 @@ Convert feedback into small, test-first package improvements. Prioritize improve
280
287
 
281
288
  #### Tasks
282
289
 
283
- - [ ] Design the smallest setup API and document rejected alternatives.
290
+ - [x] Design the smallest setup API and document rejected alternatives.
284
291
  - **Tool:** research/edit guide
285
292
  - **Verify:** decision recorded before implementation.
286
293
 
287
- - [ ] Add failing config tests for setup schema.
294
+ - [x] Add failing config tests for setup schema.
288
295
  - **Tool:** edit
289
296
  - **Verify:** `pnpm exec vitest run tests/unit/config.test.ts`
290
297
 
291
- - [ ] Add failing integration test proving localStorage/session setup before route navigation.
298
+ - [x] Add failing integration test proving localStorage/session setup before route navigation.
292
299
  - **Tool:** edit
293
300
  - **Verify:** `pnpm exec vitest run tests/integration/browser-contract.test.ts`
294
301
 
295
- - [ ] Implement setup support and metadata redaction.
302
+ - [x] Implement setup support and metadata redaction.
296
303
  - **Tool:** edit
297
304
  - **Verify:** focused tests pass.
298
305
 
306
+ #### Decision Notes
307
+
308
+ - Chosen API: `setup.localStorage` and `setup.sessionStorage` as string key/value maps at browser and route scope.
309
+ - Browser-level setup applies to every route; route-level setup extends or overrides browser-level keys.
310
+ - Rejected for this phase: arbitrary `beforeNavigate` script hooks because they are too broad and harder to make safe; `storageState` files because the current Sourcer need is simple seeded browser storage and key-only metadata.
311
+ - Report metadata records only storage key names, not values.
312
+
299
313
  #### Tests for This Phase
300
314
 
301
315
  | Test Type | What to Test | Exists? | Path / Command |
302
316
  |---|---|---|---|
303
- | Unit | Config schema accepts setup and rejects unsafe shapes | No → create | `tests/unit/config.test.ts` |
304
- | Integration | Route sees seeded storage before render | No → create | `tests/integration/browser-contract.test.ts` |
305
- | Redaction | Setup metadata does not leak token values | No create if metadata stores keys | `tests/unit/redaction.test.ts` |
306
- | Docs | Example compiles conceptually | Manual | `docs/configuration.md` |
317
+ | Unit | Config schema accepts setup and rejects unsafe shapes | Yes | `tests/unit/config.test.ts` |
318
+ | Integration | Route sees seeded storage before render | Yes | `tests/integration/browser-contract.test.ts` |
319
+ | Redaction | Setup metadata does not leak token values | Yes, integration metadata assertion | `tests/integration/browser-contract.test.ts` |
320
+ | Docs | Example compiles conceptually | Manual | `docs/configuration.md`, `docs/browser-contract.md` |
307
321
 
308
322
  #### Phase Exit Criteria
309
323
 
310
- - [ ] Auth setup can be expressed without real credentials.
311
- - [ ] Route runner applies setup before assertions.
312
- - [ ] Sensitive values are not printed in report metadata.
313
- - [ ] Sourcer can add one authenticated route without app-specific Reflection changes.
314
- - [ ] Full validation passes.
324
+ - [x] Auth setup can be expressed without real credentials.
325
+ - [x] Route runner applies setup before assertions.
326
+ - [x] Sensitive values are not printed in report metadata.
327
+ - [x] Sourcer can add one authenticated route without app-specific Reflection changes.
328
+ - [x] Full validation passes.
315
329
 
316
330
  #### Failure Protocol
317
331
 
@@ -327,7 +341,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
327
341
 
328
342
  **Goal:** Replace generic next steps with report suggestions derived from actual run results.
329
343
  **Depends on:** Phase 1
330
- **Status:** Not started
344
+ **Status:** Complete
331
345
 
332
346
  #### Inputs
333
347
 
@@ -356,15 +370,15 @@ Convert feedback into small, test-first package improvements. Prioritize improve
356
370
 
357
371
  #### Tasks
358
372
 
359
- - [ ] Add tests for suggested steps by result type.
373
+ - [x] Add tests for suggested steps by result type.
360
374
  - **Tool:** edit
361
375
  - **Verify:** `pnpm exec vitest run tests/unit/review-command.test.ts tests/unit/report-schema.test.ts`
362
376
 
363
- - [ ] Implement derived suggestions.
377
+ - [x] Implement derived suggestions.
364
378
  - **Tool:** edit
365
379
  - **Verify:** focused tests pass.
366
380
 
367
- - [ ] Update docs with examples of pass/fail/review suggestions.
381
+ - [x] Update docs with examples of pass/fail/review suggestions.
368
382
  - **Tool:** edit
369
383
  - **Verify:** docs mention dry-run update for visual review.
370
384
 
@@ -372,15 +386,15 @@ Convert feedback into small, test-first package improvements. Prioritize improve
372
386
 
373
387
  | Test Type | What to Test | Exists? | Path / Command |
374
388
  |---|---|---|---|
375
- | Unit | Derived suggestions for fail/review/pass | Partial → extend | `tests/unit/review-command.test.ts` |
389
+ | Unit | Derived suggestions for fail/review/pass | Yes | `tests/unit/report-schema.test.ts` |
376
390
  | Schema | Suggested step shape remains stable | Yes | `tests/unit/report-schema.test.ts` |
377
- | E2E | CI report has useful next steps | Partial | `tests/e2e/ci-mode.test.ts` |
391
+ | E2E | CI report has useful next steps | Yes | `tests/e2e/ci-mode.test.ts` |
378
392
 
379
393
  #### Phase Exit Criteria
380
394
 
381
- - [ ] No report emits the old generic implementation suggestion for consuming-project passes.
382
- - [ ] Review JSON remains parseable.
383
- - [ ] Full validation passes.
395
+ - [x] No report emits the old generic implementation suggestion for consuming-project passes.
396
+ - [x] Review JSON remains parseable.
397
+ - [x] Full validation passes.
384
398
 
385
399
  #### Failure Protocol
386
400
 
@@ -395,7 +409,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
395
409
 
396
410
  **Goal:** Make first-time setup easier while preserving read-only safety by default.
397
411
  **Depends on:** Phase 1
398
- **Status:** Not started
412
+ **Status:** Complete
399
413
 
400
414
  #### Inputs
401
415
 
@@ -406,7 +420,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
406
420
  #### Outputs
407
421
 
408
422
  - `reflection init --dry-run` detects package manager and prints proposed files/scripts.
409
- - Optional explicit `reflection init --write` can create minimal config after a later human-approved phase.
423
+ - `reflection init --dry-run` is read-only and refuses to write. Any future write mode must be explicit and separately approved.
410
424
  - Preset support starts explicit, for example `--preset vite-react`.
411
425
 
412
426
  #### Relevant Paths
@@ -421,15 +435,15 @@ Convert feedback into small, test-first package improvements. Prioritize improve
421
435
 
422
436
  #### Tasks
423
437
 
424
- - [ ] Add failing CLI tests for `init --dry-run`.
438
+ - [x] Add failing CLI tests for `init --dry-run`.
425
439
  - **Tool:** edit
426
440
  - **Verify:** `pnpm exec vitest run tests/unit/init-command.test.ts tests/unit/cli.test.ts`
427
441
 
428
- - [ ] Implement read-only dry-run with detected package manager and suggested commands.
442
+ - [x] Implement read-only dry-run with detected package manager and suggested commands.
429
443
  - **Tool:** edit
430
444
  - **Verify:** focused tests pass.
431
445
 
432
- - [ ] Document that `init --write` is not required for `0.0.1` consumers and must be explicit if added.
446
+ - [x] Document that `init --write` is not required for consumers and must be explicit if added.
433
447
  - **Tool:** edit
434
448
  - **Verify:** docs mention dry-run safety.
435
449
 
@@ -437,16 +451,16 @@ Convert feedback into small, test-first package improvements. Prioritize improve
437
451
 
438
452
  | Test Type | What to Test | Exists? | Path / Command |
439
453
  |---|---|---|---|
440
- | Unit | Dry-run output for pnpm repo | No → create | `tests/unit/init-command.test.ts` |
441
- | CLI | Command registration and invalid options | No → extend | `tests/unit/cli.test.ts` |
454
+ | Unit | Dry-run output for pnpm repo | Yes | `tests/unit/init-command.test.ts` |
455
+ | CLI | Command registration and invalid options | Yes | `tests/unit/cli.test.ts` |
442
456
  | Package smoke | New CLI still works installed | Yes | `pnpm smoke:package` |
443
457
 
444
458
  #### Phase Exit Criteria
445
459
 
446
- - [ ] `reflection init --dry-run` is read-only.
447
- - [ ] Output matches current package name `reflection-check`.
448
- - [ ] No repo files are mutated without `--write`.
449
- - [ ] Full validation passes.
460
+ - [x] `reflection init --dry-run` is read-only.
461
+ - [x] Output matches current package name `reflection-check`.
462
+ - [x] No repo files are mutated without `--write`.
463
+ - [x] Full validation passes.
450
464
 
451
465
  #### Failure Protocol
452
466
 
@@ -461,7 +475,7 @@ Convert feedback into small, test-first package improvements. Prioritize improve
461
475
 
462
476
  **Goal:** Make consuming-repo CI and visual baseline workflows obvious and hard to misuse.
463
477
  **Depends on:** Phases 1-3
464
- **Status:** Not started
478
+ **Status:** Complete
465
479
 
466
480
  #### Inputs
467
481
 
@@ -488,15 +502,15 @@ Convert feedback into small, test-first package improvements. Prioritize improve
488
502
 
489
503
  #### Tasks
490
504
 
491
- - [ ] Update CI docs around `pnpm add -D reflection-check` and `reflection run --ci`.
505
+ - [x] Update CI docs around `pnpm add -D reflection-check` and `reflection run --ci`.
492
506
  - **Tool:** edit
493
507
  - **Verify:** docs contain public package install path.
494
508
 
495
- - [ ] Add or update CI-mode e2e tests if command shape changes.
509
+ - [x] Add or update CI-mode e2e tests if command shape changes.
496
510
  - **Tool:** edit
497
511
  - **Verify:** `pnpm exec vitest run tests/e2e/ci-mode.test.ts`.
498
512
 
499
- - [ ] Improve baseline update dry-run messaging if needed.
513
+ - [x] Improve baseline update dry-run messaging if needed.
500
514
  - **Tool:** edit
501
515
  - **Verify:** `pnpm exec vitest run tests/integration/update-command.test.ts`.
502
516
 
@@ -504,15 +518,15 @@ Convert feedback into small, test-first package improvements. Prioritize improve
504
518
 
505
519
  | Test Type | What to Test | Exists? | Path / Command |
506
520
  |---|---|---|---|
507
- | E2E | CI report root and review | Yes | `tests/e2e/ci-mode.test.ts` |
508
- | Integration | Baseline update dry-run safety | Yes | `tests/integration/update-command.test.ts` |
521
+ | E2E | CI report root, docs, and review | Yes | `tests/e2e/ci-mode.test.ts` |
522
+ | Integration | Baseline update dry-run safety and messaging | Yes | `tests/integration/update-command.test.ts` |
509
523
  | Package | Public install smoke remains valid | Yes | `pnpm smoke:package` |
510
524
 
511
525
  #### Phase Exit Criteria
512
526
 
513
- - [ ] Consuming repo CI docs are copy-pasteable.
514
- - [ ] Baseline update process is clear and safe.
515
- - [ ] Full validation passes.
527
+ - [x] Consuming repo CI docs are copy-pasteable.
528
+ - [x] Baseline update process is clear and safe.
529
+ - [x] Full validation passes.
516
530
 
517
531
  #### Failure Protocol
518
532
 
@@ -537,20 +551,20 @@ Convert feedback into small, test-first package improvements. Prioritize improve
537
551
 
538
552
  **Unit done when:**
539
553
 
540
- - [ ] Focused tests pass.
541
- - [ ] `pnpm test`, `pnpm typecheck`, and `pnpm smoke:package` pass.
542
- - [ ] Public package docs remain accurate.
543
- - [ ] Guide updated.
554
+ - [x] Focused tests pass.
555
+ - [x] `pnpm test`, `pnpm typecheck`, and `pnpm smoke:package` pass.
556
+ - [x] Public package docs remain accurate.
557
+ - [x] Guide updated.
544
558
 
545
559
  ### Units
546
560
 
547
561
  | Unit | Status | Tests | Validation | Notes |
548
562
  |---|---|---|---|---|
549
- | Useful doctor | Not started | needed | | Highest value from Sourcer feedback |
550
- | Browser setup hooks | Not started | needed | | Enables authenticated Sourcer coverage |
551
- | Actionable next steps | Not started | needed | | Replaces generic report suggestion |
552
- | Init dry-run | Not started | needed | | Improves new project setup |
553
- | CI/baseline docs polish | Not started | partial | | Needed before broader use |
563
+ | Useful doctor | Complete | focused and full pass | full pass; publish dry-run passed for 0.0.3 | Highest value from Sourcer feedback |
564
+ | Browser setup hooks | Complete | focused and full pass | full pass; publish dry-run passed for 0.0.3 | Enables authenticated Sourcer coverage |
565
+ | Actionable next steps | Complete | focused and full pass | full pass; publish dry-run passed for 0.0.3 | Replaces generic report suggestion |
566
+ | Init dry-run | Complete | focused and full pass | full pass; package smoke verifies installed init | Improves new project setup |
567
+ | CI/baseline docs polish | Complete | focused and full pass | full pass; publish dry-run passed for 0.0.3 | Needed before broader use |
554
568
 
555
569
  ---
556
570
 
@@ -567,11 +581,11 @@ Convert feedback into small, test-first package improvements. Prioritize improve
567
581
 
568
582
  | Phase | What's Tested | Test Type | Exists? | Path |
569
583
  |---|---|---|---|---|
570
- | Phase 1 | Doctor config preflight | Unit/CLI | No | `tests/unit/doctor-command.test.ts`, `tests/unit/cli.test.ts` |
571
- | Phase 2 | Browser setup hooks | Unit/integration | No | `tests/unit/config.test.ts`, `tests/integration/browser-contract.test.ts` |
572
- | Phase 3 | Derived next steps | Unit/e2e | Partial | `tests/unit/review-command.test.ts`, `tests/e2e/ci-mode.test.ts` |
573
- | Phase 4 | Init dry-run | Unit/CLI | No | `tests/unit/init-command.test.ts`, `tests/unit/cli.test.ts` |
574
- | Phase 5 | CI/baseline docs and safety | E2E/integration | Partial | `tests/e2e/ci-mode.test.ts`, `tests/integration/update-command.test.ts` |
584
+ | Phase 1 | Doctor config preflight | Unit/CLI | Yes | `tests/unit/doctor-command.test.ts`, `tests/unit/cli.test.ts` |
585
+ | Phase 2 | Browser setup hooks | Unit/integration | Yes | `tests/unit/config.test.ts`, `tests/integration/browser-contract.test.ts` |
586
+ | Phase 3 | Derived next steps | Unit/e2e | Yes | `tests/unit/report-schema.test.ts`, `tests/e2e/ci-mode.test.ts` |
587
+ | Phase 4 | Init dry-run | Unit/CLI/package smoke | Yes | `tests/unit/init-command.test.ts`, `tests/unit/cli.test.ts`, `scripts/smoke-package-install.mjs` |
588
+ | Phase 5 | CI/baseline docs and safety | E2E/integration | Yes | `tests/e2e/ci-mode.test.ts`, `tests/integration/update-command.test.ts` |
575
589
 
576
590
  ### Full Validation Run
577
591
 
@@ -606,18 +620,18 @@ npm publish --dry-run --access public
606
620
 
607
621
  | Phase | Title | Status | Tests | Validation | Completed |
608
622
  |---|---|---|---|---|---|
609
- | Patch | Missing Baseline Promotion | In progress | focused pass | pending full | |
610
- | 1 | Useful `doctor --config` | Not started | | | |
611
- | 2 | Browser Setup Hooks for Authenticated Apps | Not started | | | |
612
- | 3 | Actionable Report Suggestions | Not started | | | |
613
- | 4 | Safe `reflection init --dry-run` | Not started | | | |
614
- | 5 | CI and Baseline Workflow Polish | Not started | | | |
623
+ | Patch | Missing Baseline Promotion | Complete | full pass | included in 0.0.3 candidate; publish dry-run passed | 2026-06-02 |
624
+ | 1 | Useful `doctor --config` | Complete | full pass | included in 0.0.3 candidate; publish dry-run passed | 2026-06-02 |
625
+ | 2 | Browser Setup Hooks for Authenticated Apps | Complete | full pass | included in 0.0.3 candidate; publish dry-run passed | 2026-06-02 |
626
+ | 3 | Actionable Report Suggestions | Complete | full pass | included in 0.0.3 candidate; publish dry-run passed | 2026-06-02 |
627
+ | 4 | Safe `reflection init --dry-run` | Complete | full pass | package smoke verifies installed init; publish dry-run passed | 2026-06-02 |
628
+ | 5 | CI and Baseline Workflow Polish | Complete | full pass | included in 0.0.3 candidate; publish dry-run passed | 2026-06-02 |
615
629
 
616
630
  ---
617
631
 
618
632
  ## 7. Post-Completion Checklist
619
633
 
620
- - [ ] All phases marked complete or skipped with reason.
634
+ - [x] All phases marked complete or skipped with reason.
621
635
  - [ ] Full validation suite passes.
622
636
  - [ ] `pnpm smoke:package` proves public install surface.
623
637
  - [ ] `npm publish --dry-run --access public` has no warnings.
@@ -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.2",
3
+ "version": "0.0.3",
4
4
  "description": "CLI for evidence-backed rendered UI validation.",
5
5
  "license": "MIT",
6
6
  "type": "module",