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
@@ -258,14 +258,14 @@ ccpkg packages install as Claude Code plugins. This is the fundamental integrati
258
258
259
259
```json
260
260
{
261
-
"extraKnownMarketplaces": {
262
-
"ccpkg": {
263
-
"source": {
264
-
"source": "directory",
265
-
"path": "~/.ccpkg/plugins"
266
-
}
267
-
}
268
-
}
261
+
"extraKnownMarketplaces": {
262
+
"ccpkg": {
263
+
"source": {
264
+
"source": "directory",
265
+
"path": "~/.ccpkg/plugins"
266
+
}
267
+
}
268
+
}
269
269
}
270
270
```
271
271
@@ -362,7 +362,7 @@ The ccpkg format targets multiple AI coding assistant hosts, but each host has f
362
362
363
363
---
364
364
365
-
### 15. Instructions Assembly — Base + Per-Host Overlays
365
+
### 15. Instructions Assembly. Base + Per-Host Overlays
366
366
367
367
**Decision**: The `components.instructions` field supports both a simple string form (single file) and a structured form declaring a base file with optional per-host overlay files. Overlays declare their assembly position (`append`, `prepend`, or `insert` at a named marker) via YAML frontmatter. The installer assembles the final instructions output per host at install time.
368
368
@@ -372,7 +372,19 @@ The ccpkg format targets multiple AI coding assistant hosts, but each host has f
372
372
373
373
1.**Separate instruction files per host** -- Each host gets its own complete file (`claude-instructions.md`, `copilot-instructions.md`). Simple to implement but leads to content duplication. When shared content changes, authors must update N files. Rejected because it undermines the DRY principle and scales poorly with host count.
374
374
2.**Template language with conditionals** -- Use a templating syntax (e.g., Handlebars, Jinja) with `{{#if host == "claude"}}` blocks. Powerful but introduces a template engine dependency, makes the raw files hard to read, and is overkill for what is typically "shared base + small per-host additions." Rejected for complexity.
375
-
3.**mappings.json only (previous design)** -- Map a single canonical file to host-specific filenames without any content variation. Already proven insufficient — the filename mapping exists via `targets.*.instructions_file`, but the content is identical everywhere. Superseded by the assembly model which adds content variation on top of filename mapping.
375
+
3.**mappings.json only (previous design)** -- Map a single canonical file to host-specific filenames without any content variation. Already proven insufficient. the filename mapping exists via `targets.*.instructions_file`, but the content is identical everywhere. Superseded by the assembly model which adds content variation on top of filename mapping.
376
+
377
+
### 16. MCP server deduplication at install time
378
+
379
+
When multiple packages bundle the same MCP server, the installer deduplicates at install time rather than requiring packages to declare shared dependencies or a shared MCP directory.
380
+
381
+
**Why install-time dedup?** Packages stay self-contained. Authors do not need to change anything. The dedup is transparent -- the installer is smarter about what it writes to the host config. This preserves Principle #1 (self-contained) and Principle #8 (no inter-package deps).
382
+
383
+
**Why not shared directory with refcounting?** Reference counting introduces a new complexity vector. Crashes mid-uninstall corrupt counts. It breaks the "each plugin is self-contained in its directory" model hosts expect.
384
+
385
+
**Why not a server_id manifest field?** Requires schema change and author adoption. Existing packages would not benefit. The key_name + origin tuple provides sufficient identity without opt-in.
386
+
387
+
**Identity model:** (key_name, origin) tuple. Origin is derived from server mode: command string for Mode 1, bundle path for Mode 2, source URL for Mode 3. Version resolution: highest wins. User override: per-server or global.
376
388
377
389
---
378
390
@@ -429,7 +441,7 @@ Dev mode uses a symmetric pair of operations that mirror the install/uninstall l
429
441
1. Validate the directory contains a valid `manifest.json`
430
442
2. Prompt for required config values (same as install)
431
443
3. Generate `.claude-plugin/plugin.json` inside the source directory (from manifest metadata)
5. Add `{name}@ccpkg` to `enabledPlugins` in `settings.json`
434
446
6. Render MCP/LSP templates with config substitution
435
447
7. Write lockfile entry with `"source": "link:/absolute/path"`, `"linked": true`, and `"generated_plugin_json": true` (if plugin.json was created by ccpkg, not pre-existing)
Copy file name to clipboardExpand all lines: docs/plans/2026-02-14-spec-grounding-revision.md
+54-54Lines changed: 54 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# ccpkg Spec Grounding Revision — Implementation Plan
1
+
# ccpkg Spec Grounding Revision. Implementation Plan
2
2
3
3
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4
4
@@ -21,35 +21,35 @@ Claude Code's plugin system provides automatic namespacing via `.claude-plugin/p
21
21
- Plugin with `{"name": "my-package"}` + skill in `skills/my-skill/SKILL.md` = `/my-package:my-skill`
22
22
- Namespace prefix: driven by `plugin.json``name` field (NOT directory name, NOT SKILL.md frontmatter)
23
23
- Component name within namespace: driven by skill **directory name** (NOT frontmatter `name`)
24
-
- User-level skills (`~/.claude/skills/`) CANNOT be namespaced — subdirectories flatten
25
-
- User-level commands (`~/.claude/commands/`) CANNOT be namespaced — subdirectories flatten
24
+
- User-level skills (`~/.claude/skills/`) CANNOT be namespaced. subdirectories flatten
25
+
- User-level commands (`~/.claude/commands/`) CANNOT be namespaced. subdirectories flatten
26
26
- There is NO programmatic API to register namespaced components outside the plugin system
27
27
28
28
**Implication:** ccpkg packages MUST be installed as Claude Code plugins to get namespacing.
29
29
30
30
### Finding 2: extraKnownMarketplaces Is the Official Registration Entry Point
31
31
32
-
Claude Code supports third-party plugin sources via `extraKnownMarketplaces` in `settings.json`. This is the documented, supported API — NOT `known_marketplaces.json` (which is internal).
32
+
Claude Code supports third-party plugin sources via `extraKnownMarketplaces` in `settings.json`. This is the documented, supported API. NOT `known_marketplaces.json` (which is internal).
33
33
34
34
Seven source types are supported:
35
-
1.`github` — GitHub repositories
36
-
2.`git` — any Git URL
37
-
3.`url` — hosted marketplace.json
38
-
4.`npm` — npm packages
39
-
5.`file` — local marketplace.json file
40
-
6.`directory` — local directory of plugins
41
-
7.`hostPattern` — regex host matching
35
+
1.`github`. GitHub repositories
36
+
2.`git`. any Git URL
37
+
3.`url`. hosted marketplace.json
38
+
4.`npm`. npm packages
39
+
5.`file`. local marketplace.json file
40
+
6.`directory`. local directory of plugins
41
+
7.`hostPattern`. regex host matching
42
42
43
43
**Implication:** ccpkg registers as a marketplace using the `directory` source type, pointing at `~/.ccpkg/plugins/`. Claude Code auto-discovers plugins in that directory.
44
44
45
45
### Finding 3: Six Plugin Loading Mechanisms Exist
46
46
47
-
1.**Marketplace installation** — via `/plugin` UI or `claude plugin install`
48
-
2.**`--plugin-dir` CLI flag** — session-only, no persistence, for quick testing
@@ -238,7 +238,7 @@ Replace the current 5-step host-reads-lockfile description with:
238
238
- State that Claude Code already implements lazy loading for skills: frontmatter (name + description) is loaded at startup, full SKILL.md body is loaded on invocation via the Skill tool
239
239
- ccpkg leverages this existing behavior by placing well-formed SKILL.md files in standard plugin directories
240
240
- No custom host-level lockfile reader is required
241
-
- The host discovers ccpkg plugins via `extraKnownMarketplaces`→ directory source → standard plugin component discovery
241
+
- The host discovers ccpkg plugins via `extraKnownMarketplaces`-> directory source -> standard plugin component discovery
242
242
243
243
**Step 2: Keep "On-Demand Loading" table**
244
244
@@ -256,7 +256,7 @@ Add a note: "These behaviors are provided by the host application's existing plu
## Task 7: Revise Design Document. Add Plugin System Integration
333
333
334
334
**Files:**
335
335
- Modify: `docs/plans/2026-02-14-ccpkg-design.md`
@@ -378,10 +378,10 @@ Replace with the symmetric link/unlink design:
378
378
379
379
**Step 1: Review schema for any required changes**
380
380
381
-
The manifest schema itself should NOT change significantly — the manifest is the package author's contract. The `.claude-plugin/plugin.json` generation is an installer concern, not a manifest concern.
381
+
The manifest schema itself should NOT change significantly. the manifest is the package author's contract. The `.claude-plugin/plugin.json` generation is an installer concern, not a manifest concern.
382
382
383
383
However, verify:
384
-
- The `scope` enum still makes sense (it does —`user`, `project`, `any`)
384
+
- The `scope` enum still makes sense (it does.`user`, `project`, `any`)
385
385
- The `targets` object can accommodate plugin.json generation hints if needed
386
386
- No fields reference the old `~/.claude/packages/` path
387
387
@@ -424,7 +424,7 @@ Capture the following to mnemonic:
424
424
-`_semantic/decisions`: ccpkg installs as Claude Code plugins via extraKnownMarketplaces directory source
425
425
-`_semantic/decisions`: Namespacing handled by plugin system, not file editing
426
426
-`_semantic/knowledge`: installed_plugins.json is read-only at startup, no hot-reload
0 commit comments