Skip to content

feat(sync): Phase 1 porter workflow + enriched icon/color maps#67

Open
IgorShevchik wants to merge 2 commits into
mainfrom
claude/sync-phase1-porter
Open

feat(sync): Phase 1 porter workflow + enriched icon/color maps#67
IgorShevchik wants to merge 2 commits into
mainfrom
claude/sync-phase1-porter

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of the nuxt/ui → b24ui sync pipeline (see .sync/PLAN.md). Adds the manual porter workflow plus the maps it relies on. Nothing runs automatically — the workflow is workflow_dispatch only and does not advance the ledger cursor.

What's included

.github/workflows/sync-porter.yml — ports ONE upstream commit:

  1. Validate the SHA (^[0-9a-f]{40}$).
  2. Fetch the nuxt/ui commit, write its diff to a file (hard-fail if the SHA is gone — force-push guard).
  3. Branch sync/nuxt-<short> off main (deletes any abandoned branch first).
  4. Run Claude (anthropics/claude-code-action@v1) — it reads .sync/PORTING.md (rules) and the untrusted diff file, and reproduces the change under src/ only. Tools limited to Read,Edit,Write,Grep,Glob (no Bash → it can't run git/secrets).
  5. Scope guard — fail if anything outside src//test//.sync/log/ changed.
  6. Security gate — new v-html/innerHTMLsecurity-review-required label.
  7. No-op detection — docs/deps/infra commits write a one-line rationale to .sync/log/<sha>.md instead.
  8. Gates in ci.yml order: dev:prepare → lint → typecheck → test run -u → test run → build.
  9. Commit (Upstream: nuxt/ui@<sha> trailer) and open a PR labelled nuxt-sync with an <!-- upstream-sha --> footer.

Maps (now grounded, not stubs):

  • icon-map.json — 33 literal i-lucide-*b24-icons entries, verified against src/runtime/dictionary/icons.ts.
  • color-map.json — nuxt tokens → air-*, verified against src/theme/*.ts.

PORTING.md — documents the key insight: b24ui shares nuxt/ui's semantic icon keys (icons.chevronDown, …), so most icon references port 1:1; the map is only the fallback for hardcoded literals.

Before this can actually run (blockers)

Out of scope

  • Phase 2 (dispatcher/queue) and Phase 3 (cursor advance) — later milestones.

https://claude.ai/code/session_01Qz7EXMncvEGiCj4WbmYgJo


Generated by Claude Code

claude added 2 commits June 5, 2026 14:06
- .github/workflows/sync-porter.yml: manual (workflow_dispatch) porter that
  ports ONE nuxt/ui commit via Claude, with SHA validation, untrusted-diff
  isolation, a src/-only scope guard, a v-html security gate, no-op detection,
  the full ci gate chain, and PR creation. Experimental; needs ANTHROPIC_API_KEY;
  does not advance the cursor.
- icon-map.json: grounded literal lucide -> b24-icons map (verified against
  src/runtime/dictionary/icons.ts).
- color-map.json: nuxt tokens -> air-* (verified against src/theme).
- PORTING.md: document that the semantic icons.<key> interface is shared, so
  most icon references port 1:1 and the map is only for hardcoded literals.
Switch the porter's Claude auth from anthropic_api_key to
claude_code_oauth_token (Pro/Max subscription, via `claude setup-token`), and
add a max_turns workflow input so trial runs can be capped lower.
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.

2 participants