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.
- package/dist/cli.js +11 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts +2 -1
- package/dist/commands/doctor.js +109 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.js +59 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/run.js +1 -2
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/update.js +5 -0
- package/dist/commands/update.js.map +1 -1
- package/dist/contracts/browser/browser-contract.d.ts +2 -1
- package/dist/contracts/browser/browser-contract.js +2 -1
- package/dist/contracts/browser/browser-contract.js.map +1 -1
- package/dist/contracts/browser/route-runner.d.ts +6 -0
- package/dist/contracts/browser/route-runner.js +42 -1
- package/dist/contracts/browser/route-runner.js.map +1 -1
- package/dist/core/config.d.ts +8 -0
- package/dist/core/config.js +11 -2
- package/dist/core/config.js.map +1 -1
- package/dist/core/report-schema.d.ts +11 -10
- package/dist/core/report-schema.js +47 -1
- package/dist/core/report-schema.js.map +1 -1
- package/docs/agent-workflows.md +13 -5
- package/docs/browser-contract.md +31 -0
- package/docs/ci.md +11 -1
- package/docs/configuration.md +26 -0
- package/docs/getting-started.md +17 -3
- package/docs/plans/reflection-dogfood-feedback-implementation-guide.md +100 -86
- package/docs/validation-process.md +16 -7
- package/package.json +1 -1
|
@@ -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-
|
|
22
|
-
**Current phase:**
|
|
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
|
|
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
|
-
- [
|
|
161
|
-
- [
|
|
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
|
-
- [
|
|
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
|
|
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:**
|
|
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
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
212
|
+
- [x] Implement config-aware doctor output.
|
|
213
213
|
- **Tool:** edit
|
|
214
214
|
- **Verify:** focused doctor tests pass.
|
|
215
215
|
|
|
216
|
-
- [
|
|
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
|
-
- [
|
|
220
|
+
- [x] Update docs to describe doctor as a config-aware preflight.
|
|
221
221
|
- **Tool:** edit
|
|
222
|
-
- **Verify:**
|
|
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 |
|
|
229
|
-
| CLI | `reflection doctor --config` exit behavior |
|
|
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
|
-
- [
|
|
236
|
-
- [
|
|
237
|
-
- [
|
|
238
|
-
- [
|
|
239
|
-
- [
|
|
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:**
|
|
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
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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 |
|
|
304
|
-
| Integration | Route sees seeded storage before render |
|
|
305
|
-
| Redaction | Setup metadata does not leak token values |
|
|
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
|
-
- [
|
|
311
|
-
- [
|
|
312
|
-
- [
|
|
313
|
-
- [
|
|
314
|
-
- [
|
|
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:**
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
377
|
+
- [x] Implement derived suggestions.
|
|
364
378
|
- **Tool:** edit
|
|
365
379
|
- **Verify:** focused tests pass.
|
|
366
380
|
|
|
367
|
-
- [
|
|
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 |
|
|
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 |
|
|
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
|
-
- [
|
|
382
|
-
- [
|
|
383
|
-
- [
|
|
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:**
|
|
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
|
-
-
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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 |
|
|
441
|
-
| CLI | Command registration and invalid options |
|
|
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
|
-
- [
|
|
447
|
-
- [
|
|
448
|
-
- [
|
|
449
|
-
- [
|
|
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:**
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
514
|
-
- [
|
|
515
|
-
- [
|
|
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
|
-
- [
|
|
541
|
-
- [
|
|
542
|
-
- [
|
|
543
|
-
- [
|
|
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 |
|
|
550
|
-
| Browser setup hooks |
|
|
551
|
-
| Actionable next steps |
|
|
552
|
-
| Init dry-run |
|
|
553
|
-
| CI/baseline docs polish |
|
|
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 |
|
|
571
|
-
| Phase 2 | Browser setup hooks | Unit/integration |
|
|
572
|
-
| Phase 3 | Derived next steps | Unit/e2e |
|
|
573
|
-
| Phase 4 | Init dry-run | Unit/CLI |
|
|
574
|
-
| Phase 5 | CI/baseline docs and safety | E2E/integration |
|
|
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 |
|
|
610
|
-
| 1 | Useful `doctor --config` |
|
|
611
|
-
| 2 | Browser Setup Hooks for Authenticated Apps |
|
|
612
|
-
| 3 | Actionable Report Suggestions |
|
|
613
|
-
| 4 | Safe `reflection init --dry-run` |
|
|
614
|
-
| 5 | CI and Baseline Workflow Polish |
|
|
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
|
-
- [
|
|
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 #
|
|
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
|
|
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
|
```
|