cxgrd 0.1.12 → 0.1.14

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) 2026 ContextGuard
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,221 +1,180 @@
1
- # CXGRD CLI
1
+ # CXGRD CLI
2
2
 
3
- The TypeScript CLI provides user-friendly commands for dependency analysis and AI-safe code changes.
3
+ > Make AI-assisted code changes without breaking your codebase.
4
+ > **[cxgrd.com](https://cxgrd.com)**
4
5
 
5
- ## CLI Commands
6
+ ---
7
+
8
+ ## What is CXGRD?
9
+
10
+ Modern codebases are deeply interconnected — changing one file can silently break a dozen others. When you ask an AI assistant to refactor a service or add a feature, it typically has no awareness of your project's dependency graph, architectural layers, or downstream impact.
11
+
12
+ **CXGRD** solves this. It scans your project and builds a complete dependency graph, then uses that graph to:
6
13
 
7
- ### cxgrd scan [path]
8
- **Purpose:** Build complete dependency graph
14
+ - **Tell you exactly what will break** before you make a change
15
+ - **Enrich your AI prompts** with architectural context so the AI makes safer, smarter suggestions
16
+ - **Validate your code** for circular dependencies, orphaned files, and layer violations — both structurally and with compiler-backed checks
17
+
18
+ Think of it as giving your AI assistant a map of your codebase before it starts digging.
19
+
20
+ ---
21
+
22
+ ## Installation
9
23
 
10
- **Syntax:**
11
24
  ```bash
12
- cxgrd scan [projectPath]
25
+ npm install -g cxgrd
13
26
  ```
14
27
 
15
- **Options:**
16
- - `projectPath` (optional): Path to analyze (default: current directory)
28
+ ---
29
+
30
+ ## Core Commands
17
31
 
18
- **Output:**
19
- Creates `.cg/` directory containing:
20
- - `graph.json` - Full dependency graph
21
- - `symbols.json` - Exported symbols per file
22
- - `arch.json` - Inferred architectural layers
23
- - `meta.json` - Scan metadata
24
- - `history.json` - Operation history
25
- - `patterns.json` - Pattern analysis
32
+ ### `cxgrd auth login`
33
+ **Authenticate with CXGRD before first use.**
26
34
 
27
- **Example:**
28
35
  ```bash
29
- cxgrd scan /path/to/myapp
36
+ cxgrd auth login
30
37
  ```
31
38
 
32
39
  ---
33
40
 
34
- ### cxgrd input <description>
35
- **Purpose:** Analyze blast radius of a change
41
+ ### `cxgrd scan [path]`
42
+ **Build a complete dependency graph of your project.**
43
+
44
+ This is the first command to run. It recursively analyzes your source files and produces a `.cg/` directory containing the full dependency graph, exported symbols, architectural layers, and metadata.
36
45
 
37
- **Syntax:**
38
46
  ```bash
39
- cxgrd input "description" [--path /project/path]
47
+ cxgrd scan # scan current directory
48
+ cxgrd scan /path/to/myapp # scan a specific project
40
49
  ```
41
50
 
42
- **Options:**
43
- - `description` (required): What you're planning to change
44
- - `--path` or `-p` (optional): Project path
51
+ **What gets created in `.cg/`:**
45
52
 
46
- **Output:**
47
- - List of affected files
48
- - Severity levels (high/medium/low)
49
- - Why each file is affected
50
- - Total downstream impact
53
+ | File | Description |
54
+ |---|---|
55
+ | `graph.json` | Full dependency graph |
56
+ | `symbols.json` | Exported symbols per file |
57
+ | `arch.json` | Inferred architectural layers |
58
+ | `meta.json` | Scan metadata |
59
+ | `history.json` | Operation history |
60
+ | `patterns.json` | Pattern analysis |
61
+
62
+ ---
63
+
64
+ ### `cxgrd input "<description>"`
65
+ **Analyze the blast radius of a planned change.**
66
+
67
+ Before touching any code, describe what you're planning to change. CXGRD will tell you every file that will be affected, why it's affected, and how severe the impact is.
51
68
 
52
- **Example:**
53
69
  ```bash
54
70
  cxgrd input "rename AuthService to AuthController" --path /myapp
55
71
  ```
56
72
 
73
+ **Output includes:**
74
+ - List of affected files
75
+ - Severity levels (high / medium / low)
76
+ - Reason each file is impacted
77
+ - Total downstream impact count
78
+
79
+ Use this before making any significant refactor or before handing a task off to an AI assistant.
80
+
57
81
  ---
58
82
 
59
- ### cxgrd prompt <description>
60
- **Purpose:** Generate enriched AI prompt
83
+ ### `cxgrd prompt "<description>"`
84
+ **Generate an architecturally-aware prompt for your AI assistant.**
85
+
86
+ Instead of giving your AI a vague instruction, CXGRD generates an enriched prompt that includes the relevant modules, symbols, dependencies, and architectural constraints. Your AI gets the full picture — not just your words.
61
87
 
62
- **Syntax:**
63
88
  ```bash
64
- cxgrd prompt "description" [--path /project/path]
89
+ cxgrd prompt "add OAuth2 authentication" --path /myapp
65
90
  ```
66
91
 
67
- **Options:**
68
- - `description` (required): What you want to build
69
- - `--path` or `-p` (optional): Project path
70
-
71
- **Output:**
72
- - Original request
73
- - Affected modules
92
+ **The generated prompt includes:**
93
+ - Your original request
94
+ - Affected modules and files
74
95
  - Architectural considerations
75
- - Related symbols to consider
96
+ - Related symbols to be aware of
76
97
  - Key dependencies
77
98
  - AI-friendly recommendations
78
99
 
79
- **Example:**
80
- ```bash
81
- cxgrd prompt "add OAuth2 authentication" --path /myapp
82
- ```
100
+ Paste the output directly into Claude, ChatGPT, Cursor, or any AI tool.
83
101
 
84
102
  ---
85
103
 
86
- ### cxgrd check [path]
87
- **Purpose:** Structural graph validation + compiler-backed semantic checks
104
+ ## Additional Commands
88
105
 
89
- **Syntax:**
90
- ```bash
91
- cxgrd check [projectPath] [--staged] [--changed] [--skip-compiler] [--skip-structural]
92
- ```
106
+ ### `cxgrd check [path]`
107
+ Validates your project structurally and with compiler-backed checks. Catches circular dependencies, orphaned files, layer violations, and type/syntax errors.
93
108
 
94
- **Options:**
95
- - `projectPath` (optional): Path to analyze
96
- - `--staged`: Only report issues in git staged files (used by pre-commit hooks)
97
- - `--changed`: Staged + unstaged changed files
98
- - `--skip-compiler`: Structural checks only
99
- - `--skip-structural`: Compiler checks only
100
- - `--strict`: Fail if a detected language's compiler was skipped (recommended for CI)
101
-
102
- **Compiler tools (auto-detected per project):**
103
- - TypeScript — programmatic `typescript` API per `tsconfig.json`
104
- - Python — `pyright --outputjson` (skipped if pyright not on PATH)
105
- - Rust — `cargo check --message-format=json`
106
-
107
- **Output:**
108
- - Structural: circular deps, orphans, layer violations
109
- - Compiler: type/syntax errors with file, line, and diagnostic code
110
- - `.cg/check-latest.json` with full result payload
111
-
112
- **Examples:**
113
109
  ```bash
114
- cxgrd check /myapp
115
- cxgrd check . --staged
116
- cxgrd check . --skip-structural
117
- cxgrd check . --strict # CI: fail if Pyright/cargo missing on detected projects
118
- cxgrd doctor . # verify toolchain before enabling --strict
110
+ cxgrd check .
111
+ cxgrd check . --staged # only staged files (great for pre-commit hooks)
112
+ cxgrd check . --strict # fail if compiler tools are missing (recommended for CI)
119
113
  ```
120
114
 
121
- ### cxgrd doctor [path]
122
- **Purpose:** Verify Node/runtime tools and (optionally) project readiness for strict checks
115
+ Supports TypeScript, Python (Pyright), and Rust (cargo check) out of the box.
116
+
117
+ ### `cxgrd doctor [path]`
118
+ Verifies your toolchain is ready before enabling strict checks.
123
119
 
124
- **Syntax:**
125
120
  ```bash
126
- cxgrd doctor # global toolchain only
127
- cxgrd doctor [path] # + project language detection and .cg status
121
+ cxgrd doctor # check global toolchain
122
+ cxgrd doctor . # check project-specific readiness
128
123
  ```
129
124
 
130
- Exits with code 1 when the project cannot run `cxgrd check --strict` (missing Pyright on a Python repo, no scan, etc.).
125
+ ### `cxgrd init-hooks`
126
+ Sets up a pre-commit hook so CXGRD checks run automatically before every commit.
131
127
 
132
- ### cxgrd init-hooks
133
- **Purpose:** Initialize pre-commit hooks to catch errors before commiting to git
134
-
135
- **Syntax:**
136
128
  ```bash
137
- cxgrd init-hooks # initialize hook
138
- cxgrd init-hooks --threshold 80 --block-critical #initialize hook with threshold
139
- cxgrd init-hooks --uninstall # uninstall hook
129
+ cxgrd init-hooks
130
+ cxgrd init-hooks --threshold 80 --block-critical
131
+ cxgrd init-hooks --uninstall
140
132
  ```
141
133
 
142
- ### cxgrd watch
143
- **Purpose:** Real time monitoring which works in background
134
+ ### `cxgrd watch`
135
+ Runs in the background and monitors your project for dependency changes in real time.
144
136
 
145
- **Syntax:**
146
137
  ```bash
147
138
  cxgrd watch
148
139
  ```
149
140
 
150
- ## Output Format
151
-
152
- ### graph.json Structure
153
- ```json
154
- {
155
- "files": {
156
- "src/services/auth.ts": {
157
- "path": "src/services/auth.ts",
158
- "language": "typescript",
159
- "dependencies": [
160
- {
161
- "from": "src/services/auth.ts",
162
- "to": "./utils/crypto.ts",
163
- "type": "import",
164
- "line": 3
165
- }
166
- ],
167
- "symbols": ["authenticate", "AuthService", "validateToken"]
168
- }
169
- },
170
- "stats": {
171
- "totalFiles": 42,
172
- "totalDependencies": 156,
173
- "languages": {
174
- "typescript": 32,
175
- "python": 10
176
- }
177
- }
178
- }
179
- ```
141
+ ---
180
142
 
181
- ## Development
143
+ ## Typical Workflow
182
144
 
183
- ### Installation
184
145
  ```bash
185
- npm install
186
- npm run build
187
- ```
146
+ # 1. Authenticate
147
+ cxgrd auth login
188
148
 
189
- ### Basic Usage
149
+ # 2. Scan your project
150
+ cxgrd scan .
190
151
 
191
- #### Scan a Project
192
- ```bash
193
- npm run dev -- scan /path/to/project
194
- ```
195
- Analyzes the project and creates `.cg/` with dependency graph.
152
+ # 3. Before making a change — check the blast radius
153
+ cxgrd input "extract UserService into a separate module"
196
154
 
197
- #### Analyze Blast Radius
198
- ```bash
199
- npm run dev -- input "describe your change here"
200
- ```
201
- Shows which files will be affected by your proposed change.
155
+ # 4. Generate an enriched prompt for your AI
156
+ cxgrd prompt "extract UserService into a separate module"
202
157
 
203
- #### Generate AI Prompt
204
- ```bash
205
- npm run dev -- prompt "describe your feature here"
158
+ # 5. Paste the prompt into your AI tool, make the changes
159
+
160
+ # 6. Validate the result
161
+ cxgrd check .
206
162
  ```
207
- Creates an architecturally-aware prompt for your AI assistant.
208
163
 
209
- #### Validate Code
164
+ ---
165
+
166
+ ## Development
167
+
210
168
  ```bash
211
- npm run dev -- check /path/to/project
212
- ```
213
- Checks for circular dependencies, orphaned files, and architecture violations.
169
+ npm install
170
+ npm run build
214
171
 
215
- ## Architecture Overview
172
+ # Run commands locally
173
+ npm run dev -- scan /path/to/project
174
+ npm run dev -- input "describe your change"
175
+ npm run dev -- prompt "describe your feature"
176
+ ```
216
177
 
217
- 1. **Scanner** - Recursively finds source files
218
- 2. **Graph Builder** - Extracts dependencies and symbols
219
- 3. **CG Directory** - Manages `.cg/` persistence
220
- 4. **Commands** - User-facing CLI operations
178
+ ---
221
179
 
180
+ **Learn more at [cxgrd.com](https://cxgrd.com)**
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/commands/input.ts"],"names":[],"mappings":"AAeA,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0F3F"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/commands/input.ts"],"names":[],"mappings":"AAeA,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwH3F"}
@@ -34,14 +34,38 @@ async function inputCommand(description, projectPath) {
34
34
  cli_formatter_1.RichOutput.error('No dependency graph found. Run "cxgrd scan" first.');
35
35
  process.exit(1);
36
36
  }
37
- // Detect changed files from description and git
37
+ const allFiles = Object.keys(graph.files || {});
38
+ // Load symbols.json to match function/class/variable names
39
+ const symbols = await cgDir.readSymbols().catch(() => null);
40
+ // Build a map: symbolName → file path
41
+ const symbolToFile = {};
42
+ if (symbols) {
43
+ for (const [filePath, fileSymbols] of Object.entries(symbols)) {
44
+ for (const sym of fileSymbols) {
45
+ symbolToFile[sym.toLowerCase()] = filePath;
46
+ }
47
+ }
48
+ }
49
+ // Find files that define symbols mentioned in the description
50
+ const descriptionLower = description.toLowerCase();
51
+ const symbolMatches = [];
52
+ for (const [sym, filePath] of Object.entries(symbolToFile)) {
53
+ if (descriptionLower.includes(sym)) {
54
+ if (!symbolMatches.includes(filePath)) {
55
+ symbolMatches.push(filePath);
56
+ cli_formatter_1.RichOutput.info(`Symbol match: "${sym}" → ${filePath}`);
57
+ }
58
+ }
59
+ }
60
+ // Also do the existing filename/description matching
38
61
  const changeDetector = new change_detector_1.ChangeDetector(rootPath);
39
62
  const gitChanges = changeDetector.getChangedFiles();
40
- const descriptionMatch = changeDetector.parseDescription(description, Object.keys(graph.files || {}));
41
- // Combine both sources of information
63
+ const descriptionMatch = changeDetector.parseDescription(description, allFiles);
64
+ // Combine all sources
42
65
  const changedFiles = [
43
66
  ...gitChanges.files,
44
67
  ...descriptionMatch.files,
68
+ ...symbolMatches,
45
69
  ];
46
70
  const uniqueFiles = [...new Set(changedFiles)];
47
71
  if (uniqueFiles.length === 0) {
@@ -50,10 +74,9 @@ async function inputCommand(description, projectPath) {
50
74
  else {
51
75
  cli_formatter_1.RichOutput.info(`Detected ${uniqueFiles.length} changed file(s)`);
52
76
  }
53
- // Run enhanced blast radius analysis
77
+ // Run blast radius analysis
54
78
  const analyzer = new blast_radius_analyzer_1.BlastRadiusAnalyzer(graph);
55
79
  const result = analyzer.analyze(uniqueFiles.length > 0 ? uniqueFiles : []);
56
- // Display results
57
80
  displayBlastRadiusResults(result);
58
81
  // Save to history
59
82
  const history = await cgDir.readHistory();
@@ -95,7 +118,6 @@ async function inputCommand(description, projectPath) {
95
118
  function displayBlastRadiusResults(result) {
96
119
  cli_formatter_1.RichOutput.blank();
97
120
  cli_formatter_1.RichOutput.section('Impact Summary');
98
- // Overall risk display
99
121
  const riskBadge = cli_formatter_1.CLIFormatter.severity(result.riskLevel);
100
122
  console.log(` Overall Risk: ${riskBadge}`);
101
123
  console.log(` Risk Score: ${result.totalRisk}/100`);
@@ -120,7 +142,6 @@ function displayBlastRadiusResults(result) {
120
142
  console.log(` ... and ${result.affectedFiles.length - 15} more files`);
121
143
  }
122
144
  }
123
- // Change types
124
145
  if (result.changeTypes.length > 0) {
125
146
  cli_formatter_1.RichOutput.blank();
126
147
  cli_formatter_1.RichOutput.section('Change Classification');
@@ -129,7 +150,6 @@ function displayBlastRadiusResults(result) {
129
150
  console.log(` • ${change.type}: ${change.description} (${confidence}% confident)`);
130
151
  }
131
152
  }
132
- // Recommendations
133
153
  if (result.recommendations.length > 0) {
134
154
  cli_formatter_1.RichOutput.blank();
135
155
  cli_formatter_1.RichOutput.section('Recommendations');
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/commands/input.ts"],"names":[],"mappings":";;AAeA,oCA0FC;AAzGD,+BAA+B;AAC/B,kDAA8C;AAC9C,0EAAqE;AACrE,8DAA0D;AAC1D,0DAAkE;AAClE,uDAA4D;AAC5D,uDAA4D;AAC5D,yCAAuD;AACvD,qDAK6B;AAEtB,KAAK,UAAU,YAAY,CAAC,WAAmB,EAAE,WAAoB;IAC1E,MAAM,QAAQ,GAAG,IAAA,cAAO,EAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAEvD,0BAAU,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAC3C,0BAAU,CAAC,IAAI,CAAC,s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AE,CAAC;QACtC,0BAAU,CAAC,KAAK,EAAE,CAAC;QACnB,0BAAU,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACtC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,0BAAU,CAAC,KAAK,EAAE,CAAC;AACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cxgrd",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "AI context guardrail CLI — dependency-aware architecture safety for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {