awesome-slash 3.2.1 → 3.3.0
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/.claude-plugin/marketplace.json +9 -9
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +10 -0
- package/README.md +14 -1
- package/bin/cli.js +19 -3
- package/lib/drift-detect/collectors.js +3 -1
- package/mcp-server/index.js +1 -1
- package/package.json +6 -18
- package/plugins/audit-project/.claude-plugin/plugin.json +1 -1
- package/plugins/audit-project/lib/drift-detect/collectors.js +3 -1
- package/plugins/deslop/.claude-plugin/plugin.json +1 -1
- package/plugins/deslop/lib/drift-detect/collectors.js +3 -1
- package/plugins/drift-detect/.claude-plugin/plugin.json +1 -1
- package/plugins/drift-detect/lib/drift-detect/collectors.js +3 -1
- package/plugins/enhance/.claude-plugin/plugin.json +1 -1
- package/plugins/enhance/lib/drift-detect/collectors.js +3 -1
- package/plugins/next-task/.claude-plugin/plugin.json +1 -1
- package/plugins/next-task/lib/drift-detect/collectors.js +3 -1
- package/plugins/repo-map/.claude-plugin/plugin.json +1 -1
- package/plugins/repo-map/lib/drift-detect/collectors.js +3 -1
- package/plugins/repo-map/lib/platform/state-dir.js +29 -19
- package/plugins/ship/.claude-plugin/plugin.json +1 -1
- package/plugins/ship/lib/drift-detect/collectors.js +3 -1
- package/plugins/sync-docs/.claude-plugin/plugin.json +1 -1
- package/plugins/sync-docs/lib/drift-detect/collectors.js +3 -1
- package/lib/cross-platform/RESEARCH.md +0 -274
- package/lib/schemas/README.md +0 -195
- package/lib/types/README.md +0 -292
- package/plugins/audit-project/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/audit-project/lib/schemas/README.md +0 -195
- package/plugins/audit-project/lib/types/README.md +0 -292
- package/plugins/deslop/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/deslop/lib/schemas/README.md +0 -195
- package/plugins/deslop/lib/types/README.md +0 -292
- package/plugins/drift-detect/README.md +0 -177
- package/plugins/drift-detect/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/drift-detect/lib/schemas/README.md +0 -195
- package/plugins/drift-detect/lib/types/README.md +0 -292
- package/plugins/enhance/README.md +0 -163
- package/plugins/enhance/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/enhance/lib/schemas/README.md +0 -195
- package/plugins/enhance/lib/types/README.md +0 -292
- package/plugins/next-task/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/next-task/lib/schemas/README.md +0 -195
- package/plugins/next-task/lib/types/README.md +0 -292
- package/plugins/repo-map/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/repo-map/lib/schemas/README.md +0 -195
- package/plugins/repo-map/lib/types/README.md +0 -292
- package/plugins/ship/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/ship/lib/schemas/README.md +0 -195
- package/plugins/ship/lib/types/README.md +0 -292
- package/plugins/sync-docs/lib/cross-platform/RESEARCH.md +0 -274
- package/plugins/sync-docs/lib/schemas/README.md +0 -195
- package/plugins/sync-docs/lib/types/README.md +0 -292
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awesome-slash",
|
|
3
3
|
"description": "8 specialized plugins for AI workflow automation - task orchestration, PR workflow, slop detection, code review, drift detection, enhancement analysis, documentation sync, and repo mapping",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"owner": {
|
|
6
6
|
"name": "Avi Fenesh",
|
|
7
7
|
"url": "https://github.com/avifenesh"
|
|
@@ -13,56 +13,56 @@
|
|
|
13
13
|
"name": "next-task",
|
|
14
14
|
"source": "./plugins/next-task",
|
|
15
15
|
"description": "Master workflow orchestrator: autonomous workflow with model optimization (opus/sonnet/haiku), two-file state management, workflow enforcement gates, 14 specialist agents",
|
|
16
|
-
"version": "3.
|
|
16
|
+
"version": "3.3.0",
|
|
17
17
|
"category": "productivity"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "ship",
|
|
21
21
|
"source": "./plugins/ship",
|
|
22
22
|
"description": "Complete PR workflow: commit to production, skips review when called from next-task, removes task from registry on cleanup, automatic rollback",
|
|
23
|
-
"version": "3.
|
|
23
|
+
"version": "3.3.0",
|
|
24
24
|
"category": "deployment"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "deslop",
|
|
28
28
|
"source": "./plugins/deslop",
|
|
29
29
|
"description": "3-phase AI slop detection: regex patterns (HIGH), multi-pass analyzers (MEDIUM), CLI tools (LOW)",
|
|
30
|
-
"version": "3.
|
|
30
|
+
"version": "3.3.0",
|
|
31
31
|
"category": "development"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"name": "audit-project",
|
|
35
35
|
"source": "./plugins/audit-project",
|
|
36
36
|
"description": "Multi-agent iterative code review until zero issues remain",
|
|
37
|
-
"version": "3.
|
|
37
|
+
"version": "3.3.0",
|
|
38
38
|
"category": "development"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"name": "drift-detect",
|
|
42
42
|
"source": "./plugins/drift-detect",
|
|
43
43
|
"description": "Deep repository analysis to realign project plans with code reality - detects drift, gaps, and creates prioritized reconstruction plans",
|
|
44
|
-
"version": "3.
|
|
44
|
+
"version": "3.3.0",
|
|
45
45
|
"category": "productivity"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "enhance",
|
|
49
49
|
"source": "./plugins/enhance",
|
|
50
50
|
"description": "Master enhancement orchestrator: parallel analyzer execution for plugins, agents, docs, CLAUDE.md, and prompts with unified reporting",
|
|
51
|
-
"version": "3.
|
|
51
|
+
"version": "3.3.0",
|
|
52
52
|
"category": "development"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "sync-docs",
|
|
56
56
|
"source": "./plugins/sync-docs",
|
|
57
57
|
"description": "Standalone documentation sync: find outdated refs, update CHANGELOG, flag stale examples based on code changes",
|
|
58
|
-
"version": "3.
|
|
58
|
+
"version": "3.3.0",
|
|
59
59
|
"category": "development"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "repo-map",
|
|
63
63
|
"source": "./plugins/repo-map",
|
|
64
64
|
"description": "AST-based repository map generation using ast-grep with incremental updates for faster drift analysis",
|
|
65
|
-
"version": "3.
|
|
65
|
+
"version": "3.3.0",
|
|
66
66
|
"category": "development"
|
|
67
67
|
}
|
|
68
68
|
],
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [3.3.0] - 2026-01-28
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Docs** - Documented `npm run detect`/`npm run verify` diagnostics scripts for platform/tool checks
|
|
14
|
+
- **Docs** - Clarified Phase 9 review loop uses the `orchestrate-review` skill for pass definitions
|
|
15
|
+
- **Docs** - Aligned `/drift-detect` naming and expanded repo-map usage details
|
|
16
|
+
- **Docs** - Recommended installing ast-grep (`sg`) upfront for repo-map
|
|
17
|
+
|
|
8
18
|
## [3.2.1] - 2026-01-28
|
|
9
19
|
|
|
10
20
|
### Added
|
package/README.md
CHANGED
|
@@ -228,6 +228,8 @@ With proper workflow structure, context management, and quality gates, AI agents
|
|
|
228
228
|
11. **Docs Update** - Updates CHANGELOG and related documentation
|
|
229
229
|
12. **Ship** - Creates PR, monitors CI, addresses comments, merges
|
|
230
230
|
|
|
231
|
+
Phase 9 uses the `orchestrate-review` skill to define review passes and signal thresholds.
|
|
232
|
+
|
|
231
233
|
**Agents involved:**
|
|
232
234
|
|
|
233
235
|
| Agent | Model | Role |
|
|
@@ -433,6 +435,8 @@ Multi-agent collection wastes tokens on coordination. JavaScript collectors are
|
|
|
433
435
|
- Import graph for dependency hints
|
|
434
436
|
- Optional docs analysis (features, checkboxes)
|
|
435
437
|
|
|
438
|
+
Output is cached at `{state-dir}/repo-map.json` and exposed via the MCP `repo_map` tool.
|
|
439
|
+
|
|
436
440
|
**Why it matters:**
|
|
437
441
|
|
|
438
442
|
Tools like `/drift-detect` and planners can use the map instead of re-scanning the repo every time.
|
|
@@ -445,7 +449,7 @@ Tools like `/drift-detect` and planners can use the map instead of re-scanning t
|
|
|
445
449
|
/repo-map status # Check freshness
|
|
446
450
|
```
|
|
447
451
|
|
|
448
|
-
**
|
|
452
|
+
**Recommended:** Install ast-grep (`sg`) before using `/repo-map` for fastest setup. It is required for repo-map generation.
|
|
449
453
|
|
|
450
454
|
---
|
|
451
455
|
|
|
@@ -598,6 +602,15 @@ Interactive installer for Claude Code, OpenCode, and Codex CLI.
|
|
|
598
602
|
**For GitLab workflows:**
|
|
599
603
|
- GitLab CLI (`glab`) authenticated
|
|
600
604
|
|
|
605
|
+
**Recommended for repo-map:**
|
|
606
|
+
- ast-grep (`sg`) installed (required for `/repo-map` generation)
|
|
607
|
+
|
|
608
|
+
**Local diagnostics (optional):**
|
|
609
|
+
```bash
|
|
610
|
+
npm run detect # Platform detection (CI, deploy, project type)
|
|
611
|
+
npm run verify # Tool availability + versions
|
|
612
|
+
```
|
|
613
|
+
|
|
601
614
|
---
|
|
602
615
|
|
|
603
616
|
## Documentation
|
package/bin/cli.js
CHANGED
|
@@ -162,8 +162,9 @@ function installForClaude() {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
function installForOpenCode(installDir) {
|
|
165
|
+
function installForOpenCode(installDir, options = {}) {
|
|
166
166
|
console.log('\n📦 Installing for OpenCode...\n');
|
|
167
|
+
const { stripModels = false } = options;
|
|
167
168
|
|
|
168
169
|
const home = process.env.HOME || process.env.USERPROFILE;
|
|
169
170
|
// Commands go to ~/.opencode/commands/awesome-slash/
|
|
@@ -175,6 +176,12 @@ function installForOpenCode(installDir) {
|
|
|
175
176
|
const configDir = path.dirname(configPath);
|
|
176
177
|
|
|
177
178
|
fs.mkdirSync(configDir, { recursive: true });
|
|
179
|
+
if (fs.existsSync(commandsDir)) {
|
|
180
|
+
fs.rmSync(commandsDir, { recursive: true, force: true });
|
|
181
|
+
}
|
|
182
|
+
if (fs.existsSync(pluginDir)) {
|
|
183
|
+
fs.rmSync(pluginDir, { recursive: true, force: true });
|
|
184
|
+
}
|
|
178
185
|
fs.mkdirSync(commandsDir, { recursive: true });
|
|
179
186
|
fs.mkdirSync(pluginDir, { recursive: true });
|
|
180
187
|
|
|
@@ -344,7 +351,7 @@ function installForOpenCode(installDir) {
|
|
|
344
351
|
opencodeFrontmatter += 'mode: subagent\n';
|
|
345
352
|
|
|
346
353
|
// Map model names
|
|
347
|
-
if (parsed.model) {
|
|
354
|
+
if (parsed.model && !stripModels) {
|
|
348
355
|
const modelMap = {
|
|
349
356
|
'sonnet': 'anthropic/claude-sonnet-4',
|
|
350
357
|
'opus': 'anthropic/claude-opus-4',
|
|
@@ -500,6 +507,9 @@ AI_STATE_DIR = ".codex"
|
|
|
500
507
|
const destPath = path.join(skillDir, 'SKILL.md');
|
|
501
508
|
|
|
502
509
|
if (fs.existsSync(srcPath)) {
|
|
510
|
+
if (fs.existsSync(skillDir)) {
|
|
511
|
+
fs.rmSync(skillDir, { recursive: true, force: true });
|
|
512
|
+
}
|
|
503
513
|
// Create skill directory
|
|
504
514
|
fs.mkdirSync(skillDir, { recursive: true });
|
|
505
515
|
|
|
@@ -564,6 +574,8 @@ function removeInstallation() {
|
|
|
564
574
|
|
|
565
575
|
async function main() {
|
|
566
576
|
const args = process.argv.slice(2);
|
|
577
|
+
const stripModels = args.includes('--strip-models') ||
|
|
578
|
+
['1', 'true', 'yes'].includes((process.env.AWESOME_SLASH_STRIP_MODELS || '').toLowerCase());
|
|
567
579
|
|
|
568
580
|
// Handle --remove / --uninstall
|
|
569
581
|
if (args.includes('--remove') || args.includes('--uninstall')) {
|
|
@@ -584,10 +596,14 @@ awesome-slash v${VERSION} - Workflow automation for AI coding assistants
|
|
|
584
596
|
|
|
585
597
|
Usage:
|
|
586
598
|
awesome-slash Interactive installer (select platforms)
|
|
599
|
+
awesome-slash --strip-models Skip per-agent model overrides (OpenCode)
|
|
587
600
|
awesome-slash --remove Remove local installation
|
|
588
601
|
awesome-slash --version Show version
|
|
589
602
|
awesome-slash --help Show this help
|
|
590
603
|
|
|
604
|
+
Environment:
|
|
605
|
+
AWESOME_SLASH_STRIP_MODELS=1 Same as --strip-models
|
|
606
|
+
|
|
591
607
|
Supported Platforms:
|
|
592
608
|
1) Claude Code - /next-task, /ship, /deslop, /audit-project
|
|
593
609
|
2) OpenCode - Same commands + MCP tools
|
|
@@ -658,7 +674,7 @@ Docs: https://github.com/avifenesh/awesome-slash
|
|
|
658
674
|
installForClaude();
|
|
659
675
|
break;
|
|
660
676
|
case 'opencode':
|
|
661
|
-
installForOpenCode(installDir);
|
|
677
|
+
installForOpenCode(installDir, { stripModels });
|
|
662
678
|
break;
|
|
663
679
|
case 'codex':
|
|
664
680
|
installForCodex(installDir);
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
package/mcp-server/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awesome-slash",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.3.0",
|
|
4
|
+
"description": "8 specialized plugins for AI workflow automation (drift detection + AST repo maps) - works with Claude Code, OpenCode, and Codex CLI",
|
|
5
5
|
"main": "lib/platform/detect-platform.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"bin": {
|
|
8
8
|
"awesome-slash": "./bin/cli.js"
|
|
9
9
|
},
|
|
10
|
-
"files": [
|
|
11
|
-
".claude-plugin/",
|
|
12
|
-
".mcp.json",
|
|
13
|
-
"adapters/",
|
|
14
|
-
"bin/",
|
|
15
|
-
"lib/",
|
|
16
|
-
"mcp-server/index.js",
|
|
17
|
-
"mcp-server/package.json",
|
|
18
|
-
"plugins/",
|
|
19
|
-
"scripts/setup-hooks.js",
|
|
20
|
-
"README.md",
|
|
21
|
-
"LICENSE",
|
|
22
|
-
"CHANGELOG.md",
|
|
23
|
-
"SECURITY.md"
|
|
24
|
-
],
|
|
25
10
|
"scripts": {
|
|
26
11
|
"test": "jest",
|
|
27
12
|
"test:watch": "jest --watch",
|
|
@@ -58,7 +43,10 @@
|
|
|
58
43
|
"multi-agent",
|
|
59
44
|
"cli",
|
|
60
45
|
"pr-automation",
|
|
61
|
-
"productivity"
|
|
46
|
+
"productivity",
|
|
47
|
+
"repo-map",
|
|
48
|
+
"ast-grep",
|
|
49
|
+
"drift-detect"
|
|
62
50
|
],
|
|
63
51
|
"author": {
|
|
64
52
|
"name": "Avi Fenesh",
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drift-detect",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Deep repository analysis to realign project plans with actual code reality - discovers drift, gaps, and produces prioritized reconstruction plans",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Avi Fenesh",
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -11,10 +11,19 @@ const fs = require('fs');
|
|
|
11
11
|
const path = require('path');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Cached state directory name (relative, without leading dot handling)
|
|
15
|
-
*
|
|
14
|
+
* Cached state directory name (relative, without leading dot handling),
|
|
15
|
+
* scoped by resolved base path.
|
|
16
|
+
* @type {Map<string, string>}
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
const _cachedStateDirs = new Map();
|
|
19
|
+
|
|
20
|
+
function isDirectory(targetPath) {
|
|
21
|
+
try {
|
|
22
|
+
return fs.statSync(targetPath).isDirectory();
|
|
23
|
+
} catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
18
27
|
|
|
19
28
|
/**
|
|
20
29
|
* Detect which AI coding assistant is running and return appropriate state directory
|
|
@@ -34,23 +43,24 @@ function getStateDir(basePath = process.cwd()) {
|
|
|
34
43
|
return process.env.AI_STATE_DIR;
|
|
35
44
|
}
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
const cacheKey = path.resolve(basePath);
|
|
47
|
+
const cached = _cachedStateDirs.get(cacheKey);
|
|
48
|
+
if (cached) {
|
|
49
|
+
return cached;
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
// OpenCode detection
|
|
43
53
|
if (process.env.OPENCODE_CONFIG || process.env.OPENCODE_CONFIG_DIR) {
|
|
44
|
-
|
|
45
|
-
return
|
|
54
|
+
_cachedStateDirs.set(cacheKey, '.opencode');
|
|
55
|
+
return '.opencode';
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
// Check for .opencode directory in project
|
|
49
59
|
try {
|
|
50
60
|
const opencodePath = path.join(basePath, '.opencode');
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
return
|
|
61
|
+
if (isDirectory(opencodePath)) {
|
|
62
|
+
_cachedStateDirs.set(cacheKey, '.opencode');
|
|
63
|
+
return '.opencode';
|
|
54
64
|
}
|
|
55
65
|
} catch {
|
|
56
66
|
// Ignore errors, continue detection
|
|
@@ -58,24 +68,24 @@ function getStateDir(basePath = process.cwd()) {
|
|
|
58
68
|
|
|
59
69
|
// Codex detection
|
|
60
70
|
if (process.env.CODEX_HOME) {
|
|
61
|
-
|
|
62
|
-
return
|
|
71
|
+
_cachedStateDirs.set(cacheKey, '.codex');
|
|
72
|
+
return '.codex';
|
|
63
73
|
}
|
|
64
74
|
|
|
65
75
|
// Check for .codex directory in project
|
|
66
76
|
try {
|
|
67
77
|
const codexPath = path.join(basePath, '.codex');
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
return
|
|
78
|
+
if (isDirectory(codexPath)) {
|
|
79
|
+
_cachedStateDirs.set(cacheKey, '.codex');
|
|
80
|
+
return '.codex';
|
|
71
81
|
}
|
|
72
82
|
} catch {
|
|
73
83
|
// Ignore errors, continue detection
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
// Default to Claude Code
|
|
77
|
-
|
|
78
|
-
return
|
|
87
|
+
_cachedStateDirs.set(cacheKey, '.claude');
|
|
88
|
+
return '.claude';
|
|
79
89
|
}
|
|
80
90
|
|
|
81
91
|
/**
|
|
@@ -111,7 +121,7 @@ function getPlatformName(basePath = process.cwd()) {
|
|
|
111
121
|
* Clear the cached state directory (useful for testing)
|
|
112
122
|
*/
|
|
113
123
|
function clearCache() {
|
|
114
|
-
|
|
124
|
+
_cachedStateDirs.clear();
|
|
115
125
|
}
|
|
116
126
|
|
|
117
127
|
module.exports = {
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|
|
@@ -15,11 +15,13 @@ const path = require('path');
|
|
|
15
15
|
/**
|
|
16
16
|
* Default options for data collection
|
|
17
17
|
*/
|
|
18
|
+
const DEFAULT_PR_LIMIT = 50;
|
|
19
|
+
|
|
18
20
|
const DEFAULT_OPTIONS = {
|
|
19
21
|
sources: ['github', 'docs', 'code'],
|
|
20
22
|
depth: 'thorough', // quick | thorough
|
|
21
23
|
issueLimit: 100,
|
|
22
|
-
prLimit:
|
|
24
|
+
prLimit: DEFAULT_PR_LIMIT,
|
|
23
25
|
timeout: 10000, // 10s
|
|
24
26
|
cwd: process.cwd()
|
|
25
27
|
};
|