/recursively Skill
Run a task recursively with K-line memory, allowing the agent to learn from previous iterations.
Usage
code
/recursively "task description" [--flags]
Flags
| Flag | Default | Description |
|---|---|---|
--max-iterations <n> | 20 | Maximum number of iterations |
--max-cost <n> | 50 | Maximum cost in USD (approximate) |
--convergence-threshold <n> | 10 | Lines changed to consider converged |
--auto-promote | false | Auto-append promoted K-lines to AGENTS.md |
--verbose | false | Show detailed K-line activation logs |
--dry-run | false | Plan decomposition without executing |
Examples
code
/recursively "Implement user authentication with JWT tokens" /recursively "Fix the bug in the payment processing flow" --max-iterations 10 /recursively "Refactor the API client to use async/await" --verbose /recursively "Add comprehensive tests for the auth module" --dry-run
How It Works
- •Task Decomposition: The coordinator agent breaks down your task into sub-goals
- •K-line Activation: Relevant insights from previous runs are loaded into context
- •Sub-agent Execution: Specialized agents work on each sub-goal
- •Insight Capture: When agents solve problems, they create K-lines
- •Progress Evaluation: The coordinator assesses progress after each iteration
- •Iteration: Steps 2-5 repeat until the task is complete or limits are reached
- •Promotion: High-value K-lines are promoted for future use
K-lines
K-lines (Knowledge lines) are persistent memory artifacts that capture insights from problem-solving. They're stored in .klines/ in your project root.
When agents discover something valuable—a bug fix, a pattern, a gotcha—they create a K-line. Future runs automatically activate relevant K-lines, priming agents with proven approaches.
Philosophy
- •Simplicity over complexity: The system rewards code reduction
- •Learn from experience: Each run makes future runs smarter
- •Autonomous operation: Minimal human intervention needed