clavix 5.1.0 → 5.2.1
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/README.md +21 -3
- package/dist/cli/commands/config.d.ts +1 -3
- package/dist/cli/commands/config.js +4 -13
- package/dist/cli/commands/diagnose.d.ts +15 -0
- package/dist/cli/commands/diagnose.js +295 -0
- package/dist/core/adapters/agents-md-generator.d.ts +0 -10
- package/dist/core/adapters/agents-md-generator.js +7 -41
- package/dist/core/adapters/copilot-instructions-generator.d.ts +0 -10
- package/dist/core/adapters/copilot-instructions-generator.js +7 -41
- package/dist/core/adapters/gemini-adapter.d.ts +2 -18
- package/dist/core/adapters/gemini-adapter.js +7 -46
- package/dist/core/adapters/llxprt-adapter.d.ts +2 -18
- package/dist/core/adapters/llxprt-adapter.js +7 -46
- package/dist/core/adapters/octo-md-generator.d.ts +0 -10
- package/dist/core/adapters/octo-md-generator.js +7 -41
- package/dist/core/adapters/qwen-adapter.d.ts +2 -18
- package/dist/core/adapters/qwen-adapter.js +7 -46
- package/dist/core/adapters/toml-formatting-adapter.d.ts +50 -0
- package/dist/core/adapters/toml-formatting-adapter.js +74 -0
- package/dist/core/adapters/warp-md-generator.d.ts +3 -4
- package/dist/core/adapters/warp-md-generator.js +10 -30
- package/dist/core/doc-injector.js +4 -5
- package/dist/templates/agents/agents.md +8 -2
- package/dist/templates/agents/copilot-instructions.md +6 -2
- package/dist/templates/agents/octo.md +6 -2
- package/dist/templates/agents/warp.md +6 -2
- package/dist/templates/slash-commands/_canonical/archive.md +4 -7
- package/dist/templates/slash-commands/_canonical/implement.md +4 -7
- package/dist/templates/slash-commands/_canonical/improve.md +4 -7
- package/dist/templates/slash-commands/_canonical/plan.md +4 -7
- package/dist/templates/slash-commands/_canonical/prd.md +4 -7
- package/dist/templates/slash-commands/_canonical/start.md +3 -6
- package/dist/templates/slash-commands/_canonical/summarize.md +3 -6
- package/dist/templates/slash-commands/_canonical/verify.md +4 -7
- package/dist/templates/slash-commands/_components/agent-protocols/AGENT_MANUAL.md +284 -0
- package/dist/types/agent.d.ts +0 -4
- package/dist/types/config.d.ts +0 -80
- package/dist/types/config.js +1 -1
- package/dist/utils/agent-error-messages.d.ts +5 -5
- package/dist/utils/agent-error-messages.js +5 -5
- package/dist/utils/error-utils.d.ts +1 -7
- package/dist/utils/error-utils.js +12 -11
- package/dist/utils/toml-templates.js +4 -1
- package/package.json +3 -8
|
@@ -61,22 +61,23 @@ export function toError(error) {
|
|
|
61
61
|
* Type guard to check if error is a NodeJS error with code property
|
|
62
62
|
*/
|
|
63
63
|
export function isNodeError(error) {
|
|
64
|
-
return
|
|
65
|
-
'code' in error &&
|
|
66
|
-
typeof error.code === 'string');
|
|
64
|
+
return isError(error) && 'code' in error && typeof error.code === 'string';
|
|
67
65
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Handles CLI errors, formatting OCLIF errors nicely and falling back to default handler.
|
|
70
|
-
* @param error The error to handle
|
|
71
|
-
* @param defaultHandler The default handler function (usually handle from @oclif/core)
|
|
72
|
-
* @param exitFn Optional exit function (defaults to process.exit)
|
|
73
|
-
*/
|
|
74
66
|
export async function handleCliError(error, defaultHandler, exitFn = process.exit) {
|
|
67
|
+
// Type guard for OCLIF errors
|
|
68
|
+
const isOclifError = (err) => {
|
|
69
|
+
return (err !== null &&
|
|
70
|
+
typeof err === 'object' &&
|
|
71
|
+
'oclif' in err &&
|
|
72
|
+
err.oclif !== null &&
|
|
73
|
+
typeof err.oclif === 'object' &&
|
|
74
|
+
'exit' in err.oclif);
|
|
75
|
+
};
|
|
75
76
|
// For CLIError, show only the formatted message
|
|
76
|
-
if (error
|
|
77
|
+
if (isOclifError(error)) {
|
|
77
78
|
// Format error message (hints are now included in error.message)
|
|
78
79
|
console.error(' › Error: ' + error.message);
|
|
79
|
-
exitFn(error.oclif
|
|
80
|
+
exitFn(error.oclif?.exit ?? 1);
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
83
|
// For other errors, use default handler
|
|
@@ -23,7 +23,10 @@ export function parseTomlSlashCommand(content, templateName, providerName) {
|
|
|
23
23
|
while (promptLines.length > 0 && /^\s*(description\s*=|prompt\s*=)/.test(promptLines[0])) {
|
|
24
24
|
promptLines.shift();
|
|
25
25
|
}
|
|
26
|
-
promptBody = promptLines
|
|
26
|
+
promptBody = promptLines
|
|
27
|
+
.join('\n')
|
|
28
|
+
.replace(/^\n+/, '')
|
|
29
|
+
.replace(/[\s]+$/, '');
|
|
27
30
|
return {
|
|
28
31
|
description: descriptionMatch ? descriptionMatch[2] : '',
|
|
29
32
|
prompt: promptBody,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "5.1
|
|
4
|
-
"description": "Agentic-first prompt workflows. Markdown templates that teach AI agents how to optimize prompts, create PRDs, and manage implementation
|
|
3
|
+
"version": "5.2.1",
|
|
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",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -70,20 +70,15 @@
|
|
|
70
70
|
"@oclif/plugin-help": "^6.2.35",
|
|
71
71
|
"chalk": "^5.6.2",
|
|
72
72
|
"fs-extra": "^11.3.2",
|
|
73
|
-
"
|
|
74
|
-
"inquirer": "^12.11.1",
|
|
75
|
-
"json5": "^2.2.3",
|
|
76
|
-
"uuid": "^9.0.1"
|
|
73
|
+
"inquirer": "^12.11.1"
|
|
77
74
|
},
|
|
78
75
|
"devDependencies": {
|
|
79
76
|
"@eslint/js": "^9.17.0",
|
|
80
77
|
"@oclif/test": "^4.1.15",
|
|
81
78
|
"@types/fs-extra": "^11.0.4",
|
|
82
|
-
"@types/handlebars": "^4.0.40",
|
|
83
79
|
"@types/inquirer": "^9.0.9",
|
|
84
80
|
"@types/jest": "^30.0.0",
|
|
85
81
|
"@types/node": "^24.10.1",
|
|
86
|
-
"@types/uuid": "^10.0.0",
|
|
87
82
|
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
88
83
|
"@typescript-eslint/parser": "^8.46.4",
|
|
89
84
|
"copyfiles": "^2.4.1",
|