arcvision 0.2.4 → 0.2.6

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 ArcVision
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,74 +1,85 @@
1
- # ArcVision CLI
2
-
3
- Architecture scanner for modern codebases that generates dependency graphs and visualizes your project structure.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install -g arcvision
9
- ```
10
-
11
- ## Usage
12
-
13
- ### Quick Start
14
- 1. Sign up at the ArcVision dashboard
15
- 2. Create a project and name it
16
- 3. Generate a CLI token
17
- 4. Run: `arcvision link <token>`
18
- 5. Run: `arcvision scan --upload`
19
- 6. Open dashboard to see results
20
-
21
- ### Commands
22
-
23
- #### Link to Project
24
- ```bash
25
- arcvision link <token>
26
- ```
27
- Link this CLI to a project via upload token.
28
-
29
- #### Scan Project
30
- ```bash
31
- arcvision scan [directory] [options]
32
- ```
33
- Scan the current directory and generate architecture map.
34
-
35
- Options:
36
- - `-u, --upload`: Upload to database
37
-
38
- The scan command will also output a blast radius analysis showing the file with the highest blast radius and its potential role on your codebase.
39
-
40
- **Blast Radius Analysis**: After scanning, the CLI will display a warning identifying the most critical file in your codebase:
41
- ```
42
- ⚠️ [filename] at the center of the system (blast radius: X out of Y). This file represents a single point of systemic failure. Changes here may affect many parts of the system.
43
- ```
44
- This feature helps identify high-structure files that are imported by many other files, allowing you to be more cautious when modifying them.
45
-
46
- ## Features
47
-
48
- - **Modern Import Resolution**: Handles path aliases (`@/components/*`), barrel files (`./utils` `./utils/index.ts`), and directory imports
49
- - **AST-based Parsing**: Uses Babel parser for accurate import detection
50
- - **Multi-framework Support**: Works with React, Next.js, and other modern JavaScript frameworks
51
- - **Dependency Graph Generation**: Creates comprehensive node-edge relationships
52
- - **Blast Radius Analysis**: Identifies high-structure files that are imported by many other files
53
- - **Cloud Integration**: Uploads results to ArcVision dashboard for visualization
54
-
55
- ## Supported Import Patterns
56
-
57
- - Relative imports: `./utils`, `../components`
58
- - Path aliases: `@/components/Button`, `~/lib/utils`
59
- - Barrel files: `./utils` resolves to `./utils/index.ts(x)`
60
- - Directory imports: `@/utils` resolves to `src/utils/index.ts(x)`
61
- - Implicit extensions: `.ts`, `.tsx`, `.js`, `.jsx`
62
-
63
- ## Architecture
64
-
65
- The ArcVision CLI runs locally on your machine and:
66
- 1. Scans your project files using AST parsing
67
- 2. Detects import relationships between files
68
- 3. Resolves path aliases using tsconfig.json/jsconfig.json
69
- 4. Generates a dependency graph in JSON format
70
- 5. Uploads the graph to the ArcVision dashboard via API
71
-
72
- ## License
73
-
74
- MIT
1
+ # ArcVision System Context Artifact
2
+
3
+ ## What This Is
4
+
5
+ This file is the **canonical structural context** of this codebase.
6
+ It represents how the system actually works — not how it is described.
7
+
8
+ It is generated directly from source code by ArcVision.
9
+
10
+ ## What This Replaces
11
+
12
+ This artifact replaces:
13
+ - Manual repository scanning
14
+ - Tribal knowledge held by senior engineers
15
+ - Re-explaining the system to new developers
16
+ - Re-prompting LLMs with partial or incorrect context
17
+ - Guessing blast radius of changes
18
+
19
+ ## When You Must Use This
20
+
21
+ Use this artifact when:
22
+ - Onboarding a new developer
23
+ - Prompting an AI assistant about this codebase
24
+ - Making architectural changes
25
+ - Investigating unexpected behavior
26
+ - Assessing risk before modifying core modules
27
+
28
+ ## What This Artifact Contains
29
+
30
+ - Canonical module and dependency graph
31
+ - Execution and data flow relationships
32
+ - Structural roles (service, store, boundary, etc.)
33
+ - Invariants inferred from the system
34
+ - Impact metrics (blast radius, coupling)
35
+
36
+ ## Determinism & Trust
37
+
38
+ - Generated from commit: b63e62db4aedf6ffb21055dd88d13c8a947a7422
39
+ - Generation timestamp: 2026-01-13T03:50:34.571Z
40
+ - Tool version: 0.2.5
41
+ - Deterministic: same input → same output
42
+ - Explicit assumptions listed inside the artifact
43
+
44
+ If this artifact conflicts with human memory, **trust the artifact**.
45
+
46
+ ## Structural Context Hubs
47
+
48
+ The following files have the highest blast radius and represent critical structural hubs in the system:
49
+
50
+ - **src/lib/utils.ts**
51
+ - Blast Radius: 62 files (14.73% of codebase)
52
+ - Risk: Changes here may silently propagate across the system.
53
+
54
+ - **src/components/ui/button.tsx**
55
+ - Blast Radius: 49 files (11.64% of codebase)
56
+ - Risk: Acts as a coordination layer between components.
57
+
58
+ - **src/lib/supabase/client.ts**
59
+ - Blast Radius: 45 files (10.69% of codebase)
60
+ - Risk: Modifications can cause widespread inconsistencies.
61
+
62
+
63
+
64
+ ## How to Use With AI
65
+
66
+ When prompting AI tools, include this file as system context.
67
+ Do not ask the AI to infer architecture without it.
68
+
69
+ ## When to Regenerate
70
+
71
+ Regenerate this artifact when:
72
+ - Core modules change
73
+ - New services are added
74
+ - Dependency structure shifts
75
+
76
+ Run:
77
+
78
+ ```
79
+ arcvision scan --upload
80
+ ```
81
+
82
+ ## Source of Truth
83
+
84
+ This artifact is the **source of truth** for system structure.
85
+ All explanations, decisions, and AI reasoning should reference it.