Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .claude/agents/sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: sources
description: Source catalog. Owns sources/** and nothing else — the authoritative external references each skill should check against, with the license class that says what may be done with each. Delegate adding, correcting or re-verifying a source here.
---

# Source catalog

## Why this agent exists

The single owner of `sources/**`. The catalog maps outside authorities — regulators, standards
bodies, primary law, public datasets — to the skills whose answers they settle, and
`scripts/build-sources.py` emits each skill's list into its own `references/sources.md`.

It is separate from the departments because one source serves several: the same control catalog is
authoritative for `security`, `legal-risk` and `technology` at once, and duplicating it per
department gives a living catalog three places to go stale.

## Standard

**References, never copies.** The catalog holds a URL and a judgment about it. It never reproduces
source material, which is what keeps D3 and D6 true while still putting the agent in front of the
real document, and what keeps the catalog current — a pointer to a regulator's site is right the
moment the rule changes.

**The license class is the load-bearing field.** Most of what a professional must cite is not open:
ISO standards are sold, SANS papers are copyrighted, the FASB Codification needs an account. An
entry classed wrongly as open invites an agent to reproduce text it was only allowed to read. When
uncertain between two classes, take the more restrictive one.

**Prefer the publisher to the aggregator.** `ecfr.gov` over a site that reprints it. The aggregator
is where staleness and license ambiguity enter, and it is usually the more convenient link.

**Record what a source is authoritative *for*, not what it is about.** The agent is choosing between
sources; "what question does this settle" is what makes the choice.

`sources/README.md` holds the format and the full license vocabulary.

## Surface

Writes: `sources/**`.
Reads: anything. Commits: nothing; the orchestrator is the sole committer.

Note that the emitted `plugins/*/skills/*/references/sources.md` files are **not** in this surface —
they belong to the department that owns the plugin, and are generated rather than maintained. A
change to them is made here, in the catalog, and regenerated.

## Verification this surface implies

- `python3 scripts/check-sources.py` passes — structure, license vocabulary, every `department:skill`
resolves, and every skill with sources carries the `## Sources` pointer that sends an agent to them.
- `python3 scripts/build-sources.py --check` passes — no emitted file has drifted from the catalog.
- `python3 scripts/check-sources.py --online` before claiming a `checked` date. CI does not fetch
URLs on every push; a publisher being briefly down is not a reason to fail somebody's pull request.
52 changes: 52 additions & 0 deletions .claude/agents/verticals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: verticals
description: Vertical packs. Owns verticals/** and nothing else — the per-vertical configs, the industry-only skills, and the context fragments that extend core skills. Gated: its diffs ship to a standalone repository, so they are surfaced before landing.
---

# Vertical packs

## Why this agent exists

The single owner of `verticals/**`. Each vertical is a config plus the content that makes the core
specific to one industry, and `scripts/build-vertical.py` emits a standalone repository from the
two. No other agent writes inside this surface.

It is separate from the departments because the content crosses them — an industrial vertical adds
to `operations`, `people` and `legal-risk` at once — and separate from `repo-meta` because writing
industry advice is not the same job as maintaining the generator that ships it.

## Authority: proposes

Diffs here are surfaced before they land. A change inside `plugins/finance/**` is wrong in one
department of one repository. A change inside `verticals/**` is emitted into a distributable
repository carrying industry-specific advice, and the emit is one-way — nothing downstream can
correct it locally, so the review has to happen here.

## Surface

Writes: `verticals/**`.
Reads: anything. Commits: nothing; the orchestrator is the sole committer.

## Standard

A vertical adds and extends. It never edits a core skill in place — a core skill that is wrong for
every industry is wrong in the core, and belongs in a core fix rather than in a vertical that hides
it from the other verticals.

- **New skills** go in `verticals/<slug>/skills/<department>/<skill>/SKILL.md` and follow the
conventions in `technology:skill-authoring` like any other skill. A name that collides with a core
skill fails the emit.
- **Extensions** go in `verticals/<slug>/context/<department>/<skill>.md` and are spliced into the
core skill ahead of its `## Never` block. They carry their own `##` heading and read as a section
the skill would have had if it were written for that industry.
- **Nothing is listed twice.** Skills and fragments are discovered on disk; the config says what the
vertical is, not what it contains.

`verticals/README.md` holds the working details.

## Verification this surface implies

- `python3 scripts/build-vertical.py --all --verify` passes — every vertical emits, and every
emitted repository passes its own checks.
- No change outside `verticals/**`. Needing one means coordinating with that surface's owner; a
change to the generator itself is `repo-meta`.
23 changes: 23 additions & 0 deletions .github/workflows/sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: source links

# The catalog points at outside publishers, so it rots without anything in this repository
# changing. That makes it the one check worth running on a clock rather than on a diff.
#
# Deliberately not part of `checks.yml`: a publisher being briefly down, or rate-limiting a
# runner, is not a reason to fail somebody's pull request. A dead link is real and worth a
# notification; it is not worth blocking a merge that has nothing to do with it.
on:
schedule:
- cron: "17 7 * * 1"
workflow_dispatch:

permissions:
contents: read

jobs:
links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Fetch every cataloged source
run: python3 scripts/check-sources.py --online
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
# untracked __pycache__ is enough to make a clean tree look dirty.
__pycache__/
*.pyc

# Emitted vertical repositories. Generation is one-way (D8) and the output is never hand-edited, so
# committing it would put a hand-editable copy in front of every contributor. `build-vertical.py
# --verify` proves the emit is sound without keeping a copy (D36).
dist/
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ Every check CI runs, in one script — the workflow calls this same file, so the
| Skill references | Every `department:skill` mentioned in the docs or in a skill body resolves |
| US English spelling | No British spellings, by exact word form |
| `## Never` blocks | Bullets inside one block agree on terminal punctuation |
| Source catalog | Structure, license vocabulary, and every skill it names resolves |
| Skill source files | Each skill's `references/sources.md` matches the catalog |
| Verticals | Every vertical emits, and the emitted repository passes its own checks |
| Manifests | The marketplace file and every `plugin.json` parse |

**Stage your files first.** The surface guard reads `git ls-files`, so an unstaged file is invisible
Expand Down Expand Up @@ -113,6 +116,38 @@ department cannot end up missing from the README and the org chart while the che
Give it a chief before any specialists — the department's remit should exist before things are added
to it.

## Adding a source

`sources/*.toml` maps outside authorities — regulators, standards bodies, primary law, public
datasets — to the skills whose answers they settle. `scripts/build-sources.py` emits each skill's
list into its own `references/sources.md`, which is what an agent reads while it is answering.

**References, never copies.** The catalog holds a URL and a judgment about it, never source
material. That keeps D3 and D6 true and keeps the catalog live — a pointer to a regulator's site is
right the moment the rule changes, and a copy is wrong the moment it does.

**The `license` field is the load-bearing one.** Most of what a professional must cite is not open:
ISO standards are sold, SANS papers are copyrighted, the FASB Codification needs an account. An
entry classed wrongly as open invites an agent to reproduce text it was only allowed to read. When
torn between two classes, take the more restrictive one. `sources/README.md` has the vocabulary.

Link reachability is checked weekly by its own workflow rather than on every push, because a
publisher being briefly down is not a reason to fail an unrelated pull request. Run
`python3 scripts/check-sources.py --online` before you claim a `checked` date.

## Adding to a vertical

A vertical is the core made specific to one industry. `scripts/build-vertical.py` emits a standalone
repository from the core plus a config under `verticals/<slug>/`.

Generation is one-way and **generated output is never hand-edited** (D8). `dist/` is gitignored for
that reason; what replaces a committed copy is `--verify`, which emits to a temporary directory and
runs the emitted repository's own checks against it. CI does that on every push.

A vertical adds skills and extends core skills. It never edits 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. `verticals/README.md` has the working details.

## Adding a file outside `plugins/`

It needs an owner in `docs/AGENT-SURFACES.md`, or the surface check fails. Most such files belong to
Expand Down
17 changes: 17 additions & 0 deletions docs/AGENT-SURFACES.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ corporate-strategy builder installed autonomous
security builder installed autonomous
it-operations builder installed autonomous
pmo builder installed autonomous
verticals builder installed proposes
sources builder installed autonomous
repo-meta builder installed proposes
legal-risk-review reviewer installed autonomous
security-review reviewer installed autonomous
Expand All @@ -63,6 +65,13 @@ generators every document is built from, and this map. A change inside `plugins/
wrong in one department. A change to `scripts/check-all.sh` can make every other check stop
reporting, and nothing downstream would fail to say so.

`verticals` is the second, for the same reason in a different direction. It owns the per-vertical
configs and content that `scripts/build-vertical.py` emits standalone repositories from, so a change
inside `verticals/**` does not land in this repository — it lands in a distributable artifact
carrying somebody's industry advice, and the emit is one-way, so nothing downstream can correct it
locally. It owns the input rather than the generator; the generator is a script and belongs to
`repo-meta` with the others.

Charters live in `.claude/agents/`, one per installed row. A row marked `installed` without a
charter, or a charter without a row, fails the check — the two cannot drift apart silently.

Expand Down Expand Up @@ -135,6 +144,14 @@ plugins/pmo/**
plugins/security/**
```

```surface:verticals
verticals/**
```

```surface:sources
sources/**
```

```surface:repo-meta
LICENSE
.gitignore
Expand Down
103 changes: 102 additions & 1 deletion docs/DECISION-LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ recorded rather than being deleted.
| D33 | US English check rejects the plural of "analysis" | ✅ Resolved |
| D34 | Two skills claim social graphics | ✅ Resolved |
| D35 | Whether description shape is a checkable convention | ✅ Resolved |
| D36 | Where emitted vertical repositories live | ✅ Resolved |
| D37 | Authoritative sources as a catalog of references | ✅ Resolved |

---

Expand Down Expand Up @@ -409,7 +411,7 @@ of decisions.
| 7 | Deepen `operations`, then `finance`, then `people` | D10 | — | ✅ done |
| 8 | Catalog the other organizations' public repos — no import | D11 | — | ✂️ dropped, D30 |
| 9 | ~~Separate session for the private sweep~~ | D11 | — | ✂️ dropped, D30 |
| 10 | Build the vertical generator: core, per-vertical config, one-way emit | D8 | — | |
| 10 | Build the vertical generator: core, per-vertical config, one-way emit | D8 | — | ✅ done, D36 |
| 11 | Revisit repo visibility | D16 | after 1 | ✅ done |

Items 1–4 can proceed in parallel; all four land before item 5. Items 8 and 9 were dropped in D30.
Expand Down Expand Up @@ -1207,3 +1209,102 @@ it.** The figure "~24 agents over a 1,500-file monorepo" in `executive:agent-hie
a claim about this roster, which currently runs 17 builders and 2 reviewers. It is not: both
instances say the method was *extracted from* a working implementation of that size. The sentence
describes the source the method came from, and changing the number would make it wrong.

---

## D36. Where emitted vertical repositories live — ✅ Resolved

D8 resolved the vertical architecture to template-plus-generator with one-way emit, and roadmap item
10 was to build it. Building it raised a question D8 did not answer: what happens to the output.

Every other generated artifact in this repository — the README, the org chart, the social card — is
committed, and a `--check` mode fails the build when the committed copy drifts from what the
generator produces. Applying that pattern here would mean committing an entire second copy of the
tree per vertical.

- **(a) Emit to a gitignored `dist/`, and verify by emitting to a temporary directory and running
the emitted repository's own checks against it.** ← **chosen**
- (b) Commit the emitted tree and `--check` it like the other generated documents. Consistent with
the existing pattern, and reviewable in a diff. It also roughly doubles the repository per
vertical, and — decisively — puts a hand-editable copy of the output in front of every
contributor, which is the one thing D8's rule forbids. A `--check` failure would read as "the
generated copy is stale" long after someone had already edited it.
- (c) Emit straight to the downstream repository from CI. Removes the local copy entirely, at the
cost of making every push to this repository a publish. Publishing should be a deliberate act.

**Resolution: (a).** The invariant worth holding is not "a stored copy matches the generator" but
"the generator produces a repository that is sound." `--verify` states that directly: it emits into
a temporary directory, initializes it the way a consumer's clone would be, runs the emitted
repository's checks, and keeps nothing. CI runs it on every push, so the emit cannot rot unnoticed.

**Two consequences worth recording.**

The emitted repository does not carry the three document generators or their checks. Its README is
written by `build-vertical.py`, so a "README is current" check downstream would be verifying the
wrong generator; freshness is guaranteed upstream instead. It carries the other seven checks, which
still mean what they say about a tree of skills.

`verticals/**` is a new surface with its own owner, and it is 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.

---

## D37. Authoritative sources as a catalog of references — ✅ Resolved

A skill states what a competent practitioner knows. It does not state what the regulator published
last month, and it cannot: the catalog is written once and the obligation moves. The ask was for
each skill to carry the outside authorities an agent should check in real time — tax guidance,
employment law by jurisdiction, security control catalogs, standards bodies, public datasets.

The framing offered was "open source or MIT/Apache licensed sources." Investigating that turned out
to be the decision, because **most of what a professional must cite is not open**, and the examples
named make the point: ISO standards are sold, SANS papers are copyrighted, the FASB Codification is
free only behind an account. What *is* freely usable is narrower and more valuable than it looks —
US 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 cannot be a list of things we may copy. It has to be a list of things an agent may
*read*, each carrying what it may then do with what it read.

- **(a) A catalog of references, with a closed license vocabulary, emitted per skill.** ← **chosen**
- (b) Vendor the material that permits it — US public-domain control catalogs, CISA KEV — so a
skill works offline. Reverses D3 and D6, needs a carve-out in the provenance check, and
reintroduces the staleness the catalog exists to remove: a snapshot of a live feed is wrong the
day after it is taken.
- (c) Put the URLs inline in each skill body. No new machinery, and no way to check that a link
still resolves, no way to record what may be done with it, and one source serving three
departments becomes three copies to update.

**Resolution: (a).** `sources/*.toml` maps a source to the skills whose answers it settles.
`scripts/build-sources.py` emits each skill's list into its own `references/sources.md`, which is
where Claude Code and ChatGPT both load a skill's supporting files from on demand — so the agent
gets its own sources and not the other 171 skills'.

**The license class is the load-bearing field**, and it is a closed vocabulary the checker enforces.
Three of its ten values — `free-to-read`, `registration-required`, `paywalled` — exist specifically
to mark the sources most often assumed open and not. An entry classed wrongly as open invites an
agent to reproduce text it was only ever allowed to cite. The emitted file states the consequence in
the imperative next to each source rather than leaving it to a table elsewhere.

**Three things were built to 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 it both ways.

Reachability is checked 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 a check people learn to ignore. All 37 initial URLs were verified reachable before the
`checked` dates were claimed, and three were wrong at first writing.

The provenance check gained a narrow waiver, because a file whose job is to classify licenses must
be able to name license families. It waives the *names* only; actual license text is still caught by
its body, which the waiver was tested against by pasting some in and watching it fail.

**Coverage is `security`, `legal-risk` and `finance` first** — the three departments where citing
the authority changes the answer rather than decorating it. Extending it is adding entries, not
changing the mechanism.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ The predictable value destroyers are attrition of the people you bought, custome
transition, and a stalled integration that leaves two of everything indefinitely. Each is
foreseeable and each is planned around, or it is not.

## Sources

`references/sources.md` in this skill lists the outside authorities that settle the questions
here — what each one is authoritative for, and what you may do with it. Check them before
answering on anything they cover, and cite what you used. Most are free to read and not free
to reproduce; the use note on each is binding.

## Never

- Proceed with a thesis that changed to fit the target.
Expand Down
Loading