.claude/skills/upstream-boundary-check/SKILL.md
Use when reading or writing any file under src/renderer/ that calls remoteTrpc.* or fetch(${apiUrl}/...). Verifies the call site is documented in docs/enterprise/upstream-features.md and warns if a new upstream-backend dependency is being introduced without a corresponding F-entry. This skill enforces the enterprise-fork posture documented in CLAUDE.md.
npx skillsauth add jrmatherly/1dev upstream-boundary-checkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This repo is the enterprise fork of 1Code, being decoupled from the upstream 21st.dev / 1code.dev hosted backend. Every call site that touches the upstream backend is a future migration cost. This skill prevents new upstream dependencies from being introduced silently.
src/renderer/ that contains remoteTrpc. or fetch(${apiUrl} or signedFetch("https://21st.devsrc/renderer/lib/remote-*.ts, src/renderer/features/automations/*, src/renderer/features/agents/lib/remote-chat-transport.ts, src/main/lib/trpc/routers/sandbox-import.ts, src/main/lib/trpc/routers/voice.ts, or src/main/lib/trpc/routers/claude-code.tsRun this grep to see what currently exists:
grep -rn "remoteTrpc\." src/renderer/
grep -rn "fetch(\`\${apiUrl}\|getApiBaseUrl" src/main/ src/renderer/
If the file you're touching introduces a NEW boundary call (one not previously in the grep output), continue to Step 2.
Read docs/enterprise/upstream-features.md. The inventory contains 10 catalogued features (F1–F10) with code locations. Check whether the new call site fits inside an existing F-entry.
If the new call fits an existing F-entry:
If the new call does NOT fit any existing F-entry:
⚠️ NEW UPSTREAM-BACKEND DEPENDENCY DETECTED
File: <file>:<line>
Call: <the remoteTrpc.* or fetch(${apiUrl}/...) line>
This call site is not documented in docs/enterprise/upstream-features.md.
Per CLAUDE.md "Upstream Backend Boundary" section, every new remoteTrpc.* call
becomes a future migration cost. Before introducing this dependency:
1. Confirm there is no local-only alternative (LiteLLM, local subprocess, etc.)
2. If the upstream call is required, add a new F-entry to the inventory with:
- Feature name + priority (P0/P1/P2/P3)
- Code location (this file:line)
- What it does today
- What breaks when upstream is retired
- Candidate restore approaches
3. Then re-attempt the change
| ID | Feature | Priority | Primary code locations |
|---|---|---|---|
| F1 | Background Agents / cloud sandbox | 🟥 P0 (OAuth) / ⬜ P3 (agents) | src/main/lib/trpc/routers/sandbox-import.ts, src/main/lib/trpc/routers/claude-code.ts:178-220, src/renderer/features/agents/lib/remote-chat-transport.ts |
| F2 | Automations & Inbox | 🟨 P1 | src/renderer/features/automations/*, src/renderer/features/sidebar/agents-sidebar.tsx:1163, src/renderer/features/agents/ui/agents-content.tsx:202 |
| F3 | Remote Agent Chats / Teams | 🟨 P1 | src/renderer/lib/remote-api.ts, src/renderer/components/dialogs/settings-tabs/agents-beta-tab.tsx:67 |
| F4 | Voice Transcription (hosted path) | 🟨 P1 | src/main/lib/trpc/routers/voice.ts:229 |
| F5 | Auto-Update CDN | ⬜ P3 | src/main/lib/auto-updater.ts:33 |
| F6 | Changelog Display | ⬜ P3 | src/renderer/features/agents/components/agents-help-popover.tsx:80 |
| F7 | Plugin Marketplace | 🟨 P1 (unconfirmed) | src/main/lib/trpc/routers/plugins.ts (needs investigation) |
| F8 | Subscription Tier Gating | 🟨 P1 | src/main/lib/trpc/routers/voice.ts:90-115, src/main/auth-manager.ts |
| F9 | Live Browser Previews | 🟩 P2 (unconfirmed) | src/renderer/features/agents/components/preview-setup-hover-card.tsx:77, src/renderer/features/agents/main/active-chat.tsx:8664 |
| F10 | PWA Companion | ⬜ P3 | (not in this repo) |
Before this skill, the only way to enforce the upstream-boundary discipline was manual code review against the inventory. The inventory itself can drift if new call sites are added without updating it. This skill closes that loop by intercepting reads/writes to the relevant files and forcing a cross-reference check before the change lands.
CLAUDE.md "Upstream Backend Boundary" section — the canonical referencedocs/enterprise/upstream-features.md — the working catalogdocs/enterprise/auth-strategy.md and docs/enterprise/auth-fallback.md — the migration plans this skill supportsdevelopment
Background knowledge for AI agents before editing any file that handles authentication tokens or spawn environment variables in the 1Code enterprise fork. Triggers when touching src/main/lib/trpc/routers/claude.ts, claude-code.ts, claude/env.ts, feature-flags.ts, or claude-token.ts. Reminds the agent to consult the frozen Envoy Gateway strategy doc (auth-strategy-envoy-gateway.md v2.1) sections that impose hard rules on credential handling.
tools
Background knowledge for safely bumping the pinned versions of Claude CLI binary, Codex CLI binary, Electron, Vite, Tailwind, or Shiki in this repo. Each pin is load-bearing for a different reason — this skill encodes the per-pin rationale and the regression test that must pass before the bump can land. Use proactively whenever editing package.json, scripts/download-claude-binary.mjs, scripts/download-codex-binary.mjs, or any file that mentions these versions. Claude-only (background knowledge, not user-invocable).
development
End-of-task sync — update CLAUDE.md, rebuild code graph, sync Serena memories, check roadmap drift, and commit. Run after completing any significant work to ensure all drift surfaces are current.
documentation
View, add, or complete items on the centralized project roadmap at docs/operations/roadmap.md. Use when starting a session to see outstanding work, when deferring work to record it, or when completing work to update the tracker. Triggers on "roadmap", "outstanding work", "what's left", "defer", "follow-up".