tiny-corpus-workbench

Learning-first document preparation

Prepare documents without losing the evidence.

Understand the path from a raw source to an inspectable prepared revision. Read the principles, then follow the same lifecycle in a local workbench.

Why preparation comes first

Raw documents are not yet trustworthy corpus material.

Extraction creates a useful representation, but it can also expose layout noise, structural traps, and ambiguous text. Preparation makes those conditions visible before downstream systems inherit them.

01

Extraction changes representation

Compare independent views and keep the original source identity attached.

02

Quality needs evidence

Record concrete findings and affected document items before proposing a change.

03

Change needs authority

Keep diagnosis separate from the human decision to approve or reject a refinement.

2independent extraction views
4document lifecycle stages
10deterministic diagnosis rules
3ways to learn the same core

What makes this workbench different

01

Evidence is the lesson

The project exposes sources, extraction views, findings, decisions, revisions, and corpus reports instead of hiding them behind one result.

02

One core, three ways in

The guides, Workbench, and CLI teach the same project-owned lifecycle rather than separate demo paths.

03

Human authority stays explicit

Diagnosis can identify a condition, but only a recorded approve or reject decision resolves a proposal.

04

History is not overwritten

Each approved change creates a new prepared revision and preserves the evidence behind it.

One inspectable lifecycle

Evidence identifies a condition. You decide whether the document changes.

01Raw source
02Extraction views
03Diagnosis
04Decision
05Prepared revision
06Corpus insight

Three learning interfaces

Read the principles. Practice the path. Inspect every record.

Each interface serves a different learning need while using the same document lifecycle.

Read

Learning Guides

Learn why each preparation step exists and what evidence it produces.

Practice

Local Workbench

Explore guided documents through Observe, Diagnose, Refine, and Revision.

Inspect

Corpus CLI

Run the complete lifecycle and verify the records yourself.

Real preparation evidence

A finding becomes understandable when you can follow its change.

The guided whitespace example connects one diagnosis rule, one supported refiner, one explicit decision, and one immutable revision.

D009 · NORMALIZABLE_WHITESPACEMEDIUM

Whitespace can be normalized deterministically.

The finding identifies the exact affected content. R001 proposes only the supported mechanical change.

Proposed comparison
Quarterly reportQuarterly report
✓ ApproveRejectRecord decision

The local Workbench

Make the lifecycle visible before asking the learner to move forward.

Start from a guided fixture or a supported local document. Inspect extraction, run diagnosis, review one supported proposal, record a decision, and follow the prepared revision without editing JSON.

Corpus Workbench Observe stage showing extraction results and stage-scoped evidence
Observe: compare two extraction views and inspect the canonical working document before diagnosis.

Question-led stages

Observe, Diagnose, Refine, and Revision each answer one learner question.

Focused evidence

Summary, Evidence, and Artifacts stay scoped to the current stage and round.

Readable decisions

Before-and-after comparisons make approve and reject choices concrete.

Trust and control

Keep evidence inspectable and people in control.

The project treats evidence and authority as different things. That distinction stays visible in the records and the interfaces.

Evidence stays inspectable

Preserve the record behind every result.

Original sources, extraction artifacts, findings, proposals, decisions, transformations, hashes, and revisions remain available for inspection.

People retain authority

A finding does not approve a change.

Diagnosis identifies a condition. A supported proposal changes the document only after an explicit human decision.

Inspectable outputs

See what each stage produced.

The workbench does not hide the preparation path behind one final document. Each stage leaves a focused record that can be read and verified.

Observationsource + extraction views
Diagnosisfindings + evidence
Refinementproposal + decision
Prepared revisioncontent + history
Corpus reportmembers + aggregate evidence

A direct CLI

Run the same mechanics command by command.

The CLI is the complete, compact interface for learners who want to repeat a lifecycle, inspect raw output, or verify published records directly.

$ corpus observe fixtures/refinement/whitespace-cleanup.md $ corpus diagnose OBSERVATION_DIRECTORY $ corpus draft-refinement DIAGNOSIS_DIRECTORY \ --finding FINDING_ID --base OBSERVATION_DIRECTORY \ --output proposal.json $ corpus resolve-refinement proposal.json \ --diagnosis DIAGNOSIS_DIRECTORY \ --base OBSERVATION_DIRECTORY --approve $ corpus verify-refinement REFINEMENT_DIRECTORY

A deliberate boundary

Stop at a prepared revision.

Chunking, embeddings, indexing, retrieval, generation, and RAG evaluation remain downstream. This project stays focused on making document preparation understandable and inspectable.