Status: Implemented
Audience: Contributor or engineer; Maintainer or operator
Scope: Branching, commit, PR, and local validation expectations for repository contributors.
Related docs: README.md, docs/foundation/documentation-personas.md, docs/README.md
Last reviewed: 2026-03-08
- Branch from
main. - Name branches with intent prefixes:
feat/*fix/*chore/*docs/*codex/*
Use Conventional Commits:
featfixdocsstylerefactorperftestbuildcichorerevert
Example:
feat(schema): add source confidence index
- Use a semantic PR title.
- Link the issue or context.
- Explain behavior/contract impact.
- Fill the
Documentation Governanceblock in the PR template when the PR touches:- any repo-wide canonical doc under
docs/ - root governance or frontdoor docs such as
README.md,CONTRIBUTING.md,SECURITY.md, orCODE_OF_CONDUCT.md - any code-adjacent doc currently routed as canonical from
docs/README.md
- any repo-wide canonical doc under
- Run and report:
./.github/scripts/quality-gate.sh --fullpnpm lint:cifor warning-fail-fast PR validation (already included in--full)pnpm lint:llmfor LLM-authored code (warnings as hard failures in CI forlint:llm:ci)pnpm changeset:ci:lint:allto validate all.changeset/*.mdfrontmatter package names against workspace manifests./.github/scripts/ci-api-pr.shfor API changes needing seeded integration parity with CI
- Changesets policy:
- Default: if
apps/*orpackages/*changed, include a.changeset/*.mdentry. - Root-only note: if only releasable root files changed (for example
package.json,pnpm-lock.yaml) and no workspace package/app changed, the gate skips changeset coverage requirements. - Exemption: allowlisted prototype packages may skip
.changesetonly with PR labelchangeset-exempt. - Current allowlist (
CHANGESET_EXEMPT_PACKAGES):@fodmapp/mobile-prototype. - Frontmatter package names in changed
.changeset/*.mdfiles must be valid workspace package names (apps/*/packages/*). - Local parity note: for exemption-path pushes before PR labeling, run
PR_LABELS=changeset-exempt git push. - Debug note: run
CHANGESET_CHECK_DEBUG=1 pnpm changeset:ci:status:strictfor verbose diff/frontmatter/workspace diagnostics.
- Default: if
- CI scope note:
- Heavy Turbo jobs are PR-scoped via
pr-scopeand may show asskipped; theCIgate treats scopedskippedjobs as acceptable.
- Heavy Turbo jobs are PR-scoped via
Use the exact Documentation Governance field labels from the PR template. This wording is
stable on purpose and should not be paraphrased in PR descriptions.
The block is required when the PR touches:
- any repo-wide canonical doc under
docs/ - root governance or frontdoor docs such as
README.md,CONTRIBUTING.md,SECURITY.md, orCODE_OF_CONDUCT.md - any code-adjacent doc currently routed as canonical from
docs/README.md
Non-canonical local docs can use a lighter PR summary and may write N/A in the block unless the
change alters canon, routing, or lifecycle.
How to fill each field:
Documentation audience:use persona names fromdocs/foundation/documentation-personas.md, for exampleContributor or engineer,Maintainer or operator, orReviewer or auditor.Canonical document(s):name the source-of-truth document or documents after merge, not every touched file.Lifecycle status after merge:use only the status vocabulary fromdocs/README.md:Implemented,Accepted,In progress,Planned, orArchived.Supersedes / archives:list exact files that are superseded or archived, or writeNone.
Reviewer rule:
- Reject PRs that create competing canon, leave lifecycle state ambiguous, or omit required docs-governance reporting for canonical docs.
Examples:
- Canonical docs PR
Documentation audience: Contributor or engineer; Maintainer or operator Canonical document(s): docs/README.md; CONTRIBUTING.md Lifecycle status after merge: Implemented Supersedes / archives: None - Code-only PR
Documentation audience: N/A Canonical document(s): N/A Lifecycle status after merge: N/A Supersedes / archives: N/A - Local doc becomes canonical
Documentation audience: Data or workflow operator Canonical document(s): etl/phase3/PRODUCT_LAYER_RUNBOOK.md Lifecycle status after merge: Implemented Supersedes / archives: docs/archive/transition/old-product-layer-notes.md
- Issues are open for public feedback and bug reports.
- Pull request creation is restricted to approved collaborators.
- Non-collaborators should open an issue first; maintainers can invite a collaborator when code contribution is approved.
Tip: pnpm install (via prepare) configures local Git hooks, and pushes are blocked until ./.github/scripts/quality-gate.sh --full passes (delete-only pushes are skipped).
After branch/worktree sync, run pnpm install before pushing.
The pre-push full quality gate runs monorepo-wide checks, not only changed-package scopes.
pnpm lint: formatting/lint baseline (prettier --check).pnpm typecheck: Turbo-orchestrated typecheck usingpnpm exec turbo run typecheck --onlywith explicit filters forcontent-config,types,ui,reporting,storybook,app,marketing, andresearch.pnpm test: fast deterministic unit test coverage (ui,app).pnpm test:storybook: browser-based Storybook interaction/a11y tests.pnpm check:all: full local CI mirror for governance + tokens + styles + UI + Storybook + scaffold apps../.github/scripts/ci-api-pr.sh: API CI parity runner (contract/unit tests + seeded integration flow).
Turbo command policy:
- Scripts that map to Turbo tasks should use
pnpm exec turbo run ...for strict local binary resolution. - Keep direct package commands only when Turbo orchestration is not the right fit (for example
app:dev,tokens:generate,openapi:generate).
- Prefer squash merge unless release tooling requires otherwise.
- Keep
mainprotected in GitHub settings.