feat: workspace skills and knowledge first, a starter after linking, and the start-screen box back
Merged
SA
2mo ago+1158+1158+0123456789012345678901234567890123456789-62-62-01234567890123456789
Issue for this PR
No GitHub issue; tracked internally.
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Three commits.
1. Skill source labels and a precedence rule.
- Every skill the agent sees now carries
source="workspace|project|built-in|personal|other", set from where altimate-code found it (altimate/skill-source.ts). - The skills preamble says to prefer them in that order and not to ask "which team's skill?".
- Before this, a workspace skill, a repo skill and another team's copy looked identical. With near-duplicates the agent asked which team's policy to follow, or went exploring.
- Listings stay in name order. An earlier version sorted by source; that pushed the built-ins behind every project skill and out of the skill tool's 50-entry list, and they were loaded less (12/30 vs 18/30).
2. The start-screen workspace box is back.
- 0.12.6 removed it because every keybinding died once it loaded. I bisected with builds.
- Cause: the view's root was a
<Show>that renders nothing until the binding resolves. OpenTUI'sSlotshows the fallback for an empty first render and renders the view again when its output changes, so each arrival mounted a fresh view that started empty and resolved again. The lines never stayed and the box remounted without end. - Fix:
WelcomeBlockkeeps a<box>root. - The upstream sidebar views with a
<Show>root (todo, files, mcp) read shared state, so they remount once rather than loop; I left them alone.
3. A fixed-format workspace starter, and knowledge used without being asked.
- After a link, a deterministic message: which workspace, its skills, knowledge, integrations, memory setting, and up to three prompts. No model call.
- Shown by
altimate-code link, in the TUI's post-link dialog, and from a new/workspaceā Get started. Picking a prompt fills the input without sending it. GET /altimate/workspace/starterserves it for the IDE extension's chat. The extension still needs to call it.- When the workspace has knowledge, the workspace section tells the agent to check it (
ask_knowledge_base) for best practices and conventions unprompted.
How did you verify your code works?
- Tests: new tests for each part. 13 mutation checks, all caught: removing the labels, the rule, the knowledge line, the route's stale-link check, the welcome
<box>root, and so on. - Full suite: 9 failures and 1 error. I ran the 9 failing tests on a clean
origin/mainand they fail there too. - Routing harness, workspace asks: 11/11, against 8/12 on 0.12.6.
- Routing harness, built-in asks: 18/30, the same as 0.12.6.
- Over-steering: no built-in ask loaded a workspace skill.
- Harness setup: a real linked workspace with 6 skills, plus 150 other-team near-duplicates in
.claude/skills, usingaltimate-backend/altimate-default. - Knowledge:
ask_knowledge_basecalled unprompted on 4/4 best-practice questions, against 0/4 on 0.12.6 with the tool available. - E2E on a test tenant:
- headless and TTY
linkprint the starter; - the route returns linked, unlinked, and 403 for a browser origin;
- TUI: the link dialog shows the prompts, a chosen prompt fills the input, and
/workspaceā Get started works; - the welcome box renders and Ctrl+P opens the palette, checked in tmux.
- headless and TTY
Screenshots / recordings
Terminal captures from tmux are in the verification notes above. No recording.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
š¤ Generated with Claude Code
https://claude.ai/code/session_018fJ3X7pcGT4R9yzjsJnqsV
Summary by cubic
Makes the linked workspace's own skills and knowledge win over near-duplicates and general advice, shows a fixed starter message after linking, and brings back the start-screen workspace box without the dead keybindings that took it out in 0.12.6.
Skills: sources and precedence
- Every skill in the agent's listings now carries
source="workspace|project|built-in|personal|other", set from wherealtimate-codefound it. workspaceis only this project's own snapshot, judged on both the matched and resolved path; a session started in a subdirectory of the repository still owns its snapshot there. A symlink or configured path into another project's snapshot isother, and a project skill with the exact name of a workspace skill replaces it.- The skills preamble tells the agent to load the highest-source skill that fits a task and not to ask which team's skill it is.
- Listings stay in name order; sorting by source pushed built-ins out of the skill tool's 50-entry list, and they were loaded less.
Starter, knowledge, and the welcome box
- After a link, the TUI's post-link dialog and
/workspaceā Get started show the workspace's skills, knowledge, integrations, memory setting, and up to three prompts; the dialog opens at once and the starter fills in when it arrives. Prompts land below the existing rows, so a late arrival doesn't move the selection, and choosing one fills the input without sending it. GET /altimate/workspace/starterserves the same message to the IDE extension's chat, which still needs to call it.- When the workspace has knowledge, the agent is told to check it for best practices and conventions unprompted.
- The welcome box is registered again with a
<box>root, which stops OpenTUI from remounting it endlessly and killing keybindings, and it now refreshes right away on an in-process link or unlink.