feat(migration): implement workspace layout migration and testing

- Added `migrate-layout.ts` to handle migration from old workspace layouts to the new `devclaw/` structure.
- Introduced `migrate-layout.test.ts` for comprehensive tests covering various migration scenarios.
- Updated `workspace.ts` to ensure default files are created post-migration, including `workflow.yaml` and role-specific prompts.
- Refactored role instruction handling to accommodate new directory structure.
- Enhanced project registration to scaffold prompt files in the new `devclaw/projects/<project>/prompts/` directory.
- Adjusted setup tool descriptions and logic to reflect changes in file structure.
- Updated templates to align with the new workflow configuration and role instructions.
This commit is contained in:
Lauren ten Hoor
2026-02-15 20:19:09 +08:00
parent 89245f8ffa
commit a359ffed34
25 changed files with 1035 additions and 207 deletions

View File

@@ -1,13 +1,13 @@
/**
* config/types.ts — Types for the unified DevClaw configuration.
*
* A single config.yaml combines roles, models, and workflow.
* A single workflow.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.
* Role override in workflow.yaml. All fields optional — only override what you need.
* Set to `false` to disable a role entirely for a project.
*/
export type RoleOverride = {
@@ -19,7 +19,7 @@ export type RoleOverride = {
};
/**
* The full config.yaml shape.
* The full workflow.yaml shape.
* All fields optional — missing fields inherit from the layer below.
*/
export type DevClawConfig = {