@e0ipso/ai-task-manager 1.26.0 → 1.26.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/dist/utils.d.ts CHANGED
@@ -45,6 +45,16 @@ export declare function parseFrontmatter(content: string): {
45
45
  * @returns The escaped string suitable for TOML
46
46
  */
47
47
  export declare function escapeTomlString(str: string): string;
48
+ /**
49
+ * Escape a string for TOML triple-quoted format
50
+ * Triple-quoted strings in TOML do NOT interpret escape sequences,
51
+ * so we preserve newlines and only escape triple-quote boundaries.
52
+ * However, some TOML parsers (notably Gemini's) treat backslashes as escape
53
+ * characters even in triple-quoted strings, so we must escape them.
54
+ * @param str - The string to escape
55
+ * @returns The escaped string suitable for TOML triple-quoted strings
56
+ */
57
+ export declare function escapeTomlTripleQuotedString(str: string): string;
48
58
  /**
49
59
  * Convert markdown template content to TOML format for Gemini
50
60
  * @param mdContent - The markdown template content
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CAgC1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAqBhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,cAAc,CAkBtE;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;IACjD,WAAW,EAAE,mBAAmB,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd,CAoCA;AAED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;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAShE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAiCzD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAejE;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,cAAc,EAC5B,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM7F"}
package/dist/utils.js CHANGED
@@ -44,6 +44,7 @@ exports.validateAssistants = validateAssistants;
44
44
  exports.getTemplateFormat = getTemplateFormat;
45
45
  exports.parseFrontmatter = parseFrontmatter;
46
46
  exports.escapeTomlString = escapeTomlString;
47
+ exports.escapeTomlTripleQuotedString = escapeTomlTripleQuotedString;
47
48
  exports.convertMdToToml = convertMdToToml;
48
49
  exports.convertMdToGitHubPrompt = convertMdToGitHubPrompt;
49
50
  exports.readAndProcessTemplate = readAndProcessTemplate;
@@ -176,6 +177,23 @@ function escapeTomlString(str) {
176
177
  .replace(/\r/g, '\\r')
177
178
  .replace(/\t/g, '\\t');
178
179
  }
180
+ /**
181
+ * Escape a string for TOML triple-quoted format
182
+ * Triple-quoted strings in TOML do NOT interpret escape sequences,
183
+ * so we preserve newlines and only escape triple-quote boundaries.
184
+ * However, some TOML parsers (notably Gemini's) treat backslashes as escape
185
+ * characters even in triple-quoted strings, so we must escape them.
186
+ * @param str - The string to escape
187
+ * @returns The escaped string suitable for TOML triple-quoted strings
188
+ */
189
+ function escapeTomlTripleQuotedString(str) {
190
+ return (str
191
+ // Escape backslashes first to prevent them being treated as escape characters
192
+ // by non-compliant TOML parsers (notably Gemini's parser)
193
+ .replace(/\\/g, '\\\\')
194
+ // Escape triple-quote sequences that would break the string delimiters
195
+ .replace(/"""/g, '"\\"'));
196
+ }
179
197
  /**
180
198
  * Convert markdown template content to TOML format for Gemini
181
199
  * @param mdContent - The markdown template content
@@ -192,7 +210,9 @@ function convertMdToToml(mdContent) {
192
210
  .replace(/\$2(?![0-9])/g, '{{param2}}')
193
211
  .replace(/\$3(?![0-9])/g, '{{param3}}');
194
212
  // Build TOML content
195
- let tomlContent = '[metadata]\n';
213
+ // prompt must be at the root, so it comes before [metadata] table
214
+ let tomlContent = `prompt = """${escapeTomlTripleQuotedString(processedBody)}"""\n\n`;
215
+ tomlContent += '[metadata]\n';
196
216
  // Add frontmatter fields to metadata section
197
217
  for (const [key, value] of Object.entries(frontmatter)) {
198
218
  if (key === 'argument-hint') {
@@ -208,9 +228,6 @@ function convertMdToToml(mdContent) {
208
228
  tomlContent += `${key} = "${escapeTomlString(String(value))}"\n`;
209
229
  }
210
230
  }
211
- // Add the prompt section with escaped content
212
- tomlContent += '\n[prompt]\n';
213
- tomlContent += `content = """${escapeTomlString(processedBody)}"""\n`;
214
231
  return tomlContent;
215
232
  }
216
233
  /**
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYH,0CAgCC;AAOD,gDAqBC;AAOD,8CAkBC;AAcD,4CAuCC;AAOD,4CAOC;AAOD,0CAmCC;AAOD,0DAeC;AASD,wDAkBC;AAOD,wDAMC;AA1QD,6CAA+B;AAC/B,2CAA6B;AAG7B;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,KAAa;IAC3C,MAAM,eAAe,GAAgB;QACnC,QAAQ;QACR,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,UAAU;KACX,CAAC;IAEF,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1",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -2,13 +2,6 @@
2
2
 
3
3
  This hook provides pre-planning guidance to ensure scope control, simplicity principles, and proper validation requirements are established before comprehensive plan creation.
4
4
 
5
-
6
- Run this script to detect the assistant:
7
-
8
- ```bash
9
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
10
- ```
11
-
12
5
  <details>
13
6
  <summary>
14
7
  [IMPORTANT] Only for assistants that support assistant skills: Claude
@@ -11,12 +11,6 @@ This hook executes before task assignment to determine the most appropriate agen
11
11
  - Select the most appropriate sub-agent (if any are available). If no sub-agent is appropriate, use the general-purpose one.
12
12
  - Consider task-specific requirements from the task document
13
13
 
14
- Run this script to detect the assistant:
15
-
16
- ```bash
17
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
18
- ```
19
-
20
14
  <details>
21
15
  <summary>
22
16
  [IMPORTANT] Only for assistants that support assistant skills: Claude
@@ -12,13 +12,12 @@ ensuring you have all necessary context before proceeding. Use the plan-creator
12
12
 
13
13
  Before proceeding with this command, you MUST load and respect the assistant's configuration:
14
14
 
15
- **Run the following scripts:**
16
- ```bash
17
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
18
- node .ai/task-manager/config/scripts/read-assistant-config.cjs "$assistant"
19
- ```
15
+ Load the following configuration files in order of precedence (later files override earlier ones):
16
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
17
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
18
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
20
19
 
21
- The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
20
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
22
21
 
23
22
  ---
24
23
 
@@ -8,13 +8,12 @@ description: Execute the task in the plan.
8
8
 
9
9
  Before proceeding with this command, you MUST load and respect the assistant's configuration:
10
10
 
11
- **Run the following scripts:**
12
- ```bash
13
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
14
- node .ai/task-manager/config/scripts/read-assistant-config.cjs "$assistant"
15
- ```
11
+ Load the following configuration files in order of precedence (later files override earlier ones):
12
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
13
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
14
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
16
15
 
17
- The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
16
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
18
17
 
19
18
  ---
20
19
 
@@ -6,6 +6,19 @@ description: Execute a single task with dependency validation and status managem
6
6
 
7
7
  You are responsible for executing a single task within a plan while maintaining strict dependency validation and proper status management. Your role is to ensure the task is ready for execution, deploy the appropriate agent, and track execution progress.
8
8
 
9
+ ## Assistant Configuration
10
+
11
+ Before proceeding with this command, you MUST load and respect the assistant's configuration:
12
+
13
+ Load the following configuration files in order of precedence (later files override earlier ones):
14
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
15
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
16
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
17
+
18
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
19
+
20
+ ---
21
+
9
22
  Use your internal Todo task tool to track the execution of all parts of the task, and the final update of noteworthy items during execution. Example:
10
23
 
11
24
  - [ ] Validate task: file, status, and dependencies.
@@ -2,6 +2,19 @@
2
2
  argument-hint: "[testCommand]"
3
3
  description: Fix the tests your task execution broke.
4
4
  ---
5
+ ## Assistant Configuration
6
+
7
+ Before proceeding with this command, you MUST load and respect the assistant's configuration:
8
+
9
+ Load the following configuration files in order of precedence (later files override earlier ones):
10
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
11
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
12
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
13
+
14
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
15
+
16
+ ---
17
+
5
18
  Fix all failing tests in this repository. Think harder and use tools.
6
19
 
7
20
  Execute this command to run the tests:
@@ -10,13 +10,12 @@ You are a workflow composition assistant. Your role is to execute the complete t
10
10
 
11
11
  Before proceeding with this command, you MUST load and respect the assistant's configuration:
12
12
 
13
- **Run the following scripts:**
14
- ```bash
15
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
16
- node .ai/task-manager/config/scripts/read-assistant-config.cjs "$assistant"
17
- ```
13
+ Load the following configuration files in order of precedence (later files override earlier ones):
14
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
15
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
16
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
18
17
 
19
- The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
18
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
20
19
 
21
20
  ---
22
21
 
@@ -9,13 +9,12 @@ description: Generate tasks to implement the plan with the provided ID.
9
9
 
10
10
  Before proceeding with this command, you MUST load and respect the assistant's configuration:
11
11
 
12
- **Run the following scripts:**
13
- ```bash
14
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
15
- node .ai/task-manager/config/scripts/read-assistant-config.cjs "$assistant"
16
- ```
12
+ Load the following configuration files in order of precedence (later files override earlier ones):
13
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
14
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
15
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
17
16
 
18
- The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
17
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
19
18
 
20
19
  ---
21
20
 
@@ -13,13 +13,12 @@ user, and update the plan with the refinements. Use the plan-creator sub-agent f
13
13
 
14
14
  Before proceeding with this command, you MUST load and respect the assistant's configuration:
15
15
 
16
- **Run the following scripts:**
17
- ```bash
18
- assistant=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
19
- node .ai/task-manager/config/scripts/read-assistant-config.cjs "$assistant"
20
- ```
16
+ Load the following configuration files in order of precedence (later files override earlier ones):
17
+ 1. `/workspace/AGENTS.md` - Project-level task management guidance
18
+ 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
19
+ 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
21
20
 
22
- The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
21
+ These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
23
22
 
24
23
  ---
25
24
 
@@ -1,67 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
-
6
- /**
7
- * Detect the currently running AI assistant based on environment variables and directory presence
8
- * @returns {string} Assistant identifier: 'claude', 'gemini', 'opencode', 'cursor', or 'unknown'
9
- */
10
- function detectAssistant() {
11
- // 1. Check environment variables (highest priority)
12
- if (process.env.CLAUDECODE) {
13
- return 'claude';
14
- }
15
-
16
- if (process.env.GEMINI_CODE) {
17
- return 'gemini';
18
- }
19
-
20
- if (process.env.OPENCODE) {
21
- return 'opencode';
22
- }
23
-
24
- if (process.env.CURSOR) {
25
- return 'cursor';
26
- }
27
-
28
- // 2. Check directory presence (fallback)
29
- const cwd = process.cwd();
30
-
31
- const assistantDirs = [
32
- { name: 'claude', dir: '.claude' },
33
- { name: 'gemini', dir: '.gemini' },
34
- { name: 'opencode', dir: '.opencode' },
35
- { name: 'cursor', dir: '.cursor' }
36
- ];
37
-
38
- for (const { name, dir } of assistantDirs) {
39
- const dirPath = path.join(cwd, dir);
40
-
41
- try {
42
- if (fs.existsSync(dirPath)) {
43
- const stats = fs.statSync(dirPath);
44
- if (stats.isDirectory()) {
45
- return name;
46
- }
47
- }
48
- } catch (err) {
49
- // Handle filesystem errors gracefully (e.g., permission issues)
50
- continue;
51
- }
52
- }
53
-
54
- // 3. Default: unknown
55
- return 'unknown';
56
- }
57
-
58
- // Main execution with error handling
59
- try {
60
- const assistant = detectAssistant();
61
- console.log(assistant);
62
- process.exit(0);
63
- } catch (error) {
64
- // Graceful degradation: output 'unknown' even on error
65
- console.log('unknown');
66
- process.exit(0);
67
- }
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const os = require('os');
6
-
7
- // Configuration path mapping
8
- const CONFIG_PATHS = {
9
- claude: {
10
- global: [path.join(os.homedir(), '.claude', 'CLAUDE.md')],
11
- project: ['AGENTS.md', 'CLAUDE.md']
12
- },
13
- gemini: {
14
- global: [path.join(os.homedir(), '.gemini', 'GEMINI.md')],
15
- project: ['.gemini/styleguide.md']
16
- },
17
- opencode: {
18
- global: [path.join(os.homedir(), '.opencode', 'OPENCODE.md')],
19
- project: ['AGENTS.md', 'OPENCODE.md']
20
- },
21
- cursor: {
22
- global: [path.join(os.homedir(), '.cursor', 'rules', 'index.mdc')],
23
- project: ['.cursor/index.mdc']
24
- }
25
- };
26
-
27
- function readConfigFile(filePath) {
28
- try {
29
- if (fs.existsSync(filePath)) {
30
- const content = fs.readFileSync(filePath, 'utf-8');
31
- return content.trim();
32
- }
33
- return null;
34
- } catch (error) {
35
- return null;
36
- }
37
- }
38
-
39
- function readAssistantConfig(assistant) {
40
- const configs = CONFIG_PATHS[assistant];
41
-
42
- if (!configs) {
43
- return '';
44
- }
45
-
46
- const output = [];
47
-
48
- // Read global configs
49
- let globalContent = null;
50
- for (const globalPath of configs.global) {
51
- const content = readConfigFile(globalPath);
52
- if (content) {
53
- globalContent = content;
54
- break; // Use first found
55
- }
56
- }
57
-
58
- if (globalContent) {
59
- output.push('## Global Assistant Configuration\n');
60
- output.push(globalContent);
61
- output.push('\n');
62
- }
63
-
64
- // Read project configs
65
- let projectContent = null;
66
- for (const projectPath of configs.project) {
67
- const fullPath = path.join(process.cwd(), projectPath);
68
- const content = readConfigFile(fullPath);
69
- if (content) {
70
- projectContent = content;
71
- break; // Use first found
72
- }
73
- }
74
-
75
- if (projectContent) {
76
- output.push('## Project-Level Configuration\n');
77
- output.push(projectContent);
78
- output.push('\n');
79
- }
80
-
81
- return output.join('\n');
82
- }
83
-
84
- // Main execution
85
- const assistant = process.argv[2];
86
-
87
- if (!assistant) {
88
- process.exit(0); // Silent exit for graceful degradation
89
- }
90
-
91
- try {
92
- const config = readAssistantConfig(assistant);
93
- if (config) {
94
- console.log(config);
95
- }
96
- process.exit(0);
97
- } catch (error) {
98
- process.exit(0); // Graceful degradation
99
- }