| name | recode-unified-planning |
| title | ReCode: Unify Plan and Action for Universal Granularity Control |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2510.23564 |
| keywords | ["Planning","Agent","Hierarchical Control","Code Generation","Abstraction"] |
| description | Unifies planning and action by treating plans as abstract placeholder functions recursively decomposed to primitive actions. Enables agents to dynamically adjust abstraction levels per task without rigid hierarchies. Improves inference performance and training efficiency through automatic multi-level data generation. |
ReCode: Unified Recursive Action Planning
Conventional agents separate high-level planning from low-level execution, forcing rigid abstraction boundaries. ReCode dissolves this separation using unified code representation, enabling agents to fluidly adjust granularity from abstract goals to concrete actions.
By representing both plans and actions as code, the system recursively decomposes abstractions, generating implicit hierarchical training data.
Core Concept
Key insight: represent planning and action in the same code language, treating plans as abstract functions that recursively decompose:
- High-level plan: abstract placeholder functions
- Recursive decomposition: progressively substitute functions with implementations
- Unified representation: both planning and action in code syntax
- Contextual granularity: model chooses abstraction level per problem
Architecture Overview
- Code-based representation for plans and actions
- Recursive function decomposition tree
- Dynamic abstraction level selection during inference
- Implicit hierarchical training through decomposition process
Implementation Steps
Design a code representation that allows both abstract plans and concrete implementations. Use function signatures to represent abstraction levels:
class CodePlanAction:
def __init__(self):
self.code_template = """
def solve_task(task_desc):
# Abstract step 1: decompose into subgoals
subgoal_1 = abstract_function_1(task_desc)
subgoal_2 = abstract_function_2(task_desc)
# Execute subgoals with varying granularity
result_1 = execute(subgoal_1)
result_2 = execute(subgoal_2)
return combine_results(result_1, result_2)
"""
def generate_plan_action_code(self, task, granularity='medium'):
"""Generate code that unifies planning and action."""
if granularity == 'high':
code = f"""
def solve(task):
plan = generate_abstract_plan('{task}')
return execute_plan(plan)
"""
granularity == :
code =
:
code =
code
():