Skip to content

fix(skills,sessions): strip frontmatter from injected skills, preserve skills across compaction#339

Merged
Aaronontheweb merged 4 commits into
devfrom
fix/skill-injection-and-compaction
Mar 20, 2026
Merged

fix(skills,sessions): strip frontmatter from injected skills, preserve skills across compaction#339
Aaronontheweb merged 4 commits into
devfrom
fix/skill-injection-and-compaction

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two fixes for skill auto-loading quality:

Closes #324, closes #315

Test plan

  • dotnet build — clean
  • All 1,140 tests pass
  • After compaction, verify skills remain in context (check turn_skill_auto_load logs)
  • Verify bot no longer reports skill metadata version as its own version

Update version to 0.7.3 and add release notes for the manifest
path normalization fix (#336).
…l content (#324)

Skill files include metadata like version numbers in their YAML
frontmatter. When injected raw into the LLM context, the model can
mistake skill metadata (e.g., version: "0.8.2") for its own runtime
version. Strip frontmatter using SkillScanner.ExtractBody so the LLM
only sees the markdown body with behavioral guidance.
Previously, compaction cleared _autoLoadedSkills and _autoLoadedSkillContent,
causing the bot to lose all skill context. Skills would only re-load if the
next user message happened to score above the keyword threshold again —
generic follow-up messages like "ok" or "what were we talking about" would
not re-trigger them, causing apparent amnesia.

Skills loaded during a session remain relevant after compaction. Keep the
cache so they continue to be injected on subsequent turns. New skills can
still be added via keyword matching on future messages.
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) March 20, 2026 22:01
@Aaronontheweb Aaronontheweb merged commit 78047be into dev Mar 20, 2026
3 checks passed
@Aaronontheweb Aaronontheweb deleted the fix/skill-injection-and-compaction branch March 20, 2026 22:10
Aaronontheweb added a commit that referenced this pull request Mar 20, 2026
…y, and frontmatter stripping

Update version to 0.7.4 and add release notes for context overflow
auto-compaction (#314, #340), skill preservation across compaction,
and YAML frontmatter stripping from injected skills (#324, #339).
Aaronontheweb added a commit that referenced this pull request Mar 20, 2026
…y, and frontmatter stripping (#341)

Update version to 0.7.4 and add release notes for context overflow
auto-compaction (#314, #340), skill preservation across compaction,
and YAML frontmatter stripping from injected skills (#324, #339).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant