- Move pkg/prompts/lib → pkg/lib (prompt, task, flow, persona, workspace) - New lib.go: unified package with ExtractWorkspace() using text/template - Workspace templates: default, security, review — .tmpl files with data injection - prep.go: uses lib.ExtractWorkspace() + detect helpers for language/build/test - prompts.go: thin re-export wrapper for backwards compat Co-Authored-By: Virgil <virgil@lethean.io>
314 B
314 B
Refactor Task
Restructure code for clarity without changing behaviour.
Process
- Identify the refactor target (function, package, pattern)
- Write tests that lock current behaviour FIRST
- Apply refactor in small steps, testing after each
- Verify: same tests pass, same API surface, cleaner internals