# Experience articles: small runnable examples

These are synthetic teaching fixtures, not the author's private experiment data.
They use Python 3.11+ and the standard library; no LLM, credentials or cloud service is needed.

Download these files into one local directory:

- [wiki_pipeline.py](./wiki_pipeline.py): bounded source scan, common page renderer and section contract.
- [stage_trace.py](./stage_trace.py) and [stage-trace-synthetic.csv](./stage-trace-synthetic.csv): full-query denominator example.
- [check_changed_file.py](./check_changed_file.py): optional Claude Code PostToolUse script for an ESLint-configured project.
- [synthetic-sop.svg](./synthetic-sop.svg) and [synthetic-sop.canonical.json](./synthetic-sop.canonical.json): a drawn source page and its intended structure, not measured OCR output.
- [metadata-walkthrough.json](./metadata-walkthrough.json): one synthetic document from raw fields to an exact search filter.
- [hermes-evaluation-template.csv](./hermes-evaluation-template.csv): an empty evaluation form. It contains no measured improvement.

```bash
mkdir source-demo
printf 'Retries stop after three attempts.\n' > source-demo/policy.md
python3 wiki_pipeline.py source-demo
python3 stage_trace.py stage-trace-synthetic.csv
```

The retrieval example reports 2 top-five hits out of 3 total queries. Missing ranks stay in the denominator.
The scanner keeps up to 64 KiB of text per accepted file while hashing full contents in blocks.
It rejects files larger than 16 MiB and more than 1000 accepted files, and excludes generated directories and symlinks.
Read an immutable, trusted snapshot; these checks are not an OS sandbox or protection against concurrent path replacement.

The renderer uses Summary, Claims, Evidence and Related for all three MVP kinds. Production schemas
with decision/runbook-specific sections must extend both the proposal and renderer/validator together.
Generated pages remain review candidates. These examples do not establish citation entailment or sanitize arbitrary HTML.

In the blog repository, run:

```bash
node --test tests/experienceExamples.test.mjs
```

Tests cover late-file hash changes, bounded reads, excluded/symlink paths, render/validate agreement,
broken evidence references, lint failure propagation, outside-root rejection and full-set metric denominators.
They do not test an OCR engine, a real Claude Code hook load, Temporal recovery, a provider API or a deployed family app.
