athanor
О программе
Навык Athanor систематически преобразует запутанный или устаревший код в оптимизированный, современный результат, используя четырёхэтапный алхимический процесс. Он предназначен для глубоких задач рефакторинга, где постепенные исправления не дали результата, например, для преобразования кодовых баз между парадигмами или для полной переработки проблемных модулей. Процесс включает структурированные контрольные точки для анализа и очистки кода на каждом этапе.
Быстрая установка
Claude Code
Рекомендуетсяnpx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/athanorСкопируйте и вставьте эту команду в Claude Code для установки этого навыка
Документация
Athanor
Execute four-stage alchemical transmutation of code or data — decomposing prima materia, purifying its essence, illuminating its target form, synthesizing refined output. Athanor is furnace that maintains steady heat across all stages.
When Use
- Transforming legacy code into modern, well-structured equivalents
- Refactoring deeply tangled modules where incremental fixes keep failing
- Converting codebase from one paradigm to another (procedural to functional, monolith to modular)
- Processing raw, messy data into clean analytical datasets
- Simpler refactoring approaches have stalled and full-cycle transformation needed
Inputs
- Required: Material to transform (file paths, module names, or data sources)
- Required: Desired end state (target architecture, paradigm, or format)
- Optional: Known constraints (must preserve API, can't change database schema, etc.)
- Optional: Prior failed transformation attempts and why they stalled
Steps
Step 1: Nigredo — Decomposition
Break prima materia into its constituent elements. Nothing sacred; everything cataloged.
- Inventory material complete:
- List every function, class, module, or data entity
- Map all dependencies (imports, calls, data flows)
- Identify hidden coupling (shared globals, implicit state, side effects)
- Surface hidden assumptions:
- What undocumented behaviors does code rely on?
- What error conditions silently swallowed?
- What ordering dependencies exist?
- Catalog anti-patterns and technical debt:
- God objects, circular dependencies, copy-paste duplication
- Dead code paths, unreachable branches, vestigial features
- Hardcoded values, magic numbers, embedded configuration
- Produce Nigredo Inventory: structured catalog of every element, dependency, assumption, anti-pattern
Got: Complete, unflinching inventory of material. Inventory should feel uncomfortable — if it doesn't, decomposition isn't thorough enough. Every hidden assumption now explicit.
If fail: Material too large to inventory fully? Decompose by module boundary and treat each module as separate athanor run. Dependencies too tangled to map? Use grep/Grep to trace actual call sites rather than relying on documentation.
Step 2: Meditate — Calcination Checkpoint
Run meditate skill to clear assumptions accumulated during nigredo.
- Set aside nigredo inventory and clear mental context
- Anchor on transformation goal stated in Inputs
- Observe what biases nigredo introduced — did decomposition make certain approaches seem inevitable?
- Label any premature solution ideas as "tangent" and return to goal
Got: Clear, unbiased state ready to evaluate material without being anchored to its current form. Goal feels fresh rather than constrained by what was found.
If fail: Nigredo findings keep pulling attention (particularly bad anti-pattern, clever hack tempting to preserve)? Write it down and explicitly set it aside. Proceed only when goal clearer than current form.
Step 3: Albedo — Purification
Separate essential from accidental. Strip away everything that doesn't serve target form.
- From nigredo inventory, classify each element:
- Essential: Core business logic, irreplaceable algorithms, critical data transformations
- Accidental: Framework boilerplate, workarounds for old bugs, compatibility shims
- Toxic: Anti-patterns, security vulnerabilities, dead code
- Extract essential elements into isolation:
- Pull core logic out of framework wrappers
- Separate data transformation from I/O
- Extract interfaces from implementations
- Remove toxic elements entirely — document what was removed and why
- For accidental elements, determine if equivalents exist in target form
- Produce Albedo Extract: purified essential logic with clean interfaces
Got: Set of pure, isolated functions/modules that represent core value of original material. Each piece testable in isolation. Extract significantly smaller than original.
If fail: Essential and accidental too intertwined to separate? Introduce seam points (interfaces) first. Material resists purification? May need dissolve-form before athanor can continue.
Step 4: Heal — Purification Assessment
Run heal skill to assess whether purification was thorough.
- Triage albedo extract: is anything still carrying toxic residue?
- Check for drift: has purification drifted from original transformation goal?
- Assess completeness: are all essential elements accounted for, or were some discarded prematurely?
- Rebalance if needed: restore any essential elements that were incorrectly classified as accidental
Got: Confidence that albedo extract is complete, clean, ready for illumination. No essential logic was lost; no toxic patterns remain.
If fail: Assessment reveals significant gaps? Return to Step 3 with specific gaps identified. Do not proceed to citrinitas with incomplete material.
Step 5: Citrinitas — Illumination
See target form. Map purified elements to their optimal structure.
- Pattern recognition: identify which design patterns serve purified elements
- Does data flow suggest pipes/filters, event sourcing, CQRS?
- Do interfaces suggest strategy, adapter, facade?
- Does module structure suggest hexagonal, layered, micro-kernel?
- Design target architecture:
- Map each essential element to its new location
- Define interfaces between components
- Specify data flow through new structure
- Identify what must be created new (has no equivalent in original):
- New abstractions that unify duplicated logic
- New interfaces that replace implicit coupling
- New error handling that replaces silent failures
- Produce Citrinitas Blueprint: complete mapping from albedo extract to target form
Got: Clear, detailed blueprint where every essential element has home and every interface defined. Blueprint should feel inevitable — given purified elements, this structure is natural fit.
If fail: Multiple valid architectures compete? Evaluate each against constraints from Inputs. No clear winner emerges? Prefer simplest option and document alternatives as future options.
Step 6: Meditate — Pre-Synthesis Checkpoint
Run meditate skill to prepare for final synthesis.
- Clear analytical context from citrinitas
- Anchor on citrinitas blueprint as synthesis guide
- Observe any anxiety about transformation — is anything being rushed?
- Confirm readiness: blueprint clear, material purified, constraints known
Got: Calm clarity about what needs to be built. Synthesis phase should be execution, not design.
If fail: Doubt persists about blueprint? Revisit Step 5 with specific concerns. Better to refine blueprint than to begin synthesis with uncertainty.
Step 7: Rubedo — Synthesis
Compose purified elements into their target form. Philosopher's stone: working, optimized code.
- Build new structure following citrinitas blueprint:
- Create files, modules, interfaces as specified
- Migrate each essential element to its new location
- Implement new abstractions and interfaces
- Wire components together:
- Connect data flows as designed
- Implement error propagation through new paths
- Configure dependency injection or module loading
- Verify synthesis:
- Does each component work in isolation? (unit tests)
- Do components compose correctly? (integration tests)
- Does full system produce same outputs as original? (regression tests)
- Remove scaffolding:
- Delete temporary compatibility shims
- Remove migration aids
- Clean up any remaining references to old structure
- Produce Rubedo Output: transmuted code, fully functional in its new form
Got: Working code measurably better than original: fewer lines, clearer structure, better test coverage, fewer dependencies. Transformation complete and old form can be retired.
If fail: Synthesis reveals gaps in blueprint? Do not patch — return to Step 5 (citrinitas) to revise design. Individual components fail? Isolate and fix them before attempting full integration. Rubedo must not produce half-transformed chimera.
Validation Checklist
- Nigredo inventory complete (all elements, dependencies, assumptions cataloged)
- Meditate checkpoint passed between nigredo/albedo (assumptions cleared)
- Albedo extract contains only essential elements with clean interfaces
- Heal assessment confirms purification completeness
- Citrinitas blueprint maps every essential element to target form
- Meditate checkpoint passed between citrinitas/rubedo (ready for synthesis)
- Rubedo output passes regression tests against original behavior
- Rubedo output measurably improved (complexity, coupling, test coverage)
- No toxic elements survived into final output
- Transformation constraints from Inputs satisfied
Pitfalls
- Skipping nigredo depth: Rushing decomposition means hidden coupling surfaces during synthesis. Invest fully in inventory
- Preserving accidental complexity: Attachment to clever workarounds or "it works, don't touch it" code. Not essential? It goes
- Skipping meditate checkpoints: Cognitive momentum from one stage biases next. Pauses are structural, not optional
- Blueprint-less synthesis: Starting to code before citrinitas complete produces patchwork, not transmutation
- Incomplete regression testing: Rubedo must reproduce original behavior. Untested paths will break silently
- Scope creep during citrinitas: Illumination phase reveals opportunities for improvement beyond original goal. Note them but don't pursue them — athanor serves stated transformation, not hypothetical ideal
See Also
transmute— Lighter-weight transformation for single functions or small moduleschrysopoeia— Value extraction and optimization (turning base code into gold)meditate— Meta-cognitive clearing used as stage-gate checkpointsheal— Subsystem assessment used for purification validationdissolve-form— When material too rigid for athanor, dissolve firstadapt-architecture— Complementary approach for system-level migration patternsreview-software-architecture— Post-synthesis architecture review
GitHub репозиторий
Похожие навыки
executing-plans
ДизайнИспользуйте навык executing-plans, когда у вас есть полный план реализации для выполнения контролируемыми партиями с контрольными точками проверки. Он загружает и критически анализирует план, затем выполняет задачи небольшими партиями (по умолчанию 3 задачи), сообщая о прогрессе между каждой партией для проверки архитектором. Это обеспечивает систематическую реализацию со встроенными контрольными точками проверки качества.
requesting-code-review
ДизайнЭтот навык запускает суб-агента для ревью кода, который анализирует изменения в коде на соответствие требованиям перед дальнейшими действиями. Его следует использовать после завершения задач, реализации крупных функций или перед слиянием с основной веткой. Ревью помогает выявить проблемы на ранней стадии, сравнивая текущую реализацию с исходным планом.
connect-mcp-server
ДизайнЭтот навык предоставляет разработчикам подробное руководство по подключению серверов MCP к Claude Code с использованием транспортов HTTP, stdio или SSE. Он охватывает установку, конфигурацию, аутентификацию и безопасность для интеграции внешних сервисов, таких как GitHub, Notion и пользовательские API. Используйте его при настройке интеграций MCP, конфигурации внешних инструментов или работе с Model Context Protocol от Claude.
web-cli-teleport
ДизайнЭтот навык помогает разработчикам выбирать между веб-интерфейсом Claude Code и CLI на основе анализа задачи, а также обеспечивает бесшовное перемещение сессий между этими средами. Он оптимизирует рабочий процесс, управляя состоянием и контекстом сессии при переключении между веб-интерфейсом, CLI или мобильным приложением. Используйте его для сложных проектов, требующих различных инструментов на разных этапах работы.
