From ouroboros-loops
Analysis stage of the Ouroboros loop. Reads raw observations from the research step (.ouroboros/research.md) and classifies them into bugs, quality_issues, and enhancement_opportunities. Saves results to .ouroboros/state.json.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ouroboros-loops:analyzeopusThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Classify the raw observations from the research step into actionable findings. Do not re-scan the codebase — work from the research data.
Classify the raw observations from the research step into actionable findings. Do not re-scan the codebase — work from the research data.
Check .ouroboros/config.json for the useSuperpowers field:
config.json and inspect useSuperpowersuseSuperpowers is false or absent → skip Superpowers entirely for this step; proceed to step 0buseSuperpowers is true → check whether the superpowers:plan skill is available in the current session
superpowers:plan with the findings summary as input. Then:
state.jsonstate.json with a new top-level execution_plan field:
{
"execution_plan": {
"generated_at": "iteration-N",
"ordered_tasks": ["<task 1>", "<task 2>", "..."]
}
}
state.json.execution_plan (if present) to determine task ordering and file targets, in preference to their own ad-hoc selection logic.[SUPERPOWERS UNAVAILABLE] plan skipped — plugin not loaded and continue without itThe superpowersSteps.analyze field in config.json specifies which Superpowers mode to use for this step (default: plan).
Read .ouroboros/state.json and note any items already marked [RESOLVED] or [DEFERRED]. Do NOT re-report them as new findings. Treat [DEFERRED] entries the same as [RESOLVED] — they are not eligible for re-classification or re-addition as fresh findings. This aligns with the determine SKILL.md specification which marks stagnant items [DEFERRED] to prevent re-surfacing.
Read the latest .ouroboros/reports/iteration-N.md if it exists to understand what was already addressed.
Read .ouroboros/research.md — this contains the raw observations gathered in the research step.
If the file does not exist (e.g., first run or research step was skipped), fall back to reading key source files directly.
Apply judgment to the research observations and classify into three categories:
bugs — Clear bugs, error-prone code, incorrect logic
quality_issues — Code quality problems
enhancement_opportunities — Improvements that would add value
When classifying, apply the user's intensity setting (from config.json or handoff.md):
conservative: only report unambiguous issues with clear evidencebalanced: report clear issues and well-justified improvementsaggressive: include speculative improvements and broader refactoring opportunitiesAfter classifying findings, determine whether the upcoming fix and enhance steps can run in parallel. This is the analyze step's responsibility as defined in agents/ouroboros-agent.md — Parallelization Guide, Path A.
Procedure:
Collect the set of files targeted by fix candidates (bugs + quality_issues findings that name specific files).
Collect the set of files targeted by enhance candidates (enhancement_opportunities findings that name specific files).
Check for intersection:
parallel_eligible: trueparallel_eligible: falseparallel_eligible: false (conservative default)Write the result into state.json as a top-level field (step 3 will write findings; write parallel_eligible in the same write operation or immediately after):
{
"parallel_eligible": true
}
Why this matters: If parallel_eligible is absent or false, the Ouroboros agent will always run fix then enhance sequentially. Only by setting true here can Path A (Agent Teams) or Path B (Bash run_in_background) parallelization be activated. See agents/ouroboros-agent.md §Parallelization Guide for the dispatch patterns and concurrency limits.
Note: Do not set parallel_eligible: true speculatively. If there is any ambiguity about file overlap, default to false.
Update (merge) the findings field in .ouroboros/state.json. Do NOT replace the entire file.
Merge strategy:
[RESOLVED] entries — never drop or overwrite them{
"findings": {
"bugs": [
"[RESOLVED] existing-resolved-bug-preserved",
"new-bug-appended"
],
"quality_issues": [
"[RESOLVED] existing-resolved-quality-issue-preserved",
"new-quality-issue-appended"
],
"enhancement_opportunities": [
"[RESOLVED] existing-resolved-enhancement-preserved",
"new-enhancement-appended"
]
}
}
After saving state.json, output a completion message. The agent (not this skill) is responsible for invoking ouroboros-loops:context-handoff next.
npx claudepluginhub juyeongyi/jylee_claude_marketplace --plugin ouroboros-loopsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.