docs: add buildstream skill for factory-wide BST patterns - #979
Conversation
Capture the BuildStream 2 patterns that are true for every factory BST repo (dakota and fsdk-containers) as a new docs/skills/buildstream/ skill: graph-first debugging, element-kind and dependency-type semantics, cache-key invalidation cones, upstream-first junction hygiene, and source/ref discipline. Per-repo product decisions (platform.bst vs components/* composition, x86_64_v3, distroless SLIM recipe) are explicitly documented as NOT factory-general, with pointers to each repo's own skills. BST behavior claims verified against /apache/buildstream docs (arch_cachekeys.md, format_public.md, format_project.md, handling-files/composition.md). Registers the skill in docs/SKILL.md, regenerates the skill index, and adds /apache/buildstream to the known Context7 library IDs in context7.md. Assisted-by: Claude via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The first draft repeated dakota patch-junctions.md's absolute "no local
junction patch queues" rule. That rule is false in practice: dakota
carries 7 patches in patches/freedesktop-sdk/ and fsdk-containers
carries 0001+0002, both deliberately replicating the parent project's
queue so cache keys align with the parent's published artifact cache.
Restate the principle as drift control: a junction's patch_queue is
part of its source hash, so patches diverging from the parent's queue
are cache-destroying (prohibited) while patches replicating it
byte-for-byte are cache-aligning (mandatory). The per-repo parameter is
which upstream project's queue to match; dakota enforces it with
just patch-drift-check in CI.
Evidence: dakota/patches/freedesktop-sdk/ (7 patches, incl. patch_queue
in elements/freedesktop-sdk.bst), fsdk-containers
elements/{freedesktop-sdk,gnome-build-meta}.bst, dakota
docs/skills/bst-overrides.md.
Assisted-by: Claude via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
hanthor
left a comment
There was a problem hiding this comment.
Needs a rebase — the generated skill index in this branch is 9 days behind main
Still a draft, so this is informational rather than a gate. The content itself is docs-only and validate was green when it last ran, but the branch no longer merges:
$ git merge pr979
Auto-merging docs/skills/context7.md
CONFLICT (content): Merge conflict in docs/skills/index.json
CONFLICT (content): Merge conflict in docs/skills/index.md
Both conflicts are in generated files, and both are the same stale-date problem. This branch carries:
- "generated_at": "2026-08-08",
+ "generated_at": "2026-08-09",
while main has moved on:
$ head -2 docs/skills/index.json
{
"generated_at": "2026-08-18",
$ grep -n "^Generated" docs/skills/index.md
6:Generated: 2026-08-18 · schema 1.0 · 40 skills
So the index edits here were stale the moment main regenerated, and hand-resolving them risks reverting main's index by 9 days and one skill entry.
The fix is mechanical and the repo already has the tool for it — after rebasing, drop both index files from the diff and regenerate:
python3 scripts/generate_skill_index.py --write
python3 scripts/generate_skill_index.py --check
--check passes on main today, so a correct rebase should land on docs/skills/index.json and index.md are up to date (41 skills) once buildstream is added.
The substantive part — docs/skills/buildstream/SKILL.md plus the two reference files, and the docs/SKILL.md / docs/skills/context7.md links — is self-contained and low risk: nothing under system_files/, so no image blast radius across bluefin / bluefin-lts / dakota. python3 scripts/check-doc-links.sh passes on main; re-run it after the rebase to confirm the new references/ links resolve.
Generated by Claude Code
What
Adds
docs/skills/buildstream/— a factory-level skill capturing the BuildStream 2 patterns that are true for every factory BST repo (today:dakotaandfsdk-containers), harvested from both repos'docs/skills/.SKILL.md— scope rule, the per-repo divergence table, 7 core patterns, red flags, verificationreferences/cache-keys-and-junctions.md— strong/weak key model, invalidation cones, junction drift-control policyreferences/element-authoring.md— element/source kinds, dependency types, variables, conditionals, sandbox constraints, overlap rulesdocs/SKILL.mdrouter;index.json/index.mdregenerated;/apache/buildstreamadded to the known Context7 IDs incontext7.mdJunction patch queues: drift control, not "never patch"
A junction's
patch_queueis part of its source hash, so the queue determines which upstream artifact cache your keys align with:just patch-drift-checkin CI); the per-repo parameter is which upstream queue to match (currentlygnome-build-metaat the pinned ref in both repos).Note: dakota's own
docs/skills/patch-junctions.mdstates an absolute "NO LOCAL JUNCTION PATCH QUEUES" rule that is contradicted by dakota's current state (patches/freedesktop-sdk/carries 0001–0007) and by its ownbst-overrides.md(byte-identity requirement). That inconsistency is reported for correction at the source in dakota — this skill deliberately does NOT repeat the absolute rule.The general-vs-repo-specific line
Promoted only what holds in both repos. Explicitly documented as per-repo decisions, not factory rules:
components/*only,platform.bstbannedx86_64_v3just verifyNot promoted: dakota's packaging templates (
packaging-*.md), systemd/preset/dconf/bootc-ldconfig rules, GNOME/GL specifics; fsdk-containers' SLIM recipe, no-shell rule, verify gates, FSDK-tag versioning.Evidence
/apache/buildstream(arch_cachekeys.md,format_public.md,format_project.md,handling-files/composition.md,downloadablefilesource.py); cited inline.project.confoptions in both repos, fsdkintegration/ldconfig.bstusage, dakotaelements/freedesktop-sdk.bstv3 conditional, both repos' junction patch queues.pre-commit run --all-filesgreen (front-matter, index staleness, doc links).Docs-only change (
docs/**); opened as draft for review per factory PR policy.