pseudocode subagent for Claude Code: what it does, how to install · ruvnet
Turns a finished spec into pseudocode: algorithms, data structures and a complexity estimate before any code is written.
no license ★ 850 updated 2026-10-26
.claude/agents/pseudocode.mdWhat pseudocode does
The subagent covers one SPARC phase, Pseudocode. You hand it a specification; it returns algorithm blocks with declared inputs, outputs and a begin/end body, plus the data structures it settled on and what each operation costs. Its metadata marks it as an architect role with high priority.
The file also sets house style. How a login check should read in pseudocode, how to describe an LRU cache or a trie for permission checks, how a token bucket limiter looks step by step. Design patterns get a section of their own, and the output ends with a roadmap for implementation.
Two hooks wrap a run. On start it records the phase in memory and looks for a spec_complete entry; at the end it stores a completion marker. Both hooks call memory_store and memory_search, so if those commands are missing from your setup the hooks have nothing to run.
What it helps with
- Turn a spec into algorithms before coding starts
- Pick a data structure and see the cost of each operation
- Estimate time and space complexity for a search path
- Sketch a token bucket rate limiter in pseudocode
- Write down a design pattern instead of holding it in your head
Example prompts for the agent
- Take
spec.mdand write the Pseudocode phase: algorithms, data structures, complexity. - Draft pseudocode for user login with password verification and session creation.
- Work out the complexity of catalog search and tell me what to change in the index.
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 subagent file at .claude/agents/pseudocode.md.
What does pseudocode do?
It handles the Pseudocode phase of SPARC: turning a spec into algorithms, choosing data structures and weighing complexity.
What do the hooks need to work?
They run memory_store and memory_search: one saves the current phase, the other looks up a spec_complete record.
Similar subagents
All subagents for Agent setup: memory, context, orchestration →pseudocode by other authors comes first.