| name | confucius-code-agent |
| title | Confucius Code Agent: Scalable Agent Scaffolding for Real-World Codebases |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2512.10398 |
| keywords | ["code agents","software engineering","agent scaffolding","long-horizon reasoning","repository-scale coding"] |
| description | Build AI code agents that scale to massive repositories with long-context reasoning and persistent memory. Confucius SDK achieves 59% Resolve@1 on SWE-Bench-Pro—ideal when AI needs to handle real-world codebases with complex toolchains. |
Overview
The Confucius SDK platform provides agent development infrastructure across three perspectives: Agent Experience (reasoning quality), User Experience (workflow naturalness), and Developer Experience (extensibility). Infrastructure enables long-context reasoning and persistent cross-session learning.
When to Use
- Real-world software engineering tasks
- Large-scale repository modification
- Long-horizon code generation tasks
- Complex tool integration and coordination
- Need for agent persistence across sessions
When NOT to Use
- Simple code snippets
- Single-file tasks
- Scenarios with simple tool requirements
- Real-time code patching
Core Technique
Orchestrated agent with unified context management:
class ConfuciusCodeAgent:
def __init__(self):
self.sdk = ConfuciusSdk()
self.long_context_manager = LongContextManager()
self.note_memory = PersistentNoteMemory()
self.tool_orchestrator = ToolOrchestrator()
def solve_coding_task(self, task_description, repository):
"""Solve multi-file coding tasks at repository scale."""
self.long_context_manager.load_repository(repository)
repo_summary = self.long_context_manager.summarize_repository()
session_notes = self.note_memory.create_session()
subtasks = self.decompose_task(task_description)
subtask_idx, subtask (subtasks):
.note_memory.add_note(
)
result = .solve_subtask(
subtask,
repo_summary,
.note_memory.get_relevant_notes(subtask)
)
.note_memory.add_note()
iteration ():
errors = .validate_solution(repository)
errors:
.note_memory.add_note()
error errors:
fix = .fix_error(error, repository)
.note_memory.add_note()
.finalize_solution(repository)
():
context_needed = .estimate_context(task, repository)
context_needed > .model.context_limit:
compressed = .compress_repository_for_task(
repository,
task,
max_tokens=.model.context_limit -
)
:
compressed = repository
compressed
():
tools_to_use = .plan_tools(subtask)
result =
tool tools_to_use:
tool == :
result = .execute_grep(subtask)
tool == :
result = .execute_edit(subtask, result)
tool == :
result = .execute_test(subtask)
tool == :
result = .execute_compile(subtask)
result
():
candidates = .generate_agent_candidates()
candidate_agent candidates:
performance = .evaluate_agent(candidate_agent)
performance > threshold:
refined = .refine_agent(candidate_agent)
best_agent