Skip to content

M8: skills — SKILL.md discovery shared with dsh, index injection, on-demand load - #3

Merged
lroolle merged 1 commit into
mainfrom
m8-skills
Aug 13, 2026
Merged

M8: skills — SKILL.md discovery shared with dsh, index injection, on-demand load#3
lroolle merged 1 commit into
mainfrom
m8-skills

Conversation

@lroolle

@lroolle lroolle commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Skills, SKILL.md-compatible, reading the exact directories dsh reads<project>/.dsc/skills, <project>/.agents/skills, ~/.dsc/skills, ~/.agents/skills, precedence in that order on a name collision (project beats home, harness-native beats shared; mirrors dsh's root ranks, verified in its skill-filesystem package). Project root = nearest .git, also the dsh rule. One skills directory serves both harnesses — that is the launch-day interop story.
  • Progressive disclosure (DESIGN.md "Skills"): the system prompt carries one index line per skill (name + description from frontmatter); the body enters context only when the model invokes the new skill tool. Static tool schema — adding a skill never rewrites the tool's prefix bytes.
  • Cache-impact: none by default. Zero skills = no tool registered = the gated default prompt, byte-identical (prompt-golden green, plus an explicit empty-index test). With skills, the prompt grows by the index only, frozen by a new golden.
  • Hardened discovery: malformed YAML / missing fields / dsh-invalid names skip that one skill with a warning, never a crash. The 126 real skills in this machine's ~/.agents/skills all parse with zero warnings. dsc skills lists what discovery found and from where; /status gained a skills line.
  • Measured (real API, flash, totals byte-stable across runs): the index costs ~149 tokens fixed + ~25 per skill — 1134 → 1308 → 1359 input tokens/turn at 0/1/3 skills. Verified live: flash invoked skill {"name":"release-notes"} and answered from the loaded body. Full notes: docs/devlog/2026-08-13-m8-skills.org.
  • Deliberately not here: no dsh plugin adapter (their manifest format was deleted upstream 08-09 with no migration), no marketplace, no install command, no network fetching. MCP stays out of core per the Round 3 amendment.

Test plan

  • bun test tests — 133 pass (new: tests/skills.test.ts covering frontmatter hardening, precedence/shadowing, empty roots, project-root walk, on-demand load; goldens for the skills prompt and the empty-index no-op)
  • bun src/cli.ts --help (the CI smoke step)
  • Live: discovery + injection + skill tool invocation against the real API

Made with Cursor

…demand load

Discovery reads the same roots dsh reads (verified in its
skill-filesystem package): <project>/.dsc/skills,
<project>/.agents/skills, ~/.dsc/skills, ~/.agents/skills, precedence
in that order on a name collision, project root = nearest .git — so
one skills directory serves both harnesses with the same collision
semantics. Skill identity is the frontmatter name, under dsh's own
name rule.

Progressive disclosure per DESIGN.md: the system prompt carries one
index line per skill; the body enters context only when the model
invokes the skill tool (static schema — no name enum, so adding a
skill never rewrites the tool's prefix bytes). Zero skills = no tool
registered = the gated default prompt, byte-identical, and the golden
now proves that for an empty index explicitly. Frontmatter parsing is
a zero-dep YAML subset; anything unparseable skips that one skill
with a warning (the 126 real skills in this machine's ~/.agents/skills
all parse, zero warnings). dsc skills lists what discovery found;
/status gained a skills line.

Measured (real API, flash, totals byte-stable across runs): the index
costs ~149 tokens fixed + ~25 per skill — 1134 -> 1308 -> 1359 input
tokens/turn at 0/1/3 skills. Verified live: flash invoked skill
{"name":"release-notes"} and answered from the loaded body. MCP ships
nothing here (Round 3 amendment stands; upstream deleted its plugin
manifest 08-09 with no migration — holding is deliberate).

Cache-impact: none by default — the default prompt is byte-unchanged
(prompt-golden green). With skills discovered the prompt grows by the
index only, frozen by a new golden; discovery runs once per process so
the prefix is byte-stable across a session's runs. 133 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@lroolle
lroolle merged commit b9db354 into main Aug 13, 2026
1 check passed
@lroolle
lroolle deleted the m8-skills branch August 13, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant