Repository navigation
Description
Version: bigpowers 2.88.17 · pi
Since 2.88.12, pi reports [Skill conflicts] at startup and drops 10 skills. The cause is the story-tag conversion from PR #158 (commit 120a0d9, "fix(skills): convert story tags to HTML comment form in all SKILL.md files", closes #140).
Symptom
[Skill conflicts]
~/.pi/agent/skills/audit-code/SKILL.md
Map keys must be unique at line 2, column 1:
<!-- story: e51s04 -->
<!-- story: e45s18 -->
^
Affected skills (all have 2+ markers): audit-code, craft-skill, deepen-architecture, develop-tdd, gate-trace, plan-work, request-review, run-benchmark, stocktake-skills, validate-fix.
Root cause
pi parses skill frontmatter with the yaml npm package (dist/utils/frontmatter.js → parse()), which rejects duplicate keys. Inside a --- block, <!-- story: e45s18 --> is not a comment. YAML reads it as a mapping entry: key <!-- story, value e45s18 -->. Two such lines repeat the key, so the whole frontmatter fails to parse and pi discards the skill.
PR #158 converted every # story: line, including the ones inside the frontmatter block. Only body tags needed the HTML form (the actual request in #140); frontmatter tags were already invisible to the model because pi passes only the body to the skill prompt.
The change is regression-only in frontmatter. Diffing the published tarballs 2.88.9 vs 2.88.17, non-story frontmatter content is byte-identical across all 81 skills; the sole difference is 46 markers rewritten from # story: to <!-- story: … -->.
Why CI does not catch it
scripts/validate-skill-yaml.pyparses with PyYAML, which accepts duplicate keys silently — it reports "Parse OK: 81".scripts/lib/skill-common.sh:113(parse_frontmatter) skips<!--lines, so descriptions still resolve.scripts/lib/trace-stories.py:93/trace-matrix.py:112matchstory:\s*(e\d{2}s\d{2}), which accepts both forms.
Only the pi client is strict, and only at load time.
Context: #109 / BUG-2026-08-06 fixed a different instance of "pi drops skills" (tags above the delimiter). This is the same outcome by another route.
Suggest
In scripts/validate-skill-yaml.py:
- Load frontmatter with a loader that rejects duplicate keys (
yaml.BaseLoader-independent check, oryaml.safe_loadplus an explicit duplicate-key hook). - Add a rule: no
<!--inside the frontmatter block. HTML comments belong in the body, below the closing delimiter.
And revert the frontmatter-level conversion so tags inside --- use # story: eNNsNN again. Body markers can stay in HTML form.
Local workaround on the consumer side, before startup:
cd "$(dirname "$(readlink -f ~/.pi/agent/skills/audit-code)")/.." # global bigpowers install
python3 - <<'PY'
import glob, re
for f in glob.glob('skills/*/SKILL.md'):
L = open(f).read().split('\n')
end = next((i for i in range(1, len(L)) if L[i].strip() == '---'), None)
if end is None:
continue
for i in range(1, end):
m = re.match(r'^\s*<!--\s*(story:.*?)\s*-->\s*$', L[i])
if m:
L[i] = '# ' + m.group(1)
open(f, 'w').write('\n'.join(L))
PYAfter that repair: 45 # story: markers in frontmatter, 98 <!-- story: --> markers in bodies, validate-skill-yaml.py PASS, and pi loads all 82 skills.
Side note, same commit: skills/audit-code/SKILL.md open body contains > **HARD GATE** — **HARD GATE** — Audit must check for: … (duplicated phrase).
I can open a PR with the validator rule and the frontmatter revert if you want it.
Activity
Googlom commentedon Oct 31, 2026
sorry, my pi got crazy 😃
danielvm-git commentedon Nov 6, 2026
Reopening — this was closed without a fix, and the defect is live in 2.93.3
Verified today on
main(52842a2f, v2.93.3) and on the published npm artifact:120a0d99exists:git log --oneline -- skills/audit-code/SKILL.mdends at6136322a/120a0d99.skills/*/SKILL.mdcarry<!-- story: … -->inside the---block.audit-code, craft-skill, deepen-architecture, develop-tdd, gate-trace, plan-work, request-review, run-benchmark, stocktake-skills, validate-fix.scripts/validate-skill-yaml.pystill reportsPASS … Parse OK: 160(PyYAML accepts duplicate keys).Note that
skills/migrate-spec/SKILL.mdshows the correct pattern: tags below the closing---. The convention is currently applied three different ways across the catalog.Re-verified fix shape against pi 1.5.0s own parser (
require("yaml").parse, the same packagedist/utils/frontmatter.jsuses):So the fix is: tags inside the frontmatter use
# story: eNNsNN(YAML comment), tags in the body may keep the HTML form. Splitting the CI gate out as its own issue since it is a separate deliverable.danielvm-git commentedon Nov 6, 2026
Issue batch filed (fix order)
validate-skill-yaml.pycannot detect this form — CI reported green.agents/skills(Antigravity render) auto-discovered by pi, outranks source.mcp.json→ project server blocked on every startdirectToolsin pi'smcp.json, ignored by pi-mcp-adapterpi update --extensionsbigpowers doctorFix order matters: 1 and 2 are the same defect seen from the artifact and the gate. Doing 2 first makes 1 provably fixed. 3 and 4 are the shouting symptom and its cause. 5/6/7 are config placement and docs.
Suggested grouping into work: #173 + #207 (one PR, ships as
fix(skills)), #208 + #209 (needs the channel decision from #214), #210 + #211 (needs #217).danielvm-git commentedon Nov 6, 2026
Full finding batch (fix order)
validate-skill-yaml.pycannot detect that form — CI reported green.pi/skillsships 0 of 92 bundled assets.agents/skills(Antigravity render) auto-discovered by pi.mcp.json→ project server blocked every startdirectToolsin pi'smcp.json, ignored by the adapterpi update --extensionsbigpowers doctorSuggested PR split: #173 + #207 (
fix(skills)), #218 (fix(dist), needs the assertion first), #208 + #209 (fix(dist), after #214 decides the channel), #210 + #211 + #212 (fix(mcp)/docs).danielvm-git commentedon Nov 6, 2026
Batch addendum — install/uninstall lifecycle
Found while executing the machine cleanup with the install paths in hand:
install.sh --uninstallis a no-op from a checkout; copy-mode channels are never removablebin/setup.jsuses.pi/agent/skillsfor pi's project-local path — pi scans.pi/skillsBoth belong to the #214 (single-channel distribution) decision: a channel needs an install path and a recorded uninstall path. #219's fix direction (install manifest at
~/.bigpowers/install-manifest.json) also gives #216 (bigpowers doctor) its data source.Also confirmed for #215: the wrong frontmatter form is not only in
skills/*/SKILL.md—docs/references/traceability-gate.mdanddocs/references/tombstones.mddescribe the story-tag convention, and 39 files underdocs/andspecs/carry<!-- story: -->at line 3. The docs must state the rule that the parser enforces: inside frontmatter only#comments, everything else usesmetadata:.danielvm-git commentedon Nov 6, 2026
Batch plan (dependency order = SCOPE order)
Baseline on
main@52842a2f, before any change:npm run compliance0,bash scripts/run-verification-gates.sh56/56 deterministic gates PASS,bash scripts/trace-stories.sh --strict0. Green baseline — no pre-existing red gate. One baseline defect logged locally instead of filed:sync-skills.shregenerates 162 committedspecs/artifacts (506k deletions) because they were built with.claude/worktrees/**present → recorded asBUG-2026-11-06-sync-specs-artifact-churn.skills/*/SKILL.md,skills-lock.json,scripts/validate-skill-yaml.py,tests/test-skill-frontmatter-strict.sh,scripts/lib/golden-suite-gates.shscripts/lib/sync-render.sh,scripts/lib/sync-post.sh· #219/#220:scripts/install.sh,scripts/lib/install-targets-*.sh,bin/setup.jsscripts/lib/install-targets-b.sh,bin/setup.js, newdistribution-targets.yaml,scripts/sync-skills.sh,scripts/install.sh.mcp.json,bin/setup.js,scripts/validate-mcp-package.sh,docs/references/bigpowers-mcp.md,docs/references/agent-tooling.mdPR split:
#173 + #207→ onefix(skills)/fix(ci)pair, because the validator must reject exactly what the data fix removes (B1).#218alone.#209 + #208together once the render target moves, since the channel manifest is what stops the collision returning.#210 + #211 + #212may ride onefix(mcp)/docsPR (different files, same subject).#219 + #220onefix(install)PR.Docs note for #215: the wrong frontmatter form is documented as correct in
docs/references/traceability-gate.mdanddocs/references/tombstones.md, and 39 files underdocs/andspecs/carry<!-- story: -->at line 3. The rule to write down: inside the frontmatter only#comments; everything else goes inmetadata:or the body. #215 owns that rewrite; B1 only fixes the shipped data.Gates policy: every batch rebases on
main, re-runs full Preflight, and merges only with all workflows green. No gate, test or workflow is weakened to get there.Status updates follow as new comments; this table is not edited.
fix(skills): YAML comments for frontmatter story tags, and a gate tha…
danielvm-git commentedon Nov 6, 2026
Batch B1 — shipped
skill-frontmatter-strictgate 5/5; golden suite 57/57Merged as
28110b81(squash).mainpulled, branch and worktree removed.What changed: 22
skills/*/SKILL.md(43 markers) now use# story:inside the fence;validate-skill-yaml.pygained R4 (no HTML comment in the block) and R5 (no duplicate top-level key), both dependency-free so they fire with the bundledsimple_yamlfallback;tests/test-skill-frontmatter-strict.shdrives the real validator over throw-away trees and is wired intoscripts/lib/golden-suite-gates.sh.Decisions logged in
specs/state.yamlunderdecisions:: baseline-preflight, batch-order, sync-skills-specs-churn (reverted 162 committedspecs/artifacts rather than committing 506k lines of churn →BUG-2026-11-06-sync-specs-artifact-churn, out of SCOPE), frontmatter-form, epic-tracking.Not in scope of this PR, by design:
model,effortandphaseare bigpowers extensions rather than Agent Skills spec keys — pi tolerates unknown keys, so they load, but the separation is #215's job. Recorded there.Next: B2 — #218 (rendered targets ship 0 of 92 bundled assets) in parallel with #219 + #220 (install/uninstall lifecycle).
chore(release): 2.93.4 [skip ci]
github-actions commentedon Nov 6, 2026
🎉 This issue has been resolved in version 2.93.4 🎉
The release is available on:
Your semantic-release bot 📦🚀
danielvm-git commentedon Nov 6, 2026
Batch B2 — shipped
find .pi/skills -mindepth 2 -type f ! -name SKILL.md→ 92;render-assetsgate 4/4install-manifestgate 6/6 (repo-root + node_modules + chained hop + foreign-link + copy-mode replay).pi/agent/skillsinstall-helpersALL PASS; local target now.pi/skillsMerged:
7726939a(#223),6172b559(#224). Branch + worktree removed, local main == origin/main.Notes:
.agents/skillsstill lives at the Antigravity render path — this batch only fixed its payload; the relocation is bug(pi): .agents/skills (Antigravity render target) is auto-discovered by pi and outranks the maintained source #209 (B3).node_modulessymlink (worktrees don't inherit the main install); CI does cleannpm ci. No code change required.Next: B3 — #209 (relocate the Antigravity render target out of pi discovery) → #208 (single-channel manifest + collision report).
danielvm-git commentedon Nov 6, 2026
Batch B3 — #209 shipped
.agents/skillsrender target auto-discovered by pirender-targets-not-discoverablegate 5/5; render now.bigpowers/rendered/antigravity/skillsMerged
24bbbd94(squash). No worktree (worked on a feature branch of the main checkout).Next in B3: #208 — single-channel distribution +
--verifyduplicate-root report, then B4 (#210, #211, #212).danielvm-git commentedon Nov 6, 2026
Batch B3 — shipped
.agents/skillsrender auto-discovered by pirender-targets-not-discoverablegate 5/5verify-distributiongate 4/4 (clean / package-only / conflict / symlink-only)Merged
24bbbd94(#225),6a55a91d(#226). No worktrees (feature branches of the main checkout).#208 scope note: this PR ships the diagnostic + documented contract (
verify-distribution.sh --strict,install.sh --verify, channel matrix indocs/references/agent-tooling.md). The full single-channel manifest (distribution-targets.yaml+ exclusive-per-host setup) is multi-story and is tracked as epic #214 — noted in the PR body.Next: B4 — #210 (tracked
.mcp.jsonblocked project server), #211 (directToolsdoc), #212 (pi update --extensionsguidance).danielvm-git commentedon Nov 6, 2026
Final summary — all 10 concrete issues closed, 5 epics planned
install.sh --uninstallno-op + copy-mode.pi/agent/skills.agents/skillsrender auto-discovered by pi.mcp.jsonblocked project serverdirectToolsin the wrong filepi update --extensionsguidanceCI results
Every PR merged green:
sync,skill-verify,story-verify,verification-gatesall pass;release/pagesskip as expected. Golden suite grew from 56 → 61 deterministic gates across this batch:skill-frontmatter-strict(pi: frontmatter story tags converted to HTML comments break YAML parsing — 10 skills dropped as "Map keys must be unique" (since 2.88.12) #173/bug(ci): validate-skill-yaml.py cannot detect the frontmatter form that drops skills in pi #207) — pi'syamlparser semanticsrender-assets(bug(dist): rendered .pi/skills and .agents/skills ship 0 of 92 bundled skill assets (scripts, REFERENCE.md, templates) #218) — bundled asset parityinstall-manifest(bug(install): install.sh --uninstall is a no-op from a checkout and never removes copy-mode channels #219) — resolved-path uninstallrender-targets-not-discoverable(bug(pi): .agents/skills (Antigravity render target) is auto-discovered by pi and outranks the maintained source #209) — no render at a discovery rootverify-distribution(bug(pi): five install channels produce 80 skill-name collisions and pi ranks the wrong copy #208) — one channel per hostinstall-helpersassertion update for bug(setup): pi project-local path is .pi/agent/skills, which pi never scans #220)Gate decisions logged in
specs/state.yamlbaseline-preflight(green before any change),batch-order,sync-skills-specs-churn(reverted 162 committed artifacts →BUG-2026-11-06-sync-specs-artifact-churn, out of SCOPE),frontmatter-form,epic-tracking,bug-batch-complete,epic-intake,main-protected-recovery.Deferred / out of SCOPE
e89–e93record which stories the bug batch already delivered (done) and which remain (todo); registration inrelease-plan.yaml/execution-status.yamlisbuild-epicstep 1 for each.BUG-2026-11-06-sync-specs-artifact-churn—sync-skills.shregenerates 162 committedspecs/artifacts (worktree paths, timestamps) on a clean main. Logged inspecs/bugs/registry.yaml, not fixed here.Final state
main==origin/main==40713cd3, working tree clean.specs/bugs/registry.yaml(10 from the batch + 1 local finding).