feat(install-targets): add claude-project (per-project Claude Code) adapter

Completes the install-target matrix for Claude Code. Until now, ECC's
Claude support was home-scope only (~/.claude/) via the `claude` target.
This adds a project-scope counterpart (./.claude/) via a new
`claude-project` target so teams can install ECC per-repo without
contaminating ~/.claude/ — matching the existing project-scope adapters
for Cursor, Antigravity, Gemini, CodeBuddy, Joycode, and Zed.

Symmetric with `claude`:
- Same namespace under rules/ecc and skills/ecc
- Same docs/<locale> handling for --locale
- Same hooks placeholder substitution for hooks.json
- Reuses claude-home's destination-mapping logic 1:1

Use cases:
- Monorepos with multiple Flow-managed projects
- Teams that want ECC scoped per-project without touching ~/.claude/
- Per-project skill/rule isolation when global install isn't desirable

No breaking change: existing --target claude continues to route to
claude-home (user-scope) unchanged. New target is opt-in.

Tests
-----
- 4 new tests in tests/lib/install-targets.test.js
  (root resolution, lookup-by-id, plan parity with claude, foreign-path filtering)
- All install-target regression guards (schema enum / SUPPORTED_INSTALL_TARGETS)
  still pass
- End-to-end smoke: `--target claude-project --profile minimal --dry-run`
  emits 359 ops with destinations rooted at <projectRoot>/.claude/ (parity
  with --target claude which emits 359 ops rooted at ~/.claude/)
This commit is contained in:
Mhd Ghaith Al Abtah
2026-05-19 19:39:18 +04:00
committed by Affaan Mustafa
parent 27e4036075
commit 7004a66243
9 changed files with 241 additions and 15 deletions

View File

@@ -10,6 +10,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codebuddy",
@@ -33,6 +34,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -55,6 +57,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"opencode",
@@ -79,6 +82,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"opencode",
"codebuddy"
@@ -106,6 +110,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -177,6 +182,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -210,6 +216,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -255,6 +262,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -294,6 +302,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -326,6 +335,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -360,6 +370,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -402,6 +413,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -428,6 +440,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -459,6 +472,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"codex",
"opencode",
@@ -490,6 +504,7 @@
],
"targets": [
"claude",
"claude-project",
"codex",
"opencode"
],
@@ -515,6 +530,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -559,6 +575,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -592,6 +609,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -617,6 +635,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -653,6 +672,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -679,6 +699,7 @@
],
"targets": [
"claude",
"claude-project",
"cursor",
"antigravity",
"codex",
@@ -703,7 +724,8 @@
"docs/ja-JP"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -718,7 +740,8 @@
"docs/zh-CN"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -733,7 +756,8 @@
"docs/ko-KR"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -748,7 +772,8 @@
"docs/pt-BR"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -763,7 +788,8 @@
"docs/ru"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -778,7 +804,8 @@
"docs/tr"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -793,7 +820,8 @@
"docs/vi-VN"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,
@@ -808,7 +836,8 @@
"docs/zh-TW"
],
"targets": [
"claude"
"claude",
"claude-project"
],
"dependencies": [],
"defaultInstall": false,