chore: run format
This commit is contained in:
@@ -1,44 +1,44 @@
|
|||||||
{
|
{
|
||||||
"models": {
|
"models": {
|
||||||
"main": {
|
"main": {
|
||||||
"provider": "claude-code",
|
"provider": "claude-code",
|
||||||
"modelId": "sonnet",
|
"modelId": "sonnet",
|
||||||
"maxTokens": 64000,
|
"maxTokens": 64000,
|
||||||
"temperature": 0.2
|
"temperature": 0.2
|
||||||
},
|
},
|
||||||
"research": {
|
"research": {
|
||||||
"provider": "perplexity",
|
"provider": "perplexity",
|
||||||
"modelId": "sonar",
|
"modelId": "sonar",
|
||||||
"maxTokens": 8700,
|
"maxTokens": 8700,
|
||||||
"temperature": 0.1
|
"temperature": 0.1
|
||||||
},
|
},
|
||||||
"fallback": {
|
"fallback": {
|
||||||
"provider": "anthropic",
|
"provider": "anthropic",
|
||||||
"modelId": "claude-3-7-sonnet-20250219",
|
"modelId": "claude-3-7-sonnet-20250219",
|
||||||
"maxTokens": 120000,
|
"maxTokens": 120000,
|
||||||
"temperature": 0.2
|
"temperature": 0.2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"global": {
|
"global": {
|
||||||
"logLevel": "info",
|
"logLevel": "info",
|
||||||
"debug": false,
|
"debug": false,
|
||||||
"defaultNumTasks": 10,
|
"defaultNumTasks": 10,
|
||||||
"defaultSubtasks": 5,
|
"defaultSubtasks": 5,
|
||||||
"defaultPriority": "medium",
|
"defaultPriority": "medium",
|
||||||
"projectName": "Taskmaster",
|
"projectName": "Taskmaster",
|
||||||
"ollamaBaseURL": "http://localhost:11434/api",
|
"ollamaBaseURL": "http://localhost:11434/api",
|
||||||
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
|
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
|
||||||
"responseLanguage": "English",
|
"responseLanguage": "English",
|
||||||
"enableCodebaseAnalysis": true,
|
"enableCodebaseAnalysis": true,
|
||||||
"userId": "1234567890",
|
"userId": "1234567890",
|
||||||
"azureBaseURL": "https://your-endpoint.azure.com/",
|
"azureBaseURL": "https://your-endpoint.azure.com/",
|
||||||
"defaultTag": "master"
|
"defaultTag": "master"
|
||||||
},
|
},
|
||||||
"claudeCode": {},
|
"claudeCode": {},
|
||||||
"codexCli": {},
|
"codexCli": {},
|
||||||
"grokCli": {
|
"grokCli": {
|
||||||
"timeout": 120000,
|
"timeout": 120000,
|
||||||
"workingDirectory": null,
|
"workingDirectory": null,
|
||||||
"defaultModel": "grok-4-latest"
|
"defaultModel": "grok-4-latest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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."
|
"reasoning": "Low complexity involving documentation writing, example creation, and demo material production. The main challenge is ensuring accuracy and completeness rather than technical implementation."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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."
|
"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."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"currentTag": "tdd-workflow-phase-0",
|
"currentTag": "tdd-workflow-phase-0",
|
||||||
"lastSwitched": "2025-10-07T14:11:48.167Z",
|
"lastSwitched": "2025-10-07T14:11:48.167Z",
|
||||||
"branchTagMapping": {
|
"branchTagMapping": {
|
||||||
"v017-adds": "v017-adds",
|
"v017-adds": "v017-adds",
|
||||||
"next": "next"
|
"next": "next"
|
||||||
},
|
},
|
||||||
"migrationNoticeShown": true
|
"migrationNoticeShown": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ import { Command } from 'commander';
|
|||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import boxen from 'boxen';
|
import boxen from 'boxen';
|
||||||
import ora, { type Ora } from 'ora';
|
import ora, { type Ora } from 'ora';
|
||||||
import {
|
import { createTaskMasterCore, type TaskMasterCore } from '@tm/core';
|
||||||
createTaskMasterCore,
|
|
||||||
type TaskMasterCore
|
|
||||||
} from '@tm/core';
|
|
||||||
import * as ui from '../utils/ui.js';
|
import * as ui from '../utils/ui.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,11 +53,9 @@ export class AutopilotCommand extends Command {
|
|||||||
'--dry-run',
|
'--dry-run',
|
||||||
'Show what would be executed without performing actions'
|
'Show what would be executed without performing actions'
|
||||||
)
|
)
|
||||||
.action(
|
.action(async (taskId: string, options: AutopilotCommandOptions) => {
|
||||||
async (taskId: string, options: AutopilotCommandOptions) => {
|
await this.executeCommand(taskId, options);
|
||||||
await this.executeCommand(taskId, options);
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,7 +107,6 @@ export class AutopilotCommand extends Command {
|
|||||||
|
|
||||||
// Display results
|
// Display results
|
||||||
this.displayResults(result, options);
|
this.displayResults(result, options);
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (spinner) {
|
if (spinner) {
|
||||||
spinner.fail('Operation failed');
|
spinner.fail('Operation failed');
|
||||||
@@ -210,7 +204,9 @@ export class AutopilotCommand extends Command {
|
|||||||
// Run preflight checks
|
// Run preflight checks
|
||||||
console.log();
|
console.log();
|
||||||
console.log(chalk.cyan.bold('Running preflight checks...'));
|
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();
|
const preflightResult = await preflightChecker.runAllChecks();
|
||||||
|
|
||||||
// Display preflight results
|
// Display preflight results
|
||||||
@@ -244,7 +240,9 @@ export class AutopilotCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get execution order
|
// Get execution order
|
||||||
const orderedSubtasks = taskLoader.getExecutionOrder(validationResult.task!);
|
const orderedSubtasks = taskLoader.getExecutionOrder(
|
||||||
|
validationResult.task!
|
||||||
|
);
|
||||||
|
|
||||||
await taskLoader.cleanup();
|
await taskLoader.cleanup();
|
||||||
|
|
||||||
@@ -254,26 +252,40 @@ export class AutopilotCommand extends Command {
|
|||||||
console.log();
|
console.log();
|
||||||
console.log(chalk.cyan.bold('Execution Plan:'));
|
console.log(chalk.cyan.bold('Execution Plan:'));
|
||||||
console.log(chalk.white(`Task: ${validationResult.task!.title}`));
|
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();
|
console.log();
|
||||||
|
|
||||||
// Display subtasks
|
// Display subtasks
|
||||||
orderedSubtasks.forEach((subtask, index) => {
|
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) {
|
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();
|
||||||
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(' 1. RED phase: Write failing test'));
|
||||||
console.log(chalk.gray(' 2. GREEN phase: Implement code to pass test'));
|
console.log(chalk.gray(' 2. GREEN phase: Implement code to pass test'));
|
||||||
console.log(chalk.gray(' 3. COMMIT phase: Commit changes'));
|
console.log(chalk.gray(' 3. COMMIT phase: Commit changes'));
|
||||||
console.log();
|
console.log();
|
||||||
|
|
||||||
if (options.dryRun) {
|
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 {
|
return {
|
||||||
@@ -297,9 +309,11 @@ export class AutopilotCommand extends Command {
|
|||||||
{ name: 'Default branch', result: result.defaultBranch }
|
{ name: 'Default branch', result: result.defaultBranch }
|
||||||
];
|
];
|
||||||
|
|
||||||
checks.forEach(check => {
|
checks.forEach((check) => {
|
||||||
const icon = check.result.success ? chalk.green('✓') : chalk.red('✗');
|
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}`);
|
console.log(`${icon} ${chalk.white(check.name)}: ${status}`);
|
||||||
if (check.result.message) {
|
if (check.result.message) {
|
||||||
console.log(chalk.gray(` ${check.result.message}`));
|
console.log(chalk.gray(` ${check.result.message}`));
|
||||||
|
|||||||
@@ -233,9 +233,7 @@ export class TaskLoaderService {
|
|||||||
*/
|
*/
|
||||||
private validateDependencies(task: Task): TaskValidationResult {
|
private validateDependencies(task: Task): TaskValidationResult {
|
||||||
const issues: DependencyIssue[] = [];
|
const issues: DependencyIssue[] = [];
|
||||||
const subtaskIds = new Set(
|
const subtaskIds = new Set(task.subtasks.map((st) => String(st.id)));
|
||||||
task.subtasks.map((st) => String(st.id))
|
|
||||||
);
|
|
||||||
|
|
||||||
for (const subtask of task.subtasks) {
|
for (const subtask of task.subtasks) {
|
||||||
const subtaskId = `${task.id}.${subtask.id}`;
|
const subtaskId = `${task.id}.${subtask.id}`;
|
||||||
@@ -284,7 +282,9 @@ export class TaskLoaderService {
|
|||||||
errorMessage: `Task "${task.title}" has dependency issues`,
|
errorMessage: `Task "${task.title}" has dependency issues`,
|
||||||
suggestion:
|
suggestion:
|
||||||
'Fix dependency issues manually or re-expand the task:\n' +
|
'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
|
dependencyIssues: issues
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user