You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 016a269
Browse filesBrowse the repository at this point in the historyBrowse files
-**Screen Registry** (`packages/quickstart/src/ui/screen-registry.tsx`) — Factory mapping ScreenId to components
22
22
23
23
## Adding a Screen
24
24
25
-
1. Create the component in `packages/quickstart/src/ui/screens/YourScreen.tsx`
25
+
1. Create subdir in `packages/quickstart/src/ui/screens/` with component + barrel `index.ts` + collocated slice files (`telemetry-events.ts`, `log-messages.ts`, `actions.ts` as needed)
26
26
2. Add a `ScreenId` entry in `packages/core/src/session/session.ts`
27
27
3. Register the mapping in `packages/quickstart/src/ui/screen-registry.tsx`
28
-
4. Add to the sequence in `packages/quickstart/src/ui/screen-sequences.ts`
28
+
4. Add transitions in `packages/quickstart/src/ui/screen-transitions.ts`
29
29
30
30
No other files need changes.
31
31
@@ -47,9 +47,9 @@ For display-only state:
47
47
48
48
Reusable building blocks and composites: `TextBlock`, `Divider`, `KeyboardHintsBar`, `ScreenContainer`, `TitleBar`, etc. Barrel-exported from `index.ts`.
Shared constants: `Colors`, `Icons`, `HAlign`, `VAlign`. Import from here for consistent styling.
52
+
Split into `colors.ts`, `icons.ts`, `layout.ts`, re-exported via `ui/styles.ts`. Exports: `Colors`, `Icons`, `Emoji`, `HAlign`, `VAlign`. Import from `styles.ts` for consistent styling.
Copy file name to clipboardExpand all lines: .claude/skills/integrations/SKILL.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
name: integrations
3
3
description: IDE integration strategy pattern and guidelines for the packages/core/src/integrations/ module
4
-
version: '0.4'
4
+
version: '0.5'
5
5
---
6
6
7
7
# IDE Integrations Guidelines
@@ -14,18 +14,35 @@ Each supported IDE (Claude Code, Cursor, Codex) is a self-contained `IdeIntegrat
14
14
15
15
Every IDE implements the `IdeIntegration` interface: `id`, `name`, `launchChat()`, `runOnboarding()`, `detectPlugins()`, `installPlugins()`, `detectMcpStatuses()`, `connectMcpServer()`. See the type definition in `types.ts` for the full contract.
16
16
17
-
Thin orchestrators (`chat.ts`, `plugins.ts`) resolve the strategy via `getIntegration(ide)` and delegate.
17
+
Thin orchestrators (`chat.ts`) resolve the strategy via `getIntegration(ide)` and delegate.
|`chat.ts`| Orchestrator — resolves IDE strategy and delegates chat launch |
29
+
|`registry.ts`|`INTEGRATIONS` array and `getIntegration()` lookup |
30
+
|`types.ts`|`IdeIntegration` interface and related types |
31
+
|`constants.ts`| Shared integration constants |
32
+
|`stream-json.ts`| JSON streaming utilities for IDE exec output |
33
+
|`version.ts`| IDE version detection |
34
+
|`utils.ts`| Shared integration helpers |
18
35
19
36
## Hard Constraints
20
37
21
-
-**IDE subdirs are self-contained** — no imports from other IDE subdirs. Each is split into `paths.ts`, `plugins.ts`, `mcp.ts`, and `index.ts`. May import from `../types.js`, `../mcp/servers.js`, `../shared.js` — never from `../registry.js` or each other.
38
+
-**IDE subdirs are self-contained** — no imports from other IDE subdirs. Each contains `paths.ts`, `plugins.ts`, `mcp.ts`, `chat.ts`, `onboarding.ts`, `prepare.ts`, and `index.ts`. May import from `../types.js`, `../mcp/servers.js` — never from `../registry.js` or each other.
22
39
-**No switch-on-IDE outside strategies** — code outside `integrations/` must not branch on `IdeId`. Use `getIntegration(ide)` and call strategy methods.
23
40
-**Dependency direction** — integrations imports from `shared-kernel` and other core modules, never from `quickstart/` or `cli/`.
24
41
-**Clean-dev script** — when changing MCP-related code, verify `scripts/clean-dev-env.sh` still cleans up correctly. Update it when adding a new IDE.
25
42
26
43
## Adding a New IDE
27
44
28
-
1. Create `packages/core/src/integrations/<ide-name>/index.ts` with `paths.ts`, `plugins.ts`, `mcp.ts`
@@ -120,9 +126,9 @@ The stable `node-pty` release (v1.1.0) doesn't ship prebuilt binaries for Node.j
120
126
121
127
-**Cross-package imports** use npm package names: `import { authenticate } from '@spotify-confidence/core'`, `import type { IdeId } from '@spotify-confidence/shared-kernel'`.
122
128
-**Within quickstart**, use path aliases (`@commands/*`, `@features/*`, `@ui/*`) for cross-domain imports. Keep relative imports within the same domain.
123
-
-**Within cli**, use path aliases (`@commands/*`, `@features/*`, `@output/*`, `@network/*`) for cross-domain imports. Keep relative imports within the same domain.
129
+
-**Within cli**, use path aliases (`@commands/*`, `@features/*`, `@input/*`, `@output/*`, `@network/*`, `@utils/*`, `@meta`) for cross-domain imports. Keep relative imports within the same domain.
124
130
-**Within core source** (`packages/core/src/`), use relative imports. Core's `__tests__/` may use tsconfig path aliases (`@auth/*`, `@integrations/*`, etc.).
125
-
-**Test imports** from `@spotify-confidence/testing` use sub-path exports: `@spotify-confidence/testing/auth`, `@spotify-confidence/testing/scaffold`, `@spotify-confidence/testing/env`, `@spotify-confidence/testing/terminal`.
131
+
-**Test imports** from `@spotify-confidence/testing` use sub-path exports: `@spotify-confidence/testing/auth`, `@spotify-confidence/testing/scaffold`, `@spotify-confidence/testing/env`, `@spotify-confidence/testing/terminal`, `@spotify-confidence/testing/e2e`.
126
132
- Use `@inkjs/ui` components over standalone `ink-*` packages.
127
133
- Screens go in `packages/quickstart/src/ui/screens/` (as slices), reusable components in `components/`.
128
134
- Shared modules (`hooks/`, `lib/`, `components/`) must never import from screen slices. If a type is needed by both, put it in `ui/lib/`.
0 commit comments