pseudocode · ruvnet, agentic-flow — Claude Code subagent: SPARC pseudocode design
A subagent for the Pseudocode stage of SPARC: it turns a finished spec into an algorithm draft and works out the complexity.
no license ★ 850 updated 2026-10-26
.claude/agents/pseudocode.mdWhat pseudocode does
This subagent handles one stage of SPARC: Pseudocode. Give it a specification that is already complete and it returns the algorithm as plain steps, with data structures chosen and the cost in time and memory estimated.
The definition file holds frontmatter (architect type, high priority) and a pair of hooks. The pre hook searches memory for earlier algorithm patterns with npx claude-flow@alpha memory search-patterns. The post hook stores the session pattern and starts a neural train run on algorithm-design data.
Quality is written into memory as a flat 0.88 instead of being derived from the complexity figures, so stored patterns all carry the same score. Every claude-flow call is wrapped in 2>/dev/null || true. Leave the package out and the lookups do nothing while the phase still reports success.
What it helps with
- draft pseudocode from a finished spec before any code exists
- compare two data structure choices on time and space cost
- reuse a proven algorithm pattern from an earlier session
- check edge case coverage while the design is still cheap to change
- keep a complexity breakdown in project memory for later tasks
Example prompts for the agent
- Take the specification from memory and draft pseudocode for the search algorithm, with a complexity estimate.
- Weigh a hash table against a trie for this lookup and say which one costs less memory.
- List the earlier algorithm patterns you found in memory, then store the complexity breakdown.
How to install pseudocode
Manually: put the files in place
.claude/agents/pseudocode.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/pseudocode.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/pseudocode.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about pseudocode
How do I install pseudocode in Claude Code?
Place the agent file at .claude/agents/pseudocode.md inside your project. Claude then has it available as a subagent.
What does pseudocode do?
It covers the Pseudocode stage of SPARC: reads a finished specification, describes the algorithm in steps, picks data structures and estimates complexity.
Does pseudocode need claude-flow?
Its hooks shell out to npx claude-flow@alpha. Without that package the pattern search and training never run, and the errors are discarded through 2>/dev/null || true, so the failure stays quiet.
Similar subagents
All subagents for Agent setup: memory, context, orchestration →pseudocode by other authors comes first.