refactor: migrate role handling from tiers to roles module
- Removed the deprecated tiers.ts file and migrated all related functionality to roles/index.js. - Updated tests and tools to reflect the new role structure, replacing references to "dev", "qa", and "architect" with "developer", "tester", and "architect". - Adjusted workflow configurations and state management to accommodate the new role naming conventions. - Enhanced project registration and health check tools to support dynamic role handling. - Updated task creation, update, and completion processes to align with the new role definitions. - Improved documentation and comments to clarify role responsibilities and usage.
This commit is contained in:
49
lib/config/types.ts
Normal file
49
lib/config/types.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* config/types.ts — Types for the unified DevClaw configuration.
|
||||
*
|
||||
* A single config.yaml combines roles, models, and workflow.
|
||||
* Three-layer resolution: built-in → workspace → per-project.
|
||||
*/
|
||||
import type { WorkflowConfig } from "../workflow.js";
|
||||
|
||||
/**
|
||||
* Role override in config.yaml. All fields optional — only override what you need.
|
||||
* Set to `false` to disable a role entirely for a project.
|
||||
*/
|
||||
export type RoleOverride = {
|
||||
levels?: string[];
|
||||
defaultLevel?: string;
|
||||
models?: Record<string, string>;
|
||||
emoji?: Record<string, string>;
|
||||
completionResults?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
* The full config.yaml shape.
|
||||
* All fields optional — missing fields inherit from the layer below.
|
||||
*/
|
||||
export type DevClawConfig = {
|
||||
roles?: Record<string, RoleOverride | false>;
|
||||
workflow?: Partial<WorkflowConfig>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fully resolved config — all fields guaranteed present.
|
||||
* Built by merging three layers over the built-in defaults.
|
||||
*/
|
||||
export type ResolvedConfig = {
|
||||
roles: Record<string, ResolvedRoleConfig>;
|
||||
workflow: WorkflowConfig;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fully resolved role config — all fields present.
|
||||
*/
|
||||
export type ResolvedRoleConfig = {
|
||||
levels: string[];
|
||||
defaultLevel: string;
|
||||
models: Record<string, string>;
|
||||
emoji: Record<string, string>;
|
||||
completionResults: string[];
|
||||
enabled: boolean;
|
||||
};
|
||||
Reference in New Issue
Block a user