# pseudocode

Turns a finished spec into pseudocode: algorithms, data structures and a complexity estimate before any code is written.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/agents/sparc/pseudocode.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/ruvnet-pseudocode

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/pseudocode.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/pseudocode.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/pseudocode.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/agents/sparc/pseudocode.md

## When to use it
- 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
- Take `spec.md` and 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.

## Similar
- [sparc-implement](https://affpapa.org/en/nevibecode/skills/sparc-implement.md) — skill · 735 installs
- [computer-science-algorithms](https://affpapa.org/en/nevibecode/skills/computer-science-algorithms.md) — skill · 205 installs
- [typst-paper](https://affpapa.org/en/nevibecode/skills/typst-paper.md) — skill · 1600 installs
- [update-code-from-shorthand](https://affpapa.org/en/nevibecode/rules/update-code-from-shorthand.md) — rule · ★ 41430 repo stars
- [sparc-methodology](https://affpapa.org/en/nevibecode/skills/sparc-methodology.md) — skill · 1200 installs
- [vanity-engineering-review](https://affpapa.org/en/nevibecode/skills/vanity-engineering-review.md) — skill · 3400 installs

## Other versions with the same name
- [pseudocode · ruvnet](https://affpapa.org/en/nevibecode/agents/pseudocode.md) — ★ 850 repo stars

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
