skills/skillxiv-v0.0.2-claude-opus-4.6/confucius-code-agent/SKILL.md
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.
npx skillsauth add ADu2021/skillXiv confucius-code-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Orchestrated agent with unified context management:
# Confucius Code Agent
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."""
# Initialize agent with repository context
self.long_context_manager.load_repository(repository)
# Extract and compress repository information
repo_summary = self.long_context_manager.summarize_repository()
# Initialize persistent notes for this task
session_notes = self.note_memory.create_session()
# Hierarchical task decomposition
subtasks = self.decompose_task(task_description)
# Execute subtasks with context management
for subtask_idx, subtask in enumerate(subtasks):
# Update notes with progress
self.note_memory.add_note(
f"Executing subtask {subtask_idx}: {subtask}"
)
# Solve subtask with orchestrated tools
result = self.solve_subtask(
subtask,
repo_summary,
self.note_memory.get_relevant_notes(subtask)
)
# Record results in memory
self.note_memory.add_note(f"Subtask {subtask_idx} result: {result}")
# Iterate and refine
for iteration in range(3):
# Validate solution
errors = self.validate_solution(repository)
if not errors:
break
# Refine based on errors
self.note_memory.add_note(f"Iteration {iteration} errors: {errors}")
for error in errors:
fix = self.fix_error(error, repository)
self.note_memory.add_note(f"Applied fix: {fix}")
return self.finalize_solution(repository)
def unified_context_orchestrator(self, task, repository):
"""
Manage context across long reasoning chains.
Supports long-context reasoning on massive codebases.
"""
# Estimate context requirement
context_needed = self.estimate_context(task, repository)
if context_needed > self.model.context_limit:
# Compress repository information
compressed = self.compress_repository_for_task(
repository,
task,
max_tokens=self.model.context_limit - 2000
)
else:
compressed = repository
return compressed
def solve_subtask(self, subtask, repo_summary, relevant_notes):
"""Solve single subtask with tool coordination."""
# Tool orchestration: sequence of operations
tools_to_use = self.plan_tools(subtask)
result = None
for tool in tools_to_use:
if tool == 'grep':
# Search repository for relevant code
result = self.execute_grep(subtask)
elif tool == 'edit':
# Edit files based on analysis
result = self.execute_edit(subtask, result)
elif tool == 'test':
# Run tests to validate changes
result = self.execute_test(subtask)
elif tool == 'compile':
# Compile to check for errors
result = self.execute_compile(subtask)
return result
def meta_agent_automation(self):
"""Meta-agent for iterative agent improvement."""
# Build candidate agents
candidates = self.generate_agent_candidates()
# Evaluate on held-out tasks
for candidate_agent in candidates:
performance = self.evaluate_agent(candidate_agent)
# Refine high-performing candidates
if performance > threshold:
refined = self.refine_agent(candidate_agent)
return best_agent
testing
Uses flow maps as look-ahead operators to enable principled reward-guided diffusion by predicting trajectory endpoints at any denoising step. Deploy when applying rewards or preferences to diffusion trajectories with meaningful gradients throughout generation.
testing
Train language models where each expert learns independently on closed datasets, enabling flexible inference with selective data inclusion or exclusion. 41% performance improvement while allowing users to opt out of specific data sources without retraining.
data-ai
Understand how token generation flexibility in diffusion LMs paradoxically constrains reasoning, as models exploit ordering flexibility to avoid uncertain tokens, and apply simplified approaches that preserve parallel decoding benefits. Use when optimizing diffusion-based language models for reasoning tasks.
devops
Enable LLM agents to improve continuously during deployment by constructing structured experience libraries through self-reflection on successes and failures—achieving 23% improvement on reasoning without gradient-based parameter updates or external training.