Skip to content

Commit 3eb050a

Browse files
Batch fixes before release (#1011)
* fix: improve projectRoot * fix: improve task-master lang command * feat: add documentation to the readme so more people can access it * fix: expand command subtask dependency validation * fix: update command more reliable with perplexity and other models * chore: fix CI * chore: implement requested changes * chore: fix CI
1 parent 5544222 commit 3eb050a

17 files changed

+146
-81
lines changed

.changeset/beige-windows-clean.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"task-master-ai": minor
3+
---
4+
5+
Created a comprehensive documentation site for Task Master AI. Visit https://docs.task-master.dev to explore guides, API references, and examples.

.changeset/blue-rocks-clean.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"task-master-ai": patch
3+
---
4+
5+
Make `task-master update` more reliable with AI responses
6+
7+
The `update` command now handles AI responses more robustly. If the AI forgets to include certain task fields, the command will automatically fill in the missing data from your original tasks instead of failing. This means smoother bulk task updates without losing important information like IDs, dependencies, or completed subtasks.

.changeset/blue-rocks-dirty.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"task-master-ai": patch
3+
---
4+
5+
Fix subtask dependency validation when expanding tasks
6+
7+
When using `task-master expand` to break down tasks into subtasks, dependencies between subtasks are now properly validated. Previously, subtasks with dependencies would fail validation. Now subtasks can correctly depend on their siblings within the same parent task.

.changeset/early-parts-throw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"task-master-ai": patch
3+
---
4+
5+
Fix `task-master lang --setup` breaking when no language is defined, now defaults to English

.changeset/two-pots-move.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"task-master-ai": minor
3+
---
4+
5+
Improve project root detection
6+
7+
- No longer creates an infinite loop when unable to detect your code workspace

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ A task management system for AI-driven development with Claude, designed to work
1414

1515
## Documentation
1616

17-
For more detailed information, check out the documentation in the `docs` directory:
17+
📚 **[View Full Documentation](https://docs.task-master.dev)**
18+
19+
For detailed guides, API references, and comprehensive examples, visit our documentation site.
20+
21+
### Quick Reference
22+
23+
The following documentation is also available in the `docs` directory:
1824

1925
- [Configuration Guide](docs/configuration.md) - Set up environment variables and customize Task Master
2026
- [Tutorial](docs/tutorial.md) - Step-by-step guide to getting started with Task Master

scripts/modules/commands.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3727,10 +3727,7 @@ Examples:
37273727
const taskMaster = initTaskMaster({});
37283728
const projectRoot = taskMaster.getProjectRoot(); // Find project root for context
37293729
const { response, setup } = options;
3730-
console.log(
3731-
chalk.blue('Response language set to:', JSON.stringify(options))
3732-
);
3733-
let responseLanguage = response || 'English';
3730+
let responseLanguage = response !== undefined ? response : 'English';
37343731
if (setup) {
37353732
console.log(
37363733
chalk.blue('Starting interactive response language setup...')
@@ -3772,6 +3769,7 @@ Examples:
37723769
`❌ Error setting response language: ${result.error.message}`
37733770
)
37743771
);
3772+
process.exit(1);
37753773
}
37763774
});
37773775

scripts/modules/task-manager/expand-task.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ const subtaskSchema = z
4040
.min(10)
4141
.describe('Detailed description of the subtask'),
4242
dependencies: z
43-
.array(z.number().int())
44-
.describe('IDs of prerequisite subtasks within this expansion'),
43+
.array(z.string())
44+
.describe(
45+
'Array of subtask dependencies within the same parent task. Use format ["parentTaskId.1", "parentTaskId.2"]. Subtasks can only depend on siblings, not external tasks.'
46+
),
4547
details: z.string().min(20).describe('Implementation details and guidance'),
4648
status: z
4749
.string()
@@ -235,12 +237,10 @@ function parseSubtasksFromText(
235237
...rawSubtask,
236238
id: currentId,
237239
dependencies: Array.isArray(rawSubtask.dependencies)
238-
? rawSubtask.dependencies
239-
.map((dep) => (typeof dep === 'string' ? parseInt(dep, 10) : dep))
240-
.filter(
241-
(depId) =>
242-
!Number.isNaN(depId) && depId >= startId && depId < currentId
243-
)
240+
? rawSubtask.dependencies.filter(
241+
(dep) =>
242+
typeof dep === 'string' && dep.startsWith(`${parentTaskId}.`)
243+
)
244244
: [],
245245
status: 'pending'
246246
};

scripts/modules/task-manager/models.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import { findConfigPath } from '../../../src/utils/path-utils.js';
2525
import { log } from '../utils.js';
2626
import { CUSTOM_PROVIDERS } from '../../../src/constants/providers.js';
2727

28+
// Constants
29+
const CONFIG_MISSING_ERROR =
30+
'The configuration file is missing. Run "task-master init" to create it.';
31+
2832
/**
2933
* Fetches the list of models from OpenRouter API.
3034
* @returns {Promise<Array|null>} A promise that resolves with the list of model IDs or null if fetch fails.
@@ -168,9 +172,7 @@ async function getModelConfiguration(options = {}) {
168172
);
169173

170174
if (!configExists) {
171-
throw new Error(
172-
'The configuration file is missing. Run "task-master models --setup" to create it.'
173-
);
175+
throw new Error(CONFIG_MISSING_ERROR);
174176
}
175177

176178
try {
@@ -298,9 +300,7 @@ async function getAvailableModelsList(options = {}) {
298300
);
299301

300302
if (!configExists) {
301-
throw new Error(
302-
'The configuration file is missing. Run "task-master models --setup" to create it.'
303-
);
303+
throw new Error(CONFIG_MISSING_ERROR);
304304
}
305305

306306
try {
@@ -391,9 +391,7 @@ async function setModel(role, modelId, options = {}) {
391391
);
392392

393393
if (!configExists) {
394-
throw new Error(
395-
'The configuration file is missing. Run "task-master models --setup" to create it.'
396-
);
394+
throw new Error(CONFIG_MISSING_ERROR);
397395
}
398396

399397
// Validate role

scripts/modules/task-manager/parse-prd.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
import { generateObjectService } from '../ai-services-unified.js';
2020
import { getDebugFlag } from '../config-manager.js';
2121
import { getPromptManager } from '../prompt-manager.js';
22-
import generateTaskFiles from './generate-task-files.js';
2322
import { displayAiUsageSummary } from '../ui.js';
2423

2524
// Define the Zod schema for a SINGLE task object

0 commit comments

Comments
 (0)