Skip to content

Agent Legacy Specialist

Oak Dev-inter edited this page Apr 23, 2026 · 1 revision

Agent: legacy-specialist

Navigate and modify legacy codebases (ZF1, old Rails, Vue 2, PHP 5.x, no-test code) without breaking them.

When to invoke

  • Project uses ancient framework (Zend Framework 1, CodeIgniter, Rails 3, Vue 2)
  • PHP 5.x / 7.x codebase with mixed conventions
  • No test suite exists and SOTA tools keep hallucinating modern syntax
  • Template engine is Smarty / ERB / custom
  • Non-English comments or mixed conventions in source
  • Main agent or Agent-Code-Reviewer suggests "modernize" β€” route here instead to preserve legacy style

What it does

  • Detects exact versions from composer.json / package.json and framework fingerprints
  • Reads surrounding files to learn custom helpers (__get, __call, autoloaders), template engine, and error-handling pattern
  • Copies existing patterns instead of inventing new ones
  • Matches legacy style even when ugly (raw SQL via Zend_Db, manual escaping, !important + scoped class)
  • Checks php -v / runtime version before using any newer syntax

What it will NOT do

  • Suggest framework upgrade unless explicitly asked
  • Introduce modern syntax (arrow functions, type hints, async/await) in codebases that don't use it
  • Pull patterns from StackOverflow over in-project source
  • Swap the ORM or templating engine as a drive-by

Inputs expected

  • Target file or module
  • Task: patch / feature add / bug fix within legacy scope
  • Any known version pins or framework quirks

Outputs

Patch with stack context header:

Detected: <framework + runtime + UI lib>
Convention: <error handling, query style, escaping>
Patch: <code matching existing style>

Tier behavior

No tier pinning in spec. Typically Sonnet; escalate to Opus when legacy quirks span many files.

Anti-patterns

  • ❌ "Let's use Eloquent ORM" on a ZF1 project
  • ❌ Arrow functions in a PHP 5.x project
  • ❌ Type hints in a codebase that doesn't use them
  • ❌ async/await in a callback-style codebase

Since

Introduced pre-v0.9.1 (early release). Kasidit's differentiator vs SOTA tools.

See also

Kasidit

Core

Version History

Concepts

Commands

Agents

Deprecated v0.10 (stubs β†’ audit-specialist --focus=..., removed in v0.11)

Clone this wiki locally