orchestrata_ultimate.refactor
Reference › orchestrata_ultimate › refactor
Tool-calling refactor capability.
The refactor package holds two separate capabilities. At its top level is the SPEC-103 tool-calling refactor agent: agent runs an observe, mutate, verify loop in which a language model edits an existing codebase through the sandboxed functions in tools. The orchestrator's intent_broker routes refactor intents to it, and the scripts.refactor script is its command-line entry. The facade exposes refactor, arefactor, RefactorResult, RefactorTools and TOOL_SCHEMAS.
The two subpackages hold the larger part of the code (50 modules in all). codemod is the SPEC-110 codemod engine: a workspace that loads source files, builds a code intelligence graph, runs transformation passes and review checks, and commits edits transactionally, with a daemon, client and server, analysis passes, observability and persistence. ctok is a lossless tokenizer layer for Python source with an edit buffer and node index.
Control flows from the caller to arefactor for the agent, and to CodemodWorkspace for the engine. Start with agent for the simple path and the codemod index for the engine. The refactor package narrative covers both.
Curated narrative
The hand-written story of this package: orchestrata_ultimate.refactor.
50 modules, 12,684 lines of code.
Subpackages
| Package | Modules | LOC |
|---|---|---|
codemod |
41 | 11,382 |
ctok |
6 | 829 |
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
Tool-calling refactor capability. | 14 |
agent |
Tool-using refactor agent (SPEC-103 FR-005/006/007). | 185 |
tools |
Sandboxed, callable tools for the refactor agent (DeepSeek function-calling). | 274 |