Enhance workflow commands and context management

- Updated `plan.md` to include new fields in context-package.json: prioritized_context, user_intent, priority_tiers, dependency_order, and sorting_rationale.
- Added validation for the existence of the prioritized_context field in context-package.json.
- Modified user decision flow in task generation to present action choices after planning completion.
- Improved context-gathering process in `context-gather.md` to integrate user intent and prioritize context based on user goals.
- Revised conflict-resolution documentation to require planning notes records after conflict analysis.
- Streamlined task generation in `task-generate-agent.md` to utilize pre-sorted context without redundant sorting.
- Removed unused settings persistence functions and corresponding tests from `claude-cli-tools.ts` and `settings-persistence.test.ts`.
This commit is contained in:
catlog22
2026-01-28 00:02:45 +08:00
parent 9989cfcf21
commit b3c47294e7
8 changed files with 744 additions and 1176 deletions

View File

@@ -733,66 +733,6 @@ export function getPromptFormat(projectDir: string): 'plain' | 'yaml' | 'json' {
}
}
/**
* Update default model setting
* @param projectDir - Project directory path
* @param model - Default model name
* @returns Updated settings config
*/
export function setDefaultModel(
projectDir: string,
model: string
): ClaudeCliSettingsConfig {
const settings = loadClaudeCliSettings(projectDir);
settings.defaultModel = model;
saveClaudeCliSettings(projectDir, settings);
return settings;
}
/**
* Get default model setting
* @param projectDir - Project directory path
* @returns Current default model or undefined if not set
*/
export function getDefaultModel(projectDir: string): string | undefined {
try {
const settings = loadClaudeCliSettings(projectDir);
return settings.defaultModel;
} catch {
return undefined;
}
}
/**
* Update auto-sync enabled setting
* @param projectDir - Project directory path
* @param enabled - Whether auto-sync is enabled
* @returns Updated settings config
*/
export function setAutoSyncEnabled(
projectDir: string,
enabled: boolean
): ClaudeCliSettingsConfig {
const settings = loadClaudeCliSettings(projectDir);
settings.autoSyncEnabled = enabled;
saveClaudeCliSettings(projectDir, settings);
return settings;
}
/**
* Get auto-sync enabled setting
* @param projectDir - Project directory path
* @returns Current auto-sync status or undefined if not set
*/
export function getAutoSyncEnabled(projectDir: string): boolean | undefined {
try {
const settings = loadClaudeCliSettings(projectDir);
return settings.autoSyncEnabled;
} catch {
return undefined;
}
}
/**
* Update smart context enabled setting
* @param projectDir - Project directory path