chore: run format

This commit is contained in:
Ralph Khreish
2025-10-07 18:49:39 +02:00
parent 8857417870
commit 2dbfaa0d3b
6 changed files with 90 additions and 76 deletions

View File

@@ -1,44 +1,44 @@
{
"models": {
"main": {
"provider": "claude-code",
"modelId": "sonnet",
"maxTokens": 64000,
"temperature": 0.2
},
"research": {
"provider": "perplexity",
"modelId": "sonar",
"maxTokens": 8700,
"temperature": 0.1
},
"fallback": {
"provider": "anthropic",
"modelId": "claude-3-7-sonnet-20250219",
"maxTokens": 120000,
"temperature": 0.2
}
},
"global": {
"logLevel": "info",
"debug": false,
"defaultNumTasks": 10,
"defaultSubtasks": 5,
"defaultPriority": "medium",
"projectName": "Taskmaster",
"ollamaBaseURL": "http://localhost:11434/api",
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
"responseLanguage": "English",
"enableCodebaseAnalysis": true,
"userId": "1234567890",
"azureBaseURL": "https://your-endpoint.azure.com/",
"defaultTag": "master"
},
"claudeCode": {},
"codexCli": {},
"grokCli": {
"timeout": 120000,
"workingDirectory": null,
"defaultModel": "grok-4-latest"
}
}
"models": {
"main": {
"provider": "claude-code",
"modelId": "sonnet",
"maxTokens": 64000,
"temperature": 0.2
},
"research": {
"provider": "perplexity",
"modelId": "sonar",
"maxTokens": 8700,
"temperature": 0.1
},
"fallback": {
"provider": "anthropic",
"modelId": "claude-3-7-sonnet-20250219",
"maxTokens": 120000,
"temperature": 0.2
}
},
"global": {
"logLevel": "info",
"debug": false,
"defaultNumTasks": 10,
"defaultSubtasks": 5,
"defaultPriority": "medium",
"projectName": "Taskmaster",
"ollamaBaseURL": "http://localhost:11434/api",
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
"responseLanguage": "English",
"enableCodebaseAnalysis": true,
"userId": "1234567890",
"azureBaseURL": "https://your-endpoint.azure.com/",
"defaultTag": "master"
},
"claudeCode": {},
"codexCli": {},
"grokCli": {
"timeout": 120000,
"workingDirectory": null,
"defaultModel": "grok-4-latest"
}
}

View File

@@ -194,4 +194,4 @@
"reasoning": "Low complexity involving documentation writing, example creation, and demo material production. The main challenge is ensuring accuracy and completeness rather than technical implementation."
}
]
}
}

View File

@@ -90,4 +90,4 @@
"reasoning": "High complexity due to comprehensive error scenarios. Each component (preflight, task loading, dependency resolution) has multiple failure modes that need proper handling. Providing helpful error messages and recovery suggestions adds complexity."
}
]
}
}

View File

@@ -1,9 +1,9 @@
{
"currentTag": "tdd-workflow-phase-0",
"lastSwitched": "2025-10-07T14:11:48.167Z",
"branchTagMapping": {
"v017-adds": "v017-adds",
"next": "next"
},
"migrationNoticeShown": true
}
"currentTag": "tdd-workflow-phase-0",
"lastSwitched": "2025-10-07T14:11:48.167Z",
"branchTagMapping": {
"v017-adds": "v017-adds",
"next": "next"
},
"migrationNoticeShown": true
}

View File

@@ -8,10 +8,7 @@ import { Command } from 'commander';
import chalk from 'chalk';
import boxen from 'boxen';
import ora, { type Ora } from 'ora';
import {
createTaskMasterCore,
type TaskMasterCore
} from '@tm/core';
import { createTaskMasterCore, type TaskMasterCore } from '@tm/core';
import * as ui from '../utils/ui.js';
/**
@@ -56,11 +53,9 @@ export class AutopilotCommand extends Command {
'--dry-run',
'Show what would be executed without performing actions'
)
.action(
async (taskId: string, options: AutopilotCommandOptions) => {
await this.executeCommand(taskId, options);
}
);
.action(async (taskId: string, options: AutopilotCommandOptions) => {
await this.executeCommand(taskId, options);
});
}
/**
@@ -112,7 +107,6 @@ export class AutopilotCommand extends Command {
// Display results
this.displayResults(result, options);
} catch (error: any) {
if (spinner) {
spinner.fail('Operation failed');
@@ -210,7 +204,9 @@ export class AutopilotCommand extends Command {
// Run preflight checks
console.log();
console.log(chalk.cyan.bold('Running preflight checks...'));
const preflightChecker = new PreflightChecker(options.project || process.cwd());
const preflightChecker = new PreflightChecker(
options.project || process.cwd()
);
const preflightResult = await preflightChecker.runAllChecks();
// Display preflight results
@@ -244,7 +240,9 @@ export class AutopilotCommand extends Command {
}
// Get execution order
const orderedSubtasks = taskLoader.getExecutionOrder(validationResult.task!);
const orderedSubtasks = taskLoader.getExecutionOrder(
validationResult.task!
);
await taskLoader.cleanup();
@@ -254,26 +252,40 @@ export class AutopilotCommand extends Command {
console.log();
console.log(chalk.cyan.bold('Execution Plan:'));
console.log(chalk.white(`Task: ${validationResult.task!.title}`));
console.log(chalk.gray(`${orderedSubtasks.length} subtasks will be executed in dependency order`));
console.log(
chalk.gray(
`${orderedSubtasks.length} subtasks will be executed in dependency order`
)
);
console.log();
// Display subtasks
orderedSubtasks.forEach((subtask, index) => {
console.log(chalk.yellow(`${index + 1}. ${validationResult.task!.id}.${subtask.id}: ${subtask.title}`));
console.log(
chalk.yellow(
`${index + 1}. ${validationResult.task!.id}.${subtask.id}: ${subtask.title}`
)
);
if (subtask.dependencies && subtask.dependencies.length > 0) {
console.log(chalk.gray(` Dependencies: ${subtask.dependencies.join(', ')}`));
console.log(
chalk.gray(` Dependencies: ${subtask.dependencies.join(', ')}`)
);
}
});
console.log();
console.log(chalk.cyan('Autopilot would execute each subtask using TDD workflow:'));
console.log(
chalk.cyan('Autopilot would execute each subtask using TDD workflow:')
);
console.log(chalk.gray(' 1. RED phase: Write failing test'));
console.log(chalk.gray(' 2. GREEN phase: Implement code to pass test'));
console.log(chalk.gray(' 3. COMMIT phase: Commit changes'));
console.log();
if (options.dryRun) {
console.log(chalk.yellow('This was a dry run. Use without --dry-run to execute.'));
console.log(
chalk.yellow('This was a dry run. Use without --dry-run to execute.')
);
}
return {
@@ -297,9 +309,11 @@ export class AutopilotCommand extends Command {
{ name: 'Default branch', result: result.defaultBranch }
];
checks.forEach(check => {
checks.forEach((check) => {
const icon = check.result.success ? chalk.green('✓') : chalk.red('✗');
const status = check.result.success ? chalk.green('PASS') : chalk.red('FAIL');
const status = check.result.success
? chalk.green('PASS')
: chalk.red('FAIL');
console.log(`${icon} ${chalk.white(check.name)}: ${status}`);
if (check.result.message) {
console.log(chalk.gray(` ${check.result.message}`));

View File

@@ -233,9 +233,7 @@ export class TaskLoaderService {
*/
private validateDependencies(task: Task): TaskValidationResult {
const issues: DependencyIssue[] = [];
const subtaskIds = new Set(
task.subtasks.map((st) => String(st.id))
);
const subtaskIds = new Set(task.subtasks.map((st) => String(st.id)));
for (const subtask of task.subtasks) {
const subtaskId = `${task.id}.${subtask.id}`;
@@ -284,7 +282,9 @@ export class TaskLoaderService {
errorMessage: `Task "${task.title}" has dependency issues`,
suggestion:
'Fix dependency issues manually or re-expand the task:\n' +
issues.map((issue) => ` - ${issue.subtaskId}: ${issue.message}`).join('\n'),
issues
.map((issue) => ` - ${issue.subtaskId}: ${issue.message}`)
.join('\n'),
dependencyIssues: issues
};
}