clavix 1.7.2 → 1.8.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.
Files changed (67) hide show
  1. package/README.md +22 -1
  2. package/dist/cli/commands/init.d.ts +1 -0
  3. package/dist/cli/commands/init.js +120 -23
  4. package/dist/cli/commands/update.js +5 -4
  5. package/dist/core/adapters/augment-adapter.d.ts +22 -0
  6. package/dist/core/adapters/augment-adapter.js +77 -0
  7. package/dist/core/adapters/codebuddy-adapter.d.ts +23 -0
  8. package/dist/core/adapters/codebuddy-adapter.js +79 -0
  9. package/dist/core/adapters/codex-adapter.d.ts +23 -0
  10. package/dist/core/adapters/codex-adapter.js +76 -0
  11. package/dist/core/adapters/copilot-adapter.d.ts +23 -0
  12. package/dist/core/adapters/copilot-adapter.js +85 -0
  13. package/dist/core/adapters/gemini-adapter.d.ts +26 -0
  14. package/dist/core/adapters/gemini-adapter.js +84 -0
  15. package/dist/core/adapters/qwen-adapter.d.ts +26 -0
  16. package/dist/core/adapters/qwen-adapter.js +84 -0
  17. package/dist/core/agent-manager.js +12 -0
  18. package/dist/templates/slash-commands/augment/archive.md +164 -0
  19. package/dist/templates/slash-commands/augment/deep.md +147 -0
  20. package/dist/templates/slash-commands/augment/fast.md +136 -0
  21. package/dist/templates/slash-commands/augment/implement.md +122 -0
  22. package/dist/templates/slash-commands/augment/plan.md +69 -0
  23. package/dist/templates/slash-commands/augment/prd.md +80 -0
  24. package/dist/templates/slash-commands/augment/start.md +66 -0
  25. package/dist/templates/slash-commands/augment/summarize.md +99 -0
  26. package/dist/templates/slash-commands/codebuddy/archive.md +164 -0
  27. package/dist/templates/slash-commands/codebuddy/deep.md +147 -0
  28. package/dist/templates/slash-commands/codebuddy/fast.md +136 -0
  29. package/dist/templates/slash-commands/codebuddy/implement.md +122 -0
  30. package/dist/templates/slash-commands/codebuddy/plan.md +69 -0
  31. package/dist/templates/slash-commands/codebuddy/prd.md +80 -0
  32. package/dist/templates/slash-commands/codebuddy/start.md +66 -0
  33. package/dist/templates/slash-commands/codebuddy/summarize.md +99 -0
  34. package/dist/templates/slash-commands/codex/archive.md +164 -0
  35. package/dist/templates/slash-commands/codex/deep.md +147 -0
  36. package/dist/templates/slash-commands/codex/fast.md +136 -0
  37. package/dist/templates/slash-commands/codex/implement.md +122 -0
  38. package/dist/templates/slash-commands/codex/plan.md +69 -0
  39. package/dist/templates/slash-commands/codex/prd.md +80 -0
  40. package/dist/templates/slash-commands/codex/start.md +66 -0
  41. package/dist/templates/slash-commands/codex/summarize.md +99 -0
  42. package/dist/templates/slash-commands/copilot/archive.agent.md +164 -0
  43. package/dist/templates/slash-commands/copilot/deep.agent.md +147 -0
  44. package/dist/templates/slash-commands/copilot/fast.agent.md +136 -0
  45. package/dist/templates/slash-commands/copilot/implement.agent.md +122 -0
  46. package/dist/templates/slash-commands/copilot/plan.agent.md +69 -0
  47. package/dist/templates/slash-commands/copilot/prd.agent.md +80 -0
  48. package/dist/templates/slash-commands/copilot/start.agent.md +66 -0
  49. package/dist/templates/slash-commands/copilot/summarize.agent.md +99 -0
  50. package/dist/templates/slash-commands/gemini/archive.toml +162 -0
  51. package/dist/templates/slash-commands/gemini/deep.toml +145 -0
  52. package/dist/templates/slash-commands/gemini/fast.toml +134 -0
  53. package/dist/templates/slash-commands/gemini/implement.toml +120 -0
  54. package/dist/templates/slash-commands/gemini/plan.toml +67 -0
  55. package/dist/templates/slash-commands/gemini/prd.toml +78 -0
  56. package/dist/templates/slash-commands/gemini/start.toml +64 -0
  57. package/dist/templates/slash-commands/gemini/summarize.toml +97 -0
  58. package/dist/templates/slash-commands/qwen/archive.toml +162 -0
  59. package/dist/templates/slash-commands/qwen/deep.toml +145 -0
  60. package/dist/templates/slash-commands/qwen/fast.toml +134 -0
  61. package/dist/templates/slash-commands/qwen/implement.toml +120 -0
  62. package/dist/templates/slash-commands/qwen/plan.toml +67 -0
  63. package/dist/templates/slash-commands/qwen/prd.toml +78 -0
  64. package/dist/templates/slash-commands/qwen/start.toml +64 -0
  65. package/dist/templates/slash-commands/qwen/summarize.toml +97 -0
  66. package/dist/types/agent.d.ts +1 -1
  67. package/package.json +2 -2
package/README.md CHANGED
@@ -42,9 +42,13 @@ Clavix integrates seamlessly with multiple AI development tools:
42
42
  | Tool | Slash Commands | Directory | Status |
43
43
  |------|----------------|-----------|--------|
44
44
  | **Droid CLI** | ✅ | `.factory/commands/` (YAML frontmatter) | Fully Supported |
45
+ | **CodeBuddy CLI** | ✅ | `.codebuddy/commands/` (YAML frontmatter, shell-style args) | Fully Supported |
45
46
  | **OpenCode** | ✅ | `.opencode/command/` | Fully Supported |
47
+ | **Gemini CLI** | ✅ | `.gemini/commands/` (TOML custom commands) | Fully Supported |
48
+ | **Qwen Code CLI** | ✅ | `.qwen/commands/` (TOML custom commands) | Fully Supported |
46
49
  | **Amp** | ✅ | `.agents/commands/` (no frontmatter) | Fully Supported |
47
50
  | **Crush CLI** | ✅ | `.crush/commands/clavix/` | Fully Supported |
51
+ | **Codex CLI** | ✅ | `~/.codex/prompts` (global YAML frontmatter) | Fully Supported |
48
52
 
49
53
  ### Universal Adapters
50
54
  | Tool | Slash Commands | Directory | Status |
@@ -54,10 +58,23 @@ Clavix integrates seamlessly with multiple AI development tools:
54
58
 
55
59
  **Key Features:**
56
60
  - **Multi-Select Support** - Choose multiple tools during `clavix init`
57
- - **Provider-Specific Formatting** - Commands generated in each tool's native format (e.g., Crush CLI uses `$PROMPT`, Droid CLI adds YAML `description`/`argument-hint`, Amp omits frontmatter)
61
+ - **Provider-Specific Formatting** - Commands generated in each tool's native format (e.g., Crush CLI uses `$PROMPT`, Droid & CodeBuddy add YAML `description`/`argument-hint`, Gemini/Qwen emit TOML with `{{args}}`, Codex expands `$ARGUMENTS`, Amp omits frontmatter)
58
62
  - **Universal Fallback** - `agents.md` works with any tool
59
63
  - **Managed Documentation** - Auto-inject and update instructions
60
64
 
65
+ #### Argument placeholder reference
66
+
67
+ | Provider | Placeholder |
68
+ |----------|-------------|
69
+ | Droid CLI | `$ARGUMENTS`
70
+ | CodeBuddy CLI | `$1` (additional args: `$2`, `$3`, ...)
71
+ | OpenCode | `$ARGUMENTS`
72
+ | Gemini CLI | `{{args}}`
73
+ | Qwen Code CLI | `{{args}}`
74
+ | Amp | *(no inline placeholder; raw prompt)*
75
+ | Crush CLI | `$PROMPT`
76
+ | Codex CLI | `$ARGUMENTS`
77
+
61
78
  ## Why Clavix?
62
79
 
63
80
  AI-assisted development tools produce better code when given better prompts. However, developers often struggle to write comprehensive, structured prompts that clearly communicate requirements, constraints, and success criteria. Clavix solves this by:
@@ -183,10 +200,14 @@ You'll be prompted to select which AI tools to support:
183
200
  ◉ Claude Code (.claude/commands/clavix/)
184
201
  ◉ Cursor (.cursor/commands/)
185
202
  ◯ Droid CLI (.factory/commands/)
203
+ ◯ CodeBuddy CLI (.codebuddy/commands/)
186
204
  ◉ OpenCode (.opencode/command/)
205
+ ◯ Gemini CLI (.gemini/commands/)
206
+ ◯ Qwen Code CLI (.qwen/commands/)
187
207
  ◯ Amp (.agents/commands/)
188
208
  ◉ agents.md (Universal)
189
209
  ◯ Octofriend (OCTO.md - Universal)
210
+ ◯ Codex CLI (~/.codex/prompts)
190
211
  ```
191
212
 
192
213
  This will:
@@ -10,6 +10,7 @@ export default class Init extends Command {
10
10
  private injectDocumentation;
11
11
  private migrateOldCommands;
12
12
  private extractDescription;
13
+ private parseTomlTemplate;
13
14
  private extractClavixBlock;
14
15
  }
15
16
  //# sourceMappingURL=init.d.ts.map
@@ -47,6 +47,8 @@ const agents_md_generator_1 = require("../../core/adapters/agents-md-generator")
47
47
  const octo_md_generator_1 = require("../../core/adapters/octo-md-generator");
48
48
  const file_system_1 = require("../../utils/file-system");
49
49
  const config_1 = require("../../types/config");
50
+ const gemini_adapter_1 = require("../../core/adapters/gemini-adapter");
51
+ const qwen_adapter_1 = require("../../core/adapters/qwen-adapter");
50
52
  class Init extends core_1.Command {
51
53
  async run() {
52
54
  console.log(chalk_1.default.bold.cyan('\n🚀 Clavix Initialization\n'));
@@ -82,12 +84,12 @@ class Init extends core_1.Command {
82
84
  value: 'claude-code',
83
85
  },
84
86
  {
85
- name: 'Cursor (.cursor/commands/)',
86
- value: 'cursor',
87
+ name: 'Cline (.cline/workflows/)',
88
+ value: 'cline',
87
89
  },
88
90
  {
89
- name: 'Windsurf (.windsurf/workflows/)',
90
- value: 'windsurf',
91
+ name: 'Cursor (.cursor/commands/)',
92
+ value: 'cursor',
91
93
  },
92
94
  {
93
95
  name: 'Kilocode (.kilocode/workflows/)',
@@ -98,27 +100,51 @@ class Init extends core_1.Command {
98
100
  value: 'roocode',
99
101
  },
100
102
  {
101
- name: 'Cline (.cline/workflows/)',
102
- value: 'cline',
103
+ name: 'Windsurf (.windsurf/workflows/)',
104
+ value: 'windsurf',
103
105
  },
104
106
  new inquirer_1.default.Separator(),
105
107
  // CLI Tools
106
108
  {
107
- name: 'Droid CLI (.factory/commands/)',
108
- value: 'droid',
109
+ name: 'Amp (.agents/commands/)',
110
+ value: 'amp',
109
111
  },
110
112
  {
111
- name: 'OpenCode (.opencode/command/)',
112
- value: 'opencode',
113
+ name: 'Augment CLI (.augment/commands/clavix/)',
114
+ value: 'augment',
113
115
  },
114
116
  {
115
- name: 'Amp (.agents/commands/)',
116
- value: 'amp',
117
+ name: 'Codex CLI (~/.codex/prompts)',
118
+ value: 'codex',
119
+ },
120
+ {
121
+ name: 'CodeBuddy (.codebuddy/commands/)',
122
+ value: 'codebuddy',
123
+ },
124
+ {
125
+ name: 'Copilot CLI (.github/agents/)',
126
+ value: 'copilot',
117
127
  },
118
128
  {
119
129
  name: 'Crush CLI (.crush/commands/clavix/)',
120
130
  value: 'crush',
121
131
  },
132
+ {
133
+ name: 'Droid CLI (.factory/commands/)',
134
+ value: 'droid',
135
+ },
136
+ {
137
+ name: 'Gemini CLI (.gemini/commands/clavix/)',
138
+ value: 'gemini',
139
+ },
140
+ {
141
+ name: 'OpenCode (.opencode/command/)',
142
+ value: 'opencode',
143
+ },
144
+ {
145
+ name: 'Qwen Code (.qwen/commands/clavix/)',
146
+ value: 'qwen',
147
+ },
122
148
  new inquirer_1.default.Separator(),
123
149
  // Universal Adapters
124
150
  {
@@ -166,8 +192,40 @@ class Init extends core_1.Command {
166
192
  await octo_md_generator_1.OctoMdGenerator.generate();
167
193
  continue;
168
194
  }
169
- const adapter = agentManager.requireAdapter(providerName);
195
+ let adapter = agentManager.requireAdapter(providerName);
170
196
  console.log(chalk_1.default.gray(` ✓ Generating ${adapter.displayName} commands...`));
197
+ if (adapter.name === 'codex') {
198
+ const codexPath = adapter.getCommandPath();
199
+ const { confirmCodex } = await inquirer_1.default.prompt([
200
+ {
201
+ type: 'confirm',
202
+ name: 'confirmCodex',
203
+ message: `Codex commands will be generated at ${codexPath}. Continue?`,
204
+ default: true,
205
+ },
206
+ ]);
207
+ if (!confirmCodex) {
208
+ console.log(chalk_1.default.yellow(' ⊗ Skipped Codex CLI'));
209
+ continue;
210
+ }
211
+ }
212
+ if (adapter.name === 'gemini' || adapter.name === 'qwen') {
213
+ const defaultNamespacePath = path.join(`.${adapter.name}`, 'commands', 'clavix');
214
+ const { useNamespace } = await inquirer_1.default.prompt([
215
+ {
216
+ type: 'confirm',
217
+ name: 'useNamespace',
218
+ message: `Store ${adapter.displayName} commands under ${defaultNamespacePath}? (Produces /clavix:<command> shortcuts)`,
219
+ default: true,
220
+ },
221
+ ]);
222
+ if (!useNamespace) {
223
+ adapter = adapter.name === 'gemini'
224
+ ? new gemini_adapter_1.GeminiAdapter({ useNamespace: false })
225
+ : new qwen_adapter_1.QwenAdapter({ useNamespace: false });
226
+ console.log(chalk_1.default.gray(` → Using ${adapter.getCommandPath()} (no namespacing)`));
227
+ }
228
+ }
171
229
  // Validate before generating
172
230
  if (adapter.validate) {
173
231
  const validation = await adapter.validate();
@@ -193,7 +251,16 @@ class Init extends core_1.Command {
193
251
  await this.migrateOldCommands(adapter);
194
252
  }
195
253
  // Generate slash commands
196
- await this.generateSlashCommands(adapter);
254
+ const generatedTemplates = await this.generateSlashCommands(adapter);
255
+ if (adapter.name === 'gemini' || adapter.name === 'qwen') {
256
+ const commandPath = adapter.getCommandPath();
257
+ const isNamespaced = commandPath.endsWith(path.join('commands', 'clavix'));
258
+ const namespace = isNamespaced ? path.basename(commandPath) : undefined;
259
+ const commandNames = generatedTemplates.map((template) => isNamespaced ? `/${namespace}:${template.name}` : `/${template.name}`);
260
+ console.log(chalk_1.default.green(` → Registered ${commandNames.join(', ')}`));
261
+ console.log(chalk_1.default.gray(` Commands saved to ${commandPath}`));
262
+ console.log(chalk_1.default.gray(' Tip: reopen the CLI or run /help to refresh the command list.'));
263
+ }
197
264
  // Inject documentation blocks (Claude Code only)
198
265
  if (providerName === 'claude-code') {
199
266
  console.log(chalk_1.default.gray(' ✓ Injecting CLAUDE.md documentation...'));
@@ -291,18 +358,31 @@ See documentation for template format details.
291
358
  }
292
359
  async generateSlashCommands(adapter) {
293
360
  const templateDir = path.join(__dirname, '../../templates/slash-commands', adapter.name);
294
- const commandFiles = await file_system_1.FileSystem.listFiles(templateDir, /\.md$/);
361
+ const files = await file_system_1.FileSystem.listFiles(templateDir);
362
+ const extension = adapter.fileExtension;
363
+ const commandFiles = files.filter((file) => file.endsWith(extension));
295
364
  const templates = [];
296
365
  for (const file of commandFiles) {
297
366
  const content = await file_system_1.FileSystem.readFile(path.join(templateDir, file));
298
- const name = file.replace('.md', '');
299
- templates.push({
300
- name,
301
- content,
302
- description: this.extractDescription(content),
303
- });
367
+ const name = file.slice(0, -extension.length);
368
+ if (extension === '.toml') {
369
+ const parsed = this.parseTomlTemplate(content, name, adapter.name);
370
+ templates.push({
371
+ name,
372
+ content: parsed.prompt,
373
+ description: parsed.description,
374
+ });
375
+ }
376
+ else {
377
+ templates.push({
378
+ name,
379
+ content,
380
+ description: this.extractDescription(content),
381
+ });
382
+ }
304
383
  }
305
384
  await adapter.generateCommands(templates);
385
+ return templates;
306
386
  }
307
387
  async injectDocumentation(adapter) {
308
388
  // Inject AGENTS.md
@@ -345,8 +425,25 @@ See documentation for template format details.
345
425
  }
346
426
  }
347
427
  extractDescription(content) {
348
- const match = content.match(/description:\s*(.+)/);
349
- return match ? match[1] : '';
428
+ const yamlMatch = content.match(/description:\s*(.+)/);
429
+ if (yamlMatch) {
430
+ return yamlMatch[1].trim().replace(/^['"]|['"]$/g, '');
431
+ }
432
+ const tomlMatch = content.match(/description\s*=\s*['"]?(.+?)['"]?(?:\r?\n|$)/);
433
+ if (tomlMatch) {
434
+ return tomlMatch[1].trim().replace(/^['"]|['"]$/g, '');
435
+ }
436
+ return '';
437
+ }
438
+ parseTomlTemplate(content, templateName, providerName) {
439
+ const descriptionMatch = content.match(/^\s*description\s*=\s*(['"])(.*?)\1/m);
440
+ const promptMatch = content.match(/^\s*prompt\s*=\s*"""([\s\S]*?)"""/m);
441
+ if (!promptMatch) {
442
+ throw new Error(`Template ${templateName}.toml for ${providerName} is missing a prompt = """ ... """ block.`);
443
+ }
444
+ const description = descriptionMatch ? descriptionMatch[2] : '';
445
+ const prompt = promptMatch[1];
446
+ return { description, prompt };
350
447
  }
351
448
  extractClavixBlock(content) {
352
449
  const match = content.match(/<!-- CLAVIX:START -->([\s\S]*?)<!-- CLAVIX:END -->/);
@@ -157,6 +157,7 @@ class Update extends core_1.Command {
157
157
  this.log(chalk_1.default.cyan('\n🔧 Updating slash commands...'));
158
158
  const commandsDir = adapter.getCommandPath();
159
159
  const commandsPath = path.join(process.cwd(), commandsDir);
160
+ const extension = adapter.fileExtension;
160
161
  // Dynamically scan template directory for all command templates
161
162
  const templatesDir = path.join(__dirname, '..', '..', 'templates', 'slash-commands', adapter.name);
162
163
  if (!fs.existsSync(templatesDir)) {
@@ -165,8 +166,8 @@ class Update extends core_1.Command {
165
166
  }
166
167
  // Get all .md template files
167
168
  const templateFiles = fs.readdirSync(templatesDir)
168
- .filter(file => file.endsWith('.md'))
169
- .map(file => file.replace('.md', ''));
169
+ .filter(file => file.endsWith(extension))
170
+ .map(file => file.slice(0, -extension.length));
170
171
  if (templateFiles.length === 0) {
171
172
  this.log(chalk_1.default.yellow(' ⚠ No command templates found'));
172
173
  return 0;
@@ -178,8 +179,8 @@ class Update extends core_1.Command {
178
179
  }
179
180
  let updated = 0;
180
181
  for (const command of templateFiles) {
181
- const commandFile = path.join(commandsPath, `${command}.md`);
182
- const templatePath = path.join(templatesDir, `${command}.md`);
182
+ const commandFile = path.join(commandsPath, `${command}${extension}`);
183
+ const templatePath = path.join(templatesDir, `${command}${extension}`);
183
184
  const newContent = fs.readFileSync(templatePath, 'utf-8');
184
185
  if (fs.existsSync(commandFile)) {
185
186
  const currentContent = fs.readFileSync(commandFile, 'utf-8');
@@ -0,0 +1,22 @@
1
+ import { BaseAdapter } from './base-adapter';
2
+ import { CommandTemplate } from '../../types/agent';
3
+ /**
4
+ * Augment CLI adapter
5
+ * Commands stored in .augment/commands/clavix with optional subdirectories
6
+ */
7
+ export declare class AugmentAdapter extends BaseAdapter {
8
+ readonly name = "augment";
9
+ readonly displayName = "Augment CLI";
10
+ readonly directory = ".augment/commands/clavix";
11
+ readonly fileExtension = ".md";
12
+ readonly features: {
13
+ supportsSubdirectories: boolean;
14
+ supportsFrontmatter: boolean;
15
+ frontmatterFields: string[];
16
+ };
17
+ detectProject(): Promise<boolean>;
18
+ getCommandPath(): string;
19
+ protected formatCommand(template: CommandTemplate): string;
20
+ private getHomeDir;
21
+ }
22
+ //# sourceMappingURL=augment-adapter.d.ts.map
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.AugmentAdapter = void 0;
37
+ const os = __importStar(require("os"));
38
+ const path = __importStar(require("path"));
39
+ const base_adapter_1 = require("./base-adapter");
40
+ const file_system_1 = require("../../utils/file-system");
41
+ /**
42
+ * Augment CLI adapter
43
+ * Commands stored in .augment/commands/clavix with optional subdirectories
44
+ */
45
+ class AugmentAdapter extends base_adapter_1.BaseAdapter {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.name = 'augment';
49
+ this.displayName = 'Augment CLI';
50
+ this.directory = '.augment/commands/clavix';
51
+ this.fileExtension = '.md';
52
+ this.features = {
53
+ supportsSubdirectories: true,
54
+ supportsFrontmatter: true,
55
+ frontmatterFields: ['description', 'argument-hint', 'model'],
56
+ };
57
+ }
58
+ async detectProject() {
59
+ if (await file_system_1.FileSystem.exists('.augment')) {
60
+ return true;
61
+ }
62
+ const homeAugmentDir = path.join(this.getHomeDir(), '.augment');
63
+ return file_system_1.FileSystem.exists(homeAugmentDir);
64
+ }
65
+ getCommandPath() {
66
+ return this.directory;
67
+ }
68
+ formatCommand(template) {
69
+ const frontmatter = `---\ndescription: ${template.description}\nargument-hint: [prompt]\n---\n\n`;
70
+ return frontmatter + template.content;
71
+ }
72
+ getHomeDir() {
73
+ return process.env.CLAVIX_HOME_OVERRIDE || os.homedir();
74
+ }
75
+ }
76
+ exports.AugmentAdapter = AugmentAdapter;
77
+ //# sourceMappingURL=augment-adapter.js.map
@@ -0,0 +1,23 @@
1
+ import { BaseAdapter } from './base-adapter';
2
+ import { CommandTemplate } from '../../types/agent';
3
+ /**
4
+ * CodeBuddy CLI adapter
5
+ * Commands stored in .codebuddy/commands with YAML frontmatter
6
+ */
7
+ export declare class CodeBuddyAdapter extends BaseAdapter {
8
+ readonly name = "codebuddy";
9
+ readonly displayName = "CodeBuddy";
10
+ readonly directory = ".codebuddy/commands";
11
+ readonly fileExtension = ".md";
12
+ readonly features: {
13
+ supportsSubdirectories: boolean;
14
+ supportsFrontmatter: boolean;
15
+ argumentPlaceholder: string;
16
+ frontmatterFields: string[];
17
+ };
18
+ detectProject(): Promise<boolean>;
19
+ getCommandPath(): string;
20
+ protected formatCommand(template: CommandTemplate): string;
21
+ private getHomeDir;
22
+ }
23
+ //# sourceMappingURL=codebuddy-adapter.d.ts.map
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CodeBuddyAdapter = void 0;
37
+ const os = __importStar(require("os"));
38
+ const path = __importStar(require("path"));
39
+ const base_adapter_1 = require("./base-adapter");
40
+ const file_system_1 = require("../../utils/file-system");
41
+ /**
42
+ * CodeBuddy CLI adapter
43
+ * Commands stored in .codebuddy/commands with YAML frontmatter
44
+ */
45
+ class CodeBuddyAdapter extends base_adapter_1.BaseAdapter {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.name = 'codebuddy';
49
+ this.displayName = 'CodeBuddy';
50
+ this.directory = '.codebuddy/commands';
51
+ this.fileExtension = '.md';
52
+ this.features = {
53
+ supportsSubdirectories: false,
54
+ supportsFrontmatter: true,
55
+ argumentPlaceholder: '$1',
56
+ frontmatterFields: ['description', 'argument-hint'],
57
+ };
58
+ }
59
+ async detectProject() {
60
+ if (await file_system_1.FileSystem.exists('.codebuddy')) {
61
+ return true;
62
+ }
63
+ const homePath = path.join(this.getHomeDir(), '.codebuddy');
64
+ return await file_system_1.FileSystem.exists(homePath);
65
+ }
66
+ getCommandPath() {
67
+ return this.directory;
68
+ }
69
+ formatCommand(template) {
70
+ const frontmatter = `---\ndescription: ${template.description}\nargument-hint: [prompt]\n---\n\n`;
71
+ const content = template.content.replace(/\{\{ARGS\}\}/g, '$1');
72
+ return frontmatter + content;
73
+ }
74
+ getHomeDir() {
75
+ return process.env.CLAVIX_HOME_OVERRIDE || os.homedir();
76
+ }
77
+ }
78
+ exports.CodeBuddyAdapter = CodeBuddyAdapter;
79
+ //# sourceMappingURL=codebuddy-adapter.js.map
@@ -0,0 +1,23 @@
1
+ import { BaseAdapter } from './base-adapter';
2
+ import { CommandTemplate } from '../../types/agent';
3
+ /**
4
+ * Codex CLI adapter
5
+ * Commands stored globally under ~/.codex/prompts
6
+ */
7
+ export declare class CodexAdapter extends BaseAdapter {
8
+ readonly name = "codex";
9
+ readonly displayName = "Codex CLI";
10
+ readonly directory = "~/.codex/prompts";
11
+ readonly fileExtension = ".md";
12
+ readonly features: {
13
+ supportsSubdirectories: boolean;
14
+ supportsFrontmatter: boolean;
15
+ argumentPlaceholder: string;
16
+ frontmatterFields: string[];
17
+ };
18
+ detectProject(): Promise<boolean>;
19
+ getCommandPath(): string;
20
+ protected formatCommand(template: CommandTemplate): string;
21
+ private getHomeDir;
22
+ }
23
+ //# sourceMappingURL=codex-adapter.d.ts.map
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CodexAdapter = void 0;
37
+ const os = __importStar(require("os"));
38
+ const path = __importStar(require("path"));
39
+ const base_adapter_1 = require("./base-adapter");
40
+ const file_system_1 = require("../../utils/file-system");
41
+ /**
42
+ * Codex CLI adapter
43
+ * Commands stored globally under ~/.codex/prompts
44
+ */
45
+ class CodexAdapter extends base_adapter_1.BaseAdapter {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.name = 'codex';
49
+ this.displayName = 'Codex CLI';
50
+ this.directory = '~/.codex/prompts';
51
+ this.fileExtension = '.md';
52
+ this.features = {
53
+ supportsSubdirectories: false,
54
+ supportsFrontmatter: true,
55
+ argumentPlaceholder: '$ARGUMENTS',
56
+ frontmatterFields: ['description', 'argument-hint'],
57
+ };
58
+ }
59
+ async detectProject() {
60
+ const codexDir = path.join(this.getHomeDir(), '.codex');
61
+ return await file_system_1.FileSystem.exists(codexDir);
62
+ }
63
+ getCommandPath() {
64
+ return path.join(this.getHomeDir(), '.codex', 'prompts');
65
+ }
66
+ formatCommand(template) {
67
+ const frontmatter = `---\ndescription: ${template.description}\nargument-hint: [prompt]\n---\n\n`;
68
+ const content = template.content.replace(/\{\{ARGS\}\}/g, '$ARGUMENTS');
69
+ return frontmatter + content;
70
+ }
71
+ getHomeDir() {
72
+ return process.env.CLAVIX_HOME_OVERRIDE || os.homedir();
73
+ }
74
+ }
75
+ exports.CodexAdapter = CodexAdapter;
76
+ //# sourceMappingURL=codex-adapter.js.map
@@ -0,0 +1,23 @@
1
+ import { BaseAdapter } from './base-adapter';
2
+ import { CommandTemplate } from '../../types/agent';
3
+ /**
4
+ * GitHub Copilot CLI adapter (custom agents)
5
+ * Generates agent profiles under .github/agents
6
+ */
7
+ export declare class CopilotAdapter extends BaseAdapter {
8
+ readonly name = "copilot";
9
+ readonly displayName = "Copilot CLI";
10
+ readonly directory = ".github/agents";
11
+ readonly fileExtension = ".agent.md";
12
+ readonly features: {
13
+ supportsSubdirectories: boolean;
14
+ supportsFrontmatter: boolean;
15
+ frontmatterFields: string[];
16
+ };
17
+ detectProject(): Promise<boolean>;
18
+ getCommandPath(): string;
19
+ protected formatCommand(template: CommandTemplate): string;
20
+ private toTitle;
21
+ private getHomeDir;
22
+ }
23
+ //# sourceMappingURL=copilot-adapter.d.ts.map