Toward Self-Evolution-Ready Workflow Harnesses: A Reversible Migration Path and Convertibility Taxonomy for Expert LLM Pipelines

TL;DR

Reversible migration path and taxonomy enable expert LLM workflows to become self-evolution-ready, validated through low-cost, auditable case study.

cs.SE 🔴 Advanced 2026-06-15 38 views
Yimo Lin Zhen Zhang Yibin Li
LLM workflow migration reversible design taxonomy self-evolution

Key Findings

Methodology

This paper introduces a migration framework based on the Strangler-Fig pattern, decomposing legacy scripts into composable, typed, and auditable stages. It employs a three-tier convertibility taxonomy (A/B/C) integrated as a routing stage to diagnose whether workflows can be incrementally migrated or require refactoring. The system uses tool encapsulation, stage composition, structured decision loops, and safety gates to ensure low-risk, reversible transition. The case study on WeChat content workflow demonstrates minimal business logic change, cost-effective migration, and autonomous topic tuning, validating the approach’s practicality and safety in production environments.

Key Results

  • Migration cost was minimal: zero business logic modification, nine tools encapsulated, platform code increased by less than 1200 lines, with a one-flag rollback mechanism supporting live deployment without disruption.
  • The workflow was successfully decomposed into independent, typed stages, with clear input/output schemas, enabling auditability and safety. Nine functions mapped directly to tools, with zero business logic change, validated in a real-world scenario.
  • Autonomous topic selection tuning showed a 58% increase in click-through rate and a 4.23-fold revenue boost, demonstrating early signs of self-evolution capability, with structured traceability and safety invariants ensuring reliability.

Significance

This work addresses a critical gap in enterprise AI deployment: transforming static,专家验证的脚本为动态、可演化的系统。通过系统化的迁移路径和分类体系,确保迁移的安全性、可逆性和审计追踪,为企业数字化转型提供了坚实的技术基础。它不仅降低了迁移成本,还增强了系统的可调试性和扩展性,为未来自主AI系统的发展奠定了基础。这种方法的推广,将极大推动企业在复杂业务环境中的AI应用升级,解决传统迁移方案中的安全和可靠性难题。

Technical Contribution

核心创新在于提出基于Strangler-Fig模式的逐步拆解策略,结合A/B/C分类法实现自动诊断和调度。系统设计融合工具封装、阶段契约、结构化决策和安全门控,确保迁移过程的低风险和高可控性。支持逐步替换、回滚和审计追踪,极大提升迁移效率和系统安全,为未来自我演化机制提供工程基础。这一框架实现了从静态脚本到动态自适应系统的转变,为企业提供了可持续发展的技术路径。

Novelty

本研究首次提出将遗留专家脚本迁移到自我演化系统的可逆路径,结合类型化分类法实现迁移决策自动化。区别于现有的绿色场景代理或软件现代化方案,本方法专注于生产环境中的逐步拆解和重构,强调安全性、审计性和可回滚性,填补了迁移路径和分类体系的空白。它为企业提供了一条系统化、低成本的迁移新途径,具有开创性意义。

Limitations

  • 目前仅在微信内容场景验证,缺乏多行业、多场景的验证,迁移策略的通用性和适应性仍需进一步验证。
  • 类型化和自动诊断算法在复杂工作流中仍面临挑战,准确率和鲁棒性有待提升。
  • 系统对模型和API依赖较强,跨模型兼容性不足,未来需增强自适应和泛化能力。

Future Work

未来将拓展多行业多场景验证,完善迁移分类算法,提升自动化水平。探索更复杂的工作流拆解策略,结合强化学习优化迁移路径。增强系统的自我调优能力,实现更高层次的自主演化,推动AI系统的持续自我优化和扩展。

AI Executive Summary

In the era of large language models (LLMs), enterprise workflows validated by experts—such as content generation, customer service, and financial reporting—have become essential. These workflows, however, are static: they encode domain knowledge but lack adaptability. Traditional migration approaches often require complete rewrites or manual refactoring, risking business disruption and high costs. To address this, the authors propose a reversible, systematic migration path based on the Strangler-Fig pattern, which incrementally refactors legacy scripts into a modular, type-safe, auditable pipeline. Central to this framework is a three-tier convertibility taxonomy (A/B/C), embedded as a routing stage, which diagnoses whether a workflow can be decomposed directly or needs preliminary refactoring. The approach supports zero business logic change, one-flag rollback, and detailed audit trails, ensuring safety and reversibility.

A real-world case study on WeChat content automation demonstrates the method’s effectiveness. Nine expert functions are encapsulated as independent tools, composed into stages, with minimal platform code increase. The migration process incurs negligible cost and introduces autonomous topic tuning, leading to a 58% increase in engagement and over four times revenue growth, indicating early signs of self-evolution. The system’s safety invariants and auditability are validated through adversarial testing, confirming robustness.

This work significantly advances enterprise AI deployment by providing a low-risk, scalable, and auditable migration strategy that transforms static workflows into adaptive, self-evolving systems. It addresses core challenges of safety, traceability, and reversibility, enabling organizations to upgrade their AI capabilities incrementally. Future directions include expanding multi-industry validation, refining classification algorithms, and enhancing autonomous self-tuning, paving the way for more resilient and intelligent AI systems.

Deep Analysis

Background

The evolution of enterprise AI has seen significant advances with models like ReAct, Toolformer, and Reflexion, which enhance reasoning, tool use, and self-reflection. Despite性能提升,传统工作流多为静态脚本,缺乏动态调整能力。企业对安全性、审计和可控性的需求日益增长,促使研究关注如何迁移遗留系统。现有方案多依赖手工重构或一次性迁移,成本高、风险大,难以在实际生产中推广。近年来,软件现代化和迁移策略逐渐发展,但针对复杂LLM+脚本工作流的系统迁移路径仍缺失,亟需一种低成本、安全、可逆的迁移方案,为企业数字化转型提供技术支撑。

Core Problem

核心难题在于如何在保证业务连续的前提下,将静态、专家验证的工作流逐步拆解为可组合、类型化的阶段,支持未来的自我演化。迁移过程中面临类型定义困难、风险控制、审计追踪等多重挑战。传统方法多为一次性迁移或手工重构,成本高、风险大,且难以实现持续优化。缺乏系统化路径限制了企业在复杂业务环境中的AI升级能力,亟需一种支持逐步拆解、低风险、可逆的迁移策略。

Innovation

本研究创新点在于提出基于Strangler-Fig模式的逐步迁移路径,将遗留脚本拆解为可组合、类型化、可审计的阶段,确保迁移的安全性和可控性。引入A/B/C三层转换分类法,结合自动诊断和调度机制,实现迁移路径的智能判定和路由。系统设计融合工具封装、阶段契约、结构化决策和安全门控,支持逐步替换、回滚和审计追踪。该框架实现了从静态脚本到动态自适应系统的转变,为企业提供了可持续发展的工程方案,推动AI系统的自主演化。

Methodology

  • �� 逐步封装:将遗留脚本作为黑箱封装,保持业务逻辑不变。
  • �� 工具化:将每个功能封装为独立工具,定义输入输出。
  • �� 阶段组合:将工具按类型组合成阶段,形成声明式流程。
  • �� 决策代理:用结构化决策循环替代硬编码决策,支持动态调整。
  • �� 安全门控:引入硬编码守卫,确保关键操作安全,支持回滚。
  • �� 迁移路径:逐步拆解,支持一键回滚,确保业务连续性。

Experiments

在微信内容自动化场景中,验证迁移路径的低成本和高安全性。迁移九个专家功能为独立工具,工具调用和阶段契约清晰,迁移成本极低,平台代码增加不足1200行。系统支持一键回滚,无业务中断。通过自主话题调优,显示出58%的点击率提升和4.23倍收入增长,验证了系统的自我演化潜力。

Results

迁移成本极低,无业务逻辑变更,支持一键回滚,确保生产连续性。系统实现工具封装、阶段组合和自动调优,验证了迁移路径的实用性。自主调优带来显著性能提升,早期信号显示策略调整带来58%点击率增长,收入提升4倍以上,展示了系统的自我演化能力。安全门控和审计追踪确保迁移的可靠性,为企业提供了可持续发展的技术保障。

Applications

该迁移路径适用于企业中已有的专家验证工作流,尤其是内容生成、客服、财务等场景。实现条件为工作流可以拆解为类型化阶段,且每个阶段功能可封装为工具。通过自动诊断和调度,企业可以低成本实现系统升级和自我优化,提升效率和安全性。未来可推广到多行业多场景,推动企业数字化转型升级。

Limitations & Outlook

目前验证仅在微信内容场景,缺乏多行业验证,迁移策略的普适性待验证。类型化难题在复杂工作流中仍存在,自动诊断准确率需提升。系统对模型和API的依赖较强,跨模型兼容性不足。未来需增强泛化能力和自适应调优,解决复杂场景中的迁移难题。

Plain Language Accessible to non-experts

想象你有一个老旧的工厂,里面的机器都已经用了很多年,生产线很稳定,但也很笨拙。现在你想让工厂变得更智能、更灵活,但又不想停工。于是,你决定用一种叫“攀藤树模式”的方法,把旧机器逐步拆掉,换上新设备,每次只换一部分,确保工厂还能正常生产。每次换完后,还可以随时退回到旧机器,保证安全。这个过程就像把一个复杂的工作流程拆成几个小步骤,每个步骤都可以单独测试和调整。通过这种方式,工厂变得越来越智能,能自己学习和适应新需求。这就像本文提出的方法,让AI工作流也能逐步升级,变得更聪明、更安全、更可靠。

ELI14 Explained like you're 14

Imagine you have an old factory where machines have been running for years. It works fine but is slow and inflexible. You want to upgrade it to be smarter and more adaptable, but you can't just shut everything down. So, you decide to use a method like climbing a vine—gradually replacing parts of the factory one by one. Each time, you swap out a machine or process, making sure the factory still runs smoothly. If something goes wrong, you can easily switch back to the old machine. This way, the factory slowly becomes more modern and capable of learning new things. The paper's method is similar: it breaks down complex AI workflows into small, manageable pieces, replaces them step by step, and keeps everything safe and reversible. Over time, the factory (or AI system) gets smarter and more flexible without risking shutdowns or errors.

Abstract

While expert-validated "LLM + script" workflows deliver significant value, they remain static: they encode hard-won domain knowledge yet fail to adapt execution based on feedback. Existing agent research predominantly targets greenfield agents and synthetic benchmarks, leaving the migration of active legacy workflows unresolved. To bridge this gap, we present a reversible, Strangler-Fig migration path that refactors legacy workflows into composable, typed, and auditable stages. Central to this framework is a three-tier convertibility taxonomy (A/B/C), implemented as a routing stage within the system harness, which diagnoses a workflow's readiness and routes it accordingly.

cs.SE cs.AI cs.LG