analyze-code-quality
AgentAdvanced code quality analysis agent for comprehensive code reviews and improvements
Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives. Uses gaming AI techniques to discover novel solutions by combining actions in creative ways. Excels at adaptive replanning, multi-step reasoning, and finding
Claude Code
> /plugin marketplace add ruvnet/agentic-flow> /plugin install agentic-flow@agentic-flow
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
name: sublinear-goal-planner description: "Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives. Uses gaming AI techniques to discover novel solutions by combining actions in creative ways. Excels at adaptive replanning, multi-step reasoning, and finding optimal paths through complex state spaces." color: cyan
A sophisticated Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives using advanced graph analysis and sublinear optimization techniques. This agent transforms high-level goals into executable action sequences through mathematical optimization, temporal advantage prediction, and multi-agent coordination.
// World state representation
const WorldState = {
current_state: new Map([
["code_written", false],
["tests_passing", false],
["documentation_complete", false],
["deployment_ready", false],
]),
goal_state: new Map([
["code_written", true],
["tests_passing", true],
["documentation_complete", true],
["deployment_ready", true],
]),
};
// Action definitions with preconditions and effects
const Actions = [
{
name: "write_code",
cost: 5,
preconditions: new Map(),
effects: new Map([["code_written", true]]),
},
{
name: "write_tests",
cost: 3,
preconditions: new Map([["code_written", true]]),
effects: new Map([["tests_passing", true]]),
},
{
name: "write_documentation",
cost: 2,
preconditions: new Map([["code_written", true]]),
effects: new Map([["documentation_complete", true]]),
},
{
name: "deploy_application",
cost: 4,
preconditions: new Map([
["code_written", true],
["tests_passing", true],
["documentation_complete", true],
]),
effects: new Map([["deployment_ready", true]]),
},
];// Build adjacency matrix for sublinear optimization
async function buildActionGraph(actions, worldState) {
const n = actions.length;
const adjacencyMatrix = Array(n)
.fill()
.map(() => Array(n).fill(0));
// Calculate action dependencies and transitions
for (let i = 0; i < n; i++) {
for (let j = 0; j < n; j++) {
if (canTransition(actions[i], actions[j], worldState)) {
adjacencyMatrix[i][j] = 1 / actions[j].cost; // Weight by inverse cost
}
}
}
// Analyze matrix properties for optimization
const analysis = await mcp__sublinear_time_solver__analyzeMatrix({
matrix: {
rows: n,
cols: n,
format: "dense",
data: adjacencyMatrix,
},
checkDominance: true,
checkSymmetry: false,
estimateCondition: true,
});
return { adjacencyMatrix, analysis };
}async function prioritizeGoals(actionGraph, goals) {
// Use PageRank to identify critical actions and goals
const pageRank = await mcp__sublinear_time_solver__pageRank({
adjacency: {
rows: actionGraph.length,
cols: actionGraph.length,
format: "dense",
data: actionGraph,
},
damping: 0.85,
epsilon: 1e-6,
});
// Sort goals by importance scores
const prioritizedGoals = goals
.map((goal, index) => ({
goal,
priority: pageRank.ranks[index],
index,
}))
.sort((a, b) => b.priority - a.priority);
rProduction-ready AI agent orchestration with 66 self-learning agents, 213 MCP tools, and autonomous multi-agent swarms.
Advanced code quality analysis agent for comprehensive code reviews and improvements
Advanced code quality analysis agent for comprehensive code reviews and improvements
Expert agent for system architecture design, patterns, and high-level technical decisions
Use this agent when you need to create foundational templates, boilerplate code, or starter configurations for new projects,…
Specialized agents for distributed consensus mechanisms and fault-tolerant coordination protocols
Coordinates Byzantine fault-tolerant consensus protocols with malicious actor detection
Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…