clavix 5.5.0 → 5.5.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.
@@ -1,8 +1,20 @@
1
1
  import { AgentManager } from '../core/agent-manager.js';
2
+ /**
3
+ * AGENTS.md is always enabled by default.
4
+ * It provides universal agent guidance that all AI tools can read.
5
+ */
6
+ export declare const MANDATORY_INTEGRATION = "agents-md";
2
7
  /**
3
8
  * Interactive integration selection utility
4
9
  * Displays multi-select checkbox for all available integrations
5
10
  * Used by both init and config commands
11
+ *
12
+ * Note: AGENTS.md is always enabled and not shown in selection
6
13
  */
7
14
  export declare function selectIntegrations(agentManager: AgentManager, preSelected?: string[]): Promise<string[]>;
15
+ /**
16
+ * Ensures AGENTS.md is always included in the final integration list.
17
+ * Call this after selectIntegrations() to enforce mandatory integrations.
18
+ */
19
+ export declare function ensureMandatoryIntegrations(integrations: string[]): string[];
8
20
  //# sourceMappingURL=integration-selector.d.ts.map
@@ -1,8 +1,15 @@
1
1
  import inquirer from 'inquirer';
2
+ /**
3
+ * AGENTS.md is always enabled by default.
4
+ * It provides universal agent guidance that all AI tools can read.
5
+ */
6
+ export const MANDATORY_INTEGRATION = 'agents-md';
2
7
  /**
3
8
  * Interactive integration selection utility
4
9
  * Displays multi-select checkbox for all available integrations
5
10
  * Used by both init and config commands
11
+ *
12
+ * Note: AGENTS.md is always enabled and not shown in selection
6
13
  */
7
14
  export async function selectIntegrations(agentManager, preSelected = []) {
8
15
  const { selectedIntegrations } = await inquirer.prompt([
@@ -31,8 +38,8 @@ export async function selectIntegrations(agentManager, preSelected = []) {
31
38
  { name: 'Roocode (.roo/clavix/)', value: 'roocode' },
32
39
  { name: 'Windsurf (.windsurf/rules/)', value: 'windsurf' },
33
40
  new inquirer.Separator(),
34
- new inquirer.Separator('=== Universal Adapters ==='),
35
- { name: 'AGENTS.md (Universal)', value: 'agents-md' },
41
+ new inquirer.Separator('=== Optional Universal Adapters ==='),
42
+ // Note: AGENTS.md is always enabled (not shown here)
36
43
  { name: 'GitHub Copilot (.github/copilot-instructions.md)', value: 'copilot-instructions' },
37
44
  { name: 'OCTO.md (Universal)', value: 'octo-md' },
38
45
  { name: 'WARP.md (Universal)', value: 'warp-md' },
@@ -57,4 +64,14 @@ export async function selectIntegrations(agentManager, preSelected = []) {
57
64
  ]);
58
65
  return selectedIntegrations;
59
66
  }
67
+ /**
68
+ * Ensures AGENTS.md is always included in the final integration list.
69
+ * Call this after selectIntegrations() to enforce mandatory integrations.
70
+ */
71
+ export function ensureMandatoryIntegrations(integrations) {
72
+ if (!integrations.includes(MANDATORY_INTEGRATION)) {
73
+ return [MANDATORY_INTEGRATION, ...integrations];
74
+ }
75
+ return integrations;
76
+ }
60
77
  //# sourceMappingURL=integration-selector.js.map
@@ -1,3 +1,4 @@
1
+ import { DataError } from '../types/errors.js';
1
2
  /**
2
3
  * Parse TOML-based slash command templates (Gemini/Qwen) and extract metadata.
3
4
  * Ensures the resulting prompt body does not include duplicated frontmatter.
@@ -10,13 +11,13 @@ export function parseTomlSlashCommand(content, templateName, integrationName) {
10
11
  const descriptionMatch = normalized.match(/^\s*description\s*=\s*(['"])(.*?)\1\s*$/m);
11
12
  const promptHeaderMatch = normalized.match(/^\s*prompt\s*=\s*"""/m);
12
13
  if (!promptHeaderMatch || promptHeaderMatch.index === undefined) {
13
- throw new Error(`Template ${templateName}.toml for ${integrationName} is missing a prompt = """ ... """ block.`);
14
+ throw new DataError(`Template ${templateName}.toml for ${integrationName} is missing a prompt = """ ... """ block.`, 'Check the template file format. TOML templates require prompt = """...""" syntax.');
14
15
  }
15
16
  const bodyStart = promptHeaderMatch.index + promptHeaderMatch[0].length;
16
17
  const bodyRemainder = normalized.slice(bodyStart);
17
18
  const closingIndex = bodyRemainder.indexOf('"""');
18
19
  if (closingIndex === -1) {
19
- throw new Error(`Template ${templateName}.toml for ${integrationName} does not terminate its prompt = """ ... """ block.`);
20
+ throw new DataError(`Template ${templateName}.toml for ${integrationName} does not terminate its prompt = """ ... """ block.`, 'Add closing """ to the prompt block.');
20
21
  }
21
22
  let promptBody = bodyRemainder.slice(0, closingIndex);
22
23
  const promptLines = promptBody.split('\n');
@@ -2,11 +2,6 @@
2
2
  * Version utility for Clavix
3
3
  * Centralizes version reading from package.json
4
4
  */
5
- /**
6
- * Get the current Clavix version from package.json
7
- * Returns '0.0.0' if package.json cannot be read
8
- */
9
- export declare function getVersion(): Promise<string>;
10
5
  /**
11
6
  * Get version synchronously (for use in type definitions)
12
7
  * Falls back to hardcoded version if file cannot be read
@@ -7,20 +7,6 @@ import path from 'path';
7
7
  import { fileURLToPath } from 'url';
8
8
  const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
10
- /**
11
- * Get the current Clavix version from package.json
12
- * Returns '0.0.0' if package.json cannot be read
13
- */
14
- export async function getVersion() {
15
- try {
16
- const packageJsonPath = path.join(__dirname, '../../package.json');
17
- const packageJson = await fs.readJson(packageJsonPath);
18
- return packageJson.version || '0.0.0';
19
- }
20
- catch {
21
- return '0.0.0';
22
- }
23
- }
24
10
  /**
25
11
  * Get version synchronously (for use in type definitions)
26
12
  * Falls back to hardcoded version if file cannot be read
@@ -126,5 +126,5 @@
126
126
  ]
127
127
  }
128
128
  },
129
- "version": "5.5.0"
129
+ "version": "5.5.2"
130
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavix",
3
- "version": "5.5.0",
3
+ "version": "5.5.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",