Skip to content

chore(docs): remove the docs/ directory, moving each record to the skill that owns it - #786

Merged
athvin merged 2 commits into
mainfrom
chore/purge-docs-dir
Nov 7, 2026
Merged

athvin merged 2 commits into
mainfrom
chore/purge-docs-dir

Conversation

@athvin

@athvin athvin commented Nov 7, 2026

Copy link
Copy Markdown
Owner

What

docs/ is gone. Its 34 files split three ways: six were gate inputs and moved with their gates intact, fifteen were design records and moved to the references/ of the skill that owns their subject, and the rest were deleted.

521 files changed, ~71k deletions. Most of that is the deleted archive; the rest is link rewriting.

The part that wasn't a documentation move

Six files were load-bearing in code, and deleting them would have deleted the gates that read them:

File Why it couldn't just go
erd.md, entity-lint-rules.md emitted by er-entity-gen / er-entity-lint, byte-compared by er-entity verify; paths hardcoded in er-entity-cli
telemetry-reference.md generated from er-obs's registry, byte-compared by its own test
profile-findings.md generated from er-profile's rule registry, byte-compared by its own test
agent-skills.md skills-check.sh greps its generator table and splices two generated blocks into it
entity-framework-design.md skills-check.sh set-differences the E0xx codes out of its table

So this PR touches Rust, skills-check.sh, the CI path classifier and its tests — not only markdown.

Three consequences of putting them under .claude/skills/*/references/:

  • A reference over 100 lines needs a ## Contents. The three generators that emit a long file now emit the TOC too — hand-maintaining it was never an option, since an index that can disagree with its own sections is the drift these files are generated to prevent. The ERD's erweb row is conditional, because its section is.
  • A reference may not link a sibling (Claude only partially reads a file reached through another reference), so same-directory links became plain mentions.
  • An unlinked reference is never read, so each moved file is linked from its owning SKILL.md.

CI behaviour is unchanged by the move

The four coupled files were exempt-by-prefix and re-admitted by DETECT_ERD/DETECT_DRIFT before; they still are, because .claude/ is exempt by the same mechanism docs/ was. Only the path strings moved. detect-paths-test.sh asserts all 35 cases and pass-gate-test.sh asserts the coupled ERD still moves the rust pass key.

docs/ was removed from DETECT_EXEMPT rather than left behind: an exemption for a directory that does not exist is a hole nobody is watching, and the fail-safe direction is that a reintroduced docs/ file runs the gate until someone argues it should not.

Two deletions I reversed

plan-to-aws.md and research-cloudingo.md looked like archive and are not — the infrastructure documents defer to the first for live build status, and the parity matrices are measured against the second. A document that retained documents need for their own meaning is not archive; six dangling citations each would have been the evidence of getting it wrong. Both were restored into the owning skill.

Judgement calls worth flagging

  • architecture.md went to er-engine-ops, not CLAUDE.md. CLAUDE.md loads into every session, and 100 lines of engine detail there is a cost every session pays for something most never read. CLAUDE.md gets the pointer.
  • No new skill. A general "architecture" skill would describe territory every existing skill already routes for, and its description would have collided with them.
  • The measurement captures are deleted, and measure_runner_startup.sh now defaults to the gitignored artifacts/ tree so a run cannot recreate the directory. The pentest playbook writes its report there too, rather than to a docs/security/ it would have had to create.

Not fixed here

  • entity-lint-rules.md is byte-compared by the same entities job as erd.md but was never in DETECT_ERD, so a lone edit to it skips that gate. Pre-existing; widening the regex is a CI behaviour change this move doesn't need.
  • Three broken links in DesignDoc.md and rust/PERFORMANCE.md (ci.yaml, benchmark.yaml, rust/README.md) are pre-existing — verified present on origin/main.
  • docs/arch.md and docs/static-analysis.md in two records are dagr's and feather-flow's own documentation, and docs/ in ci-triage.yml is a BRANCH prefix. All left alone.

Verification

  • make check — green (fmt, clippy -D warnings, doc, er-entity verify, skills-check, 92 test suites)
  • pnpm check — green (eslint, prettier, tsc, the four BFF guards, 875 tests, coverage floor)
  • detect-paths-test.sh 35/35, pass-gate-test.sh 16/16, scripts-home-check, workflow-shell-check
  • Every local markdown link checked: all resolve except the three pre-existing ones above

🤖 Generated with Claude Code

https://claude.ai/code/session_01MFnHDTCHkPgyCWWELigoGF

bmoore813 and others added 2 commits November 7, 2026 13:12
…them

`docs/` is being removed. Six of its files are not prose — they are gate
inputs, and deleting them would delete the gates:

  erd.md, entity-lint-rules.md   generated by er-entity-gen / er-entity-lint
                                 and byte-compared by `er-entity verify`
  telemetry-reference.md         generated from er-obs's registry, byte-compared
                                 by er-obs's own test
  profile-findings.md            generated from er-profile's rule registry,
                                 byte-compared by er-profile's own test
  agent-skills.md                skills-check greps its generator table and
                                 splices two generated blocks INTO it
  entity-framework-design.md     skills-check set-differences the E0xx codes
                                 out of its table

So they move to the `references/` directory of the skill that owns each, which
is where a generated reference already belongs here, and every gate is
preserved rather than re-pointed at nothing.

Three consequences worth naming:

- A skill reference over 100 lines needs a `## Contents` (skills-check), so the
  three generators that emit a long file now emit the table of contents too.
  Hand-maintaining it was never an option: an index that can disagree with the
  sections it indexes is the same drift these files are generated to prevent.
  The ERD's `erweb` row is conditional, because its section is.
- References must be one level deep from SKILL.md, so the design doc's link to
  entity-lint-rules.md — now a sibling — becomes a plain mention, and each
  moved file is linked from its owning SKILL.md (an unlinked reference is never
  read).
- `docs/` leaves DETECT_EXEMPT rather than being left behind as a courtesy to a
  future re-introduction. An exemption for a directory that does not exist is a
  hole nobody is watching; the fail-safe direction is that a reintroduced
  `docs/` file runs the gate until someone argues it should not.

The classifier keeps its shape: these files were exempt-by-prefix and
re-admitted by DETECT_ERD/DETECT_DRIFT before, and they still are — `.claude/`
is exempt by the same mechanism `docs/` was. Only the path strings moved, so CI
behaviour is unchanged by this commit. detect-paths-test.sh asserts all 35
cases, including that the coupled ERD still moves the rust pass key.

Not fixed here, and pre-existing: entity-lint-rules.md is byte-compared by the
same `entities` job as erd.md but was never in DETECT_ERD, so a lone edit to it
skips that gate. Left alone deliberately — widening the regex is a CI
behaviour change this move does not need.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MFnHDTCHkPgyCWWELigoGF
…ill that owns it

There is no `docs/` directory now. What was in it split three ways.

**Moved to the owning skill's `references/`** — a design record is loaded with
the skill that would send you to it, instead of sitting where nothing points:

  er-engine-ops            architecture, runbook, configuration,
                           batch-orchestration-design
  infra-platform           infrastructure, infrastructure-decisions, plan-to-aws
  er-server-control-plane  backend-design, connectors, research-cloudingo
  frontend-design-system   frontend-design
  frontend-testing         frontend-testing
  ducklake-performance     performance, profiling
  ci-and-supply-chain      devcontainer, agent-fleet

**Deleted** (~16k lines): parity-roadmap, research-datagroomr,
research-runner-startup, python-processing-exceptions, and the eight
`measurements/*.json` captures. Each was superseded or was raw capture nothing
read; all are in git history. `measure_runner_startup.sh` now defaults its
output to the gitignored `artifacts/` tree so a run cannot recreate the
directory, and the `pentest` playbook writes its report there too rather than
to a `docs/security/` it would have had to create.

**plan-to-aws and research-cloudingo were restored after being deleted.** Both
looked like archive and are not: the infrastructure documents defer to
plan-to-aws for live build status, and the parity matrices are measured against
the Cloudingo feature bar. A document other retained documents need for their
own meaning is not archive, and six dangling citations each would have been the
evidence of getting that wrong.

The mechanical cost was the links. These files used repo-root-relative paths
that were correct from `docs/` and are four levels up from a skill's
`references/`, and they cross-linked each other; 89 root links, 75 cross-skill
links and 8 skill links were rewritten, and 61 pointing at deleted or
same-skill targets were de-linked. Same-skill links had to go entirely: the
skills lint forbids a reference linking a sibling, because Claude only
partially reads a file reached through another reference. Every remaining link
resolves — the lint checks that, which is how the depth arithmetic is known
right rather than assumed.

Each moved document over 100 lines also needed a `## Contents`, generated from
its own headings.

`architecture.md` went to `er-engine-ops` rather than into CLAUDE.md. CLAUDE.md
is loaded into every session, and 100 lines of engine detail there is a cost
every session pays for something most of them never read; it gets the pointer
instead. No new skill was created either — a general "architecture" skill would
have had to describe territory every existing skill already routes for, and its
description would have collided with them.

Left alone deliberately: `docs/arch.md` and `docs/static-analysis.md` in the
batch-orchestration and entity-framework records are dagr's and feather-flow's
own documentation, and `docs/` in ci-triage.yml is a BRANCH prefix.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MFnHDTCHkPgyCWWELigoGF
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

terraform plan

3fab374 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 0
dev 0 0 0
prod 0 0 0

Planned with -refresh=false, so this is the config-versus-state diff and
not out-of-band drift. That is a security choice, not a speed one: a refreshing
plan reads secret values, and the plan role is assumable from any PR branch —
which can edit the workflow it runs under. Drift is caught at apply time, which
refreshes fully.

@athvin
athvin merged commit 4affe21 into main Nov 7, 2026
47 checks passed
@athvin
athvin deleted the chore/purge-docs-dir branch November 7, 2026 18:27
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