Compare commits
4 Commits
task-maste
...
fix/merge.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99fc67a09f | ||
|
|
b1fd0ec0c9 | ||
|
|
f662654afb | ||
|
|
a8e2d728c9 |
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Recover from `@anthropic-ai/claude-code` JSON truncation bug that caused Task Master to crash when handling large (>8 kB) structured responses. The CLI/SDK still truncates, but Task Master now detects the error, preserves buffered text, and returns a usable response instead of throwing.
|
||||
12
.changeset/claude-import-fix-new.md
Normal file
12
.changeset/claude-import-fix-new.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Prevent CLAUDE.md overwrite by using Claude Code's import feature
|
||||
|
||||
- Task Master now creates its instructions in `.taskmaster/CLAUDE.md` instead of overwriting the user's `CLAUDE.md`
|
||||
- Adds an import section to the user's CLAUDE.md that references the Task Master instructions
|
||||
- Preserves existing user content in CLAUDE.md files
|
||||
- Provides clean uninstall that only removes Task Master's additions
|
||||
|
||||
**Breaking Change**: Task Master instructions for Claude Code are now stored in `.taskmaster/CLAUDE.md` and imported into the main CLAUDE.md file. Users who previously had Task Master content directly in their CLAUDE.md will need to run `task-master rules remove claude` followed by `task-master rules add claude` to migrate to the new structure.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Updating dependency ai-sdk-provider-gemini-cli to 0.0.4 to address breaking change Google made to Gemini CLI and add better 'api-key' in addition to 'gemini-api-key' AI-SDK compatibility.
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Add support for xAI Grok 4 model
|
||||
|
||||
- Add grok-4 model to xAI provider with $3/$15 per 1M token pricing
|
||||
- Enable main, fallback, and research roles for grok-4
|
||||
- Max tokens set to 131,072 (matching other xAI models)
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"mode": "exit",
|
||||
"tag": "rc",
|
||||
"initialVersions": {
|
||||
"task-master-ai": "0.19.0"
|
||||
},
|
||||
"changesets": [
|
||||
"claude-code-json-truncation",
|
||||
"cuddly-baboons-invent",
|
||||
"grok-4-support",
|
||||
"quick-laws-cover",
|
||||
"some-lies-grin",
|
||||
"spicy-badgers-fail",
|
||||
"tender-ads-joke"
|
||||
]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Add stricter validation and clearer feedback for task priority when adding new tasks
|
||||
|
||||
- if a task priority is invalid, it will default to medium
|
||||
- made taks priority case-insensitive, essentially making HIGH and high the same value
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Add support for MCP Sampling as AI provider, requires no API key, uses the client LLM provider
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Unify and streamline profile system architecture for improved maintainability
|
||||
7
.changeset/ten-glasses-feel.md
Normal file
7
.changeset/ten-glasses-feel.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Fixed the comprehensive taskmaster system integration via custom slash commands with proper syntax
|
||||
|
||||
- Provide claude clode with a complete set of of commands that can trigger task master events directly within Claude Code
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Added Groq provider support
|
||||
@@ -1,130 +0,0 @@
|
||||
# Task Master Command Reference
|
||||
|
||||
Comprehensive command structure for Task Master integration with Claude Code.
|
||||
|
||||
## Command Organization
|
||||
|
||||
Commands are organized hierarchically to match Task Master's CLI structure while providing enhanced Claude Code integration.
|
||||
|
||||
## Project Setup & Configuration
|
||||
|
||||
### `/project:tm/init`
|
||||
- `index` - Initialize new project (handles PRD files intelligently)
|
||||
- `quick` - Quick setup with auto-confirmation (-y flag)
|
||||
|
||||
### `/project:tm/models`
|
||||
- `index` - View current AI model configuration
|
||||
- `setup` - Interactive model configuration
|
||||
- `set-main` - Set primary generation model
|
||||
- `set-research` - Set research model
|
||||
- `set-fallback` - Set fallback model
|
||||
|
||||
## Task Generation
|
||||
|
||||
### `/project:tm/parse-prd`
|
||||
- `index` - Generate tasks from PRD document
|
||||
- `with-research` - Enhanced parsing with research mode
|
||||
|
||||
### `/project:tm/generate`
|
||||
- Create individual task files from tasks.json
|
||||
|
||||
## Task Management
|
||||
|
||||
### `/project:tm/list`
|
||||
- `index` - Smart listing with natural language filters
|
||||
- `with-subtasks` - Include subtasks in hierarchical view
|
||||
- `by-status` - Filter by specific status
|
||||
|
||||
### `/project:tm/set-status`
|
||||
- `to-pending` - Reset task to pending
|
||||
- `to-in-progress` - Start working on task
|
||||
- `to-done` - Mark task complete
|
||||
- `to-review` - Submit for review
|
||||
- `to-deferred` - Defer task
|
||||
- `to-cancelled` - Cancel task
|
||||
|
||||
### `/project:tm/sync-readme`
|
||||
- Export tasks to README.md with formatting
|
||||
|
||||
### `/project:tm/update`
|
||||
- `index` - Update tasks with natural language
|
||||
- `from-id` - Update multiple tasks from a starting point
|
||||
- `single` - Update specific task
|
||||
|
||||
### `/project:tm/add-task`
|
||||
- `index` - Add new task with AI assistance
|
||||
|
||||
### `/project:tm/remove-task`
|
||||
- `index` - Remove task with confirmation
|
||||
|
||||
## Subtask Management
|
||||
|
||||
### `/project:tm/add-subtask`
|
||||
- `index` - Add new subtask to parent
|
||||
- `from-task` - Convert existing task to subtask
|
||||
|
||||
### `/project:tm/remove-subtask`
|
||||
- Remove subtask (with optional conversion)
|
||||
|
||||
### `/project:tm/clear-subtasks`
|
||||
- `index` - Clear subtasks from specific task
|
||||
- `all` - Clear all subtasks globally
|
||||
|
||||
## Task Analysis & Breakdown
|
||||
|
||||
### `/project:tm/analyze-complexity`
|
||||
- Analyze and generate expansion recommendations
|
||||
|
||||
### `/project:tm/complexity-report`
|
||||
- Display complexity analysis report
|
||||
|
||||
### `/project:tm/expand`
|
||||
- `index` - Break down specific task
|
||||
- `all` - Expand all eligible tasks
|
||||
- `with-research` - Enhanced expansion
|
||||
|
||||
## Task Navigation
|
||||
|
||||
### `/project:tm/next`
|
||||
- Intelligent next task recommendation
|
||||
|
||||
### `/project:tm/show`
|
||||
- Display detailed task information
|
||||
|
||||
### `/project:tm/status`
|
||||
- Comprehensive project dashboard
|
||||
|
||||
## Dependency Management
|
||||
|
||||
### `/project:tm/add-dependency`
|
||||
- Add task dependency
|
||||
|
||||
### `/project:tm/remove-dependency`
|
||||
- Remove task dependency
|
||||
|
||||
### `/project:tm/validate-dependencies`
|
||||
- Check for dependency issues
|
||||
|
||||
### `/project:tm/fix-dependencies`
|
||||
- Automatically fix dependency problems
|
||||
|
||||
## Usage Patterns
|
||||
|
||||
### Natural Language
|
||||
Most commands accept natural language arguments:
|
||||
```
|
||||
/project:tm/add-task create user authentication system
|
||||
/project:tm/update mark all API tasks as high priority
|
||||
/project:tm/list show blocked tasks
|
||||
```
|
||||
|
||||
### ID-Based Commands
|
||||
Commands requiring IDs intelligently parse from $ARGUMENTS:
|
||||
```
|
||||
/project:tm/show 45
|
||||
/project:tm/expand 23
|
||||
/project:tm/set-status/to-done 67
|
||||
```
|
||||
|
||||
### Smart Defaults
|
||||
Commands provide intelligent defaults and suggestions based on context.
|
||||
146
.claude/commands/tm/tm-main.md
Normal file
146
.claude/commands/tm/tm-main.md
Normal file
@@ -0,0 +1,146 @@
|
||||
# Task Master Command Reference
|
||||
|
||||
Comprehensive command structure for Task Master integration with Claude Code.
|
||||
|
||||
## Command Organization
|
||||
|
||||
Commands are organized hierarchically to match Task Master's CLI structure while providing enhanced Claude Code integration.
|
||||
|
||||
## Project Setup & Configuration
|
||||
|
||||
### `/project:tm/init`
|
||||
- `init-project` - Initialize new project (handles PRD files intelligently)
|
||||
- `init-project-quick` - Quick setup with auto-confirmation (-y flag)
|
||||
|
||||
### `/project:tm/models`
|
||||
- `view-models` - View current AI model configuration
|
||||
- `setup-models` - Interactive model configuration
|
||||
- `set-main` - Set primary generation model
|
||||
- `set-research` - Set research model
|
||||
- `set-fallback` - Set fallback model
|
||||
|
||||
## Task Generation
|
||||
|
||||
### `/project:tm/parse-prd`
|
||||
- `parse-prd` - Generate tasks from PRD document
|
||||
- `parse-prd-with-research` - Enhanced parsing with research mode
|
||||
|
||||
### `/project:tm/generate`
|
||||
- `generate-tasks` - Create individual task files from tasks.json
|
||||
|
||||
## Task Management
|
||||
|
||||
### `/project:tm/list`
|
||||
- `list-tasks` - Smart listing with natural language filters
|
||||
- `list-tasks-with-subtasks` - Include subtasks in hierarchical view
|
||||
- `list-tasks-by-status` - Filter by specific status
|
||||
|
||||
### `/project:tm/set-status`
|
||||
- `to-pending` - Reset task to pending
|
||||
- `to-in-progress` - Start working on task
|
||||
- `to-done` - Mark task complete
|
||||
- `to-review` - Submit for review
|
||||
- `to-deferred` - Defer task
|
||||
- `to-cancelled` - Cancel task
|
||||
|
||||
### `/project:tm/sync-readme`
|
||||
- `sync-readme` - Export tasks to README.md with formatting
|
||||
|
||||
### `/project:tm/update`
|
||||
- `update-task` - Update tasks with natural language
|
||||
- `update-tasks-from-id` - Update multiple tasks from a starting point
|
||||
- `update-single-task` - Update specific task
|
||||
|
||||
### `/project:tm/add-task`
|
||||
- `add-task` - Add new task with AI assistance
|
||||
|
||||
### `/project:tm/remove-task`
|
||||
- `remove-task` - Remove task with confirmation
|
||||
|
||||
## Subtask Management
|
||||
|
||||
### `/project:tm/add-subtask`
|
||||
- `add-subtask` - Add new subtask to parent
|
||||
- `convert-task-to-subtask` - Convert existing task to subtask
|
||||
|
||||
### `/project:tm/remove-subtask`
|
||||
- `remove-subtask` - Remove subtask (with optional conversion)
|
||||
|
||||
### `/project:tm/clear-subtasks`
|
||||
- `clear-subtasks` - Clear subtasks from specific task
|
||||
- `clear-all-subtasks` - Clear all subtasks globally
|
||||
|
||||
## Task Analysis & Breakdown
|
||||
|
||||
### `/project:tm/analyze-complexity`
|
||||
- `analyze-complexity` - Analyze and generate expansion recommendations
|
||||
|
||||
### `/project:tm/complexity-report`
|
||||
- `complexity-report` - Display complexity analysis report
|
||||
|
||||
### `/project:tm/expand`
|
||||
- `expand-task` - Break down specific task
|
||||
- `expand-all-tasks` - Expand all eligible tasks
|
||||
- `with-research` - Enhanced expansion
|
||||
|
||||
## Task Navigation
|
||||
|
||||
### `/project:tm/next`
|
||||
- `next-task` - Intelligent next task recommendation
|
||||
|
||||
### `/project:tm/show`
|
||||
- `show-task` - Display detailed task information
|
||||
|
||||
### `/project:tm/status`
|
||||
- `project-status` - Comprehensive project dashboard
|
||||
|
||||
## Dependency Management
|
||||
|
||||
### `/project:tm/add-dependency`
|
||||
- `add-dependency` - Add task dependency
|
||||
|
||||
### `/project:tm/remove-dependency`
|
||||
- `remove-dependency` - Remove task dependency
|
||||
|
||||
### `/project:tm/validate-dependencies`
|
||||
- `validate-dependencies` - Check for dependency issues
|
||||
|
||||
### `/project:tm/fix-dependencies`
|
||||
- `fix-dependencies` - Automatically fix dependency problems
|
||||
|
||||
## Workflows & Automation
|
||||
|
||||
### `/project:tm/workflows`
|
||||
- `smart-workflow` - Context-aware intelligent workflow execution
|
||||
- `command-pipeline` - Chain multiple commands together
|
||||
- `auto-implement-tasks` - Advanced auto-implementation with code generation
|
||||
|
||||
## Utilities
|
||||
|
||||
### `/project:tm/utils`
|
||||
- `analyze-project` - Deep project analysis and insights
|
||||
|
||||
### `/project:tm/setup`
|
||||
- `install-taskmaster` - Comprehensive installation guide
|
||||
- `quick-install-taskmaster` - One-line global installation
|
||||
|
||||
## Usage Patterns
|
||||
|
||||
### Natural Language
|
||||
Most commands accept natural language arguments:
|
||||
```
|
||||
/project:tm/add-task create user authentication system
|
||||
/project:tm/update mark all API tasks as high priority
|
||||
/project:tm/list show blocked tasks
|
||||
```
|
||||
|
||||
### ID-Based Commands
|
||||
Commands requiring IDs intelligently parse from $ARGUMENTS:
|
||||
```
|
||||
/project:tm/show 45
|
||||
/project:tm/expand 23
|
||||
/project:tm/set-status/to-done 67
|
||||
```
|
||||
|
||||
### Smart Defaults
|
||||
Commands provide intelligent defaults and suggestions based on context.
|
||||
25
CHANGELOG.md
25
CHANGELOG.md
@@ -1,5 +1,30 @@
|
||||
# task-master-ai
|
||||
|
||||
## 0.20.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#950](https://github.com/eyaltoledano/claude-task-master/pull/950) [`699e9ee`](https://github.com/eyaltoledano/claude-task-master/commit/699e9eefb5d687b256e9402d686bdd5e3a358b4a) Thanks [@ben-vargas](https://github.com/ben-vargas)! - Add support for xAI Grok 4 model
|
||||
- Add grok-4 model to xAI provider with $3/$15 per 1M token pricing
|
||||
- Enable main, fallback, and research roles for grok-4
|
||||
- Max tokens set to 131,072 (matching other xAI models)
|
||||
|
||||
- [#946](https://github.com/eyaltoledano/claude-task-master/pull/946) [`5f009a5`](https://github.com/eyaltoledano/claude-task-master/commit/5f009a5e1fc10e37be26f5135df4b7f44a9c5320) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Add stricter validation and clearer feedback for task priority when adding new tasks
|
||||
- if a task priority is invalid, it will default to medium
|
||||
- made taks priority case-insensitive, essentially making HIGH and high the same value
|
||||
|
||||
- [#863](https://github.com/eyaltoledano/claude-task-master/pull/863) [`b530657`](https://github.com/eyaltoledano/claude-task-master/commit/b53065713c8da0ae6f18eb2655397aa975004923) Thanks [@OrenMe](https://github.com/OrenMe)! - Add support for MCP Sampling as AI provider, requires no API key, uses the client LLM provider
|
||||
|
||||
- [#930](https://github.com/eyaltoledano/claude-task-master/pull/930) [`98d1c97`](https://github.com/eyaltoledano/claude-task-master/commit/98d1c974361a56ddbeb772b1272986b9d3913459) Thanks [@OmarElKadri](https://github.com/OmarElKadri)! - Added Groq provider support
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#958](https://github.com/eyaltoledano/claude-task-master/pull/958) [`6c88a4a`](https://github.com/eyaltoledano/claude-task-master/commit/6c88a4a749083e3bd2d073a9240799771774495a) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Recover from `@anthropic-ai/claude-code` JSON truncation bug that caused Task Master to crash when handling large (>8 kB) structured responses. The CLI/SDK still truncates, but Task Master now detects the error, preserves buffered text, and returns a usable response instead of throwing.
|
||||
|
||||
- [#958](https://github.com/eyaltoledano/claude-task-master/pull/958) [`3334e40`](https://github.com/eyaltoledano/claude-task-master/commit/3334e409ae659d5223bb136ae23fd22c5e219073) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Updating dependency ai-sdk-provider-gemini-cli to 0.0.4 to address breaking change Google made to Gemini CLI and add better 'api-key' in addition to 'gemini-api-key' AI-SDK compatibility.
|
||||
|
||||
- [#853](https://github.com/eyaltoledano/claude-task-master/pull/853) [`95c299d`](https://github.com/eyaltoledano/claude-task-master/commit/95c299df642bd8e6d75f8fa5110ac705bcc72edf) Thanks [@joedanz](https://github.com/joedanz)! - Unify and streamline profile system architecture for improved maintainability
|
||||
|
||||
## 0.20.0-rc.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "task-master-ai",
|
||||
"version": "0.20.0-rc.0",
|
||||
"version": "0.20.0",
|
||||
"description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
|
||||
@@ -59,6 +59,63 @@ function onAddRulesProfile(targetDir, assetsDir) {
|
||||
`[Claude] An error occurred during directory copy: ${err.message}`
|
||||
);
|
||||
}
|
||||
|
||||
// Handle CLAUDE.md import for non-destructive integration
|
||||
const sourceFile = path.join(assetsDir, 'AGENTS.md');
|
||||
const userClaudeFile = path.join(targetDir, 'CLAUDE.md');
|
||||
const taskMasterClaudeFile = path.join(targetDir, '.taskmaster', 'CLAUDE.md');
|
||||
const importLine = '@./.taskmaster/CLAUDE.md';
|
||||
const importSection = `\n## Task Master AI Instructions\n**Import Task Master's development workflow commands and guidelines, treat as if import is in the main CLAUDE.md file.**\n${importLine}`;
|
||||
|
||||
if (fs.existsSync(sourceFile)) {
|
||||
try {
|
||||
// Ensure .taskmaster directory exists
|
||||
const taskMasterDir = path.join(targetDir, '.taskmaster');
|
||||
if (!fs.existsSync(taskMasterDir)) {
|
||||
fs.mkdirSync(taskMasterDir, { recursive: true });
|
||||
}
|
||||
|
||||
// Copy Task Master instructions to .taskmaster/CLAUDE.md
|
||||
fs.copyFileSync(sourceFile, taskMasterClaudeFile);
|
||||
log(
|
||||
'debug',
|
||||
`[Claude] Created Task Master instructions at ${taskMasterClaudeFile}`
|
||||
);
|
||||
|
||||
// Handle user's CLAUDE.md
|
||||
if (fs.existsSync(userClaudeFile)) {
|
||||
// Check if import already exists
|
||||
const content = fs.readFileSync(userClaudeFile, 'utf8');
|
||||
if (!content.includes(importLine)) {
|
||||
// Append import section at the end
|
||||
const updatedContent = content.trim() + '\n' + importSection + '\n';
|
||||
fs.writeFileSync(userClaudeFile, updatedContent);
|
||||
log(
|
||||
'info',
|
||||
`[Claude] Added Task Master import to existing ${userClaudeFile}`
|
||||
);
|
||||
} else {
|
||||
log(
|
||||
'info',
|
||||
`[Claude] Task Master import already present in ${userClaudeFile}`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// Create minimal CLAUDE.md with the import section
|
||||
const minimalContent = `# Claude Code Instructions\n${importSection}\n`;
|
||||
fs.writeFileSync(userClaudeFile, minimalContent);
|
||||
log(
|
||||
'info',
|
||||
`[Claude] Created ${userClaudeFile} with Task Master import`
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
log(
|
||||
'error',
|
||||
`[Claude] Failed to set up Claude instructions: ${err.message}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onRemoveRulesProfile(targetDir) {
|
||||
@@ -67,6 +124,77 @@ function onRemoveRulesProfile(targetDir) {
|
||||
if (removeDirectoryRecursive(claudeDir)) {
|
||||
log('debug', `[Claude] Removed .claude directory from ${claudeDir}`);
|
||||
}
|
||||
|
||||
// Clean up CLAUDE.md import
|
||||
const userClaudeFile = path.join(targetDir, 'CLAUDE.md');
|
||||
const taskMasterClaudeFile = path.join(targetDir, '.taskmaster', 'CLAUDE.md');
|
||||
const importLine = '@./.taskmaster/CLAUDE.md';
|
||||
|
||||
try {
|
||||
// Remove Task Master CLAUDE.md from .taskmaster
|
||||
if (fs.existsSync(taskMasterClaudeFile)) {
|
||||
fs.rmSync(taskMasterClaudeFile, { force: true });
|
||||
log('debug', `[Claude] Removed ${taskMasterClaudeFile}`);
|
||||
}
|
||||
|
||||
// Clean up import from user's CLAUDE.md
|
||||
if (fs.existsSync(userClaudeFile)) {
|
||||
const content = fs.readFileSync(userClaudeFile, 'utf8');
|
||||
const lines = content.split('\n');
|
||||
const filteredLines = [];
|
||||
let skipNextLines = 0;
|
||||
|
||||
// Remove the Task Master section
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
if (skipNextLines > 0) {
|
||||
skipNextLines--;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if this is the start of our Task Master section
|
||||
if (lines[i].includes('## Task Master AI Instructions')) {
|
||||
// Skip this line and the next two lines (bold text and import)
|
||||
skipNextLines = 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Also remove standalone import lines (for backward compatibility)
|
||||
if (lines[i].trim() === importLine) {
|
||||
continue;
|
||||
}
|
||||
|
||||
filteredLines.push(lines[i]);
|
||||
}
|
||||
|
||||
// Join back and clean up excessive newlines
|
||||
let updatedContent = filteredLines
|
||||
.join('\n')
|
||||
.replace(/\n{3,}/g, '\n\n')
|
||||
.trim();
|
||||
|
||||
// Check if file only contained our minimal template
|
||||
if (
|
||||
updatedContent === '# Claude Code Instructions' ||
|
||||
updatedContent === ''
|
||||
) {
|
||||
// File only contained our import, remove it
|
||||
fs.rmSync(userClaudeFile, { force: true });
|
||||
log('debug', `[Claude] Removed empty ${userClaudeFile}`);
|
||||
} else {
|
||||
// Write back without the import
|
||||
fs.writeFileSync(userClaudeFile, updatedContent + '\n');
|
||||
log(
|
||||
'debug',
|
||||
`[Claude] Removed Task Master import from ${userClaudeFile}`
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
log(
|
||||
'error',
|
||||
`[Claude] Failed to remove Claude instructions: ${err.message}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function onPostConvertRulesProfile(targetDir, assetsDir) {
|
||||
@@ -86,7 +214,7 @@ export const claudeProfile = createProfile({
|
||||
mcpConfigName: null,
|
||||
includeDefaultRules: false,
|
||||
fileMap: {
|
||||
'AGENTS.md': 'CLAUDE.md'
|
||||
'AGENTS.md': '.taskmaster/CLAUDE.md'
|
||||
},
|
||||
onAdd: onAddRulesProfile,
|
||||
onRemove: onRemoveRulesProfile,
|
||||
|
||||
@@ -23,7 +23,9 @@ describe('Claude Profile Initialization Functionality', () => {
|
||||
expect(claudeProfileContent).toContain("rulesDir: '.'"); // non-default
|
||||
expect(claudeProfileContent).toContain('mcpConfig: false'); // non-default
|
||||
expect(claudeProfileContent).toContain('includeDefaultRules: false'); // non-default
|
||||
expect(claudeProfileContent).toContain("'AGENTS.md': 'CLAUDE.md'");
|
||||
expect(claudeProfileContent).toContain(
|
||||
"'AGENTS.md': '.taskmaster/CLAUDE.md'"
|
||||
);
|
||||
|
||||
// Check the final computed properties on the profile object
|
||||
expect(claudeProfile.profileName).toBe('claude');
|
||||
@@ -33,7 +35,7 @@ describe('Claude Profile Initialization Functionality', () => {
|
||||
expect(claudeProfile.mcpConfig).toBe(false);
|
||||
expect(claudeProfile.mcpConfigName).toBe(null); // computed
|
||||
expect(claudeProfile.includeDefaultRules).toBe(false);
|
||||
expect(claudeProfile.fileMap['AGENTS.md']).toBe('CLAUDE.md');
|
||||
expect(claudeProfile.fileMap['AGENTS.md']).toBe('.taskmaster/CLAUDE.md');
|
||||
});
|
||||
|
||||
test('claude.js has lifecycle functions for file management', () => {
|
||||
@@ -44,9 +46,11 @@ describe('Claude Profile Initialization Functionality', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('claude.js handles .claude directory in lifecycle functions', () => {
|
||||
test('claude.js handles .claude directory and .taskmaster/CLAUDE.md import in lifecycle functions', () => {
|
||||
expect(claudeProfileContent).toContain('.claude');
|
||||
expect(claudeProfileContent).toContain('copyRecursiveSync');
|
||||
expect(claudeProfileContent).toContain('.taskmaster/CLAUDE.md');
|
||||
expect(claudeProfileContent).toContain('@./.taskmaster/CLAUDE.md');
|
||||
});
|
||||
|
||||
test('claude.js has proper error handling in lifecycle functions', () => {
|
||||
|
||||
Reference in New Issue
Block a user