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
134 changes: 0 additions & 134 deletions .agents/skills/ts-js-validation/SKILL.md

This file was deleted.

39 changes: 24 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@

## Project

- Yarn workspaces monorepo for React Native Firebase.
- Library code: `packages/**/lib`; e2e app: `tests/`.
- Contributor/review norms: `CONTRIBUTING.md`.

## Working

- Run from repo root; install once with `yarn`.
- **Agent shell commands:** [agent-command-policy.md](okf-bundle/testing/agent-command-policy.md) only (allowlist). E2e additionally [running-e2e.md § agent rule](okf-bundle/testing/running-e2e.md#agent-rule-read-first).
- Follow local package patterns; check `type-test.ts`, `__tests__/`, and plugin dirs before public API/platform changes.
- Start with `okf-bundle/index.md` for repo-specific implementation/testing/maintenance knowledge.
- **Change authoring:** [change-authoring-workflow.md](okf-bundle/testing/change-authoring-workflow.md) — baseline → unit-focused implementation → `documentation?` → area-focused `independent-review` → commit; [**validation evidence**](okf-bundle/testing/change-authoring-workflow.md#validation-evidence-blocking) and [**coverage evidence**](okf-bundle/testing/coverage-design.md#coverage-evidence-package) required before gates close or push. Do not add OKF / `AGENTS.md` / `CONTRIBUTING.md` after a frozen review without another `independent-review`.
- Use package indexes under `okf-bundle/packages/` for package-specific workflows and active work queues (Linear project documents; see [documentation-policy.md](okf-bundle/documentation-policy.md#work-queue-documents)). Do not create new `okf-bundle/**/*work-queue.md` files.
- Follow [documentation-policy § public vs ephemeral vs private](okf-bundle/documentation-policy.md#durable-vs-ephemeral): GitHub-public **reference** docs, this file, commits, and PR titles must not contain ephemeral **fields** or Linear issue identifiers. Gated queue state lives on Linear, not in new git files.
- Testing entry points: `okf-bundle/testing/index.md`; validation requirements: `okf-bundle/testing/validation-checklist.md`.
- Match validation to the **work type** and **validation tier** in OKF ([change authoring workflow](okf-bundle/testing/change-authoring-workflow.md); term ids in [iteration vocabulary](okf-bundle/testing/iteration-vocabulary.md)).
- Yarn workspaces monorepo for React Native Firebase. Library code: `packages/**/lib`; e2e app: `tests/`. Contributor/review norms: `CONTRIBUTING.md`.
- Run from repo root; install once with `yarn`. Repo knowledge: [okf-bundle/index.md](okf-bundle/index.md).

## Route by change type

Read only the route for what your diff touches. It names the work type, validation tier, files to load per step, and exact commands. Several rows match: [mixed diffs](okf-bundle/routes/index.md#mixed-diffs). Paths that look like another type: [look-alike trees](okf-bundle/routes/index.md#look-alike-trees).

| Diff touches | Route |
| --- | --- |
| `docs/**` only | [docs-only](okf-bundle/routes/docs-only.md) |
| `packages/*/__tests__/**` only (Jest) | [tests-only](okf-bundle/routes/tests-only.md) |
| `packages/*/lib/**` | [js-lib](okf-bundle/routes/js-lib.md) |
| `packages/*/{ios,android}/**`, podspecs, `generated/**`, `packages/*/specs/*.ts` (TurboModule specs), codegen wiring, `packages/app/**/*.rb` | [native](okf-bundle/routes/native.md) |
| `packages/*/e2e/**`, `tests/**`, `tests-macos/**` (e2e test app), or any `yarn tests:*` e2e run | [e2e](okf-bundle/routes/e2e.md) |
| `packages/*/plugin/**`, `test-expo/**`, `test-rn-bare/**` | [expo-plugin](okf-bundle/routes/expo-plugin.md) |
| `okf-bundle/**`, `AGENTS.md`, `CONTRIBUTING.md` | [okf-docs](okf-bundle/routes/okf-docs.md) |
| CI, monorepo tooling, TurboModules, one package's workflow | [other areas](okf-bundle/routes/index.md#other-areas) |

## Every change

- **Agent shell commands:** [agent command policy](okf-bundle/testing/agent-command-policy.md#agent-rule-read-first) only (allowlist). E2e additionally [running-e2e.md § agent rule](okf-bundle/testing/running-e2e.md#agent-rule-read-first).
- **Change authoring:** [loop](okf-bundle/testing/authoring/loop.md#primary-loop): baseline → unit-focused implementation → `documentation?` → area-focused `independent-review` → commit. [Validation evidence](okf-bundle/testing/authoring/gates.md#validation-evidence-blocking) and, when required, [coverage evidence](okf-bundle/testing/code-coverage/policy.md#coverage-evidence-package) before gates close or push. Do not add OKF / `AGENTS.md` / `CONTRIBUTING.md` after a frozen review without another `independent-review`.
- Follow local package patterns; check `type-test.ts`, `__tests__/`, and plugin dirs before public API/platform changes. Package workflows: `okf-bundle/packages/<pkg>/index.md`.
- Follow [documentation-policy § public vs ephemeral vs private](okf-bundle/documentation-policy.md#durable-vs-ephemeral): GitHub-public **reference** docs, this file, commits, and PR titles must not contain ephemeral **fields** or Linear issue identifiers. Active work queues are Linear project documents ([work-queue documents](okf-bundle/documentation-policy.md#work-queue-documents)); do not create new `okf-bundle/**/*work-queue.md` files.

## PR instructions

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ The New Architecture commits generated native code (CMake files, podspecs, JSI/s

1. **Bump the mobile app RN (and macOS only when that stack moves).** Update `tests/package.json` (`react-native`, CLI / `@react-native/*`) for mobile + codegen. Update `tests-macos/package.json` (`react-native`, `react-native-macos`) only when the macOS pair advances. Do **not** reintroduce blanket root `resolutions` for `react-native` / `@react-native/codegen` / CLI — each app pins its own line; codegen resolves from **`tests/`**. Never float the toolchain (`latest`, `*`, `^x.y`). Individual packages must not declare their own `react-native` devDependency. See [test app dependency pins](okf-bundle/testing/test-app-dependency-pins.md).
2. `yarn install` and verify pins: from `tests/` and `tests-macos/` report their expected `react-native` versions; `rg 'react-native@npm:' yarn.lock` should show the intended line(s) (plus `react-native-macos` for the macOS app).
3. **Regenerate all native artifacts** when the **mobile** RN/codegen line changes: `yarn codegen:all` (wipe-then-regen on each configured `--outputPath` via [`scripts/codegen-package.mjs`](scripts/codegen-package.mjs) — [NewArch-AD-22](okf-bundle/new-architecture/architecture-decisions.md#newarch-ad-22--codegen-is-wipe-then-regen-on-the-configured-outputpath--accepted)), then review the diff — macro/podspec/JSI churn is expected on an RN bump.
3. **Regenerate all native artifacts** when the **mobile** RN/codegen line changes: `yarn codegen:all` (wipe-then-regen on each configured `--outputPath` via [`scripts/codegen-package.mjs`](scripts/codegen-package.mjs) — [NewArch-AD-22](okf-bundle/new-architecture/decisions/codegen-and-toolchain.md#newarch-ad-22--codegen-is-wipe-then-regen-on-the-configured-outputpath--accepted)), then review the diff — macro/podspec/JSI churn is expected on an RN bump.
4. **Rebuild native on both platforms** (iOS + Android) and run the e2e suite; generated changes only take effect after a native rebuild. Rebuild/run macOS Jet from `tests-macos/` when that app's native shell or Metro entry changed.
5. `yarn codegen:verify` must pass (it re-runs wipe+regen via `codegen-package.mjs` and fails on any drift). If it flags drift on an unchanged RN, the mobile toolchain is mis-pinned — fix the `tests/` pins, do not commit the drift.

See [NewArch-AD-20](okf-bundle/new-architecture/architecture-decisions.md#newarch-ad-20--pin-the-rncodegen-toolchain-rn-bumps-are-coordinated-breaking-changes--accepted) for the rationale.
See [NewArch-AD-20](okf-bundle/new-architecture/decisions/codegen-and-toolchain.md#newarch-ad-20--pin-the-rncodegen-toolchain-rn-bumps-are-coordinated-breaking-changes--accepted) for the rationale.

---

Expand Down
45 changes: 45 additions & 0 deletions okf-bundle/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
type: Reference
title: okf-bundle structure
description: 'How the knowledge bundle is laid out, where a new fact goes, how to move text without breaking #anchors, and where the layout deliberately departs from ICM defaults.'
tags: [okf, structure, routes, documentation]
timestamp: 2026-12-04T00:00:00Z
---

# okf-bundle structure

The bundle is the factory shelf for changing this repo: stable reference that agents load per task. The root `AGENTS.md` routes by change type to [routes/](routes/index.md); each route names the shelf files and commands for that change. [index.md](index.md) is the OKF catalog of every topic. Policy for what may be written here: [documentation-policy.md](documentation-policy.md).

## Layout

| Path | Job |
| --- | --- |
| `index.md` | OKF catalog (`okf_version`), one line per topic owner |
| `routes/` | One file per change type: work type, tier, files per step, exact commands, what that diff does not need. Routes link to owners and hold no rules |
| `testing/` | Testing owners. `testing/index.md` lists every file |
| `testing/commands/`, `authoring/`, `validation/`, `e2e/`, `code-coverage/` | Task-sized sections of `agent-command-policy.md`, `change-authoring-workflow.md`, `validation-checklist.md`, `running-e2e.md`, `coverage-design.md` |
| `ci-workflows/`, `monorepo-tooling/`, `new-architecture/`, `packages/<pkg>/` | Area owners, each with an `index.md` |
| `ci-workflows/ios/`, `new-architecture/decisions/` | Task-sized sections of `ci-workflows/ios.md` and `new-architecture/architecture-decisions.md` (the ADR catalog keeps a one-line decision index) |

## Writing here

- Every file starts with frontmatter (`type`, `title`, `description`, `tags`, `timestamp`); quote a value that contains `: `. The first heading names the file.
- One home per fact: link to the owner instead of copying. Add new topics to `index.md` (and `testing/index.md` for testing).
- Keep a file small enough that one route step loads it with its siblings in under about 8,000 tokens; split by section rather than trimming rules ([Efficiency](documentation-policy.md#efficiency)).
- Moving a section: move it verbatim, keep its heading text, and leave an `<a id="...">` for each of its anchors in the old file's anchor list, pointing at the new file. Files outside the bundle (code comments, CI, `CONTRIBUTING.md`, private skills) link to old paths and anchors.
- New text after a frozen review needs another `independent-review` ([OKF update contract](documentation-policy.md#okf-update-contract)).

## Check

The [OKF bundle review](testing/validation/okf-review.md#okf-bundle-review) during frozen `independent-review` is the check for this tree: canonical location, DRY, Efficiency, link hygiene, Durability.

## Where this layout departs from ICM defaults

Kept on purpose, OKF conventions win where they conflict:

- **Catalogs are `index.md`, not `CONTEXT.md`.** OKF names folder catalogs `index.md`. Folders here are shelves of reference, not pipeline stages, so they have no Inputs / Process / Outputs contracts; the change authoring loop is the pipeline and lives in `testing/authoring/`.
- **`index.md` uses bundle-root links (`/testing/...`).** That is the existing OKF catalog style. A link checker must resolve a leading `/` against `okf-bundle/`, not the filesystem root.
- **Old paths stay as catalogs.** `agent-command-policy.md`, `change-authoring-workflow.md`, `validation-checklist.md`, `running-e2e.md`, `coverage-design.md`, `ci-workflows/ios.md` and `new-architecture/architecture-decisions.md` keep their intro, any agent rule, a file list, and an `<a id>` for every old anchor, instead of an `index.md` inside each new subfolder. External referrers keep working and each subfolder still has one catalog (its sibling file).
- **`AGENTS.md` keeps a few repo-wide rules** (command allowlist, change authoring evidence, public vs ephemeral, PR scope) as one-line links. It is the only file every agent is sure to load.
- **`testing/commands/constraints.md` restates other command rows** as one plain-text block for pasting into prompts. It predates this layout; each line's owner is a registry or trap section in `testing/commands/`.
- **`testing/code-coverage/`**, not `coverage/`: the repo `.gitignore` ignores every folder named `coverage`.
Loading