Chapter 8 — The Shared Layer
Version house rules, pin shared copies and detect drift without overwriting local rules.
Felix Reyes · The Skills Pack · First edition, 2026 · CC BY 4.0 · Router
Step 8, Route and share, has two halves. Chapter 7 built the first: a router that sends each request to one leaf and lists the shared files to read with it. This chapter builds the second, sharing: a rule is written once in a house skill, and a tool keeps every pack’s copy identical to a released version. A run’s trace tokens show that the copy reached the model.
InterStationary has three house skills: the executive voice, the source trace and the company branding. A fourth skill in the shared layer, the Forecast and Planning pack’s driver model, is pack-local. Your company’s rules will differ, but the test for a house skill is the same: a rule two packs share belongs in a house skill.
House skills and pack-local skills
Chapter 1 moved the voice and the source trace out of the revenue-bridge leaf into _shared/, and Chapter 7 put them in the router’s Then read column. A skill in the shared layer is read, not triggered: its description says so (Appendix A, 3.5.1). At least one row of the routing table must list it, and the validator refuses a pack where none does.
Every leaf of all four packs reads the voice, sixteen leaves in all, and each pack ships its own copy, because a pack installs as one folder (Chapter 7). Four copies of one file drift apart: a team that tightens a rule in its copy changes only its own notes, and after a few such edits the four packs no longer sound like one company.
Figure — text equivalent.
Upstream house/ contains VERSION 2.0.0, releases/2.0.0.json, executive-voice, source-trace and company-branding. sync_house.py copies pinned rules into each pack's _shared/ and records house.lock. Management-reporting takes all three; variance-bridge, close-reconciliation and forecast-planning take executive-voice and source-trace. Forecast-planning's driver-model is pack-local: it is in no house lock and is never synced. Vendor-rebates remains pinned at 1.0.0, one MAJOR behind; it is left alone until explicit --adopt.
The house skills at house 2.0.0. Canonical copies in house/, released at a version; each pack pins a release and keeps the copies its lock lists. The sync writes the four packs on 2.0.0 and leaves the capstone’s pack on 1.0.0 alone; the pack-local driver-model is in no lock and is never synced.
A skill that more than one pack reads has one canonical copy in house/<name>/, at the root of the companion repository, and that copy is a house skill (Figure 8.1). The house has a version of its own in house/VERSION. Each release has a manifest, house/releases/<version>.json, with the sha256 of every house file, so anyone can check a copy against a release without the repository’s history. A pack pins the release it copies in its router, house: "interstationary/2.0.0", beside its own version. Its house copies are listed in _shared/house.lock, the house lock: the house line, then one line per file with its hash. Any _shared/ folder the lock does not list is a pack-local skill, and the Forecast and Planning pack’s driver model is one. Only the capstone’s reference pack (Section 13.6) still pins 1.0.0, inside the lag window Section 10.3 describes.
Here is the Variance and Bridge pack’s lock:
File: packs/variance-bridge/_shared/house.lock (lines 1–4).
# The house copies in this _shared/ folder. Any other folder here is pack-local.
house: interstationary/2.0.0
executive-voice/SKILL.md sha256:3c5b0db36047bcc46daba4539b0716088c5bfc8d415c967573406148b9057cfe
source-trace/SKILL.md sha256:7fbf79c7b038a274f7926cd07a166ff74a3dc8d2a36d217825192479e5e50c9d
The routing table keeps every house copy one hop from the router, so the model reads it with the leaf, before it writes (Chapter 7). A house skill never refers to another skill in the shared layer, and a leaf may repeat the shared files its row lists but never adds one (Appendix A, 3.5.2). The validator checks only that a listed path exists, so the reviewer enforces that rule. A brand file adds no hop: the model reads the company-branding skill file and stops there, and brand.json reaches the deck through build_deck.py.
Executive voice
Section 1.6 printed the voice’s six rules, and the house copy has them unchanged. Here are the Drivers and the Watch list of the executive summary a host wrote for FY2025 at version 1.0.0. Version 2.0.0 changed how the leaf prints amounts, but every figure in these lines prints the same there.
File: runs/20261004-0335-repeat-management-reporting-claude-sonnet-5-5/exec-summary-fy25/claude/r1/output/exec-summary.md (lines 21–26).
## Drivers
- Revenue: ($362K), unfavourable for the year. The shortfall is the main reason operating income missed budget.
- Cost of goods sold: $196K, favourable for the year. It offset part of the revenue miss, but gross margin still fell short.
- Salaries and wages: ($38K), unfavourable for the year.
- Freight out: ($29K), unfavourable for the year.File: runs/20261004-0335-repeat-management-reporting-claude-sonnet-5-5/exec-summary-fy25/claude/r1/output/exec-summary.md (lines 27–32).
## Watch list
- Days sales outstanding: 51.2 days against a target of 45.0 days; months off target: 3.
- On-time delivery percent: 93.3% against a target of 95.0%; months off target: 3.
- Active customers: 40 against a target of 42; months off target: 2.
What is driving the revenue shortfall in Q1 and Q3, and does the data show whether it was volume, price or customer losses?Table 8.1 sets the note against each rule. Three rules have a check behind them, two of those only in part. The leaf’s contract requires a one-sentence Headline that gives the year’s revenue and operating income against budget as display strings, so the contract check enforces the first rule. The provenance check compares each figure with the display strings, parentheses included, so a positive figure set alone inside them fails unless the script printed that string (Section 6.5). binding covers the names in the fifth rule and cannot see a cause. On this note it recorded 11 of 13 figures in 8 bullets and sentences belong to one record or scope, and each sits with its name.
The FY2025 executive summary against the six voice rules.
| Rule | Where the note follows it | Checked by a program? |
|---|---|---|
| Lead with the answer | Headline: one sentence; revenue and operating income, each against budget | Yes: contract (one sentence, five display strings) |
| Sentences under 25 words | Longest: the closing question, 23 words; longest bullet sentence, 15 | No |
| Size words carry their figure | Each bullet gives its name and figure first; no size word stands without a figure | No |
| Negatives as printed; parentheses for nothing else | Three negatives, as the script prints them; the Watch list’s figures and counts stand bare | Partly: provenance, and the contract’s table cells |
| Name customers and movements; no causes the data does not show | Lines and KPIs named as the display block prints them. One bullet calls the revenue shortfall “the main reason” operating income missed budget: an inference from the table, stated as known; the reviewer’s catch | Partly: binding, for the name beside each figure; never for a cause |
| Known, estimated, inferred and unknown kept apart; no hedge or filler | Every figure is the script’s, stated plainly; the closing question says what the data would show; the inference above is not marked as one | No |
Rules 2, 3 and 6 are the reviewer’s, and so are the parts of rules 4 and 5 that no check covers. The checks matched every figure to a display string. The reviewer still reads the whole note for what no check can see (Section 9.1). Rule 4 was tightened after a run wrote two positive biases in parentheses as an aside and the provenance check failed the note (Section 9.6).
Exercise 8-1. Audit each bullet above against the six rules. Mark any line a reviewer could still object to, and say which rule it strains.
Exercise 8-2. In a scratch copy of the companion repository, add a seventh rule to house/executive-voice/SKILL.md: “Name the period in the headline.” Which house increment does it need, and what does the sync tool say before the release? List every pack fixture and every check that would have to change before a check tests it.
Source trace
Chapter 1 printed the source trace’s four rules, which govern where a note’s figures come from. Each has a check behind it, within the limits Chapter 6 marked, and the leaf’s output contract says where in the note it applies.
The first rule, every figure copied exactly from a script’s output, is the provenance check, a figure allowlist. A figure the model rounded or added up is not in the list, and neither is a number the script never printed, which the third rule forbids. The allowlist cannot say which name a figure sits beside, so the binding check backs it up for a figure that belongs to one name. Both checks treat a code that begins with letters as a name and skip it, so the reviewer compares account codes and IDs written that way by eye.
The second rule, and the third rule’s hash, are checked in the Data notes section: the contract check requires the input’s file name, its row count and the twelve-character hash in backticks, exactly as the display block’s input block prints them (display.input, or display.inputs for several files).
The fourth rule is enforced before the note is written: every script in the four packs checks an identity and exits 3 when it fails, the router’s second rule tells the model to report the error and stop, and after the run script_identity and independent_identity recompute the identity from the result and from the raw input (Chapter 9).
Exercise 8-3. Copy the Chapter 1 run’s files to a scratch folder (examples/renders/bridge-note/commands.txt gives the run), cut the hash in the Data notes line to 11 characters and run the pack’s checks. What do contract and provenance report, and what with 13 characters?
Company branding
The voice and the source trace are rules a model applies while it writes. Branding is mostly values: the company name, the footer, colours, fonts, number formats, table and chart rules, and file names. A script applies some and the model the rest.
Only the Management Reporting pack has this skill, and its router lists company-branding in all four rows. The skill file opens with the paragraph Chapter 5 printed: the values live in assets/brand.json, scripts read that file, and the model never retypes a colour, a font or a format. Six short sections follow with the rules for a name, a table, a chart or a file name. Appendix B prints both files.
One script in the four packs opens the file: the deck leaf’s build_deck.py, which walks up from its own folder to the first one that contains _shared/ (Chapter 5), so it finds the file in both shapes. Before it builds anything it requires the eight keys BRAND_KEYS lists. A missing one ends the run with exit 2 and a line that says which: error: brand file has no ’file_naming.deck’.
No script reads the numbers block. The block states the money rule, the display functions of every pack on house 2.0.0 implement it, and the repository test tests/test_shared_sync.py requires the two to agree. A new colour is one edit in house/, a house release and a sync into the pack (Section 8.5). A new money rule is the same three steps and an edit to every script’s fmt_k.
Keeping copies in step
The four packs contain nine copies of the three house skills. The sync tool, tools/sync_house.py, keeps them in step: house/ is upstream, the packs’ copies downstream. With no flags (make sync) it copies, into every pack pinned to the current release, the house skills that pack’s lock lists, and rewrites the lock. --check compares every copy with its lock and every lock with the release manifest its pack pins, writes nothing, and exits 1 on drift, a clash or a pin with no manifest. On the repository as it ships:
File: examples/ch08/outputs/sync-check-clean.txt (lines 1–3).
$ python3 tools/sync_house.py --check
packs/forecast-planning: _shared/driver-model is pack-local (not in house.lock); left alone
lag: answers/capstone/vendor-rebates pins interstationary/1.0.0; house is at 2.0.0, 1 MAJOR behind, inside the lag window until the sunset date the central team sets
File: examples/ch08/outputs/sync-check-clean.txt (lines 4–5).
house skills: every copy matches its house.lock and every lock its release (house 2.0.0); 1 pack behind 2.0.0
exit 0
The lag line comes from the edition’s one house release since 1.0.0. House 2.0.0 changed company-branding’s money rule: every amount in $K with separators, so $11.2M became $11,238K. A rule change that changes deliverables is a house MAJOR (Appendix A, 7.6). The central team edited house/, set VERSION to 2.0.0 and ran --release, which wrote house/releases/2.0.0.json. Until that file exists the sync writes nothing. The tool refuses a bump smaller than the change it can see, a house skill removed (MAJOR) or added (at least MINOR). It cannot see that a rule changed, so the MAJOR was the central team’s call.
The four packs adopted the release in two steps with --adopt, which rewrites a pack’s pin, copies and lock. A house MAJOR is a pack MAJOR (Appendix A, 7.3), so each adoption was a MAJOR release with runs of its own. Variance and Bridge, Management Reporting and the Chapter 1 stage went first, the two packs from 1.1.0 to 2.0.0 and the stage from 1.0.0. Close and Reconciliation and Forecast and Planning followed, 1.1.0 to 2.0.0 each. The reconciliation review’s GL and subledger totals had both printed as $1.2M; at 2.0.0 they print $1,203K and $1,242K. In each step one pack had cases held (three, then one) and went to a PATCH; Section 11.6 records the runs. The capstone’s reference pack (Section 13.6) is still on 1.0.0. The check reports it as lagging, exits 0, and the sync does not write it. How long a pack may stay there is the lag window of Section 10.3. In a scratch copy, adopting it copies nothing new and still asks for a MAJOR:
$ python3 tools/sync_house.py --adopt answers/capstone/vendor-rebates
...
answers/capstone/vendor-rebates: bump pack-version at least a MAJOR (house 1.0.0 -> 2.0.0; spec 7.6)
The tool prints the smallest bump that will do and leaves the owner to make it: move the version, then run the cases again.
In a scratch copy, one edit to the Variance and Bridge pack’s source-trace turns the first rule’s “delete it” into “flag it”, a softer rule one team might prefer. The check reports:
File: examples/ch08/outputs/sync-check-drift.txt (lines 4–7).
packs/forecast-planning: _shared/driver-model is pack-local (not in house.lock); left alone
drift: packs/variance-bridge/_shared/source-trace: differs SKILL.md
house skills: drift found; run make sync (or --adopt for a pack whose lock is missing)
exit 1
The report gives the pack, the skill and the file. A diff against house/ shows the line. make validate runs this check before it validates a single pack, and the validator fails the edited copy on its own (spec 3.5.5: differs from its sha256 in house.lock). Run without --check, the tool restores the copy.
A pack-local folder with a house skill’s name stops the tool before it writes anything. In a scratch copy, a folder named company-branding under the Variance and Bridge pack’s _shared/, which its lock does not list, ends the sync with:
$ python3 tools/sync_house.py
error: clash: house/company-branding (interstationary/2.0.0) and packs/variance-bridge/_shared/company-branding share a name; the pack's folder is not in house.lock, so it is pack-local. Rename it, or make it an exact copy and run --add company-branding variance-bridge
error: nothing written
exit 1
A sync that matched folders by name would have overwritten it, since only the lock tells a pack-local folder from a house copy.
Both check reports above list driver-model, the planning model three Forecast and Planning leaves read and no other pack uses. No lock lists it, so it is pack-local: the sync never writes it, and it changes only with its pack (Appendix A, 3.5.4).
A note that follows the voice does not show that the voice was read. The evidence that the house copies reached the model is the trace check on the case’s reads list: the Chapter 1 case requires the router, the leaf and its two house copies, and the run on each primary model recorded 4/4 required files read (Table 1.1). When a row gains a house skill, the leaf’s test case gains it in reads, and a run that skips the file fails.
Exercise 8-4. In a scratch copy of the companion repository, add a line to house/executive-voice/SKILL.md that tells the model to read _shared/driver-model/SKILL.md. Release the house, adopt each pack and validate all four. Which packs fail, and on which rule? In the pack that passes, which test case’s trace tokens could show the extra read, and how would its sentinels line say so?
Exercise 8-5. In a scratch copy, copy the Forecast and Planning pack’s _shared/driver-model/ to house/driver-model/ and run the check. What does it report, and why is it not a clash? Then say what --release and --adopt would each have to do, and what stops --adopt, before driver-model is a house skill.
Exercise 8-6. Why does the runner plant an HTML comment and never ask the model to repeat it? What would a token found in the note, rather than in the transcript, tell you?