Contributing and documentation ownership#
Verify a checkout#
Use Node 22 or later and the pnpm@11.25.0 version in the root
packageManager field. The repository's script interface is npm run:
pnpm install --frozen-lockfile
npm run verify
npm run docs:check
npm run docs:build
verify builds, typechecks, and tests both packages. Thread also runs packed
consumer and tree-shaking smoke checks. Workspace membership and local sibling
linking live in pnpm-workspace.yaml; npm's -w selection is not configured.
Do not replace the managed install with a raw npm install in this checkout.
Importer changes require real writer output, accurate fixture provenance, and a review of the adapter's declared fidelity losses. Invented transcript shapes do not establish source compatibility. Schema changes affect every adapter; review schema-version compatibility and both package contracts.
Docs source and freshness#
corpus.json is the v2 manifest for the Pages site and docs-bundle.json
consumed by documentation tools. It names the landing page, published
documents, topic routes, purpose, and product dependencies. Its empty
builtOn list reflects no dependency on another first-party product; Ferry
and Thread are packages within this product.
Maintain the document owning a changed contract in the same change:
| Changed area | Canonical document |
|---|---|
| Package setup and workspace linking | Get started |
| CLI, dispatch/output, tool-call rows | Ferry CLI |
| Adapters and detection | Formats and fidelity |
| Schema, usage library, answer identities/projections | Canonical contracts |
| Root scripts and workflows | This document |
The manifest's covers patterns route source changes to those documents.
docs:check validates the manifest, topics, links/anchors, and reachability.
To include scoped freshness locally, supply the review base:
npm run docs:check -- --base origin/main
docs:build renders the site and MCP-readable bundle under ignored dist-pages/.
The scripts and workflow explicitly select Corpus commit
b8ecf4cd4c6482bb804cdeea617ebe2d9b78ab05 so local and hosted checks use the
same reviewed implementation. Its narrow-page renderer wraps long inline text
while code blocks and wide tables keep their local horizontal scrolling.
Hosted and release boundaries#
The Docs workflow calls the shared kontourai/.github docs gate for pull
requests, merge groups, pushes to main, and manual dispatch. On main pushes
or dispatch, the Pages job waits for that gate, builds the site/bundle, and
uses the reusable workflow's github-pages environment. The repository must
have GitHub Actions selected as its Pages source. Hub registration, hosted
deployment, and aggregate MCP discovery require their own configuration and
successful hosted runs; a local build proves only local output.
The gate's freshness check fails a pull request that changes a file a document
covers but not the document. Release pull requests are the exception. A release
bumps version in the package.json files, which getting-started.md covers,
and Corpus matches whole files, so it cannot tell a version bump from a change
to the dependencies. On the pull request that the release bot (Release Please) opens from its own
release-please--branches--main branch in this repository, stale documents are
reported as warnings instead of failing. That exception depends on who opened
the pull request, not on what it contains. Any other pull request that changes
those files must still update getting-started.md.
Workflow setup uses pnpm/action-setup 6.1.1, release-please-action 5, and create-github-app-token 3.3.0. These updates preserve the existing trigger, permission, and publishing boundaries.
The ordinary CI runs verification on Node 22/24 and package publish-path dry
runs. Release-please manages each package's versions/changelogs; the publishing
workflow handles thread-v* and ferry-v* component tags, verifies the checkout,
checks tag/version and main ancestry, and publishes each member separately.
Do not hand-edit versions or publish locally. Docs publication and npm package
publication are separate operations.
Keep ferry's dependency on thread as "@kontourai/thread": "workspace:^".
Release-please updates version ranges in package.json but cannot update
pnpm-lock.yaml. With an ordinary range, every release that bumps thread would
leave the two out of step, and CI's install step (pnpm install --frozen-lockfile,
which refuses a lockfile that doesn't match) would fail. Release-please leaves
workspace:^ alone.
At publish time, scripts/pack-workspace.sh packs with pnpm, which writes the
real range (^<thread version>) into the tarball. The script fails if any
local-only range (workspace:, catalog:, link:, file:, portal:,
git+file:, or a bare path such as ../lib) is left. npm publish then
uploads that tarball. Never run npm publish on a package directory: for Ferry
it uploads workspace:^ as written, and nobody can install the result.
npm run test:scripts checks the packing script.