Repository navigation
docs(okf): restructure okf-bundle for per-change loading - #9552
Merged
Merged
Conversation
Agents were loading 100+ KB of testing docs for small changes (a Jest-only change read the whole command allowlist and validation checklist, then ran the full lint, tsc, prepare and type-parity set). AGENTS.md now routes by change type to a short route per diff kind that names the work type, tier, files to load per step and exact commands, linking to the existing rule owners without adding rules. The five large testing docs are split verbatim into task-sized files under testing/commands, authoring, validation, e2e and code-coverage. Each old path stays as a catalog that keeps every old anchor, so links from code, CI, CONTRIBUTING.md and skills keep resolving. Links inside the bundle now point at the new homes; a few pre-existing broken links and fragments are fixed along the way.
Nothing loads it, and its command list had drifted from okf-bundle: it ran full yarn lint (rewrites Java, banned during frozen review) and yarn format:js, and skipped the docs checks. The AGENTS.md routes own validation per diff.
ci-workflows/ios.md and new-architecture/architecture-decisions.md were the two largest stable docs left (about 12k tokens each) after the testing split. Both are split verbatim into ios/ and decisions/ with the same catalog convention: the old path keeps every old anchor, and links inside the bundle point at the new homes. The ADR catalog gains a one-line decision index so finding NewArch-AD-<n> costs one small read. The forbidden-command table moves from testing/commands/forbidden.md into agent-command-policy.md, directly under the agent rule, so the file every agent is sent to first shows what never to run without another hop.
Four phase trackers (monorepo tooling rollout, App Check iOS provider init, Firestore pipeline coverage, compare-types parity) still lived in the bundle as grandfathered queues, about 128 KB of mutable status next to stable reference, plus an ephemeral prepare benchmark log. Three queues were marked complete; compare-types had not moved since August. Reference docs linked into them for live status. The files are removed (git history keeps them). Reference docs no longer link into them or cite their phase ids, and the one durable fact that only lived in a queue (known gaps in the lint:deps allowlist) moves to prepare-and-cache.md. The policy drops the grandfathered exception: queues live in Linear project documents and no tracker goes back into the repo.
The route table missed paths that read as one change type and are another: packages/*/specs/*.ts are TurboModule specs (native, not js-lib), tests/** is the e2e test app and had no row at all, and Ruby tests under __tests__ are not Jest. AGENTS.md and the routes catalog now name these paths, and routes/index.md gains a look-alike table so an agent picks the right route before loading anything.
russellwheatley
force-pushed
the
russell/okf-bundle-docs-cleanup-ef021e
branch
from
December 4, 2026 09:19
fe5b31c to
3588cc6
Compare
russellwheatley
marked this pull request as ready for review
December 4, 2026 09:38
Mastersam07
approved these changes
Dec 4, 2026
3 of 9 tasks
This was referenced Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cuts how much of
okf-bundle/an agent loads per change.AGENTS.mdroutes by change type tookf-bundle/routes/. Large docs are split verbatim into task-sized files; old paths stay as catalogs that keep every anchor.agent-command-policy.md.ts-js-validationskill, whose command list had drifted from the bundle.