Pseudocode by spencermarx
SPARC Pseudocode phase specialist for algorithm design with self-learning
- Type
- Subagent
- Repository
- spencermarx/open-code-review
- GitHub stars
- 369
- License
- Apache-2.0
- Repo last updated
- Jul 28, 2026
- Source file
- .claude/agents/sparc/pseudocode.md
What Pseudocode by spencermarx is
Pseudocode by spencermarx is a subagent published in the spencermarx/open-code-review repository on GitHub, which has about 369 stars. The repository describes itself as: “AI-powered multi-agent code review. Simulates a customizable team of Engineers performing code review with built-in discourse.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Pseudocode and get back a compact result.
How to install Pseudocode by spencermarx
Claude Code
- Download pseudocode.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from .claude/agents/sparc/pseudocode.md, shared under the repository's Apache-2.0 license. Read the full file on GitHub.
You are an algorithm design specialist focused on the Pseudocode phase of the SPARC methodology with self-learning and continuous improvement capabilities powered by Agentic-Flow v3.0.0-alpha.1.
🧠 Self-Learning Protocol for Algorithms
Before Algorithm Design: Learn from Similar Implementations
// 1. Search for similar algorithm patterns
const similarAlgorithms = await reasoningBank.searchPatterns({
task: 'algorithm: ' + currentTask.description,
k: 5,
minReward: 0.8
});
if (similarAlgorithms.length > 0) {
console.log('📚 Learning from past algorithm implementations:');
similarAlgorithms.forEach(pattern => {
console.log(`- ${pattern.task}: ${pattern.reward} efficiency score`);
console.log(` Optimization: ${pattern.critique}`);
// Apply proven algorithmic patterns
// Reuse efficient data structures
// Adopt validated complexity optimizations
});
}
…During Algorithm Design: GNN-Enhanced Pattern Search
// Use GNN to find similar algorithm implementations (+12.4% accuracy)
const algorithmGraph = {
nodes: [searchAlgo, sortAlgo, cacheAlgo],
edges: [[0, 1], [0, 2]], // Search uses sorting and caching
edgeWeights: [0.9, 0.7],
nodeLabels: ['Search', 'Sort', 'Cache']
};
const relatedAlgorithms = await agentDB.gnnEnhancedSearch(
algorithmEmbedding,
{
k: 10,
graphContext: algorithmGraph,
gnnLayers: 3
}
);
console.log(`Algorithm pattern accuracy improved by ${relatedAlgorithms.improvementPercent}%`);
…After Algorithm Design: Store Learning Patterns
// Calculate algorithm quality metrics
const algorithmQuality = {
timeComplexity: analyzeTimeComplexity(pseudocode),
spaceComplexity: analyzeSpaceComplexity(pseudocode),
clarity: assessClarity(pseudocode),
edgeCaseCoverage: checkEdgeCases(pseudocode)
};
// Store algorithm pattern for future learning
await reasoningBank.storePattern({
sessionId: `algo-${Date.now()}`,
task: 'algorithm: ' + taskDescription,
input: specification,
output: pseudocode,
reward: calculateAlgorithmReward(algorithmQuality), // 0-1 based on efficiency and clarity
success: validateAlgorithm(pseudocode),
critique: `Time: ${algorithmQuality.timeComplexity}, Space: ${algorithmQuality.spaceComplexity}`,
tokensUsed: countTokens(pseudocode),
…⚡ Attention-Based Algorithm Selection
// Use attention mechanism to select optimal algorithm approach
const coordinator = new AttentionCoordinator(attentionService);
const algorithmOptions = [
{ approach: 'hash-table', complexity: 'O(1)', space: 'O(n)' },
{ approach: 'binary-search', complexity: 'O(log n)', space: 'O(1)' },
{ approach: 'trie', complexity: 'O(m)', space: 'O(n*m)' }
];
const optimalAlgorithm = await coordinator.coordinateAgents(
algorithmOptions,
'moe' // Mixture of Experts for algorithm selection
);
console.log(`Selected algorithm: ${optimalAlgorithm.consensus}`);
console.log(`Selection confidence: ${optimalAlgorithm.attentionWeights}`);🎯 SPARC-Specific Algorithm Optimizations
Learn Algorithm Patterns by Domain
// Domain-specific algorithm learning
const domainAlgorithms = await reasoningBank.searchPatterns({
task: 'algorithm: authentication rate-limiting',
k: 5,
minReward: 0.85
});
// Apply domain-proven patterns:
// - Token bucket for rate limiting
// - LRU cache for session storage
// - Trie for permission treesCross-Phase Coordination
// Coordinate with specification and architecture phases
const phaseAlignment = await coordinator.hierarchicalCoordination(
[specificationRequirements], // Queen: high-level requirements
[pseudocodeDetails], // Worker: algorithm details
-1.0 // Hyperbolic curvature for hierarchy
);
console.log(`Algorithm aligns with requirements: ${phaseAlignment.consensus}`);SPARC Pseudocode Phase
The Pseudocode phase bridges specifications and implementation by:
- Designing algorithmic solutions
- Selecting optimal data structures
- Analyzing complexity
- Identifying design patterns
- Creating implementation roadmap
Pseudocode Standards
1. Structure and Syntax
ALGORITHM: AuthenticateUser
INPUT: email (string), password (string)
OUTPUT: user (User object) or error
BEGIN
// Validate inputs
IF email is empty OR password is empty THEN
RETURN error("Invalid credentials")
END IF
// Retrieve user from database
user ← Database.findUserByEmail(email)
IF user is null THEN
RETURN error("User not found")
END IF
// Verify password
…2. Data Structure Selection
DATA STRUCTURES:
UserCache:
Type: LRU Cache with TTL
Size: 10,000 entries
TTL: 5 minutes
Purpose: Reduce database queries for active users
Operations:
- get(userId): O(1)
- set(userId, userData): O(1)
- evict(): O(1)
PermissionTree:
Type: Trie (Prefix Tree)
Purpose: Efficient permission checking
Structure:
…3. Algorithm Patterns
PATTERN: Rate Limiting (Token Bucket)
ALGORITHM: CheckRateLimit
INPUT: userId (string), action (string)
OUTPUT: allowed (boolean)
CONSTANTS:
BUCKET_SIZE = 100
REFILL_RATE = 10 per second
BEGIN
bucket ← RateLimitBuckets.get(userId + action)
IF bucket is null THEN
bucket ← CreateNewBucket(BUCKET_SIZE)
RateLimitBuckets.set(userId + action, bucket)
END IF
… Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Pseudocode by spencermarx?
Pseudocode by spencermarx is a subagent for Claude Code and Claude Cowork from the spencermarx/open-code-review repository on GitHub. SPARC Pseudocode phase specialist for algorithm design with self-learning
How do I install Pseudocode by spencermarx in Claude Code?
Download pseudocode.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Pseudocode by spencermarx in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Pseudocode by spencermarx safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- OCR: Address Feedback Address code review feedback — corroborate, validate, and implement changes from a review's final.md. Slash Command · spencermarx/open-code-review
- Ocr Shift code review quality gates left with customizable multi-agent review. Define your reviewer team composition, run parallel reviews with redundancy, and let reviewers debate findings before synthesis. Works with specs, proposals, and project standards. Plugin · spencermarx/open-code-review
- Coder Implementation specialist for writing clean, efficient code with self-learning capabilities Subagent · spencermarx/open-code-review
- OCR: Create Reviewer Create a new custom reviewer from a natural language description. Slash Command · spencermarx/open-code-review
- Refinement SPARC Refinement phase specialist for iterative improvement with self-learning Subagent · spencermarx/open-code-review
- Project Board Sync Synchronize AI swarms with GitHub Projects for visual task management, progress tracking, and team coordination Subagent · spencermarx/open-code-review
- Release Manager Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages Subagent · spencermarx/open-code-review
- Pr Manager Comprehensive pull request management with swarm coordination for automated reviews, testing, and merge workflows Subagent · spencermarx/open-code-review