scopecairn 0.10.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,22 @@
1
- # ScopeCairn
1
+ <p align="center">
2
+ <img src="assets/icon.png" alt="ScopeCairn Icon" width="140" height="140" style="border-radius: 32px;" />
3
+ </p>
4
+
5
+ <h1 align="center">ScopeCairn</h1>
6
+
7
+ <p align="center">
8
+ <strong>Local-first codebase intelligence &amp; task scope guard for AI coding agents.</strong><br>
9
+ <em>Understand before exploring. Retrieve before reading.</em>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-22c55e.svg?style=flat-square" alt="Node.js version"></a>
14
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-6366f1.svg?style=flat-square" alt="License: MIT"></a>
15
+ <img src="https://img.shields.io/badge/local--first-100%25-00f0ff.svg?style=flat-square" alt="Local-First">
16
+ <img src="https://img.shields.io/badge/telemetry-zero-a855f7.svg?style=flat-square" alt="Zero Telemetry">
17
+ </p>
18
+
19
+ ---
2
20
 
3
21
  Local-first codebase intelligence layer for AI coding agents.
4
22
  Understand the codebase, then give the agent only what it needs:
@@ -24,15 +42,15 @@ No MCP server, no embeddings, no network calls, no telemetry.
24
42
  Definition of Done, so the agent changes only what matters.
25
43
  - **Change impact** — direct, indirect (2-hop), tests, and UI components
26
44
  affected by a file or symbol.
27
- - **Call path tracing** — `scopecairn path <A> <B>` shows the shortest
45
+ - **Call path tracing** — `scopecairn graph <A> --to <B>` shows the shortest
28
46
  multi-hop call/dependency chain between two symbols.
29
47
  - **Centrality ranking** — weighted PageRank + betweenness cached per
30
- symbol; `context` surfaces critical hotspots, `doctor` flags
48
+ symbol; `context` surfaces critical hotspots, `status --doctor` flags
31
49
  single points of failure.
32
50
  - **Community detection** — Louvain clustering finds real modules by
33
51
  link density (not just folders); `graph` shows each symbol's community.
34
52
  - **Cycle detection** — Tarjan SCC finds circular dependencies;
35
- reported by `doctor`, warned in `context`, listed in `GRAPH.md`.
53
+ reported by `status --doctor` and `verify`, warned in `context`, listed in `GRAPH.md`.
36
54
  - **Auto-refresh** — `context` and `impact` re-index changed files first;
37
55
  run `scan` after editing to close the loop.
38
56
  - **Framework adapters** — Next.js (App + Pages Router routes),
@@ -40,8 +58,8 @@ No MCP server, no embeddings, no network calls, no telemetry.
40
58
  - **Multi-language** — TypeScript, JavaScript, Python, Java, Go, Rust,
41
59
  PHP, C#, C/C++, Ruby, HTML, Vue SFC (plus config/schema files as
42
60
  graph nodes).
43
- - **Multi-agent setup** — skills for Claude Code (plugin + marketplace
44
- ready), Antigravity, Cursor, Windsurf, Copilot, Kiro, and an OpenCode
61
+ - **Multi-agent setup** — skills for Claude Code (project skill),
62
+ Antigravity, Cursor, Windsurf, Copilot, Kiro, and an OpenCode
45
63
  slash command. ScopeCairn never touches your `AGENTS.md`/`CLAUDE.md` —
46
64
  those hold your repo's details, not tool instructions.
47
65
  - **`GRAPH.md` knowledge file** — `.scopecairn/GRAPH.md` is a budgeted
@@ -58,7 +76,7 @@ No MCP server, no embeddings, no network calls, no telemetry.
58
76
  click-for-details side panel (callers, callees, centrality scores).
59
77
  Nodes sized by symbols/PageRank, colored by Louvain community.
60
78
  Pan, zoom, hover inspect. Double-click to open, no server.
61
- - **`export` for external tools** — `scopecairn export --format
79
+ - **Graph export for external tools** — `scopecairn graph --export
62
80
  mermaid|graphml|dot|json` writes `.scopecairn/graph.<ext>` for PR
63
81
  diagrams (Mermaid), Gephi/Cytoscape (GraphML), Graphviz (DOT),
64
82
  or custom scripts (JSON).
@@ -74,8 +92,7 @@ Requires Node.js ≥ 20.
74
92
  Upgrade later with:
75
93
 
76
94
  ```bash
77
- scopecairn update # or: npm install -g scopecairn@latest
78
- scopecairn update --check # only check for a new version
95
+ npm install -g scopecairn@latest
79
96
  ```
80
97
 
81
98
  ## Agent-driven setup
@@ -88,8 +105,8 @@ it runs project setup itself.
88
105
  npx skills add <github-user>/scopecairn -g
89
106
  ```
90
107
  (fallback without a skill: add one line to your global agent
91
- instructions — `~/.claude/CLAUDE.md` or equivalent: *When the user
92
- writes "scopecairn \<path\>", run `scopecairn init \<path\>`.*)
108
+ instructions — `~/.claude/CLAUDE.md` or equivalent: _When the user
109
+ writes "scopecairn \<path\>", run `scopecairn init \<path\>`._)
93
110
  2. In any project chat, type:
94
111
  ```
95
112
  scopecairn ./
@@ -111,82 +128,75 @@ Claude Code (project skill, committed with the repo):
111
128
  scopecairn claude install
112
129
  ```
113
130
 
114
- Or as a plugin from the bundled marketplace (this repo):
115
-
116
- ```
117
- /plugin marketplace add <github-user>/scopecairn
118
- /plugin install scopecairn@scopecairn
119
- ```
120
-
121
131
  After setup, your agent calls ScopeCairn automatically on every coding task.
122
- To query manually:
132
+ To query manually (replace `src/indexer.ts` or `buildContext` with files/symbols from your codebase):
123
133
 
124
134
  ```bash
125
- scopecairn context "add approval workflow"
126
- scopecairn context ./ # repository orientation map
127
- scopecairn impact src/request/RequestService.ts
128
- scopecairn read symbol approveRequest
129
- scopecairn graph RequestService
130
- scopecairn path handleLogin dbQuery
131
- scopecairn export --format mermaid
132
- scopecairn doctor
135
+ scopecairn scan # index repository (--rebuild, --clean, --watch)
136
+ scopecairn context "tambah fitur auth" # AI agent task context + scope
137
+ scopecairn impact src/indexer.ts # blast radius & affected tests (--run-tests)
138
+ scopecairn graph buildContext # inspect relations, path (--to), export (--export)
139
+ scopecairn verify # pre-commit safety guard (--diff, --arch)
140
+ scopecairn status # index statistics & health checks (--doctor, --html)
141
+ scopecairn read symbol indexFileSymbols # symbol-level source excerpt
133
142
  ```
134
143
 
135
144
  Per-agent installers (instead of `init --agents …`):
136
145
 
137
146
  ```bash
138
147
  scopecairn antigravity install # Skill + Workflow + allowlist guide
139
- scopecairn claude install # project skill .claude/skills (also: cursor, windsurf, copilot, kiro)
148
+ scopecairn claude install # project skill .claude/skills (also: cursor, windsurf, copilot)
149
+ scopecairn kiro install # steering .kiro/steering + knowledge skill .kiro/skills/scopecairn-knowledge
140
150
  scopecairn opencode install # /scopecairn slash command + permission snippet
141
151
  scopecairn claude uninstall # clean removal, user content preserved
142
152
  scopecairn agents list
143
153
  ```
144
154
 
145
- ## Commands
155
+ ## 6 Core Commands
156
+
157
+ ScopeCairn organizes its capabilities into **6 core commands** aligned with codebase architecture:
158
+
159
+ | Core Command | Description & Key Options |
160
+ | ------------ | ------------------------- |
161
+ | `scan` | **Index & Database Lifecycle:** Index repository. Options: `--rebuild` (rebuild from scratch), `--clean` (remove `.scopecairn/`), `--watch` (auto-refresh daemon on file save). |
162
+ | `context "<task>"` | **AI Agent Context & Scope:** Main agent entry point with auto-refresh, task classification, relevant context, task scope, and Task Guard. Options: `--escalate`, `--mode NORMAL\|FAST\|SAFE\|AUDIT`, `--max-tokens N`, `--no-history`, `--with-diff`, `--json`. |
163
+ | `impact <target>` | **Blast Radius & Test Selection:** Change impact analysis across direct, indirect, tests, UI components, and API clients. Options: `--run-tests` (run affected tests directly), `--tests` (list affected tests only), `--repos [list]` (cross-repo blast radius). |
164
+ | `graph [symbol]` | **Knowledge Graph & Navigation:** Symbol relations, PageRank centrality, community clusters, and cycle status. Options: `--to <target>` (shortest multi-hop call path), `--export <fmt>` (`mermaid\|graphml\|dot\|json`). |
165
+ | `verify` | **Pre-Commit Safety Guard:** Working tree check against protected files, task scope creep, and circular dependency regressions. Options: `--diff` (structural symbol-level diff vs HEAD), `--arch` (architectural layer rules), `--strict`, `--task <t>`. |
166
+ | `status` | **Health & Diagnostics:** Index statistics and metadata. Options: `--doctor` (integration and adapter health check), `--verbose`, `--html` (generate local HTML dashboard). |
167
+
168
+ ### Helper & Setup Commands
146
169
 
147
170
  | Command | Description |
148
- |---|---|
149
- | `init [path]` | Initial indexing + Skill, Workflow, detected agent skills (`--agents …\|all`; never writes `AGENTS.md`) |
150
- | `scan` / `rebuild` / `clean` | Manual index management (`scan` incremental; `rebuild` from scratch; `clean` removes `.scopecairn/`) |
151
- | `status` / `doctor` | Index status (incl. adapters, invocations) and health checks |
152
- | `context "<task>"` | Main entry point: context + scope (`--escalate`, `--no-refresh`, `--mode NORMAL|FAST|SAFE|AUDIT`, `--max-tokens N`, `--no-history`, `--with-diff`); a path task returns an orientation map |
153
- | `history "<task>" [--limit N] [--json] [--with-diff]` | Analog commit lama paling mirip (BM25 + recency half-life 180 hari + co-change); co-change set ikut ke Optional di `context` |
154
- | `impact <path\|symbol>` | Change impact: direct, indirect, tests (via TESTS edges + static CALLS backward reachability), UI, queries, routes. Edge evidence tagged EXTRACTED/INFERRED/AMBIGUOUS |
155
- | `graph <symbol>` | Symbol relations (+ PageRank, community, cycle status) |
156
- | `path <from> <to>` | Shortest multi-hop call/dependency path between two symbols |
157
- | `export --format <fmt>` | Graph export: `mermaid`, `graphml`, `dot`, or `json` (default `.scopecairn/graph.<ext>`, override with `--out`) |
158
- | `read symbol <name>` | Symbol-level source excerpt (not whole files) |
159
- | `<agent> install` | Per-agent setup: `antigravity`, `claude`, `gemini`, `cursor`, `windsurf`, `copilot`, `kiro` (each also `uninstall`; `agents list` to see all) |
160
- | `dashboard` | Generate local HTML dashboard at `.scopecairn/dashboard.html` |
161
- | `test-select <target> [--run]` | List affected test files via graph dependency traversal & runner detection (`--run` executes runner) |
162
- | `verify [--task <t>] [--strict]` | Post-edit guard: check modified protected files, task scope creep, and circular dependency regressions |
163
- | `diff` | Structural symbol-level diff of working tree vs HEAD with breaking impact alerts |
164
- | `arch-check [--init]` | Check architectural layer rules & disallowed import boundaries (`--init` scaffolds `.scopecairn/arch.json`) |
165
- | `watch [--debounce <ms>]` | Daemon mode: auto-refresh index in background on file saves |
166
- | `doctor --verbose` | Also surface adapter/graph errors from `.scopecairn/last-run.log` to stderr |
167
- | `benchmark [--tune]` | Retrieval recall, irrelevant ratio, context reduction + weight calibration |
168
- | `update [--check]` | Update ScopeCairn to the latest npm release (`--check` only checks) |
169
-
170
- Agent commands (`context`, `impact`, `read`, `graph`, `status`, `doctor`, `verify`, `diff`, `test-select`, `arch-check`)
171
- are read-only toward source and only write to `.scopecairn/` — safe to
172
- allowlist. `init`, `scan`, `rebuild`, and `watch` are manual/user-side commands.
171
+ | ------- | ----------- |
172
+ | `init [path]` | Initial indexing + Skill, Workflow, detected agent skills (`--agents …\|all`). |
173
+ | `read symbol <name>` | Symbol-level source excerpt (not whole files). |
174
+ | `benchmark [--tune]` | Retrieval recall, irrelevant ratio, context reduction + weight tuning (dev-only, hidden from `--help`). |
175
+ | `<agent> install` | Agent installers: `antigravity`, `claude`, `cursor`, `windsurf`, `copilot`, `kiro`, `opencode`. |
176
+
177
+ > [!NOTE]
178
+ > **Backward Compatibility:** All previous standalone commands (`rebuild`, `clean`, `watch`, `doctor`, `dashboard`, `test-select`, `path`, `export`, `diff`, `arch-check`, `history`) are preserved as hidden aliases mapped directly into these 6 core commands — they still work but no longer appear in `--help`. `update` is deprecated (use `npm install -g scopecairn@latest`).
179
+
180
+ Agent commands (`context`, `impact`, `read`, `graph`, `status`, `verify`)
181
+ are read-only toward source code and safe to allowlist. `init` and `scan`
182
+ are user-side setup/lifecycle commands.
173
183
 
174
184
  ## Framework adapters
175
185
 
176
186
  Detected automatically during `scan` (shown in output and `status`).
177
187
  No configuration needed.
178
188
 
179
- | Adapter | Detects | Produces |
180
- |---|---|---|
181
- | `nextjs` | `app/`, `pages/`, `next.config.*` | Route symbols (`GET /api/x`, `PAGE /y` incl. route groups, dynamic segments), `ROUTES_TO` handler edges, `QUERIES` handler→model edges |
182
- | `prisma` | `schema.prisma` | `model` symbols for `QUERIES` resolution |
183
- | `drizzle` | `drizzle*` paths/config, `db/` schemas | `model` symbols from `pgTable`/`sqliteTable`/`mysqlTable`; `QUERIES` from `db.query.*` relational and `db.select/insert/update/delete` builder calls |
184
- | `express` | `package.json` deps | Route symbols from `app/router.METHOD(path)`, handler edges |
185
- | `fastapi` | `.py` routes, requirements/pyproject | Route symbols from `@app.METHOD("/path")` decorators |
186
- | `nestjs` | `*.controller.ts`, `*.service.ts`, `nest-cli.json` | Route symbols from `@Controller` and `@Get/@Post/...` decorators, `ROUTES_TO` handler edges, `@Injectable()` service providers |
187
- | `django` | `manage.py`, `urls.py`, `models.py` | Route symbols from `path()`/`re_path()` in `urls.py`, `ROUTES_TO` handler edges, `model` symbols from `models.Model` |
188
- | `sqlalchemy` | requirements/pyproject | `model` symbols from `class X(Base)`/`__tablename__`; `QUERIES` from `session.query/select` |
189
- | `vue` | `.vue` SFCs, `package.json` deps | `component` symbols per SFC; `IMPORTS` edges from used components in template |
189
+ | Adapter | Detects | Produces |
190
+ | ------------ | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
191
+ | `nextjs` | `app/`, `pages/`, `next.config.*` | Route symbols (`GET /api/x`, `PAGE /y` incl. route groups, dynamic segments), `ROUTES_TO` handler edges, `QUERIES` handler→model edges |
192
+ | `prisma` | `schema.prisma` | `model` symbols for `QUERIES` resolution |
193
+ | `drizzle` | `drizzle*` paths/config, `db/` schemas | `model` symbols from `pgTable`/`sqliteTable`/`mysqlTable`; `QUERIES` from `db.query.*` relational and `db.select/insert/update/delete` builder calls |
194
+ | `express` | `package.json` deps | Route symbols from `app/router.METHOD(path)`, handler edges |
195
+ | `fastapi` | `.py` routes, requirements/pyproject | Route symbols from `@app.METHOD("/path")` decorators |
196
+ | `nestjs` | `*.controller.ts`, `*.service.ts`, `nest-cli.json` | Route symbols from `@Controller` and `@Get/@Post/...` decorators, `ROUTES_TO` handler edges, `@Injectable()` service providers |
197
+ | `django` | `manage.py`, `urls.py`, `models.py` | Route symbols from `path()`/`re_path()` in `urls.py`, `ROUTES_TO` handler edges, `model` symbols from `models.Model` |
198
+ | `sqlalchemy` | requirements/pyproject | `model` symbols from `class X(Base)`/`__tablename__`; `QUERIES` from `session.query/select` |
199
+ | `vue` | `.vue` SFCs, `package.json` deps | `component` symbols per SFC; `IMPORTS` edges from used components in template |
190
200
 
191
201
  Limits (honest): non-Prisma/Drizzle/SQLAlchemy ORMs, inter-table
192
202
  references, raw SQL strings, and fully dynamic table names are not mapped
@@ -210,11 +220,11 @@ Measure retrieval quality anytime: `scopecairn benchmark [--tune]`.
210
220
 
211
221
  `scan` mengindeks pesan commit git lokal ke tabel `commits`/`commit_files` di
212
222
  `.scopecairn/scopecairn.db` (dilewati commit >40 file, lockfile, dan generated).
213
- Isi commit **tidak** masuk `GRAPH.md`/`GRAPH.html`/`export` (sering di-commit dan
214
- dibagikan) — riwayat hanya hidup di database lokal dan output `context`/`history`.
223
+ Isi commit **tidak** masuk `GRAPH.md`/`GRAPH.html`/`graph --export` (sering di-commit dan
224
+ dibagikan) — riwayat hanya hidup di database lokal dan output `context`.
215
225
  Pesan commit bisa memuat info sensitif; karena tidak keluar dari mesin, risikonya
216
226
  kecil. Repo tanpa git atau clone dangkal tetap didukung (riwayat parsial/absen,
217
- dilaporkan `doctor`).
227
+ dilaporkan `status --doctor`).
218
228
 
219
229
  ## License
220
230
 
@@ -0,0 +1,137 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 260" width="100%" height="100%">
2
+ <defs>
3
+ <!-- Background Gradient -->
4
+ <linearGradient id="bannerBg" x1="0%" y1="0%" x2="100%" y2="100%">
5
+ <stop offset="0%" stop-color="#070A12" />
6
+ <stop offset="50%" stop-color="#0B101E" />
7
+ <stop offset="100%" stop-color="#05070D" />
8
+ </linearGradient>
9
+
10
+ <!-- Border Stroke -->
11
+ <linearGradient id="bannerBorder" x1="0%" y1="0%" x2="100%" y2="0%">
12
+ <stop offset="0%" stop-color="#00F0FF" stop-opacity="0.6" />
13
+ <stop offset="35%" stop-color="#6366F1" stop-opacity="0.3" />
14
+ <stop offset="70%" stop-color="#A855F7" stop-opacity="0.6" />
15
+ <stop offset="100%" stop-color="#00F0FF" stop-opacity="0.1" />
16
+ </linearGradient>
17
+
18
+ <!-- Text Title Gradient -->
19
+ <linearGradient id="titleGrad" x1="0%" y1="0%" x2="100%" y2="0%">
20
+ <stop offset="0%" stop-color="#38BDF8" />
21
+ <stop offset="45%" stop-color="#00F0FF" />
22
+ <stop offset="100%" stop-color="#C084FC" />
23
+ </linearGradient>
24
+
25
+ <!-- Glow Filter -->
26
+ <filter id="bannerGlow" x="-20%" y="-20%" width="140%" height="140%">
27
+ <feGaussianBlur stdDeviation="6" result="blur" />
28
+ <feMerge>
29
+ <feMergeNode in="blur" />
30
+ <feMergeNode in="SourceGraphic" />
31
+ </feMerge>
32
+ </filter>
33
+
34
+ <filter id="softGlow" x="-30%" y="-30%" width="160%" height="160%">
35
+ <feGaussianBlur stdDeviation="16" result="blur" />
36
+ </filter>
37
+ </defs>
38
+
39
+ <!-- Banner Outer Card -->
40
+ <rect x="2" y="2" width="956" height="256" rx="20" fill="url(#bannerBg)" stroke="url(#bannerBorder)" stroke-width="1.5" />
41
+
42
+ <!-- Background Decorative Grid Lines -->
43
+ <g stroke="#1E293B" stroke-width="0.7" opacity="0.35">
44
+ <line x1="0" y1="65" x2="960" y2="65" />
45
+ <line x1="0" y1="130" x2="960" y2="130" />
46
+ <line x1="0" y1="195" x2="960" y2="195" />
47
+ <line x1="240" y1="0" x2="240" y2="260" />
48
+ <line x1="480" y1="0" x2="480" y2="260" />
49
+ <line x1="720" y1="0" x2="720" y2="260" />
50
+ </g>
51
+
52
+ <!-- Ambient Glow Pods -->
53
+ <circle cx="140" cy="130" r="110" fill="#00F0FF" opacity="0.12" filter="url(#softGlow)" />
54
+ <circle cx="210" cy="90" r="80" fill="#8B5CF6" opacity="0.15" filter="url(#softGlow)" />
55
+
56
+ <!-- ==================== LEFT: EMBEDDED ICON ==================== -->
57
+ <g transform="translate(40, 20)">
58
+ <!-- Outer Scope Ring -->
59
+ <circle cx="110" cy="110" r="85" fill="none" stroke="#6366F1" stroke-width="1.2" stroke-dasharray="3 7" opacity="0.5" />
60
+ <circle cx="110" cy="110" r="68" fill="none" stroke="#00F0FF" stroke-width="1.8" opacity="0.8" filter="url(#bannerGlow)" />
61
+ <circle cx="110" cy="82" r="38" fill="none" stroke="#A855F7" stroke-width="2" opacity="0.85" filter="url(#bannerGlow)" />
62
+
63
+ <!-- Scope Crosshairs -->
64
+ <line x1="110" y1="18" x2="110" y2="52" stroke="#00F0FF" stroke-width="2" stroke-linecap="round" filter="url(#bannerGlow)" />
65
+ <line x1="110" y1="168" x2="110" y2="202" stroke="#00F0FF" stroke-width="2" stroke-linecap="round" filter="url(#bannerGlow)" />
66
+ <line x1="18" y1="110" x2="52" y2="110" stroke="#00F0FF" stroke-width="2" stroke-linecap="round" filter="url(#bannerGlow)" />
67
+ <line x1="168" y1="110" x2="202" y2="110" stroke="#00F0FF" stroke-width="2" stroke-linecap="round" filter="url(#bannerGlow)" />
68
+
69
+ <!-- Cairn Stones Stack -->
70
+ <!-- Base Stone -->
71
+ <polygon points="50,158 110,168 170,158 160,176 110,183 60,176" fill="#141E33" stroke="#334155" stroke-width="1" />
72
+ <polygon points="50,158 75,145 145,145 170,158 110,168" fill="#1E293B" stroke="#475569" stroke-width="1" />
73
+ <path d="M 60,176 L 110,183 L 160,176" fill="none" stroke="#00F0FF" stroke-width="1.8" opacity="0.7" filter="url(#bannerGlow)" />
74
+
75
+ <!-- Middle Stone -->
76
+ <polygon points="72,118 92,107 128,107 148,118 110,127" fill="#334155" stroke="#475569" stroke-width="1" />
77
+ <polygon points="72,118 110,127 110,143 78,134" fill="#1E293B" stroke="#334155" stroke-width="1" />
78
+ <polygon points="110,127 148,118 142,134 110,143" fill="#0F172A" stroke="#334155" stroke-width="1" />
79
+ <path d="M 78,134 L 110,143 L 142,134" fill="none" stroke="#A855F7" stroke-width="1.8" opacity="0.9" filter="url(#bannerGlow)" />
80
+
81
+ <!-- Apex Stone -->
82
+ <polygon points="110,60 88,94 110,100" fill="#334155" stroke="#475569" stroke-width="1" />
83
+ <polygon points="110,60 110,100 132,94" fill="#1E293B" stroke="#334155" stroke-width="1" />
84
+ <line x1="110" y1="60" x2="110" y2="100" stroke="#00F0FF" stroke-width="1.8" filter="url(#bannerGlow)" />
85
+ <circle cx="110" cy="82" r="3.5" fill="#FFFFFF" filter="url(#bannerGlow)" />
86
+ <circle cx="110" cy="82" r="1.8" fill="#00F0FF" />
87
+
88
+ <!-- Constellation Graph Node Accents -->
89
+ <circle cx="158" cy="85" r="3" fill="#00F0FF" filter="url(#bannerGlow)" />
90
+ <circle cx="62" cy="100" r="2.5" fill="#A855F7" />
91
+ </g>
92
+
93
+ <!-- ==================== RIGHT: BRAND IDENTITY ==================== -->
94
+ <g transform="translate(290, 48)">
95
+ <!-- Small Category Label -->
96
+ <text x="0" y="24" fill="#38BDF8" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif" font-size="12" font-weight="700" letter-spacing="3.5" opacity="0.9">LOCAL-FIRST AGENT INTELLIGENCE</text>
97
+
98
+ <!-- Main Title -->
99
+ <text x="0" y="74" fill="url(#titleGrad)" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif" font-size="44" font-weight="800" letter-spacing="-0.5">ScopeCairn</text>
100
+
101
+ <!-- Subtitle / Mission -->
102
+ <text x="0" y="108" fill="#94A3B8" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif" font-size="15" font-weight="400" letter-spacing="0.2">
103
+ Understand before exploring. Precise task scope &amp; codebase knowledge graph for AI coding agents.
104
+ </text>
105
+
106
+ <!-- Feature Badges / Pills -->
107
+ <g transform="translate(0, 134)">
108
+ <!-- Badge 1: Knowledge Graph -->
109
+ <g transform="translate(0, 0)">
110
+ <rect x="0" y="0" width="144" height="26" rx="13" fill="#0E1726" stroke="#00F0FF" stroke-opacity="0.4" stroke-width="1" />
111
+ <circle cx="13" cy="13" r="3.5" fill="#00F0FF" />
112
+ <text x="24" y="17" fill="#E2E8F0" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="11" font-weight="600">Knowledge Graph</text>
113
+ </g>
114
+
115
+ <!-- Badge 2: Scope Guard -->
116
+ <g transform="translate(154, 0)">
117
+ <rect x="0" y="0" width="138" height="26" rx="13" fill="#141126" stroke="#A855F7" stroke-opacity="0.4" stroke-width="1" />
118
+ <circle cx="13" cy="13" r="3.5" fill="#A855F7" />
119
+ <text x="24" y="17" fill="#E2E8F0" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="11" font-weight="600">Task Scope Guard</text>
120
+ </g>
121
+
122
+ <!-- Badge 3: Impact Analysis -->
123
+ <g transform="translate(302, 0)">
124
+ <rect x="0" y="0" width="134" height="26" rx="13" fill="#0C1B2A" stroke="#38BDF8" stroke-opacity="0.4" stroke-width="1" />
125
+ <circle cx="13" cy="13" r="3.5" fill="#38BDF8" />
126
+ <text x="24" y="17" fill="#E2E8F0" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="11" font-weight="600">Impact Analysis</text>
127
+ </g>
128
+
129
+ <!-- Badge 4: Zero Telemetry -->
130
+ <g transform="translate(446, 0)">
131
+ <rect x="0" y="0" width="134" height="26" rx="13" fill="#0B171B" stroke="#10B981" stroke-opacity="0.4" stroke-width="1" />
132
+ <circle cx="13" cy="13" r="3.5" fill="#10B981" />
133
+ <text x="24" y="17" fill="#E2E8F0" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="11" font-weight="600">Zero Telemetry</text>
134
+ </g>
135
+ </g>
136
+ </g>
137
+ </svg>
Binary file
Binary file
@@ -0,0 +1,210 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" height="100%">
2
+ <defs>
3
+ <!-- Background Gradient -->
4
+ <radialGradient id="bgGlow" cx="50%" cy="45%" r="65%">
5
+ <stop offset="0%" stop-color="#141E33" />
6
+ <stop offset="60%" stop-color="#0B0F19" />
7
+ <stop offset="100%" stop-color="#05070D" />
8
+ </radialGradient>
9
+
10
+ <!-- Border Gradient -->
11
+ <linearGradient id="borderGrad" x1="0%" y1="0%" x2="100%" y2="100%">
12
+ <stop offset="0%" stop-color="#00F0FF" stop-opacity="0.8" />
13
+ <stop offset="50%" stop-color="#6366F1" stop-opacity="0.4" />
14
+ <stop offset="100%" stop-color="#A855F7" stop-opacity="0.8" />
15
+ </linearGradient>
16
+
17
+ <!-- Scope Laser Gradient -->
18
+ <linearGradient id="cyanLaser" x1="0%" y1="0%" x2="100%" y2="100%">
19
+ <stop offset="0%" stop-color="#38BDF8" />
20
+ <stop offset="50%" stop-color="#00F0FF" />
21
+ <stop offset="100%" stop-color="#0284C7" />
22
+ </linearGradient>
23
+
24
+ <linearGradient id="purpleLaser" x1="0%" y1="0%" x2="100%" y2="100%">
25
+ <stop offset="0%" stop-color="#C084FC" />
26
+ <stop offset="100%" stop-color="#7C3AED" />
27
+ </linearGradient>
28
+
29
+ <!-- Stone Obsidian Shading -->
30
+ <!-- Top Apex Stone -->
31
+ <linearGradient id="apexLeft" x1="30%" y1="0%" x2="70%" y2="100%">
32
+ <stop offset="0%" stop-color="#334155" />
33
+ <stop offset="100%" stop-color="#0F172A" />
34
+ </linearGradient>
35
+ <linearGradient id="apexRight" x1="70%" y1="0%" x2="30%" y2="100%">
36
+ <stop offset="0%" stop-color="#1E293B" />
37
+ <stop offset="100%" stop-color="#090D16" />
38
+ </linearGradient>
39
+ <linearGradient id="apexBottom" x1="50%" y1="0%" x2="50%" y2="100%">
40
+ <stop offset="0%" stop-color="#475569" />
41
+ <stop offset="100%" stop-color="#1E293B" />
42
+ </linearGradient>
43
+
44
+ <!-- Middle Stone -->
45
+ <linearGradient id="midTop" x1="20%" y1="0%" x2="80%" y2="100%">
46
+ <stop offset="0%" stop-color="#334155" />
47
+ <stop offset="100%" stop-color="#1E293B" />
48
+ </linearGradient>
49
+ <linearGradient id="midFront" x1="50%" y1="0%" x2="50%" y2="100%">
50
+ <stop offset="0%" stop-color="#1E293B" />
51
+ <stop offset="100%" stop-color="#0A0E17" />
52
+ </linearGradient>
53
+ <linearGradient id="midLeft" x1="0%" y1="50%" x2="100%" y2="50%">
54
+ <stop offset="0%" stop-color="#2D3748" />
55
+ <stop offset="100%" stop-color="#141A24" />
56
+ </linearGradient>
57
+
58
+ <!-- Base Stone -->
59
+ <linearGradient id="baseTop" x1="0%" y1="0%" x2="100%" y2="100%">
60
+ <stop offset="0%" stop-color="#334155" />
61
+ <stop offset="100%" stop-color="#1E293B" />
62
+ </linearGradient>
63
+ <linearGradient id="baseFront" x1="50%" y1="0%" x2="50%" y2="100%">
64
+ <stop offset="0%" stop-color="#1A2234" />
65
+ <stop offset="100%" stop-color="#080C14" />
66
+ </linearGradient>
67
+
68
+ <!-- Filters for Glow Effect -->
69
+ <filter id="laserGlow" x="-30%" y="-30%" width="160%" height="160%">
70
+ <feGaussianBlur stdDeviation="5" result="blur" />
71
+ <feMerge>
72
+ <feMergeNode in="blur" />
73
+ <feMergeNode in="blur" />
74
+ <feMergeNode in="SourceGraphic" />
75
+ </feMerge>
76
+ </filter>
77
+
78
+ <filter id="intenseGlow" x="-50%" y="-50%" width="200%" height="200%">
79
+ <feGaussianBlur stdDeviation="9" result="blur" />
80
+ <feMerge>
81
+ <feMergeNode in="blur" />
82
+ <feMergeNode in="SourceGraphic" />
83
+ </feMerge>
84
+ </filter>
85
+ </defs>
86
+
87
+ <!-- Container App Squircle (macOS / Modern Icon Standard) -->
88
+ <rect x="16" y="16" width="480" height="480" rx="108" fill="url(#bgGlow)" stroke="url(#borderGrad)" stroke-width="2.5" />
89
+
90
+ <!-- Ambient Internal Backdrop Glow -->
91
+ <circle cx="256" cy="240" r="140" fill="#00F0FF" opacity="0.07" filter="url(#intenseGlow)" />
92
+ <circle cx="256" cy="180" r="80" fill="#8B5CF6" opacity="0.12" filter="url(#intenseGlow)" />
93
+
94
+ <!-- Target Scope Reticle Elements -->
95
+ <!-- Outer Dotted Calibration Ring -->
96
+ <circle cx="256" cy="256" r="190" fill="none" stroke="#6366F1" stroke-width="1.5" stroke-dasharray="3 9" opacity="0.45" />
97
+
98
+ <!-- Scope HUD Corner Brackets -->
99
+ <g stroke="#00F0FF" stroke-width="2" fill="none" opacity="0.4">
100
+ <!-- Top-Left Bracket -->
101
+ <path d="M 80 120 L 80 80 L 120 80" />
102
+ <!-- Top-Right Bracket -->
103
+ <path d="M 392 80 L 432 80 L 432 120" />
104
+ <!-- Bottom-Left Bracket -->
105
+ <path d="M 80 392 L 80 432 L 120 432" />
106
+ <!-- Bottom-Right Bracket -->
107
+ <path d="M 432 392 L 432 432 L 392 432" />
108
+ </g>
109
+
110
+ <!-- Concentric Targeting Rings (Mid + Upper Focus) -->
111
+ <circle cx="256" cy="256" r="150" fill="none" stroke="#00F0FF" stroke-width="2" opacity="0.75" filter="url(#laserGlow)" />
112
+ <circle cx="256" cy="190" r="85" fill="none" stroke="#A855F7" stroke-width="2.5" opacity="0.8" filter="url(#laserGlow)" />
113
+ <circle cx="256" cy="190" r="48" fill="none" stroke="#00F0FF" stroke-width="1.8" opacity="0.9" />
114
+
115
+ <!-- Scope Reticle Crosshairs (Crosslines with precise gaps) -->
116
+ <!-- Main Vertical Scope Line -->
117
+ <line x1="256" y1="75" x2="256" y2="135" stroke="#00F0FF" stroke-width="2.5" stroke-linecap="round" filter="url(#laserGlow)" />
118
+ <line x1="256" y1="365" x2="256" y2="435" stroke="#00F0FF" stroke-width="2.5" stroke-linecap="round" filter="url(#laserGlow)" />
119
+ <line x1="256" y1="140" x2="256" y2="350" stroke="#00F0FF" stroke-width="1.2" stroke-dasharray="4 6" opacity="0.5" />
120
+
121
+ <!-- Main Horizontal Scope Line -->
122
+ <line x1="75" y1="256" x2="135" y2="256" stroke="#00F0FF" stroke-width="2.5" stroke-linecap="round" filter="url(#laserGlow)" />
123
+ <line x1="377" y1="256" x2="437" y2="256" stroke="#00F0FF" stroke-width="2.5" stroke-linecap="round" filter="url(#laserGlow)" />
124
+
125
+ <!-- Precision Sub-scope Crosshair at Apex Focal Center (256, 190) -->
126
+ <line x1="180" y1="190" x2="215" y2="190" stroke="#38BDF8" stroke-width="2" stroke-linecap="round" />
127
+ <line x1="297" y1="190" x2="332" y2="190" stroke="#38BDF8" stroke-width="2" stroke-linecap="round" />
128
+
129
+ <!-- ==================== THE CAIRN STONES ==================== -->
130
+
131
+ <!-- BASE STONE (Foundation / Repository Grounding) -->
132
+ <g id="base-stone">
133
+ <!-- Base Shadow / Glow Rim -->
134
+ <ellipse cx="256" cy="385" rx="145" ry="32" fill="#00F0FF" opacity="0.1" filter="url(#laserGlow)" />
135
+
136
+ <!-- Facets of Base Stone -->
137
+ <!-- Front Face -->
138
+ <polygon points="120,365 256,388 392,365 372,405 256,418 140,405" fill="url(#baseFront)" stroke="#1E293B" stroke-width="1" />
139
+ <!-- Top Face -->
140
+ <polygon points="120,365 170,335 342,335 392,365 256,388" fill="url(#baseTop)" stroke="#334155" stroke-width="1" />
141
+ <!-- Bottom Bevel Rim Highlight -->
142
+ <path d="M 140,405 L 256,418 L 372,405" fill="none" stroke="#00F0FF" stroke-width="2" opacity="0.65" filter="url(#laserGlow)" />
143
+
144
+ <!-- Codebase Knowledge Graph Circuit Trace on Base Stone -->
145
+ <path d="M 165,372 L 210,378 L 245,368 L 295,380 L 340,368" fill="none" stroke="#00F0FF" stroke-width="1.8" opacity="0.75" />
146
+ <circle cx="210" cy="378" r="3.5" fill="#00F0FF" filter="url(#laserGlow)" />
147
+ <circle cx="245" cy="368" r="3" fill="#A855F7" />
148
+ <circle cx="295" cy="380" r="3.5" fill="#00F0FF" filter="url(#laserGlow)" />
149
+ </g>
150
+
151
+ <!-- MIDDLE STONE (Task Context & Module Balance) -->
152
+ <g id="middle-stone">
153
+ <!-- Floating Shadow between base and middle -->
154
+ <ellipse cx="256" cy="318" rx="100" ry="16" fill="#000000" opacity="0.6" />
155
+
156
+ <!-- Facets of Middle Stone -->
157
+ <!-- Top Facet -->
158
+ <polygon points="170,270 215,245 297,245 342,270 256,290" fill="url(#midTop)" stroke="#475569" stroke-width="1" />
159
+ <!-- Left Facet -->
160
+ <polygon points="170,270 256,290 256,325 185,305" fill="url(#midLeft)" stroke="#1E293B" stroke-width="1" />
161
+ <!-- Right Facet -->
162
+ <polygon points="256,290 342,270 327,305 256,325" fill="url(#midFront)" stroke="#1E293B" stroke-width="1" />
163
+
164
+ <!-- Edge Neon Accent Highlight -->
165
+ <path d="M 170,270 L 256,290 L 342,270" fill="none" stroke="#818CF8" stroke-width="2" opacity="0.8" />
166
+ <path d="M 185,305 L 256,325 L 327,305" fill="none" stroke="#A855F7" stroke-width="2.2" opacity="0.85" filter="url(#laserGlow)" />
167
+
168
+ <!-- Graph Relation Line (Edge) -->
169
+ <path d="M 205,282 L 235,275 L 275,295 L 305,280" fill="none" stroke="#38BDF8" stroke-width="1.5" opacity="0.8" />
170
+ <circle cx="235" cy="275" r="3" fill="#38BDF8" filter="url(#laserGlow)" />
171
+ <circle cx="275" cy="295" r="3.5" fill="#C084FC" filter="url(#laserGlow)" />
172
+ </g>
173
+
174
+ <!-- APEX STONE (The Summit / Target Scope Focal Beacon) -->
175
+ <g id="apex-stone">
176
+ <!-- Hover Shadow -->
177
+ <ellipse cx="256" cy="235" rx="50" ry="10" fill="#000000" opacity="0.7" />
178
+
179
+ <!-- Facets of Apex Jewel / Pyramid Stone -->
180
+ <!-- Left Facet -->
181
+ <polygon points="256,140 205,215 256,228" fill="url(#apexLeft)" stroke="#475569" stroke-width="1" />
182
+ <!-- Right Facet -->
183
+ <polygon points="256,140 256,228 307,215" fill="url(#apexRight)" stroke="#334155" stroke-width="1" />
184
+ <!-- Top Ridge Line -->
185
+ <line x1="256" y1="140" x2="256" y2="228" stroke="#00F0FF" stroke-width="2" opacity="0.9" filter="url(#laserGlow)" />
186
+
187
+ <!-- Rim Accents -->
188
+ <path d="M 205,215 L 256,228 L 307,215" fill="none" stroke="#00F0FF" stroke-width="2.5" opacity="0.9" filter="url(#laserGlow)" />
189
+
190
+ <!-- Focal Center Reticle Core -->
191
+ <circle cx="256" cy="190" r="5" fill="#FFFFFF" filter="url(#intenseGlow)" />
192
+ <circle cx="256" cy="190" r="2.5" fill="#00F0FF" />
193
+ </g>
194
+
195
+ <!-- Constellation / Knowledge Graph Nodes floating around -->
196
+ <g id="graph-nodes">
197
+ <circle cx="370" cy="195" r="4" fill="#00F0FF" opacity="0.85" filter="url(#laserGlow)" />
198
+ <line x1="340" y1="210" x2="370" y2="195" stroke="#00F0FF" stroke-width="1" stroke-dasharray="2 3" opacity="0.5" />
199
+
200
+ <circle cx="140" cy="225" r="3.5" fill="#A855F7" opacity="0.85" filter="url(#laserGlow)" />
201
+ <line x1="170" y1="240" x2="140" y2="225" stroke="#A855F7" stroke-width="1" stroke-dasharray="2 3" opacity="0.5" />
202
+
203
+ <circle cx="345" cy="330" r="3.5" fill="#38BDF8" opacity="0.8" filter="url(#laserGlow)" />
204
+ <circle cx="165" cy="325" r="4" fill="#00F0FF" opacity="0.8" filter="url(#laserGlow)" />
205
+ </g>
206
+
207
+ <!-- Calibrated Boundary Angle Marks (Degree coordinates) -->
208
+ <text x="256" y="60" text-anchor="middle" fill="#00F0FF" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace" font-size="11" font-weight="700" letter-spacing="3" opacity="0.75">SCOPE·CAIRN</text>
209
+ <text x="256" y="465" text-anchor="middle" fill="#818CF8" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace" font-size="9" font-weight="600" letter-spacing="4" opacity="0.6">CODEBASE INTELLIGENCE</text>
210
+ </svg>
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ PROJECT_RULES_MAX_CHARS,
4
+ demoteHeadings,
5
+ findAgentsMd,
6
+ loadProjectRules
7
+ } from "./chunk-ZV4BSIQM.js";
8
+ export {
9
+ PROJECT_RULES_MAX_CHARS,
10
+ demoteHeadings,
11
+ findAgentsMd,
12
+ loadProjectRules
13
+ };