Skip to content

Build the vertical generator and the first vertical - #39

Merged
cbrock84 merged 2 commits into
mainfrom
claude/import-agents-drive-gmci3h
Sep 16, 2026
Merged

cbrock84 merged 2 commits into
mainfrom
claude/import-agents-drive-gmci3h

Conversation

@cbrock84

Copy link
Copy Markdown
Owner

Roadmap item 10 — the last open item — and the industrial vertical it was built to emit.

D8 resolved the vertical architecture to template-plus-generator with one-way emit. This is that generator, plus one real config proving it end to end.

python3 scripts/build-vertical.py industrial            → dist/headcount-industrial/
python3 scripts/build-vertical.py --all --verify         what CI runs

What a vertical may do

Add a skill verticals/<slug>/skills/<dept>/<skill>/SKILL.md
Extend a core skill verticals/<slug>/context/<dept>/<skill>.md
Drop a department [emit] exclude_departments

It may not edit a core skill in place. A core skill that is wrong for every industry is wrong in the core, and fixing it there is what reaches every vertical on its next emit — which is the whole reason for generating rather than forking.

Skills and extensions are discovered on disk, never listed in the config. A list is a second place to forget, and a file added to the directory but not the list would be silently dropped from every emit. That is the failure the README generator already guards against for departments.

Extensions splice in ahead of the skill's ## Never block rather than appending. Every skill closes with its rules, and material after them reads as an afterthought.

Guardrails, each verified by making it happen

What goes wrong What the emit says
A vertical skill shadows a core skill's name would shadow a core skill of the same name — a vertical adds skills, it does not replace them
An extension targets a skill that does not exist extends a skill that does not exist
A vertical targets a dropped department targets department 'people', which is not emitted
A vertical skill fails the core validators the emitted repository fails its own checks, and the emit fails

The last row is the important one. The core checkers glob plugins/**, which verticals/** is not, so a thin description or a dangling dept:skill reference in a vertical skill is caught when the emitted repository runs those same checks against itself. Nothing ships unchecked; the failure just names the emitted path.

Where the output lives — D36

Every other generated artifact here is committed and --checked against the generator. Doing that for a vertical would commit a second copy of the whole tree, and — decisively — put a hand-editable copy of one-way generated output in front of every contributor, which is the one thing the architecture forbids. A --check failure would read as "the copy is stale" long after someone had edited it.

So the emit target is gitignored, and verification replaces the stored copy: emit to a temporary directory, initialize it the way a consumer's clone would be, run the emitted repository's own checks, keep nothing. CI runs it on every push.

The invariant worth holding is that the generator produces a sound repository, not that a stored copy matches it.

The emitted repository carries seven of the checks. The three that verify generated documents stay upstream, because its README is written by this generator and a "README is current" check downstream would be verifying the wrong one.

The first vertical

Industrial, chosen because it is the one that can be checked against reality. D10 records the operating businesses behind this repository as production work, and D7 resolved that verticals are built for own use before they are productized. A vertical nobody in the room can judge is a vertical whose quality nobody can judge.

Four skills the core leaves out on purpose — the industry-specific management occupations D30 explicitly deferred to the verticals:

Skill
operations:production-management Sequence as the decision, work in process as the lead time, changeover as recoverable capacity, and why OEE on a non-bottleneck is noise
operations:maintenance-and-reliability Ranking by consequence rather than age, why scheduled replacement makes non-wearing components worse, and the planned-work backlog as the leading indicator
operations:ehs-and-workplace-safety The control hierarchy as a ranking by how much it depends on a person under pressure, the three recordability thresholds and their clocks, and why an injury rate tied to a bonus buys silence
people:labor-and-union-relations Past practice as part of the agreement, the grievance clock, what a supervisor's offhand remark costs, and bargaining obligations that do not wait for negotiations

Five core skills gain a plant-floor section — capacity (the constraint is one resource, not an average), supply chain (inbound materials behave differently from finished goods), quality (inside a certified system), regulatory compliance (regulators who arrive in person), and employment compliance (hourly, shift and agency work).

Emitted: 16 departments, 176 skills, passing the emitted repository's own checks.

Ownership

verticals/** is a new surface with its own owner, and the second row marked proposes. A change inside a department is wrong in one department of one repository. A change inside a vertical is emitted into a distributable repository carrying industry-specific advice, and because the emit is one-way, nothing downstream can correct it locally.

The generator itself stays with repo-meta alongside the other scripts. Writing industry advice and maintaining the tool that ships it are different jobs.

Two riders

A British spelling was shipping while the checker reported clean. The word list carried the -ed, -ing and -able forms of one verb but not its third-person form — the same inflection gap that hid the last one. I audited the whole list for that class by generating every plausible inflection of all 126 entries and grepping the tree: this was the only remaining hit. Fixed in the prose and in the checker.

The two whole-tree checkers were scanning generated output. check-us-english.py and check-provenance.py walk the working tree, so once dist/ existed they reported every finding twice, against a path nobody can fix. Both now skip it.

Verification

./scripts/check-all.sh — all eleven green, including the new one. The emitted repository passes its own seven.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FaQP2WCqeFYH7s9pi1CJ5u


Generated by Claude Code

Roadmap item 10, the last open item, and the industrial vertical it was built
to emit. D8 chose template-plus-generator over overlays; this is that generator
plus one real config proving it end to end.

The generator. A per-vertical config plus the core emits a standalone
repository. A vertical may add skills, extend a core skill in place, or drop a
department; it may not edit a core skill, because a core skill that is wrong for
every industry is wrong in the core and fixing it there is what reaches every
vertical on the next emit. Skills and extensions are discovered on disk rather
than listed in the config, so a file added to the directory cannot be silently
dropped from every emit — the failure the README generator already guards
against for departments. Four ways to get it wrong fail the emit by name:
shadowing a core skill, extending one that does not exist, targeting a dropped
department, and a slug that disagrees with its directory.

Extensions splice in ahead of the skill's rules rather than appending, because
every skill closes with its rules and material after them reads as an
afterthought.

Where the output lives is D36. Committing it would put a hand-editable copy of
one-way generated output in front of every contributor, which is the one thing
the architecture forbids, so the emit target is gitignored and verification
replaces it: emit to a temporary directory, initialize it the way a consumer's
clone would be, run the emitted repository's own checks, keep nothing. CI runs
that on every push. The invariant worth holding is that the generator produces a
sound repository, not that a stored copy matches it.

The first vertical is industrial, chosen because it is the one that can be
checked against reality — the operating businesses behind this repository do
production work, and a vertical nobody in the room can judge is a vertical whose
quality nobody can judge. Four skills the core leaves out on purpose: production
scheduling, maintenance and reliability, safety as a regulated obligation, and
the employment relationship on a represented shop floor. Five core skills gain a
plant-floor section. 176 skills emitted, and the emitted repository passes its
own seven checks.

Vertical content is a new surface with its own owner, and the second row marked
proposes. A change inside a department is wrong in one department of one
repository; a change inside a vertical ships to a distributable repository
carrying industry advice that nothing downstream can correct locally. The
generator stays with the other scripts — writing industry advice and maintaining
the tool that ships it are different jobs.

Two riders. A British spelling was shipping while the checker reported clean:
the word list carried the -ed, -ing and -able forms of one verb but not its
third-person form, the same inflection gap that hid the last one. Fixed in both
places. And the two whole-tree checkers were scanning generated output, which
doubled every finding and reported it against a path nobody can fix.

All eleven checks pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaQP2WCqeFYH7s9pi1CJ5u
A skill states what a competent practitioner knows. It cannot state what the
regulator published last month — it is written once and the obligation moves.
This maps outside authorities to the skills whose answers they settle, and puts
each skill's list where an agent reads it while answering.

The ask was framed as open-source or permissively licensed sources.
Investigating that turned out to be the decision. Most of what a professional
must cite is not open: the standards named as examples are variously sold,
copyrighted, or free only behind an account. What is freely usable is narrower
and more valuable than it looks — federal works are public domain by statute,
statutes and regulations are uncopyrightable as government edicts, and EU legal
texts are reusable with attribution.

So the catalog is references, never copies, and the license class is its
load-bearing field. Three of the ten values exist to mark exactly the sources
most often assumed open and not; an entry classed wrongly as open invites an
agent to reproduce text it was only allowed to cite. The emitted file states the
consequence in the imperative beside each source rather than leaving it to a
table somewhere else. Keeping it to references also keeps it live: a pointer to
a regulator's site is right the moment the rule changes, and a snapshot is wrong
the day after it is taken.

Three things keep it honest rather than merely present.

A skill with sources must carry a Sources section, and a skill carrying one must
have sources. Without that pairing the feature rots in both directions at once —
a file nobody is told about, or a pointer to a file no longer emitted. The check
enforces both.

Reachability runs weekly on its own schedule, not on every push. A publisher
being briefly down is not a reason to fail an unrelated pull request, and a
check that fails for reasons outside the diff is one people learn to ignore. All
37 URLs were fetched before any checked date was claimed, and three were wrong
at first writing.

The provenance check gained a narrow waiver, because a file whose job is to
classify licenses has to name license families. It waives the names only. That
was verified by pasting real license text into the waived file and confirming it
still fails.

Coverage is security, legal and employment, and finance and tax — the three
areas where citing the authority changes the answer rather than decorating it.
Extending it is adding entries, not changing the mechanism. D37 records the
reasoning.

All thirteen checks pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaQP2WCqeFYH7s9pi1CJ5u
@cbrock84
cbrock84 marked this pull request as ready for review September 16, 2026 02:49
@cbrock84
cbrock84 merged commit 29bd460 into main Sep 16, 2026
1 check passed
@cbrock84
cbrock84 deleted the claude/import-agents-drive-gmci3h branch September 16, 2026 02:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T02:50:24.798120Z 0e7cd01 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants