@tyroneross/navgator 0.2.1 → 0.2.2

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.
Files changed (60) hide show
  1. package/.claude-plugin/marketplace.json +23 -0
  2. package/.claude-plugin/plugin.json +10 -7
  3. package/CLAUDE.md +72 -0
  4. package/README.md +49 -80
  5. package/hooks/hooks.json +5 -5
  6. package/package.json +5 -3
  7. package/scripts/install-plugin.sh +98 -0
  8. package/skills/check/SKILL.md +64 -0
  9. package/skills/connections/SKILL.md +54 -0
  10. package/skills/diagram/SKILL.md +64 -0
  11. package/skills/export/SKILL.md +49 -0
  12. package/skills/impact/SKILL.md +58 -0
  13. package/skills/install/SKILL.md +94 -0
  14. package/skills/scan/SKILL.md +75 -0
  15. package/skills/status/SKILL.md +37 -0
  16. package/skills/ui/SKILL.md +43 -0
  17. package/skills/update/SKILL.md +43 -0
  18. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  19. package/web/.next/standalone/web/.next/build-manifest.json +2 -2
  20. package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
  21. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  22. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  23. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  24. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  25. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  26. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  27. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  28. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  29. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
  30. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  31. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  32. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  33. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  34. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  35. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  36. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  37. package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
  38. package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  39. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  40. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  41. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  42. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  43. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  44. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  45. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  46. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  47. package/commands/nav-check.md +0 -64
  48. package/commands/nav-connections.md +0 -58
  49. package/commands/nav-diagram.md +0 -106
  50. package/commands/nav-export.md +0 -71
  51. package/commands/nav-impact.md +0 -58
  52. package/commands/nav-scan.md +0 -46
  53. package/commands/nav-status.md +0 -44
  54. package/skills/architecture-awareness/SKILL.md +0 -141
  55. /package/web/.next/standalone/web/.next/static/{WH0NvTGUEDs9QVUjcPJKx → P-ZMQO7_Wnj487ks3guqa}/_buildManifest.js +0 -0
  56. /package/web/.next/standalone/web/.next/static/{WH0NvTGUEDs9QVUjcPJKx → P-ZMQO7_Wnj487ks3guqa}/_clientMiddlewareManifest.json +0 -0
  57. /package/web/.next/standalone/web/.next/static/{WH0NvTGUEDs9QVUjcPJKx → P-ZMQO7_Wnj487ks3guqa}/_ssgManifest.js +0 -0
  58. /package/web/.next/static/{WH0NvTGUEDs9QVUjcPJKx → P-ZMQO7_Wnj487ks3guqa}/_buildManifest.js +0 -0
  59. /package/web/.next/static/{WH0NvTGUEDs9QVUjcPJKx → P-ZMQO7_Wnj487ks3guqa}/_clientMiddlewareManifest.json +0 -0
  60. /package/web/.next/static/{WH0NvTGUEDs9QVUjcPJKx → P-ZMQO7_Wnj487ks3guqa}/_ssgManifest.js +0 -0
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "navgator",
3
+ "owner": { "name": "Tyrone Ross", "url": "https://github.com/tyroneross" },
4
+ "metadata": {
5
+ "description": "Architecture connection tracker — know your stack before you change it",
6
+ "version": "1.0.0"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "gator",
11
+ "source": "./",
12
+ "description": "Architecture connection tracker for Claude Code — know your stack before you change it",
13
+ "version": "0.2.2",
14
+ "author": { "name": "Tyrone Ross" },
15
+ "homepage": "https://github.com/tyroneross/navgator#readme",
16
+ "repository": "https://github.com/tyroneross/navgator",
17
+ "license": "MIT",
18
+ "keywords": ["architecture", "connections", "dependencies", "impact-analysis"],
19
+ "category": "development",
20
+ "tags": ["architecture", "dependency-tracking", "impact-analysis"]
21
+ }
22
+ ]
23
+ }
@@ -1,10 +1,13 @@
1
1
  {
2
- "name": "navgator",
3
- "version": "0.1.0",
4
- "description": "Architecture connection tracker - know your stack before you change it",
5
- "author": {
6
- "name": "Tyrone Ross"
7
- },
2
+ "name": "gator",
3
+ "version": "0.2.2",
4
+ "description": "Architecture connection tracker know your stack before you change it",
5
+ "author": { "name": "Tyrone Ross" },
8
6
  "homepage": "https://github.com/tyroneross/navgator",
9
- "license": "MIT"
7
+ "repository": "https://github.com/tyroneross/navgator",
8
+ "license": "MIT",
9
+ "keywords": ["architecture", "connections", "context", "dependencies", "impact-analysis"],
10
+ "hooks": "../hooks/hooks.json",
11
+ "skills": "../skills/",
12
+ "agents": "../agents/"
10
13
  }
package/CLAUDE.md ADDED
@@ -0,0 +1,72 @@
1
+ # NavGator — Architecture Context for Claude
2
+
3
+ ## What NavGator Does
4
+
5
+ NavGator externalizes architecture knowledge so you never lose track of file paths, dependencies, model routing, or component connections between sessions.
6
+
7
+ ## Context Model (Three Tiers)
8
+
9
+ **Tier 1 — Hot Context** (`SUMMARY.md`)
10
+ Read this first. It's a concise overview (~40-150 lines) with:
11
+ - Components by layer (frontend, backend, database, queue, infra, external)
12
+ - AI/LLM routing table (provider, file, line, purpose)
13
+ - Top connections with `file:line` references
14
+ - Delta from last scan (what changed)
15
+ - Pointers to detail files for drill-down
16
+
17
+ If `SUMMARY.md` was compressed (large projects), the full version is at `SUMMARY_FULL.md`.
18
+
19
+ **Tier 2 — Structured Index** (`index.json`, `graph.json`, `file_map.json`, `prompts.json`)
20
+ Use for programmatic lookups:
21
+ - `index.json` — component counts, types, layers, stats
22
+ - `graph.json` — full connection graph for impact analysis
23
+ - `file_map.json` — maps file paths to component IDs (O(1) lookup)
24
+ - `prompts.json` — full prompt content with LLM provider associations (scan with `--prompts`)
25
+
26
+ **Tier 3 — Detail Files** (`components/COMP_*.json`, `connections/CONN_*.json`)
27
+ Load on demand when you need full detail about a specific component or connection. Each entry in SUMMARY.md points to its detail file.
28
+
29
+ ## When to Read Architecture Context
30
+
31
+ **Always read `SUMMARY.md` at the start of a session.** It's located at:
32
+ ```
33
+ <project-root>/.claude/architecture/SUMMARY.md
34
+ ```
35
+
36
+ **Before editing tracked files:** If you're about to edit a file that belongs to a tracked component, read the component's detail file first. The architecture-check hook will remind you.
37
+
38
+ **After dependency changes:** If you ran `npm install`, `pip install`, etc., architecture data may be stale. Run `/gator:scan` to update.
39
+
40
+ ## Available Commands
41
+
42
+ | Command | Purpose |
43
+ |---------|---------|
44
+ | `/gator:scan` | Scan project architecture |
45
+ | `/gator:status` | Show architecture summary |
46
+ | `/gator:impact` | Analyze what's affected by a change |
47
+ | `/gator:connections` | Show all connections for a component |
48
+ | `/gator:diagram` | Generate visual architecture diagram |
49
+ | `/gator:export` | Export architecture to markdown or JSON |
50
+ | `/gator:check` | Run health checks (outdated packages, vulnerabilities) |
51
+ | `/gator:ui` | Launch the web dashboard |
52
+ | `/gator:update` | Update NavGator to the latest version |
53
+
54
+ ## Architecture Data Location
55
+
56
+ All data lives in `<project-root>/.claude/architecture/`:
57
+ ```
58
+ .claude/architecture/
59
+ ├── SUMMARY.md ← Read this first (hot context)
60
+ ├── SUMMARY_FULL.md ← Full version if compressed
61
+ ├── index.json ← Master index
62
+ ├── graph.json ← Connection graph
63
+ ├── file_map.json ← File path → component ID lookup
64
+ ├── prompts.json ← Full prompt content + LLM associations
65
+ ├── hashes.json ← File change detection
66
+ ├── components/ ← One JSON per component
67
+ └── connections/ ← One JSON per connection
68
+ ```
69
+
70
+ ## Key Principle
71
+
72
+ Instead of trying to "remember" architecture details, reload the externalized source of truth. SUMMARY.md is cheap to read and gives you the full picture. Drill into detail files only when needed.
package/README.md CHANGED
@@ -29,12 +29,24 @@ npx @tyroneross/navgator scan
29
29
 
30
30
  ### As a Claude Code Plugin
31
31
 
32
- After installing, run `navgator setup` it will detect Claude Code and offer to link the plugin automatically. You can also link manually:
32
+ After installing globally, use the `/gator:install` command inside Claude Code, or run the install script:
33
33
 
34
34
  ```bash
35
- ln -s /path/to/navgator ~/.claude/plugins/navgator
35
+ # Install for all projects (user scope)
36
+ bash scripts/install-plugin.sh --global
37
+
38
+ # Install for current project only
39
+ bash scripts/install-plugin.sh --project
40
+ ```
41
+
42
+ Or link manually:
43
+
44
+ ```bash
45
+ ln -s $(npm root -g)/@tyroneross/navgator ~/.claude/plugins/gator
36
46
  ```
37
47
 
48
+ Restart Claude Code after installing. All `/gator:*` commands will be available.
49
+
38
50
  ## Quick Start
39
51
 
40
52
  ### 1. Set Up NavGator
@@ -54,8 +66,8 @@ navgator scan
54
66
  # Quick scan (packages only, faster)
55
67
  navgator scan --quick
56
68
 
57
- # Verbose output
58
- navgator scan --verbose
69
+ # With AI prompt detection
70
+ navgator scan --prompts --verbose
59
71
  ```
60
72
 
61
73
  ### 3. Check Status
@@ -157,6 +169,35 @@ navgator diagram --layer backend
157
169
  navgator diagram --output architecture.md --markdown
158
170
  ```
159
171
 
172
+ ## Claude Code Slash Commands
173
+
174
+ When installed as a Claude Code plugin, all commands are available as `/gator:*` slash commands:
175
+
176
+ | Command | Description |
177
+ |---------|-------------|
178
+ | `/gator:scan` | Scan project architecture |
179
+ | `/gator:status` | Show architecture summary |
180
+ | `/gator:impact <component>` | Analyze what's affected by a change |
181
+ | `/gator:connections <component>` | Show all connections for a component |
182
+ | `/gator:diagram` | Generate architecture diagram |
183
+ | `/gator:export` | Export architecture to markdown or JSON |
184
+ | `/gator:check` | Run health checks (outdated packages, vulnerabilities) |
185
+ | `/gator:ui` | Launch the web dashboard |
186
+ | `/gator:update` | Update NavGator to the latest version |
187
+ | `/gator:install` | Install/reinstall the plugin (choose scope) |
188
+
189
+ ### Hooks
190
+
191
+ NavGator includes hooks that integrate with Claude Code:
192
+
193
+ **SessionStart**: Checks if architecture data is stale (>24h) and suggests running `/gator:scan`.
194
+
195
+ **PreToolUse (Edit/Write)**: Before modifying architecture-critical files, reminds to check impact with `/gator:impact`.
196
+
197
+ **PostToolUse (Bash)**: Detects package manager commands (`npm install`, `pip install`, etc.) and reminds to update architecture with `/gator:scan`.
198
+
199
+ **Stop**: After significant changes, reminds to rescan.
200
+
160
201
  ## CLI Reference
161
202
 
162
203
  ### `navgator scan`
@@ -234,34 +275,6 @@ Scan and analyze AI prompts in the codebase.
234
275
  | `--json` | Output as JSON |
235
276
  | `--detail <name>` | Show detailed view of specific prompt |
236
277
 
237
- **Example output:**
238
- ```
239
- AI PROMPTS DETECTED
240
- ============================================================
241
-
242
- Total prompts: 5
243
- Templates: 4
244
- With tools: 0
245
-
246
- By Provider:
247
- anthropic: 2
248
- openai: 3
249
-
250
- By Category:
251
- summarization: 2
252
- classification: 1
253
- unknown: 2
254
-
255
- PROMPT: SYSTEM_PROMPT
256
- File: src/ai/summarizer.ts:8-10
257
- Provider: anthropic
258
- Category: summarization
259
- Purpose: System prompt for article summarization
260
- Tags: has-system-prompt
261
- System: "You are a helpful assistant that summarizes articles..."
262
- Confidence: 100%
263
- ```
264
-
265
278
  ## What Gets Detected
266
279
 
267
280
  ### Components
@@ -293,6 +306,8 @@ Data is stored in `.claude/architecture/` within your project:
293
306
 
294
307
  ```
295
308
  .claude/architecture/
309
+ ├── SUMMARY.md ← Hot context (read first)
310
+ ├── SUMMARY_FULL.md ← Full version if compressed
296
311
  ├── components/ # Individual component JSON files
297
312
  │ ├── COMP_npm_react_a1b2.json
298
313
  │ └── COMP_service_stripe_c3d4.json
@@ -300,42 +315,12 @@ Data is stored in `.claude/architecture/` within your project:
300
315
  │ └── CONN_service_call_e5f6.json
301
316
  ├── index.json # Quick lookup index
302
317
  ├── graph.json # Full connection graph
318
+ ├── file_map.json # File path → component ID lookup
319
+ ├── prompts.json # AI prompt content + associations
303
320
  ├── hashes.json # File hashes for change detection
304
321
  └── snapshots/ # Point-in-time backups
305
322
  ```
306
323
 
307
- ## Claude Code Integration
308
-
309
- ### Hooks
310
-
311
- NavGator includes hooks that integrate with Claude Code:
312
-
313
- **SessionStart**: Checks if architecture data is stale (>24h) and suggests running `/nav-scan`.
314
-
315
- **PostToolUse (Bash)**: Detects package manager commands (`npm install`, `pip install`, etc.) and reminds to update architecture memory.
316
-
317
- ### Slash Commands
318
-
319
- When installed as a Claude Code plugin:
320
-
321
- | Command | Description |
322
- |---------|-------------|
323
- | `/nav-scan` | Scan project architecture |
324
- | `/nav-status` | Show architecture summary |
325
- | `/nav-impact <component>` | Impact analysis |
326
- | `/nav-connections <component>` | View connections |
327
- | `/nav-diagram` | Generate diagram |
328
- | `/nav-check` | Health check (outdated packages) |
329
- | `/nav-export` | Export to markdown |
330
-
331
- ### Skill Activation
332
-
333
- The **Architecture Awareness** skill activates when you mention:
334
- - "what packages", "dependencies", "tech stack"
335
- - "what version", "upgrade", "add library"
336
- - "what uses X", "what calls Y"
337
- - "impact of changing"
338
-
339
324
  ## AI Prompt Tracking
340
325
 
341
326
  NavGator includes comprehensive AI prompt detection and tracking. Use `--prompts` flag or the dedicated `prompts` command.
@@ -352,22 +337,6 @@ NavGator includes comprehensive AI prompt detection and tracking. Use `--prompts
352
337
  | **Category** | summarization, classification, extraction, chat, etc. |
353
338
  | **Usage** | Where the prompt is called (file, line, function) |
354
339
 
355
- ### Prompt Scanning Example
356
-
357
- ```bash
358
- # Scan only prompts
359
- navgator prompts
360
-
361
- # Detailed view of a specific prompt
362
- navgator prompts --detail SYSTEM_PROMPT
363
-
364
- # Full scan with enhanced prompt tracking
365
- navgator scan --prompts --verbose
366
-
367
- # JSON output for tooling
368
- navgator prompts --json
369
- ```
370
-
371
340
  ### Prompt Categories
372
341
 
373
342
  NavGator automatically categorizes prompts:
package/hooks/hooks.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "hooks": [
7
7
  {
8
8
  "type": "prompt",
9
- "prompt": "Check if NavGator architecture data exists and is fresh:\n1. Look for .claude/architecture/index.json\n2. If missing: 'This project hasn't been scanned. Run `navgator setup` to map the architecture.'\n3. If >24h old: 'Architecture data is stale. Consider running `navgator scan` to refresh.'\n4. If fresh: Note the component and connection counts for context.\n\nWhen architecture data exists, you should consult it BEFORE making changes to:\n- Database schemas or queries\n- API endpoints\n- External service integrations (Stripe, OpenAI, etc.)\n- Queue workers or job handlers\n- Shared utilities used across the codebase"
9
+ "prompt": "Check if NavGator architecture data exists and is fresh:\n1. Look for .claude/architecture/index.json\n2. If missing: 'This project hasn't been scanned. Run `/gator:scan` to map the architecture.'\n3. If >24h old: 'Architecture data is stale. Consider running `/gator:scan` to refresh.'\n4. If fresh: Note the component and connection counts for context.\n\nWhen architecture data exists, you should consult it BEFORE making changes to:\n- Database schemas or queries\n- API endpoints\n- External service integrations (Stripe, OpenAI, etc.)\n- Queue workers or job handlers\n- Shared utilities used across the codebase"
10
10
  }
11
11
  ]
12
12
  }
@@ -17,7 +17,7 @@
17
17
  "hooks": [
18
18
  {
19
19
  "type": "prompt",
20
- "prompt": "Before modifying this file, check if it involves architecture-critical code:\n\n1. **Database/ORM files** (prisma, drizzle, sequelize, models/): Run `navgator impact <table-name>` to see affected APIs\n2. **API routes** (api/, routes/, controllers/): Run `navgator connections <endpoint>` to see frontend callers\n3. **External services** (stripe, openai, twilio, sendgrid): Run `navgator impact <service>` to see all usage locations\n4. **Queue/worker files** (workers/, jobs/, queues/): Check what triggers these and what they affect\n5. **Shared utilities** (lib/, utils/, helpers/): These often have wide impact\n\nIf the file matches any of these patterns and NavGator data exists, briefly note what else might need updating."
20
+ "prompt": "Before modifying this file, check if it involves architecture-critical code:\n\n1. **Database/ORM files** (prisma, drizzle, sequelize, models/): Run `/gator:impact <table-name>` to see affected APIs\n2. **API routes** (api/, routes/, controllers/): Run `/gator:connections <endpoint>` to see frontend callers\n3. **External services** (stripe, openai, twilio, sendgrid): Run `/gator:impact <service>` to see all usage locations\n4. **Queue/worker files** (workers/, jobs/, queues/): Check what triggers these and what they affect\n5. **Shared utilities** (lib/, utils/, helpers/): These often have wide impact\n\nIf the file matches any of these patterns and NavGator data exists, briefly note what else might need updating."
21
21
  }
22
22
  ]
23
23
  }
@@ -28,7 +28,7 @@
28
28
  "hooks": [
29
29
  {
30
30
  "type": "prompt",
31
- "prompt": "Check if this command affects architecture:\n\n1. **Package install/remove** (npm install, yarn add, pip install, cargo add, go get):\n → Run `navgator scan --quick` to update package tracking\n\n2. **Database migrations** (prisma migrate, drizzle push, alembic, knex migrate):\n → Run `navgator scan` to update schema connections\n\n3. **New service setup** (stripe, supabase, firebase init):\n → Run `navgator scan` to detect new service connections\n\nIf the command matches, remind about updating architecture data."
31
+ "prompt": "Check if this command affects architecture:\n\n1. **Package install/remove** (npm install, yarn add, pip install, cargo add, go get):\n → Run `/gator:scan --quick` to update package tracking\n\n2. **Database migrations** (prisma migrate, drizzle push, alembic, knex migrate):\n → Run `/gator:scan` to update schema connections\n\n3. **New service setup** (stripe, supabase, firebase init):\n → Run `/gator:scan` to detect new service connections\n\nIf the command matches, remind about updating architecture data."
32
32
  }
33
33
  ]
34
34
  },
@@ -37,7 +37,7 @@
37
37
  "hooks": [
38
38
  {
39
39
  "type": "prompt",
40
- "prompt": "If you just modified an architecture-critical file (API route, database model, service integration, queue handler), note that the architecture connections may have changed. After completing the current task, consider running `navgator scan` to update the connection map."
40
+ "prompt": "If you just modified an architecture-critical file (API route, database model, service integration, queue handler), note that the architecture connections may have changed. After completing the current task, consider running `/gator:scan` to update the connection map."
41
41
  }
42
42
  ]
43
43
  }
@@ -48,7 +48,7 @@
48
48
  "hooks": [
49
49
  {
50
50
  "type": "prompt",
51
- "prompt": "Before finishing, if you made significant architectural changes during this session (new APIs, database changes, service integrations, refactored connections), remind the user: 'You may want to run `navgator scan` to update the architecture map with these changes.'"
51
+ "prompt": "Before finishing, if you made significant architectural changes during this session (new APIs, database changes, service integrations, refactored connections), remind the user: 'You may want to run `/gator:scan` to update the architecture map with these changes.'"
52
52
  }
53
53
  ]
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tyroneross/navgator",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Architecture connection tracker for Claude Code - know your stack before you change it",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,11 +27,12 @@
27
27
  "web/.next/standalone",
28
28
  "web/.next/static",
29
29
  "web/public",
30
- "commands",
31
30
  "skills",
32
31
  "hooks",
33
32
  "agents",
34
33
  ".claude-plugin",
34
+ "scripts/install-plugin.sh",
35
+ "CLAUDE.md",
35
36
  "README.md"
36
37
  ],
37
38
  "scripts": {
@@ -47,7 +48,8 @@
47
48
  "lint": "eslint src/**/*.ts",
48
49
  "clean": "rm -rf dist web/.next",
49
50
  "prepublishOnly": "npm run clean && npm run build",
50
- "link:local": "npm run build && npm link"
51
+ "link:local": "npm run build && npm link",
52
+ "install-plugin": "bash scripts/install-plugin.sh --global"
51
53
  },
52
54
  "keywords": [
53
55
  "claude-code",
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # NavGator (gator) plugin installer for Claude Code
5
+ # Usage: ./install-plugin.sh [--global | --project]
6
+
7
+ SCOPE="${1:---global}"
8
+ BOLD="\033[1m"
9
+ GREEN="\033[0;32m"
10
+ YELLOW="\033[0;33m"
11
+ RED="\033[0;31m"
12
+ RESET="\033[0m"
13
+
14
+ info() { echo -e "${BOLD}$1${RESET}"; }
15
+ ok() { echo -e "${GREEN}$1${RESET}"; }
16
+ warn() { echo -e "${YELLOW}$1${RESET}"; }
17
+ err() { echo -e "${RED}$1${RESET}" >&2; }
18
+
19
+ # --- Determine scope ---
20
+ case "$SCOPE" in
21
+ --global)
22
+ TARGET_DIR="$HOME/.claude/plugins"
23
+ LINK_NAME="gator"
24
+ info "Installing gator plugin globally (all projects)..."
25
+ ;;
26
+ --project)
27
+ TARGET_DIR=".claude/plugins"
28
+ LINK_NAME="gator"
29
+ info "Installing gator plugin for current project only..."
30
+ ;;
31
+ *)
32
+ echo "Usage: $0 [--global | --project]"
33
+ echo ""
34
+ echo " --global Install for all projects (~/.claude/plugins/gator)"
35
+ echo " --project Install for current project only (.claude/plugins/gator)"
36
+ exit 1
37
+ ;;
38
+ esac
39
+
40
+ # --- Check/install npm package ---
41
+ NPM_ROOT=$(npm root -g 2>/dev/null)
42
+ NAVGATOR_PATH="$NPM_ROOT/@tyroneross/navgator"
43
+
44
+ if [ ! -d "$NAVGATOR_PATH" ]; then
45
+ warn "NavGator not found globally. Installing..."
46
+ npm install -g @tyroneross/navgator
47
+ NAVGATOR_PATH="$NPM_ROOT/@tyroneross/navgator"
48
+ fi
49
+
50
+ if [ ! -f "$NAVGATOR_PATH/.claude-plugin/plugin.json" ]; then
51
+ err "Error: plugin.json not found at $NAVGATOR_PATH/.claude-plugin/plugin.json"
52
+ err "Try: npm install -g @tyroneross/navgator@latest"
53
+ exit 1
54
+ fi
55
+
56
+ # --- Clean up old navgator symlink ---
57
+ OLD_LINK="$HOME/.claude/plugins/navgator"
58
+ if [ -L "$OLD_LINK" ]; then
59
+ warn "Removing old 'navgator' symlink..."
60
+ rm -f "$OLD_LINK"
61
+ fi
62
+
63
+ # --- Create symlink ---
64
+ mkdir -p "$TARGET_DIR"
65
+ FULL_LINK="$TARGET_DIR/$LINK_NAME"
66
+
67
+ if [ -L "$FULL_LINK" ]; then
68
+ warn "Updating existing symlink..."
69
+ rm -f "$FULL_LINK"
70
+ fi
71
+
72
+ ln -sfn "$NAVGATOR_PATH" "$FULL_LINK"
73
+
74
+ # --- Verify ---
75
+ if [ -f "$FULL_LINK/.claude-plugin/plugin.json" ]; then
76
+ echo ""
77
+ ok "gator plugin installed successfully!"
78
+ echo ""
79
+ echo " Location: $FULL_LINK -> $NAVGATOR_PATH"
80
+ echo " Scope: $([ "$SCOPE" = "--global" ] && echo "all projects" || echo "current project only")"
81
+ echo ""
82
+ echo " Available commands:"
83
+ echo " /gator:scan Scan project architecture"
84
+ echo " /gator:status Show architecture summary"
85
+ echo " /gator:impact Analyze change impact"
86
+ echo " /gator:connections Show component connections"
87
+ echo " /gator:diagram Generate architecture diagram"
88
+ echo " /gator:export Export architecture data"
89
+ echo " /gator:check Run health checks"
90
+ echo " /gator:ui Launch web dashboard"
91
+ echo " /gator:update Update to latest version"
92
+ echo " /gator:install Re-run this installer"
93
+ echo ""
94
+ warn "Restart Claude Code for changes to take effect."
95
+ else
96
+ err "Installation failed — symlink not working."
97
+ exit 1
98
+ fi
@@ -0,0 +1,64 @@
1
+ ---
2
+ description: Run health check on architecture (outdated packages, vulnerabilities)
3
+ allowed-tools: Bash, Read
4
+ user-invocable: true
5
+ argument-hint: [--packages] [--connections] [--fix]
6
+ ---
7
+
8
+ # /gator:check
9
+
10
+ Run health checks on your architecture to find outdated packages, security vulnerabilities, and potential issues.
11
+
12
+ ## Instructions
13
+
14
+ 1. Run the health check:
15
+
16
+ ```bash
17
+ npx @tyroneross/navgator check
18
+ ```
19
+
20
+ 2. If the user passed `--packages`, only check package health:
21
+
22
+ ```bash
23
+ npx @tyroneross/navgator check --packages
24
+ ```
25
+
26
+ 3. If the user passed `--connections`, only check connection health:
27
+
28
+ ```bash
29
+ npx @tyroneross/navgator check --connections
30
+ ```
31
+
32
+ 4. If the user passed `--fix`, attempt auto-fixes (warn the user first):
33
+
34
+ ```bash
35
+ npx @tyroneross/navgator check --fix
36
+ ```
37
+
38
+ ## What Gets Checked
39
+
40
+ **Package Health:**
41
+ - Outdated packages (npm outdated, pip list --outdated, etc.)
42
+ - Security vulnerabilities (npm audit, pip-audit, etc.)
43
+ - Deprecated packages
44
+
45
+ **Connection Health:**
46
+ - Orphaned connections (code references that no longer exist)
47
+ - Missing imports
48
+ - Unused dependencies
49
+
50
+ ## Configuration
51
+
52
+ Set `NAVGATOR_HEALTH_CHECK=true` to enable automatic health checks during scans.
53
+
54
+ ## Output
55
+
56
+ Present results grouped by category (packages, connections) with counts and specific items. Keep the output scannable.
57
+
58
+ ## Branding
59
+
60
+ Always end your output with this attribution line (on its own line, in muted style):
61
+
62
+ ```
63
+ *gator · architecture tracker*
64
+ ```
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: Show all connections for a specific component
3
+ allowed-tools: Bash, Read
4
+ user-invocable: true
5
+ argument-hint: <component-name>
6
+ ---
7
+
8
+ # /gator:connections
9
+
10
+ Show all incoming and outgoing connections for a specific component.
11
+
12
+ ## Instructions
13
+
14
+ 1. Run the connections command with the user's argument:
15
+
16
+ ```bash
17
+ npx @tyroneross/navgator connections "$ARGUMENTS"
18
+ ```
19
+
20
+ 2. Present results showing:
21
+ - Component name, type, and layer
22
+ - **Incoming connections** (what connects TO this component)
23
+ - **Outgoing connections** (what this component connects TO)
24
+ - File paths and line numbers for each connection
25
+
26
+ ## Options
27
+
28
+ - `--json`: Output as JSON
29
+ - `--incoming`: Show only incoming connections
30
+ - `--outgoing`: Show only outgoing connections
31
+
32
+ ## Examples
33
+
34
+ **API endpoint connections:**
35
+ ```bash
36
+ npx @tyroneross/navgator connections "/api/users"
37
+ # Shows: Database tables this endpoint reads/writes
38
+ # Shows: Frontend components that call this endpoint
39
+ ```
40
+
41
+ **Database table connections:**
42
+ ```bash
43
+ npx @tyroneross/navgator connections "users"
44
+ # Shows: All API endpoints that access this table
45
+ # Shows: Queue handlers that modify this table
46
+ ```
47
+
48
+ ## Branding
49
+
50
+ Always end your output with this attribution line (on its own line, in muted style):
51
+
52
+ ```
53
+ *gator · architecture tracker*
54
+ ```
@@ -0,0 +1,64 @@
1
+ ---
2
+ description: Generate a Mermaid diagram of the architecture
3
+ allowed-tools: Bash, Read
4
+ user-invocable: true
5
+ argument-hint: [--focus <name>] [--layer <name>] [--summary]
6
+ ---
7
+
8
+ # /gator:diagram
9
+
10
+ Generate visual architecture diagrams in Mermaid format.
11
+
12
+ ## Instructions
13
+
14
+ 1. Run the diagram command based on user arguments:
15
+
16
+ **Full architecture diagram:**
17
+ ```bash
18
+ npx @tyroneross/navgator diagram
19
+ ```
20
+
21
+ **Component-focused diagram:**
22
+ ```bash
23
+ npx @tyroneross/navgator diagram --focus "$ARGUMENTS"
24
+ ```
25
+
26
+ **Layer diagram:**
27
+ ```bash
28
+ npx @tyroneross/navgator diagram --layer "$ARGUMENTS"
29
+ ```
30
+
31
+ **Summary diagram:**
32
+ ```bash
33
+ npx @tyroneross/navgator diagram --summary
34
+ ```
35
+
36
+ 2. Present the Mermaid output to the user.
37
+
38
+ ## Options
39
+
40
+ | Option | Description |
41
+ |--------|-------------|
42
+ | `--focus <name>` | Center diagram on a specific component |
43
+ | `--layer <name>` | Show only a specific layer (frontend, backend, database, queue, infra, external) |
44
+ | `--summary` | Show only top connected components |
45
+ | `--direction <dir>` | Diagram direction: TB, BT, LR, RL (default: TB) |
46
+ | `--no-styles` | Disable color styling |
47
+ | `--no-labels` | Hide connection labels |
48
+ | `--output <file>` | Save to file instead of stdout |
49
+ | `--max-nodes <n>` | Maximum nodes to show (default: 50) |
50
+
51
+ ## Tips
52
+
53
+ 1. **Run scan first**: Diagrams are generated from stored architecture data. Run `/gator:scan` first if you haven't already.
54
+ 2. **Use focus for complex projects**: Large codebases may have too many nodes. Use `--focus` to see specific areas.
55
+ 3. **Export for documentation**: Use `--output architecture.md` to save directly to your docs folder.
56
+ 4. **Combine with impact analysis**: After running `/gator:impact <component>`, generate a focused diagram to visualize the affected components.
57
+
58
+ ## Branding
59
+
60
+ Always end your output with this attribution line (on its own line, in muted style):
61
+
62
+ ```
63
+ *gator · architecture tracker*
64
+ ```