Governance
What belongs in this repository, what belongs in consuming superbuild repos, and how changes are reviewed and recorded.
Source of truth
| Content | Authoritative location |
|---|---|
| Shared workflow policy | This repo: AGENTS.md, docs/ |
| Shared Cursor adapter sources | This repo: cursor/rules/ |
| Rules for editing this repo | This repo: .cursor/rules/ |
| Product build graph, targets, versions | Consuming superbuild repo |
| Repo-specific agent exceptions | Consumer root AGENTS.md, local .cursor/rules/ overlays |
| Materialized Cursor rules in consumers | Generated from submodule + overlays; not authoritative |
If canonical docs and a Cursor adapter disagree, docs win until adapters are fixed here.
What belongs here
- Superbuild workspace conventions (
src/,libs/,tools/ai-rules/) - CMake/Conan workflow policy (not product-specific target lists)
- AI agent guidance applicable across workspaces
- Rationale, architecture, governance, workflow process
- Templates for bootstrapping consumers
- Thin tool adapters
What belongs in consuming repos
- CMake superbuild lists, dependency versions, product options
- First-party source under
src/(often as nested submodules or subtrees) - Vendored or patched third-party code under
libs/when not satisfied via Conan - CI job definitions specific to the product
- Local
AGENTS.mdsections: team contacts, release process, documented exceptions - Local
.cursor/rules/overlays referencing shared policy
What must not happen
- Silent edits inside
tools/ai-rules/in a consumer without upstream merge here - Duplicating full policy text only in consumer
.cursor/rules/with no submodule - Using consumer-specific hacks to "patch" shared templates for one team without documentation
- Treating Cursor adapters as the only documentation of a policy decision
Change discipline
Scope
- One logical change per commit when possible
- Avoid drive-by refactors unrelated to the policy change
- Do not add speculative files, frameworks, or placeholders
Documentation
When changing semantics of architecture, workflow, governance, build policy, or tool integration:
- Update the relevant
docs/*.mdin the same change set - Sync
README.mdandAGENTS.mdentry points if user-facing summaries change - Update
cursor/rules/adapters if agent-visible behavior changes
Commits and branches
- Day-to-day work on
develop; stable consumption onmaster(fast-forward only) - See development-workflow.md for branch flow and pre-commit setup
- Message format: commit-messages.md (gitlint via pre-commit)
Use conventional types:
feat:new policy or templatedocs:documentation-only clarificationfix:correction of incorrect policy or adapterchore:mechanical changes (hooks, formatting, non-semantic renames)
Body text should state why when not obvious from the diff. Include AI: footer when applicable.
Review expectations
Reviewers verify:
- No contradiction across documents
- Rationale present for non-obvious boundaries
- Templates still align with docs
- Consumers can adopt without undeclared breaking layout changes
Submodule consumption rules
Consumers:
- Pin
tools/ai-rulesto a known-good commit for release branches - Bump deliberately with commit message noting workflow revision
- Re-materialize local Cursor adapters after adapter changes
Maintainers of this repo:
- Avoid force-pushing shared branches consumers track
- Document breaking changes in merge requests
Editing this repository with AI agents
Agents must follow .cursor/rules/ in this repo:
00-governance.mdc— authority and commit expectations10-doc-sync.mdc— documentation coupling20-change-scope.mdc— minimal diffs
Escalation
If a consumer team needs a permanent fork of shared policy, that signals either:
- Missing extension point (add template or overlay pattern here), or
- Product line divergence that should not share this workflow repo
Resolve by design discussion, not unmarked fork.
Related documents
- workflow.md — rollout process
- rationale.md — why central governance exists
- architecture.md — layered responsibilities