agent/pkg/lib/task/code/refactor.md
Snider 53482cb0c8 feat: workspace templates via Extract — Gosod pattern for agent dispatch
- 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>
2026-03-18 14:03:06 +00:00

314 B

Refactor Task

Restructure code for clarity without changing behaviour.

Process

  1. Identify the refactor target (function, package, pattern)
  2. Write tests that lock current behaviour FIRST
  3. Apply refactor in small steps, testing after each
  4. Verify: same tests pass, same API surface, cleaner internals