Skip to content

ci: check that files copied across the three atlases stay identical - #20

Merged
devohmycode merged 1 commit into
mainfrom
chore/shared-drift-check
Oct 21, 2026
Merged

devohmycode merged 1 commit into
mainfrom
chore/shared-drift-check

Conversation

@devohmycode

Copy link
Copy Markdown
Owner

Summary

skills-atlas, mcp-atlas and plugins-atlas share an origin. Should their common code move into a shared package? Measured on each main (line similarity against skills-atlas):

Files mcp-atlas plugins-atlas
browser.ts, ui/mouse.ts, ui/palette.ts, ui/render.ts, ui/width.ts (about 270 lines) identical identical
ui/ListSelect.tsx (169) identical 0.99: its own messages module
ui/Layout.tsx (121) 0.98: name, steps 0.93: name, steps, messages
ui/TreeSelect.tsx 0.66 0.64
ui/App.tsx 0.57 0.57
completion.ts 0.55 0.55
mcp.ts 0.37 0.30
web/server.ts, web/page.ts 0.31, 0.22 0.26, 0.02
audit and risk rules 0.12 0.13
i18n messages 0.2 none (English only)

Only the terminal primitives, about 440 lines, are still common. The tree, the review screen, the audit, the web interface and the messages have each followed their domain (skills, MCP servers, plugins). A shared package would cost a fourth published package, versions kept in step and releases across repositories, to save about 440 lines that rarely change. Decision: no shared package.

What this adds instead: a check that the copies stay identical, so that a fix made in one atlas is not forgotten in the others.

  • npm run check:shared compares six files under src/ with each sibling's main on GitHub (raw files, no token). --local compares with sibling checkouts next to this one. Line endings are ignored. It exits with 1 and names each file and repository out of step, or unreadable.
  • The list (SHARED in scripts/check-shared.ts) records which repositories must match each file. ui/ListSelect.tsx is checked against mcp-atlas only. ui/Layout.tsx is left out because its differences are intended.
  • A shared files workflow runs it on pull requests that touch those files, and every Monday against the siblings' current main.

Validation

  • npm run check:shared and npm run check:shared -- --local: 11 shared copies match.
  • After appending a line to src/ui/width.ts: differs src/ui/width.ts mcp-atlas, the same for plugins-atlas, exit 1.
  • New unit test for differing, unreadable and CRLF copies; TypeScript checks.

@devohmycode
devohmycode force-pushed the chore/shared-drift-check branch from 26a933d to 696a42c Compare October 21, 2026 06:50
@devohmycode
devohmycode marked this pull request as ready for review October 21, 2026 06:51
@devohmycode
devohmycode merged commit 58bb68d into main Oct 21, 2026
2 checks passed
@devohmycode
devohmycode deleted the chore/shared-drift-check branch October 21, 2026 06:51
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Skills-Atlas Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant