Skip to content

feat(skills): ship system skill updates users can review, merge or rename - #1073

Draft
janburzinski wants to merge 4 commits into
mainfrom
t3code/system-skills-upgrade-merge-plan
Draft

janburzinski wants to merge 4 commits into
mainfrom
t3code/system-skills-upgrade-merge-plan

Conversation

@janburzinski

@janburzinski janburzinski commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

When we improve a built-in skill today, organizations never get it: every org keeps the copy it was seeded with, and users who edited a skill have no way to see or take our changes.

System skills are now published as versions to a global registry. Copies nobody touched move to the new version automatically; edited copies show "Update available" in the dashboard, where the user reviews a diff and either merges our change into theirs or discards their edits. System skills can also be renamed now and still keep receiving updates.

Overview

  • Registry: system_skill_versions (migration 0089), skills.system_skill_version_id as the base. Published on API boot and by an hourly dashboard cron; backfill + auto-upgrade for unmodified copies. "Modified" is derived, never stored.
  • Service (@notra/ai/skills): upstream status, upgradeSkill (discard / keep / merge), a line-based three-way merge in @notra/utils, and runtime lookups (humanizer, getSkillByName) that follow the registry name so renames don't break them.
  • Dashboard: skills table with an update action, update dialog built on @pierre/diffs with a conflict resolver, Edit/Diff selector, list ↔ detail view transition. Skill pages are now addressed by id (/skills/<id>), so a rename doesn't change the URL.
  • Public API + docs: upstream on skill responses (incl. systemName), POST /v1/skills/{name}/upgrade, GET /v1/system-skills[/{name}[/versions/{version}]]; PATCH now allows renaming system skills.

Notes

  • Migration 0089_system_skill_versions is not applied to production. The dev DB already has these tables from an earlier local 0085 of this branch, so db:migrate there will need that entry reconciled.
  • Old dashboard links /skills/<name> now 404; API paths stay name-based.
  • "keep" is API/CLI only; the dashboard offers merge or discard.
  • Companion console PR (seed new workspaces from the registry) is pending repo write access. MCP and CLI support follow in separate PRs.
  • Checks: turbo check-types (17/17), knip and oxlint clean; react-doctor findings addressed. Rename flow verified against the dev DB.

🤖 Generated with Claude Code


Summary by cubic

System skills now ship as versions in a global registry, so organizations receive improvements to built-in skills instead of keeping the copy they were seeded with forever. Unmodified copies move to the new version automatically; edited copies show an "Update available" action in the dashboard where the user reviews a diff and merges or discards their edits, and system skills can be renamed without losing future updates.

Migration

  • Migration 0089_system_skill_versions is not applied to production.
  • The dev DB already has these tables from an earlier local migration of this branch, so db:migrate there needs that entry reconciled.

Breaking changes

  • Dashboard skill pages are now addressed by id; old /skills/<name> links 404.
  • API paths stay name-based.
  • The "keep" upgrade strategy is API/CLI only; the dashboard offers merge or discard.

Written for commit 05b7b5d. Summary will update on new commits.

Review in cubic

System skills are now published to a global system_skill_versions
registry. Org copies remember the version they are based on, so Notra can
ship improvements: untouched copies upgrade automatically, edited copies
show an update the user can review, merge or discard in the dashboard.

- registry, publish on API boot and hourly cron, backfill + auto-upgrade
- upstream status, upgrade (discard/keep/merge) and three-way merge util
- dashboard update dialog with pierre diffs, skills addressed by id
- system skills can be renamed; they keep following their registry name
- public API upgrade and system-skill routes, docs

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…upgrade-merge-plan

# Conflicts:
#	packages/db/migrations/meta/0085_snapshot.json
#	packages/db/migrations/meta/_journal.json
#	packages/utils/package.json
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
notra Ready Ready Preview Sep 14, 2026 2:51pm UTC
notra-agent Ready Ready Preview Sep 14, 2026 2:51pm UTC
notra-onboarding-agent Ready Ready Preview Sep 14, 2026 2:51pm UTC
notra-web Ready Ready Preview Sep 14, 2026 2:51pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
notra-ui Skipped Skipped Sep 14, 2026 2:51pm UTC

Request Review

@github-actions github-actions Bot added apps/api Changes files in apps/api apps/dashboard Changes files in apps/dashboard apps/docs Changes files in apps/docs packages/ai Changes files in packages/ai packages/db Changes files in packages/db packages/posthog Changes files in packages/posthog packages/schemas Changes files in packages/schemas packages/tools Changes files in packages/tools packages/utils Changes files in packages/utils priority/normal Suggested review urgency; human overrides take precedence type/feature PR change classification labels Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

React Doctor found 1 new issue in 1 file · 1 warning · score 86 / 100 (Great) · 3 fixed · vs main

1 warning

src/skills/registry.ts

  • ⚠️ L242 await inside a loop async-await-in-loop

Reviewed by React Doctor for commit 05b7b5d. See inline comments for fixes.

- derive the reset dialog state instead of closing it from an effect
- lift the merge text into the update dialog; no parent sync effect
- split the update dialog footer, create dialog and editor state hook
- reuse the existing unsaved-changes toast hook on the skill page
- restore .agents/skills/humanizer/SKILL.md from main
- remove the skill, hash, upstream and three-way merge test files

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@vercel
vercel Bot temporarily deployed to Preview – notra-ui September 14, 2026 14:48 Inactive
definition.description,
definition.content
);
const latest = await getLatestSystemSkill(tx, definition.name);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Doctor · react-doctor/async-await-in-loop (warning)

This makes the for…of loop slow because each await runs one after another, so collect the independent calls & run them together with await Promise.all(items.map(...))

Fix → Collect the items, then use await Promise.all(items.map(...)) so independent work runs at the same time

Docs

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

Labels

apps/api Changes files in apps/api apps/dashboard Changes files in apps/dashboard apps/docs Changes files in apps/docs packages/ai Changes files in packages/ai packages/db Changes files in packages/db packages/posthog Changes files in packages/posthog packages/schemas Changes files in packages/schemas packages/tools Changes files in packages/tools packages/utils Changes files in packages/utils priority/normal Suggested review urgency; human overrides take precedence type/feature PR change classification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant