Skip to content

fix(skills): pi no longer drops 16 skills — story tags above frontmatter delimiter (BUG-2026-08-06, issue #108) - #109

Merged
danielvm-git merged 4 commits into
mainfrom
fix/pi-skills-frontmatter-delimiter
Aug 7, 2026
Merged

danielvm-git merged 4 commits into
mainfrom
fix/pi-skills-frontmatter-delimiter

Conversation

@danielvm-git

Copy link
Copy Markdown
Owner

Problem

pi (v0.82.0) reports description is required at startup for 16 skills (audit-code, plan-work, develop-tdd, fix-bug, …). Reporter's issue: #108.

Root cause (verified in pi source via opensrc): pi's frontmatter extractor (src/utils/frontmatter.ts) requires the opening delimiter --- to be the first characters of SKILL.md:

if (!normalized.startsWith("---")) {
    return { yamlString: null, body: normalized };
}

16 source skills/*/SKILL.md files placed # story: / <!-- story: --> traceability tags above the delimiter → pi sees no frontmatter → no description → skill silently dropped. In-repo this was masked because the generated .pi/skills/ copies (via srp-engine.py) strip the tags; every external install (symlinked sources) hits it.

Fix

  1. 16 SKILL.md sources: move leading story tags inside the frontmatter block as # story: YAML comments (converted <!-- --> form). Valid YAML for pi, PyYAML, and the bundled simple_yaml.py fallback; trace-stories.sh greps the whole tree so traceability is unaffected; generated artifacts stay byte-identical (no churn).
  2. validate-skill-yaml.py now scans sources + generated copies with a new R1 rule: file must start with --- at byte 0. Wired into the sync-skills.sh post-generation guard → regression-proof.
  3. skill-common.sh: parse_frontmatter / parse_frontmatter_okf now skip comment lines (story tags inside frontmatter no longer leak into skills-lock.json descriptions or the search index).
  4. Removed stray .agents/skills/SKILL.md (empty name/description — the 17th warning).

Verification

  • Validator: 162/162 (81 sources + 81 generated), RED→GREEN proven (16 failures → 0)
  • Generated .pi/, .cursor/, .gemini/ trees byte-identical after sync
  • trace-stories.sh --strict PASS, check-skill-links PASS, check-skill-size PASS
  • npm run compliance: 98/98 PASS
  • Golden suite: 38/38 PASS
  • Bug file: specs/bugs/BUG-2026-08-06-pi-drops-skills-frontmatter.md

…16 skills (BUG-2026-08-06)

pi requires the frontmatter delimiter '---' at byte 0 of SKILL.md
(dist/utils/frontmatter.js startsWith gate). 16 sources had
# story: / <!-- story: --> tags above the delimiter, so pi returned no
frontmatter, saw no description, and dropped the skill as
'description is required' (issue #108).

- Move leading story tags inside the frontmatter block as YAML comments
- validate-skill-yaml.py: scan sources + generated copies; new R1 rule
  (must start with '---'), wired into sync-skills.sh guard
- skill-common.sh: parse_frontmatter / _okf skip comment lines (tags
  inside frontmatter no longer leak into descriptions/lockfile/index)
- remove stray .agents/skills/SKILL.md (empty name/description)
Tag position shift (line 1→2 for moved story tags) reflected in
codebase-wiki; fresh golden suite report.
@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@danielvm-git
danielvm-git merged commit 3d4f0cf into main Aug 7, 2026
3 of 15 checks passed
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.87.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant