clavix 5.6.0 → 5.6.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.
- package/dist/config/integrations.json +161 -0
- package/dist/core/adapter-registry.d.ts +7 -9
- package/dist/core/adapter-registry.js +48 -171
- package/dist/core/adapters/universal-adapter.d.ts +4 -0
- package/dist/core/adapters/universal-adapter.js +15 -0
- package/dist/types/adapter-config.d.ts +5 -1
- package/package.json +2 -2
- package/oclif.manifest.json +0 -130
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./integrations.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"integrations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "cursor",
|
|
7
|
+
"displayName": "Cursor",
|
|
8
|
+
"directory": ".cursor/rules",
|
|
9
|
+
"filenamePattern": "clavix-{name}",
|
|
10
|
+
"extension": ".md",
|
|
11
|
+
"separator": "-",
|
|
12
|
+
"detection": ".cursor"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "windsurf",
|
|
16
|
+
"displayName": "Windsurf",
|
|
17
|
+
"directory": ".windsurf/rules",
|
|
18
|
+
"filenamePattern": "clavix-{name}",
|
|
19
|
+
"extension": ".md",
|
|
20
|
+
"separator": "-",
|
|
21
|
+
"detection": ".windsurf"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "kilocode",
|
|
25
|
+
"displayName": "Kilocode",
|
|
26
|
+
"directory": ".kilocode/rules",
|
|
27
|
+
"filenamePattern": "clavix-{name}",
|
|
28
|
+
"extension": ".md",
|
|
29
|
+
"separator": "-",
|
|
30
|
+
"detection": ".kilocode"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "roocode",
|
|
34
|
+
"displayName": "Roo-Code",
|
|
35
|
+
"directory": ".roo/rules",
|
|
36
|
+
"filenamePattern": "clavix-{name}",
|
|
37
|
+
"extension": ".md",
|
|
38
|
+
"separator": "-",
|
|
39
|
+
"detection": ".roo"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "cline",
|
|
43
|
+
"displayName": "Cline",
|
|
44
|
+
"directory": ".clinerules",
|
|
45
|
+
"filenamePattern": "clavix-{name}",
|
|
46
|
+
"extension": ".md",
|
|
47
|
+
"separator": "-",
|
|
48
|
+
"detection": ".clinerules"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "droid",
|
|
52
|
+
"displayName": "Droid",
|
|
53
|
+
"directory": ".factory/commands",
|
|
54
|
+
"filenamePattern": "clavix-{name}",
|
|
55
|
+
"extension": ".md",
|
|
56
|
+
"separator": "-",
|
|
57
|
+
"detection": ".factory",
|
|
58
|
+
"placeholder": "$ARGUMENTS"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "opencode",
|
|
62
|
+
"displayName": "OpenCode",
|
|
63
|
+
"directory": ".opencode/command",
|
|
64
|
+
"filenamePattern": "clavix-{name}",
|
|
65
|
+
"extension": ".md",
|
|
66
|
+
"separator": "-",
|
|
67
|
+
"detection": ".opencode",
|
|
68
|
+
"placeholder": "$ARGUMENTS"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "codebuddy",
|
|
72
|
+
"displayName": "CodeBuddy",
|
|
73
|
+
"directory": ".codebuddy/rules",
|
|
74
|
+
"filenamePattern": "clavix-{name}",
|
|
75
|
+
"extension": ".md",
|
|
76
|
+
"separator": "-",
|
|
77
|
+
"detection": ".codebuddy"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "amp",
|
|
81
|
+
"displayName": "Amp",
|
|
82
|
+
"directory": ".agents/commands",
|
|
83
|
+
"filenamePattern": "clavix-{name}",
|
|
84
|
+
"extension": ".md",
|
|
85
|
+
"separator": "-",
|
|
86
|
+
"detection": ".agents"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "crush",
|
|
90
|
+
"displayName": "Crush",
|
|
91
|
+
"directory": ".crush/commands",
|
|
92
|
+
"filenamePattern": "clavix-{name}",
|
|
93
|
+
"extension": ".md",
|
|
94
|
+
"separator": "-",
|
|
95
|
+
"detection": ".crush"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "codex",
|
|
99
|
+
"displayName": "Codex CLI",
|
|
100
|
+
"directory": "~/.codex/prompts",
|
|
101
|
+
"filenamePattern": "clavix-{name}",
|
|
102
|
+
"extension": ".md",
|
|
103
|
+
"separator": "-",
|
|
104
|
+
"detection": ".codex",
|
|
105
|
+
"global": true,
|
|
106
|
+
"placeholder": "$ARGUMENTS"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "augment",
|
|
110
|
+
"displayName": "Augment Code",
|
|
111
|
+
"directory": ".augment/rules",
|
|
112
|
+
"filenamePattern": "clavix-{name}",
|
|
113
|
+
"extension": ".md",
|
|
114
|
+
"separator": "-",
|
|
115
|
+
"detection": ".augment"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "claude-code",
|
|
119
|
+
"displayName": "Claude Code",
|
|
120
|
+
"directory": ".claude/commands/clavix",
|
|
121
|
+
"filenamePattern": "{name}",
|
|
122
|
+
"extension": ".md",
|
|
123
|
+
"separator": ":",
|
|
124
|
+
"detection": ".claude",
|
|
125
|
+
"specialAdapter": "doc-injection"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "gemini",
|
|
129
|
+
"displayName": "Gemini CLI",
|
|
130
|
+
"directory": ".gemini/commands/clavix",
|
|
131
|
+
"filenamePattern": "{name}",
|
|
132
|
+
"extension": ".toml",
|
|
133
|
+
"separator": ":",
|
|
134
|
+
"detection": ".gemini",
|
|
135
|
+
"specialAdapter": "toml",
|
|
136
|
+
"rootDir": ".gemini"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "qwen",
|
|
140
|
+
"displayName": "Qwen CLI",
|
|
141
|
+
"directory": ".qwen/commands/clavix",
|
|
142
|
+
"filenamePattern": "{name}",
|
|
143
|
+
"extension": ".toml",
|
|
144
|
+
"separator": ":",
|
|
145
|
+
"detection": ".qwen",
|
|
146
|
+
"specialAdapter": "toml",
|
|
147
|
+
"rootDir": ".qwen"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "llxprt",
|
|
151
|
+
"displayName": "LLXpert",
|
|
152
|
+
"directory": ".llxprt/commands/clavix",
|
|
153
|
+
"filenamePattern": "{name}",
|
|
154
|
+
"extension": ".toml",
|
|
155
|
+
"separator": ":",
|
|
156
|
+
"detection": ".llxprt",
|
|
157
|
+
"specialAdapter": "toml",
|
|
158
|
+
"rootDir": ".llxprt"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adapter Registry - Config-driven adapter definitions
|
|
3
3
|
*
|
|
4
|
-
* This registry
|
|
5
|
-
*
|
|
4
|
+
* This registry loads configuration from integrations.json and transforms
|
|
5
|
+
* it into AdapterConfig objects used by the adapter system.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* The integrations.json file is the single source of truth for all
|
|
8
|
+
* adapter configurations. See CONTRIBUTING.md for modification guidelines.
|
|
9
9
|
*
|
|
10
10
|
* NOTE: AGENTS.md is a mandatory integration that is always enabled by default.
|
|
11
11
|
* It provides universal agent guidance that all AI tools can read. The AGENTS.md
|
|
@@ -13,16 +13,14 @@
|
|
|
13
13
|
* included by ensureMandatoryIntegrations() in integration-selector.ts.
|
|
14
14
|
*
|
|
15
15
|
* @since v5.3.0
|
|
16
|
+
* @updated v5.7.0 - Refactored to use integrations.json as source of truth
|
|
16
17
|
*/
|
|
17
18
|
import { AdapterConfig } from '../types/adapter-config.js';
|
|
18
19
|
/**
|
|
19
20
|
* Registry of all adapter configurations
|
|
20
21
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* - File extension and naming pattern
|
|
24
|
-
* - Feature support (subdirectories, frontmatter, etc.)
|
|
25
|
-
* - Detection method for project environment
|
|
22
|
+
* Loaded from src/config/integrations.json and transformed into AdapterConfig objects.
|
|
23
|
+
* The JSON file is the single source of truth for integration paths, patterns, and features.
|
|
26
24
|
*/
|
|
27
25
|
export declare const ADAPTER_CONFIGS: AdapterConfig[];
|
|
28
26
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adapter Registry - Config-driven adapter definitions
|
|
3
3
|
*
|
|
4
|
-
* This registry
|
|
5
|
-
*
|
|
4
|
+
* This registry loads configuration from integrations.json and transforms
|
|
5
|
+
* it into AdapterConfig objects used by the adapter system.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* The integrations.json file is the single source of truth for all
|
|
8
|
+
* adapter configurations. See CONTRIBUTING.md for modification guidelines.
|
|
9
9
|
*
|
|
10
10
|
* NOTE: AGENTS.md is a mandatory integration that is always enabled by default.
|
|
11
11
|
* It provides universal agent guidance that all AI tools can read. The AGENTS.md
|
|
@@ -13,179 +13,56 @@
|
|
|
13
13
|
* included by ensureMandatoryIntegrations() in integration-selector.ts.
|
|
14
14
|
*
|
|
15
15
|
* @since v5.3.0
|
|
16
|
+
* @updated v5.7.0 - Refactored to use integrations.json as source of truth
|
|
16
17
|
*/
|
|
18
|
+
import { createRequire } from 'module';
|
|
17
19
|
import { DEFAULT_MD_FEATURES, DEFAULT_TOML_FEATURES, } from '../types/adapter-config.js';
|
|
20
|
+
// Use createRequire for JSON imports in ESM
|
|
21
|
+
const require = createRequire(import.meta.url);
|
|
22
|
+
const integrations = require('../config/integrations.json');
|
|
23
|
+
/**
|
|
24
|
+
* Transform JSON config to AdapterConfig
|
|
25
|
+
*/
|
|
26
|
+
function transformConfig(config) {
|
|
27
|
+
const isToml = config.extension === '.toml';
|
|
28
|
+
// Build features based on adapter type
|
|
29
|
+
const features = isToml
|
|
30
|
+
? { ...DEFAULT_TOML_FEATURES }
|
|
31
|
+
: {
|
|
32
|
+
...DEFAULT_MD_FEATURES,
|
|
33
|
+
commandSeparator: config.separator,
|
|
34
|
+
};
|
|
35
|
+
// Add placeholder support if specified
|
|
36
|
+
if (config.placeholder) {
|
|
37
|
+
features.argumentPlaceholder = config.placeholder;
|
|
38
|
+
}
|
|
39
|
+
// Special handling for Claude Code (subdirectories + frontmatter + doc injection)
|
|
40
|
+
if (config.specialAdapter === 'doc-injection') {
|
|
41
|
+
features.supportsSubdirectories = true;
|
|
42
|
+
features.supportsFrontmatter = true;
|
|
43
|
+
features.supportsDocInjection = true;
|
|
44
|
+
features.commandSeparator = ':';
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
name: config.name,
|
|
48
|
+
displayName: config.displayName,
|
|
49
|
+
directory: config.directory,
|
|
50
|
+
fileExtension: config.extension,
|
|
51
|
+
filenamePattern: config.filenamePattern,
|
|
52
|
+
features,
|
|
53
|
+
detection: { type: 'directory', path: config.detection },
|
|
54
|
+
specialAdapter: config.specialAdapter,
|
|
55
|
+
rootDir: config.rootDir,
|
|
56
|
+
global: config.global,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
18
59
|
/**
|
|
19
60
|
* Registry of all adapter configurations
|
|
20
61
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* - File extension and naming pattern
|
|
24
|
-
* - Feature support (subdirectories, frontmatter, etc.)
|
|
25
|
-
* - Detection method for project environment
|
|
62
|
+
* Loaded from src/config/integrations.json and transformed into AdapterConfig objects.
|
|
63
|
+
* The JSON file is the single source of truth for integration paths, patterns, and features.
|
|
26
64
|
*/
|
|
27
|
-
export const ADAPTER_CONFIGS =
|
|
28
|
-
// IDE Extensions (Markdown-based)
|
|
29
|
-
{
|
|
30
|
-
name: 'cursor',
|
|
31
|
-
displayName: 'Cursor',
|
|
32
|
-
directory: '.cursor/rules',
|
|
33
|
-
fileExtension: '.md',
|
|
34
|
-
filenamePattern: 'clavix-{name}',
|
|
35
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
36
|
-
detection: { type: 'directory', path: '.cursor' },
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'windsurf',
|
|
40
|
-
displayName: 'Windsurf',
|
|
41
|
-
directory: '.windsurf/rules',
|
|
42
|
-
fileExtension: '.md',
|
|
43
|
-
filenamePattern: 'clavix-{name}',
|
|
44
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
45
|
-
detection: { type: 'directory', path: '.windsurf' },
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'kilocode',
|
|
49
|
-
displayName: 'Kilocode',
|
|
50
|
-
directory: '.kilocode/rules',
|
|
51
|
-
fileExtension: '.md',
|
|
52
|
-
filenamePattern: 'clavix-{name}',
|
|
53
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
54
|
-
detection: { type: 'directory', path: '.kilocode' },
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'roocode',
|
|
58
|
-
displayName: 'Roo-Code',
|
|
59
|
-
directory: '.roo/rules',
|
|
60
|
-
fileExtension: '.md',
|
|
61
|
-
filenamePattern: 'clavix-{name}',
|
|
62
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
63
|
-
detection: { type: 'directory', path: '.roo' },
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'cline',
|
|
67
|
-
displayName: 'Cline',
|
|
68
|
-
directory: '.cline/rules',
|
|
69
|
-
fileExtension: '.md',
|
|
70
|
-
filenamePattern: 'clavix-{name}',
|
|
71
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
72
|
-
detection: { type: 'directory', path: '.cline' },
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: 'droid',
|
|
76
|
-
displayName: 'Droid',
|
|
77
|
-
directory: '.droid/rules',
|
|
78
|
-
fileExtension: '.md',
|
|
79
|
-
filenamePattern: 'clavix-{name}',
|
|
80
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
81
|
-
detection: { type: 'directory', path: '.droid' },
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
name: 'opencode',
|
|
85
|
-
displayName: 'OpenCode',
|
|
86
|
-
directory: '.opencode/rules',
|
|
87
|
-
fileExtension: '.md',
|
|
88
|
-
filenamePattern: 'clavix-{name}',
|
|
89
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
90
|
-
detection: { type: 'directory', path: '.opencode' },
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'crush',
|
|
94
|
-
displayName: 'Crush',
|
|
95
|
-
directory: '.crush/rules',
|
|
96
|
-
fileExtension: '.md',
|
|
97
|
-
filenamePattern: 'clavix-{name}',
|
|
98
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
99
|
-
detection: { type: 'directory', path: '.crush' },
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: 'codex',
|
|
103
|
-
displayName: 'Codex CLI',
|
|
104
|
-
directory: '.codex/instructions',
|
|
105
|
-
fileExtension: '.md',
|
|
106
|
-
filenamePattern: 'clavix-{name}',
|
|
107
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
108
|
-
detection: { type: 'directory', path: '.codex' },
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'codebuddy',
|
|
112
|
-
displayName: 'CodeBuddy',
|
|
113
|
-
directory: '.codebuddy/rules',
|
|
114
|
-
fileExtension: '.md',
|
|
115
|
-
filenamePattern: 'clavix-{name}',
|
|
116
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
117
|
-
detection: { type: 'directory', path: '.codebuddy' },
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
name: 'amp',
|
|
121
|
-
displayName: 'Amp',
|
|
122
|
-
directory: '.amp/rules',
|
|
123
|
-
fileExtension: '.md',
|
|
124
|
-
filenamePattern: 'clavix-{name}',
|
|
125
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
126
|
-
detection: { type: 'directory', path: '.amp' },
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'augment',
|
|
130
|
-
displayName: 'Augment Code',
|
|
131
|
-
directory: '.augment/rules',
|
|
132
|
-
fileExtension: '.md',
|
|
133
|
-
filenamePattern: 'clavix-{name}',
|
|
134
|
-
features: { ...DEFAULT_MD_FEATURES },
|
|
135
|
-
detection: { type: 'directory', path: '.augment' },
|
|
136
|
-
},
|
|
137
|
-
// Claude Code (requires doc injection - special adapter kept)
|
|
138
|
-
{
|
|
139
|
-
name: 'claude-code',
|
|
140
|
-
displayName: 'Claude Code',
|
|
141
|
-
directory: '.claude/commands/clavix',
|
|
142
|
-
fileExtension: '.md',
|
|
143
|
-
filenamePattern: '{name}',
|
|
144
|
-
features: {
|
|
145
|
-
...DEFAULT_MD_FEATURES,
|
|
146
|
-
supportsSubdirectories: true,
|
|
147
|
-
supportsFrontmatter: true,
|
|
148
|
-
supportsDocInjection: true,
|
|
149
|
-
commandSeparator: ':',
|
|
150
|
-
},
|
|
151
|
-
detection: { type: 'directory', path: '.claude' },
|
|
152
|
-
specialAdapter: 'doc-injection',
|
|
153
|
-
},
|
|
154
|
-
// TOML-based adapters (require special formatting - special adapter kept)
|
|
155
|
-
{
|
|
156
|
-
name: 'gemini',
|
|
157
|
-
displayName: 'Gemini CLI',
|
|
158
|
-
directory: '.gemini/commands/clavix',
|
|
159
|
-
fileExtension: '.toml',
|
|
160
|
-
filenamePattern: '{name}',
|
|
161
|
-
features: { ...DEFAULT_TOML_FEATURES },
|
|
162
|
-
detection: { type: 'directory', path: '.gemini' },
|
|
163
|
-
specialAdapter: 'toml',
|
|
164
|
-
rootDir: '.gemini',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: 'qwen',
|
|
168
|
-
displayName: 'Qwen CLI',
|
|
169
|
-
directory: '.qwen/commands/clavix',
|
|
170
|
-
fileExtension: '.toml',
|
|
171
|
-
filenamePattern: '{name}',
|
|
172
|
-
features: { ...DEFAULT_TOML_FEATURES },
|
|
173
|
-
detection: { type: 'directory', path: '.qwen' },
|
|
174
|
-
specialAdapter: 'toml',
|
|
175
|
-
rootDir: '.qwen',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: 'llxprt',
|
|
179
|
-
displayName: 'LLXpert',
|
|
180
|
-
directory: '.llxprt/commands/clavix',
|
|
181
|
-
fileExtension: '.toml',
|
|
182
|
-
filenamePattern: '{name}',
|
|
183
|
-
features: { ...DEFAULT_TOML_FEATURES },
|
|
184
|
-
detection: { type: 'directory', path: '.llxprt' },
|
|
185
|
-
specialAdapter: 'toml',
|
|
186
|
-
rootDir: '.llxprt',
|
|
187
|
-
},
|
|
188
|
-
];
|
|
65
|
+
export const ADAPTER_CONFIGS = integrations.integrations.map(transformConfig);
|
|
189
66
|
/**
|
|
190
67
|
* Get adapter configuration by name
|
|
191
68
|
*/
|
|
@@ -20,6 +20,10 @@ export declare class UniversalAdapter extends BaseAdapter {
|
|
|
20
20
|
get name(): string;
|
|
21
21
|
get displayName(): string;
|
|
22
22
|
get directory(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Check if this adapter uses global (home directory) installation
|
|
25
|
+
*/
|
|
26
|
+
get isGlobal(): boolean;
|
|
23
27
|
get fileExtension(): string;
|
|
24
28
|
/**
|
|
25
29
|
* Get integration features for command transformation
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { BaseAdapter } from './base-adapter.js';
|
|
14
14
|
import * as path from 'path';
|
|
15
|
+
import * as os from 'os';
|
|
15
16
|
export class UniversalAdapter extends BaseAdapter {
|
|
16
17
|
config;
|
|
17
18
|
features;
|
|
@@ -34,8 +35,18 @@ export class UniversalAdapter extends BaseAdapter {
|
|
|
34
35
|
return this.config.displayName;
|
|
35
36
|
}
|
|
36
37
|
get directory() {
|
|
38
|
+
// Expand ~ to home directory for global adapters
|
|
39
|
+
if (this.config.directory.startsWith('~/')) {
|
|
40
|
+
return this.config.directory.replace('~', os.homedir());
|
|
41
|
+
}
|
|
37
42
|
return this.config.directory;
|
|
38
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if this adapter uses global (home directory) installation
|
|
46
|
+
*/
|
|
47
|
+
get isGlobal() {
|
|
48
|
+
return this.config.global ?? false;
|
|
49
|
+
}
|
|
39
50
|
get fileExtension() {
|
|
40
51
|
return this.config.fileExtension;
|
|
41
52
|
}
|
|
@@ -61,6 +72,10 @@ export class UniversalAdapter extends BaseAdapter {
|
|
|
61
72
|
* Get full command path
|
|
62
73
|
*/
|
|
63
74
|
getCommandPath() {
|
|
75
|
+
// For global adapters, use expanded directory path directly
|
|
76
|
+
if (this.isGlobal || this.config.directory.startsWith('~/')) {
|
|
77
|
+
return this.directory; // directory getter already expands ~
|
|
78
|
+
}
|
|
64
79
|
return path.join(process.cwd(), this.config.directory);
|
|
65
80
|
}
|
|
66
81
|
/**
|
|
@@ -15,8 +15,10 @@ export type CommandSeparator = ':' | '-';
|
|
|
15
15
|
* - '{name}' - Just the command name (e.g., 'improve.md')
|
|
16
16
|
* - 'clavix-{name}' - Prefixed (e.g., 'clavix-improve.md')
|
|
17
17
|
* - 'clavix/{name}' - In subdirectory (e.g., 'clavix/improve.md')
|
|
18
|
+
*
|
|
19
|
+
* The pattern should contain '{name}' which will be replaced with the command name.
|
|
18
20
|
*/
|
|
19
|
-
export type FilenamePattern =
|
|
21
|
+
export type FilenamePattern = string;
|
|
20
22
|
/**
|
|
21
23
|
* Detection method for project environment
|
|
22
24
|
*/
|
|
@@ -61,6 +63,8 @@ export interface AdapterConfig {
|
|
|
61
63
|
specialAdapter?: 'toml' | 'doc-injection';
|
|
62
64
|
/** For TOML adapters: root directory (e.g., '.gemini') */
|
|
63
65
|
rootDir?: string;
|
|
66
|
+
/** Whether commands should be written to home directory (global installation) */
|
|
67
|
+
global?: boolean;
|
|
64
68
|
}
|
|
65
69
|
/**
|
|
66
70
|
* Default adapter features for markdown-based adapters
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.2",
|
|
4
4
|
"description": "Agentic-first prompt workflows. Markdown templates that teach AI agents how to optimize prompts, create PRDs, and manage implementation.\n\nSLASH COMMANDS (in your AI assistant):\n /clavix:improve Optimize prompts with auto-depth\n /clavix:prd Generate PRD through questions\n /clavix:plan Create task breakdown from PRD\n /clavix:implement Execute tasks with progress tracking\n /clavix:start Begin conversational session\n /clavix:summarize Extract requirements from conversation\n\nWorks with Claude Code, Cursor, Windsurf, and 19+ other AI coding tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"prebuild": "npm run validate:consistency",
|
|
18
18
|
"build": "tsc && npm run copy-templates",
|
|
19
19
|
"build:prod": "npm run build && npm run remove-sourcemaps",
|
|
20
|
-
"copy-templates": "rm -rf dist/templates && copyfiles -u 1 \"src/templates/**/*\" dist/",
|
|
20
|
+
"copy-templates": "rm -rf dist/templates && copyfiles -u 1 \"src/templates/**/*\" dist/ && copyfiles -u 1 \"src/config/**/*\" dist/",
|
|
21
21
|
"remove-sourcemaps": "find dist -name '*.map' -type f -delete",
|
|
22
22
|
"dev": "node --loader ts-node/esm src/index.ts",
|
|
23
23
|
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest",
|
package/oclif.manifest.json
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"commands": {
|
|
3
|
-
"diagnose": {
|
|
4
|
-
"aliases": [],
|
|
5
|
-
"args": {},
|
|
6
|
-
"description": "Diagnose Clavix installation and configuration",
|
|
7
|
-
"examples": [
|
|
8
|
-
"<%= config.bin %> <%= command.id %>",
|
|
9
|
-
"<%= config.bin %> <%= command.id %> # Check setup and report issues"
|
|
10
|
-
],
|
|
11
|
-
"flags": {},
|
|
12
|
-
"hasDynamicHelp": false,
|
|
13
|
-
"hiddenAliases": [],
|
|
14
|
-
"id": "diagnose",
|
|
15
|
-
"pluginAlias": "clavix",
|
|
16
|
-
"pluginName": "clavix",
|
|
17
|
-
"pluginType": "core",
|
|
18
|
-
"strict": true,
|
|
19
|
-
"enableJsonFlag": false,
|
|
20
|
-
"DOC_GENERATORS": [
|
|
21
|
-
"agents-md",
|
|
22
|
-
"octo-md",
|
|
23
|
-
"warp-md",
|
|
24
|
-
"copilot-instructions"
|
|
25
|
-
],
|
|
26
|
-
"isESM": true,
|
|
27
|
-
"relativePath": [
|
|
28
|
-
"dist",
|
|
29
|
-
"cli",
|
|
30
|
-
"commands",
|
|
31
|
-
"diagnose.js"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"init": {
|
|
35
|
-
"aliases": [],
|
|
36
|
-
"args": {},
|
|
37
|
-
"description": "Initialize Clavix in the current project",
|
|
38
|
-
"examples": [
|
|
39
|
-
"<%= config.bin %> <%= command.id %>"
|
|
40
|
-
],
|
|
41
|
-
"flags": {},
|
|
42
|
-
"hasDynamicHelp": false,
|
|
43
|
-
"hiddenAliases": [],
|
|
44
|
-
"id": "init",
|
|
45
|
-
"pluginAlias": "clavix",
|
|
46
|
-
"pluginName": "clavix",
|
|
47
|
-
"pluginType": "core",
|
|
48
|
-
"strict": true,
|
|
49
|
-
"enableJsonFlag": false,
|
|
50
|
-
"isESM": true,
|
|
51
|
-
"relativePath": [
|
|
52
|
-
"dist",
|
|
53
|
-
"cli",
|
|
54
|
-
"commands",
|
|
55
|
-
"init.js"
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
"update": {
|
|
59
|
-
"aliases": [],
|
|
60
|
-
"args": {},
|
|
61
|
-
"description": "Update managed blocks and slash commands",
|
|
62
|
-
"examples": [
|
|
63
|
-
"<%= config.bin %> <%= command.id %>",
|
|
64
|
-
"<%= config.bin %> <%= command.id %> --docs-only",
|
|
65
|
-
"<%= config.bin %> <%= command.id %> --commands-only"
|
|
66
|
-
],
|
|
67
|
-
"flags": {
|
|
68
|
-
"docs-only": {
|
|
69
|
-
"description": "Update only documentation blocks (AGENTS.md, CLAUDE.md, OCTO.md, WARP.md)",
|
|
70
|
-
"name": "docs-only",
|
|
71
|
-
"allowNo": false,
|
|
72
|
-
"type": "boolean"
|
|
73
|
-
},
|
|
74
|
-
"commands-only": {
|
|
75
|
-
"description": "Update only slash command files",
|
|
76
|
-
"name": "commands-only",
|
|
77
|
-
"allowNo": false,
|
|
78
|
-
"type": "boolean"
|
|
79
|
-
},
|
|
80
|
-
"force": {
|
|
81
|
-
"char": "f",
|
|
82
|
-
"description": "Force update even if files haven't changed",
|
|
83
|
-
"name": "force",
|
|
84
|
-
"allowNo": false,
|
|
85
|
-
"type": "boolean"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"hasDynamicHelp": false,
|
|
89
|
-
"hiddenAliases": [],
|
|
90
|
-
"id": "update",
|
|
91
|
-
"pluginAlias": "clavix",
|
|
92
|
-
"pluginName": "clavix",
|
|
93
|
-
"pluginType": "core",
|
|
94
|
-
"strict": true,
|
|
95
|
-
"enableJsonFlag": false,
|
|
96
|
-
"isESM": true,
|
|
97
|
-
"relativePath": [
|
|
98
|
-
"dist",
|
|
99
|
-
"cli",
|
|
100
|
-
"commands",
|
|
101
|
-
"update.js"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
"version": {
|
|
105
|
-
"aliases": [],
|
|
106
|
-
"args": {},
|
|
107
|
-
"description": "Display Clavix version",
|
|
108
|
-
"examples": [
|
|
109
|
-
"<%= config.bin %> <%= command.id %>"
|
|
110
|
-
],
|
|
111
|
-
"flags": {},
|
|
112
|
-
"hasDynamicHelp": false,
|
|
113
|
-
"hiddenAliases": [],
|
|
114
|
-
"id": "version",
|
|
115
|
-
"pluginAlias": "clavix",
|
|
116
|
-
"pluginName": "clavix",
|
|
117
|
-
"pluginType": "core",
|
|
118
|
-
"strict": true,
|
|
119
|
-
"enableJsonFlag": false,
|
|
120
|
-
"isESM": true,
|
|
121
|
-
"relativePath": [
|
|
122
|
-
"dist",
|
|
123
|
-
"cli",
|
|
124
|
-
"commands",
|
|
125
|
-
"version.js"
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"version": "5.5.2"
|
|
130
|
-
}
|