Skip to content

Make the skills index the default skill for new AI rooms - #5676

Draft
jurgenwerk wants to merge 5 commits into
mainfrom
cs-12343-update-default-system-card-to-use-new-md-entrypoint
Draft

Make the skills index the default skill for new AI rooms#5676
jurgenwerk wants to merge 5 commits into
mainfrom
cs-12343-update-default-system-card-to-use-new-md-entrypoint

Conversation

@jurgenwerk

@jurgenwerk jurgenwerk commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

(Written by Claude on Matic's behalf.)

A new AI assistant room now starts with one skill: the skills realm's index.md. It lists everything the assistant can reach and is short enough to push into every prompt, so the model reads only what a task calls for. It replaces the two legacy Skill cards that were pushed in full, and it applies in every submode — entering code mode no longer layers on a second set of skills.

An active system card still wins: defaultSkillCards / defaultSkillFiles replace the index when set.

Two bugs this exposed in updateSkillsAndToolsIfNeeded, which runs on every message send:

  • It rebuilt the enabled-skill list grouped by kind, so any room holding both a skill card and a .md skill had its order changed and got a state event that changed nothing else.
  • It re-fetched every .md skill's source over HTTP each time. It now reuses the stored file when the indexed content hash matches.

Tests that apply a tool call now attach a skill declaring that tool, instead of relying on the default skill to supply host tools.

A matching boxel-catalog change names the same index on the default system card, so the default is visible and editable in the UI.

The skills realm's index.md is the pull-model entry point: its body names
every skill and command the assistant can reach, short enough to push into
every room, so a room needs no other skill up front. It replaces the pair of
legacy Skill cards the host used to push, and it applies in every submode —
entering code mode no longer runs a second activation pass to add the coding
skill and source-code-editing on top.

Also fixes an ordering bug this exposed in updateSkillsAndToolsIfNeeded:
re-uploading split the enabled skills by kind and concatenated the buckets,
so any room holding both a skill card and a .md skill had its list reordered
on every message send, writing a state event that changed nothing but the
sequence.

CS-12343

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files  ±0      1 suites  ±0   2h 27m 46s ⏱️ + 1m 14s
3 809 tests ±0  3 795 ✅ ±0  14 💤 ±0  0 ❌ ±0 
3 828 runs  ±0  3 814 ✅ ±0  14 💤 ±0  0 ❌ ±0 

Results for commit 71593a8. ± Comparison against earlier commit 5037f91.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   14m 16s ⏱️ + 2m 14s
2 032 tests ±0  2 032 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 111 runs  ±0  2 111 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 71593a8. ± Comparison against earlier commit 5037f91.

These tests fired a tool call without attaching any skill that declares it,
relying on the room's default skill to supply host tools. The skills index
declares none, so the request resolved to no known codeRef: the host tests
timed out waiting for the room's tools to load, and the matrix test never saw
a result event.

Each now attaches a skill carrying the tool it applies, and the host tests
derive the function name from the code ref rather than hardcoding its hash.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Changes in packages/test-realm-cards/contents/skill-search-cards.json

Instructions Changes

--- /tmp/skill-diffs/old_instructions.txt	2026-08-04 10:12:20.909053530 +0000
+++ /tmp/skill-diffs/new_instructions.txt	2026-08-04 10:12:20.909053530 +0000
@@ -1 +1 @@
-
+Use search-cards-by-type-and-title to find cards by their type or title.

Commands Changes

--- /tmp/skill-diffs/old_commands.txt	2026-08-04 10:12:20.909053530 +0000
+++ /tmp/skill-diffs/new_commands.txt	2026-08-04 10:12:20.909053530 +0000
@@ -1 +1 @@
-[]
+[{"codeRef":{"name":"SearchCardsByTypeAndTitleCommand","module":"@cardstack/boxel-host/commands/search-cards"},"requiresApproval":true}]

Re-uploading a `.md` skill fetches its source over HTTP first, and this runs on
every message send, so each send re-downloaded every enabled markdown skill.
The realm-indexed file-meta already carries the hash of that content, so when
it matches the hash the room recorded, the stored fileDef is reused and the
fetch is skipped.
The test leaves the send un-awaited so it can assert the pending bubble, then
waits for the failure alert. The mock sleeps 1000ms before failing, which is
exactly waitFor's default timeout, so the wait had no margin for anything the
send does first — and it re-uploads the room's skills on every send.
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