Skip to content

Category A: Skip present_report reviewer when DocBaker validation_report.json already passed #406

@sansari

Description

@sansari

Parent: #405

Problem

When the Presentation Expert generates a DocBaker HTML report, two layers of validation run back-to-back:

  1. DocBaker's own validation — headless Chrome renders the document, takes screenshots of every section and every chart, and writes a validation_report.json with status, errors, warnings, and a full screenshot list.
  2. deepwork:reviewer — "Review present_report output" — a separate agent is then spawned that re-reads those same screenshots to evaluate quality.

When validation_report.json shows "status": "pass" and "errors": [], the external reviewer adds no new information. It only re-confirms what the machine already verified.

Evidence

From session logs (sansari-terminal-may12.txt):

Review Time Tokens
Review present_report (first DocBaker pass) 4m 6s 50.7k
Review updated present_report (second DocBaker pass) 3m 39s 47.5k

Both ran immediately after DocBaker reported "status": "pass". The GSC report was run through DocBaker twice (after user edits), so this pattern consumed ~8 minutes for a single report.

Proposed fix

Before spawning the present_report reviewer, check validation_report.json:

if validation_report["status"] == "pass" and validation_report["errors"] == []:
    # skip reviewer, mark step as passed directly
    mark_review_as_passed(review_id)
else:
    # run reviewer normally
    spawn_reviewer(...)

If validation_report.json is absent or shows errors/warnings, fall through to the full reviewer as today.

Quality preservation

Full reviewer still runs when:

  • DocBaker validation failed or produced warnings
  • validation_report.json is missing
  • The report format is not DocBaker (Slidev, plain Markdown, etc.)

The reviewer is only skipped when the machine validator already issued a clean pass — the case where it adds the least marginal value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions