@defai.digital/ax-cli 3.14.13 → 3.14.16
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/.ax-cli/CUSTOM.md +97 -0
- package/.ax-cli/auto-accept-audit.json +1302 -0
- package/.ax-cli/index.json +43 -0
- package/.ax-cli/memory.json +62 -0
- package/.ax-cli/settings.json +39 -0
- package/README.md +54 -2
- package/ax.config.json +304 -0
- package/dist/analyzers/ast/tree-sitter-parser.d.ts +134 -0
- package/dist/analyzers/ast/tree-sitter-parser.js +730 -0
- package/dist/analyzers/ast/tree-sitter-parser.js.map +1 -0
- package/dist/commands/setup.js +108 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/update.js +55 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/mcp/config-detector-v2.d.ts +83 -0
- package/dist/mcp/config-detector-v2.js +328 -0
- package/dist/mcp/config-detector-v2.js.map +1 -0
- package/dist/mcp/config-migrator-v2.d.ts +89 -0
- package/dist/mcp/config-migrator-v2.js +288 -0
- package/dist/mcp/config-migrator-v2.js.map +1 -0
- package/dist/mcp/config-v2.d.ts +111 -0
- package/dist/mcp/config-v2.js +443 -0
- package/dist/mcp/config-v2.js.map +1 -0
- package/dist/mcp/transports-v2.d.ts +152 -0
- package/dist/mcp/transports-v2.js +481 -0
- package/dist/mcp/transports-v2.js.map +1 -0
- package/dist/mcp/transports.d.ts +6 -2
- package/dist/mcp/transports.js +57 -103
- package/dist/mcp/transports.js.map +1 -1
- package/dist/schemas/settings-schemas.d.ts +2 -2
- package/dist/utils/error-sanitizer.d.ts +119 -0
- package/dist/utils/error-sanitizer.js +253 -0
- package/dist/utils/error-sanitizer.js.map +1 -0
- package/dist/utils/errors.d.ts +74 -0
- package/dist/utils/errors.js +139 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/incremental-analyzer.d.ts +134 -0
- package/dist/utils/incremental-analyzer.js +377 -0
- package/dist/utils/incremental-analyzer.js.map +1 -0
- package/dist/utils/math.d.ts +1 -0
- package/dist/utils/math.js +4 -0
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/settings.d.ts +1 -0
- package/dist/utils/settings.js +4 -0
- package/dist/utils/settings.js.map +1 -0
- package/dist/utils/streaming-analyzer.d.ts +160 -0
- package/dist/utils/streaming-analyzer.js +214 -0
- package/dist/utils/streaming-analyzer.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Custom Instructions for AX CLI
|
|
2
|
+
|
|
3
|
+
**Project**: @defai.digital/ax-cli v3.12.8
|
|
4
|
+
**Type**: cli
|
|
5
|
+
**Language**: TypeScript
|
|
6
|
+
**Stack**: React, Vitest, Zod, Commander, Ink, ESM, TypeScript
|
|
7
|
+
|
|
8
|
+
Generated: 11/30/2025, 8:45:19 PM
|
|
9
|
+
|
|
10
|
+
## Project Context
|
|
11
|
+
|
|
12
|
+
- **Entry Point**: `dist/index.js`
|
|
13
|
+
- **Package Manager**: pnpm
|
|
14
|
+
- **Module System**: ESM
|
|
15
|
+
- **CLI Tool**: This is a command-line interface application
|
|
16
|
+
|
|
17
|
+
## Code Conventions
|
|
18
|
+
|
|
19
|
+
### TypeScript
|
|
20
|
+
- Use explicit type annotations for function parameters and returns
|
|
21
|
+
- Prefer `const` and `let` over `var`
|
|
22
|
+
- Use strict mode (strict type checking enabled)
|
|
23
|
+
- **CRITICAL**: Always use `.js` extension in import statements (ESM requirement)
|
|
24
|
+
- Example: `import { foo } from "./bar.js"` (NOT "./bar" or "./bar.ts")
|
|
25
|
+
|
|
26
|
+
### ES Modules
|
|
27
|
+
- Use `import/export` syntax (not `require/module.exports`)
|
|
28
|
+
- Top-level await is supported
|
|
29
|
+
|
|
30
|
+
### Validation
|
|
31
|
+
- Use **zod** for runtime validation
|
|
32
|
+
- Validate all external inputs (API requests, file reads, user input)
|
|
33
|
+
- Use `.safeParse()` for error handling
|
|
34
|
+
|
|
35
|
+
## File Structure
|
|
36
|
+
|
|
37
|
+
- **Source Code**: `src/`
|
|
38
|
+
- **Tests**: `tests/`
|
|
39
|
+
- **Tools**: `src/tools/`
|
|
40
|
+
|
|
41
|
+
### Typical Structure
|
|
42
|
+
- Commands: `src/commands/`
|
|
43
|
+
- Utilities: `src/utils/`
|
|
44
|
+
- Types: `src/types/`
|
|
45
|
+
|
|
46
|
+
### Key Files
|
|
47
|
+
- `package.json`: Node.js package configuration
|
|
48
|
+
- `tsconfig.json`: TypeScript configuration
|
|
49
|
+
- `vitest.config.ts`: Vitest test configuration
|
|
50
|
+
- `.eslintrc.js`: ESLint configuration
|
|
51
|
+
- `README.md`: Project documentation
|
|
52
|
+
- `CLAUDE.md`: Claude-specific instructions
|
|
53
|
+
|
|
54
|
+
## Development Workflow
|
|
55
|
+
|
|
56
|
+
### Before Making Changes
|
|
57
|
+
1. Read relevant files with `view_file` to understand current implementation
|
|
58
|
+
2. Use `search` to find related code or patterns
|
|
59
|
+
3. Check existing tests to understand expected behavior
|
|
60
|
+
|
|
61
|
+
### Making Changes
|
|
62
|
+
1. **NEVER** use `create_file` on existing files - use `str_replace_editor` instead
|
|
63
|
+
2. Make focused, atomic changes
|
|
64
|
+
3. Preserve existing code style and patterns
|
|
65
|
+
4. Update related tests when modifying functionality
|
|
66
|
+
|
|
67
|
+
### After Changes
|
|
68
|
+
1. Run linter: `eslint . --ext .js,.jsx,.ts,.tsx`
|
|
69
|
+
2. Run tests: `vitest run`
|
|
70
|
+
3. Build: `npm run build:schemas && tsc && chmod +x dist/index.js`
|
|
71
|
+
|
|
72
|
+
## Testing Guidelines
|
|
73
|
+
|
|
74
|
+
### Vitest
|
|
75
|
+
- Use `describe`, `it`, `expect` for test structure
|
|
76
|
+
- Place tests in `tests/` directory or `*.test.ts` files
|
|
77
|
+
- Test edge cases: empty inputs, null/undefined, boundary conditions
|
|
78
|
+
- Include Unicode and special character tests where relevant
|
|
79
|
+
|
|
80
|
+
### Coverage Requirements
|
|
81
|
+
- Aim for high test coverage (80%+ for new code)
|
|
82
|
+
- Always test error paths and edge cases
|
|
83
|
+
- Test both success and failure scenarios
|
|
84
|
+
|
|
85
|
+
## Available Scripts
|
|
86
|
+
|
|
87
|
+
- **Development**: `tsx src/index.ts`
|
|
88
|
+
- **Build**: `npm run build:schemas && tsc && chmod +x dist/index.js`
|
|
89
|
+
- **Test**: `vitest run`
|
|
90
|
+
- **Lint**: `eslint . --ext .js,.jsx,.ts,.tsx`
|
|
91
|
+
|
|
92
|
+
### Quick Commands
|
|
93
|
+
```bash
|
|
94
|
+
pnpm dev # Start development
|
|
95
|
+
pnpm test # Run tests
|
|
96
|
+
pnpm build # Build for production
|
|
97
|
+
```
|