Workflow
How shared workflow policy is changed, reviewed, rolled out to consuming superbuild repositories, and how local exceptions are handled.
Principles
- Upstream first — shared policy changes land in
ai-workflows/superbuild-workflowbefore consumers rely on them - Docs with semantics — behavior or boundary changes include documentation updates in the same change set
- Submodule as delivery — consumers take revisions via
tools/ai-rules/submodule pointer - Explicit exceptions — local deviations are documented in the consumer, not hidden in forked shared files
Change lifecycle
Discover → Propose (here) → Review → Merge → Tag/commit → Consumer submodule bump → Verify
1. Discovery
Sources:
- Maintainer editing this repo
- Developer hitting friction in a consuming workspace
- AI agent noticing inconsistency between docs and practice
- Build/CI failure traced to ambiguous policy
When discovery happens in a consumer, treat it as input to this repository unless the issue is purely local (e.g. one product's proprietary module layout).
2. Implement in this repository
- Identify affected docs and adapters (
cursor/rules/, templates) - Make a focused change set
- Update
AGENTS.md/README.mdif entry-point semantics change - Commit with a clear message (see governance.md)
3. Review
Reviewers check:
- Consistency across docs
- No contradiction with cmake-conan-policy.md or repository-layout.md
- Adapters remain thin
- Rationale updated if the why changed
4. Rollout to consumers
Consumers update the submodule:
cd tools/ai-rules
git fetch origin
git checkout <desired-commit-or-tag>
cd ../..
git add tools/ai-rules
git commit -m "chore: bump ai-rules workflow to <revision>"
Then re-run or verify setup steps (e.g. materialize Cursor rules from templates/setup-dev.template.sh pattern).
Pinning: Production branches often pin to a tested commit. Integration branches may track main more aggressively.
5. Verification
After bump:
- Confirm
tools/ai-rules/AGENTS.mdrevision matches expectation - Re-materialize
.cursor/rules/if adapter files changed - Run representative configure/build on Windows, Linux, and/or macOS as appropriate
- Update consumer
AGENTS.mdonly if local exception docs need adjustment
Fixing a problem found in one consumer
| Situation | Action |
|---|---|
| Shared policy was wrong or unclear | Fix docs/rules here; bump submodule in all consumers that need it |
| Consumer violated shared policy | Fix consumer; optionally clarify docs here if agents keep misreading |
| Legitimate one-off exception | Document in consumer AGENTS.md + local overlay; consider whether policy should generalize |
Never "fix" shared semantics only in .cursor/rules/ of a consumer without upstreaming.
Local exception handling
Exceptions are allowed when:
- The exception is documented (what, why, scope, owner)
- The exception lives in local overlay rules or consumer
AGENTS.md - Shared files under
tools/ai-rules/remain unmodified (read-only checkout discipline)
If an exception becomes common across workspaces, promote it to shared policy here and remove redundant local overlays.
Emergency/temporary divergence
Sometimes a consumer must pin an old submodule revision while others advance. That is normal. Document the pin reason and target date for realignment in the consumer's AGENTS.md.
Do not maintain a long-lived git fork of this repository inside a consumer.
Communication
For team-visible changes:
- Note summary in merge request description
- Mention submodule bump requirement for consumers
- Call out breaking changes to adapter filenames or required directory layout
Related documents
- governance.md — ownership and review discipline
- architecture.md — layered model
- cursor-integration.md — rematerializing adapters