Agent skill
sparc-pseudocode
SPARC Pseudocode phase specialist for algorithm design, data structure selection, complexity analysis, and design pattern identification
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/development/sparc/sparc-pseudocode
SKILL.md
Sparc Pseudocode
Quick Start
# Invoke SPARC Pseudocode phase
# Or directly in Claude Code
# "Use SPARC pseudocode to design the login flow algorithm"
When to Use
- Translating specifications into algorithmic solutions
- Designing data structures for optimal performance
- Analyzing time and space complexity
- Selecting appropriate design patterns
- Creating implementation roadmaps for developers
Prerequisites
- Completed specification phase with clear requirements
- Understanding of data structure trade-offs
- Knowledge of common algorithm patterns
- Familiarity with complexity analysis
Core Concepts
SPARC Pseudocode Phase
The Pseudocode phase bridges specifications and implementation:
- Design algorithmic solutions - Language-agnostic logic
- Select optimal data structures - Based on access patterns
- Analyze complexity - Time and space requirements
- Identify design patterns - Reusable solutions
- Create implementation roadmap - Guide for developers
Complexity Classes
| Class | Description | Example |
|---|---|---|
| O(1) | Constant | Hash lookup |
| O(log n) | Logarithmic | Binary search |
| O(n) | Linear | Array scan |
| O(n log n) | Linearithmic | Merge sort |
| O(n^2) | Quadratic | Nested loops |
Implementation Pattern
Algorithm Structure
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
*See sub-skills for full details.*
### 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:
See sub-skills for full details.
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
*See sub-skills for full details.*
## Metrics & Success Criteria
- All algorithms have documented complexity
- Subroutines are clearly defined
- Data structures are justified with operations
- Design patterns are identified where applicable
- Pseudocode is language-agnostic
## Integration Points
### MCP Tools
```javascript
// Store pseudocode phase completion
action: "store",
key: "sparc/pseudocode/algorithms",
namespace: "coordination",
value: JSON.stringify({
algorithms: ["AuthenticateUser", "CheckRateLimit"],
patterns: ["strategy", "observer"],
complexity: "O(log n)",
timestamp: Date.now()
})
}
Hooks
# Pre-pseudocode hook
# Post-pseudocode hook
Related Skills
- sparc-specification - Previous phase: requirements
- sparc-architecture - Next phase: system design
- sparc-refinement - TDD implementation phase
References
Version History
- 1.0.0 (2026-01-02): Initial release - converted from agent to skill format
Sub-Skills
- Configuration
- Example 1: Search Algorithm (+2)
- Best Practices
Sub-Skills
- Execution Checklist
- Error Handling
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?