MCPInstall

flywheel

Check knowledge flywheel health. Triggers: "flywheel", "check knowledge flywheel health.", "flywheel skill".

Installs
1K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/boshu2/agentops --skill flywheel
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads flywheel automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Flywheel Skill

Loop position: move 7 (capture + ratchet) of the operating loop — monitors the knowledge-pool health that the promotion ratchet feeds. Monitor the knowledge flywheel health.

The Flywheel Model

Sessions → Transcripts → Forge → Pool → Promote → Knowledge
     ↑                                               │
     └───────────────────────────────────────────────┘
                    Future sessions find it

Velocity = rate of knowledge flowing through. Friction = bottlenecks slowing the flywheel.

Folded triggers (ag-s43tg wave 1): ratchet routes here

  • ratchet → flywheel gate tracking. Use when asked to record Brownian Ratchet gates — tracking progress through the RPI workflow with permanent gates (Progress = Chaos × Filter → Ratchet; merged/closed/stored progress can't be un-ratcheted).
  • Gate surface: ao ratchet status / ao ratchet check <step> / ao ratchet record <step> --output "<artifact-path>" over the chain at .agents/ao/chain.jsonl (steps: research, plan, implement, vibe, post-mortem).
  • Ratchet tracks and locks progress; it does not run the loop itself — pair with /crank (epic loop) or /swarm (Ralph loop) to execute work.

Execution Steps

Given /flywheel:

Step 1: Measure Knowledge Pools

# Count top-level artifact files (avoid counting directories)
LEARNINGS=$(find .agents/learnings -maxdepth 1 -type f 2>/dev/null | wc -l)
PATTERNS=$(find .agents/patterns -maxdepth 1 -type f 2>/dev/null | wc -l)
RESEARCH=$(find .agents/research -maxdepth 1 -type f 2>/dev/null | wc -l)
RETROS=$(find .agents/retros -maxdepth 1 -type f 2>/dev/null | wc -l)
echo "Learnings: $LEARNINGS"
echo "Patterns: $PATTERNS"
echo "Research: $RESEARCH"
echo "Retros: $RETROS"

Step 2: Check Recent Activity

# Recent learnings (last 7 days)
find .agents/learnings -maxdepth 1 -type f -mtime -7 2>/dev/null | wc -l
# Recent research
find .agents/research -maxdepth 1 -type f -mtime -7 2>/dev/null | wc -l

Step 3: Detect Staleness

# Old artifacts (> 30 days without modification)
find .agents/ -name "*.md" -mtime +30 2>/dev/null | wc -l

Step 3.5: Check Cache Health

if command -v ao &>/dev/null; then
  # Get citation report (cache metrics)
  CITE_REPORT=$(ao metrics cite-report --json --days 30 2>/dev/null)
  if [ -n "$CITE_REPORT" ]; then
    HIT_RATE=$(echo "$CITE_REPORT" | jq -r '.hit_rate // "unknown"')
    UNCITED=$(echo "$CITE_REPORT" | jq -r '(.uncited_learnings // []) | length')
    STALE_90D=$(echo "$CITE_REPORT" | jq -r '.staleness["90d"] // 0')
    echo "Cache hit rate: $HIT_RATE"
    echo "Uncited learnings: $UNCITED"
    echo "Stale (90d uncited): $STALE_90D"
  fi
else
  # ao-free fallback: compute approximate metrics from files
  echo "Cache health (ao-free fallback):"
  echo "Active learnings (30d): $(find .agents/learnings/ -name '*.md' -mtime -30 2>/dev/null | wc -l | tr -d ' ')"
  echo "Forge candidates pending: $(ls .agents/forge/*.md 2>/dev/null | wc -l | tr -d ' ')"
  if [ -f .agents/ao/citations.jsonl ]; then
    echo "Total citations: $(wc -l < .agents/ao/citations.jsonl | tr -d ' ')"
    echo "Unique learnings cited: $(grep -o '"artifact_path":"[^"]*"' .agents/ao/citations.jsonl 2>/dev/null | sort -u | wc -l | tr -d ' ')"
  else
    echo "No citation data (citations.jsonl not found)"
  fi
  [ -f .agents/ao/outcomes.jsonl ] && echo "Session outcomes recorded: $(wc -l < .agents/ao/outcomes.jsonl | tr -d ' ')"
fi

Step 4: Check ao CLI Status

if command -v ao &>/dev/null; then
  ao metrics flywheel status 2>/dev/null || echo "ao metrics flywheel status unavailable"
  ao status 2>/dev/null || echo "ao status unavailable"
  ao maturity --scan 2>/dev/null || echo "ao maturity unavailable"
  ao anti-patterns 2>/dev/null || echo "ao anti-patterns unavailable"
  ao badge 2>/dev/null || echo "ao badge unavailable"

  # Knowledge maintenance
  ao dedup --merge 2>/dev/null || true
  ao contradict 2>/dev/null || true
  ao constraint review 2>/dev/null || true
  ao curate status 2>/dev/null || true
  ao metrics health 2>/dev/null || true
  ao metrics cite-report --days 30 2>/dev/null || true

  # Active pruning: archive stale, evict low-utility, and curate noisy uncited learnings
  ao maturity --expire --archive 2>/dev/null || true
  ao maturity --evict --archive 2>/dev/null || true
  ao maturity --curate --archive 2>/dev/null || true

  # Retrieval quality: use the representative live corpus when it exists
  if [ -d cli/cmd/ao/testdata/retrieval-bench-live ]; then
    ao eval bench --live --corpus cli/cmd/ao/testdata/retrieval-bench-live --json 2>/dev/null || true
  fi
else
  echo "ao CLI not available — using file-based metrics"
  echo "Pool depths:"
  for pool in learnings patterns forge knowledge research retros; do
    echo "  $pool: $(ls .agents/${pool}/*.md 2>/dev/null | wc -l | tr -d ' ')"
  done
  echo "  global patterns: $(ls ~/.claude/patterns/*.md 2>/dev/null | wc -l | tr -d ' ')"
  echo "See references/promotion-tiers.md for tier definitions"
fi

Step 4.5: Process Metrics (from skill telemetry)

If .agents/ao/skill-telemetry.jsonl exists, use jq to extract: invocations by skill, average cycle time per skill, gate failure rates. Include in health report (Step 6) under ## Process Metrics.

Step 5: Validate Artifact Consistency

Cross-reference validation: scan knowledge artifacts for broken internal references. Use scripts/artifact-consistency.sh (method documented in references/artifact-consistency.md). Default allowlist lives at references/artifact-consistency-allowlist.txt; use --no-allowlist for a full raw audit.

Health indicator: >90% = Healthy, 70-90% = Warning, <70% = Critical.

Step 6: Write Health Report

Write to: .agents/flywheel-status.md

# Knowledge Flywheel Health

**Date:** YYYY-MM-DD

## Pool Depths
| Pool | Count | Recent (7d) |
|------|-------|-------------|
| Learnings | <count> | <count> |
| Patterns | <count> | <count> |
| Research | <count> | <count> |
| Retros | <count> | <count> |

## Velocity (Last 7 Days)
- Sessions with extractions: <count>
- New learnings: <count>
- New patterns: <count>

## Artifact Consistency
- References scanned: <count>
- Broken references: <count>
- Consistency score: <percentage>%
- Status: <Healthy/Warning/Critical>

## Cache Health
- Hit rate: <percentage>%
- Uncited learnings: <count>
- Stale (90d uncited): <count>
- Status: <Healthy/Warning/Critical>

## Retrieval Quality
- Live corpus coverage: <percentage or unavailable>
- Live corpus learnings: <count or unavailable>
- Status: <Healthy/Warning/Critical>

## Health Status
<Healthy/Warning/Critical>

## Friction Points
- <issue 1>
- <issue 2>

## Recommendations
1. <recommendation>
2. <recommendation>

Step 7: Report to User

Tell the user:

  1. Overall flywheel health
  2. Knowledge pool depths
  3. Recent activity
  4. Any friction points
  5. Recommendations

Health Indicators

MetricHealthyWarningCritical
Learnings/week3+1-20
Stale artifacts<20%20-50%>50%
Research/plan ratio>0.50.2-0.5<0.2
Cache hit rate>80%50-80%<50%

Golden Signals

Four golden signals (always shown) reveal whether knowledge is truly compounding or just accumulating noise.

ao flywheel status              # table output with golden signals
ao flywheel status --json       # machine-readable

The Four Signals

#SignalQuestionKey Metric
1Velocity TrendIs σρ-δ increasing?Linear regression slope of baseline velocities (7d/30d)
2Citation PipelineAre citations useful?% of feedback with reward > 0.6
3Research ClosureIs research being mined?% orphaned research (no learning backlink)
4Reuse ConcentrationIs the whole pool active?Gini coefficient of citation distribution

Verdicts and Thresholds

SignalHealthyWarningCritical
Velocity Trendcompounding (slope > +0.01)stagnantdecaying (slope < -0.01)
Citation Pipelinereinforcing (>60% high-util)inert (30-60%)degrading (<30%)
Research Closuremining (<=10% orphans)—hoarding (>=10% orphans)
Reuse Concentrationdistributed (Gini<0.4, active>30%)concentrateddormant (Gini>0.7 or active<10%)

Overall verdict: 3+ healthy = compounding, 3+ critical = decaying, mixed = accumulating.

Recommended Actions

VerdictAction
decayingRun /compile cycle, archive stale artifacts, increase citation via ao lookup
accumulatingReview orphaned research (/research→/post-mortem --quick pipeline), improve /curate --mode=forge capture quality
compoundingMaintain cadence. Consider capturing baselines (ao metrics baseline) for trend tracking

Cache Eviction

Read references/cache-eviction.md for the full eviction pipeline (passive tracking → confidence decay → maturity scan → archive).

Hub Budget & Phase 4 Hardening

Phase 4 (soc-ytpq) governance for ~/.agents/learnings/ — all advisory, none block by default. Full details in references/hub-budget.md.

  • Size budget: target ≤ 250 MB / ≤ 5,000 files. Restore via ao maturity --evict --target-size=250M (lowest-utility-first; respects lifecycle.IsEvictionEligible so canonical / high-confidence files are protected).
  • Volume gate: ao harvest WARNs when promotions exceed --max-promotions=N (default 500; AO_MAX_PROMOTIONS=N env as fallback; ≤0 disables). WARN-only — the 2,638-promotion soc-ujls drain proves a hard gate would falsely block legitimate runs.
  • Provenance: every promoted file carries source_rig: in its frontmatter (empty writers serialize as source_rig: unknown). Both harvest.Promote and pool.(*Pool).Promote content-dedup against the same hub via ~/.agents/pool/promoted-index.jsonl.
  • Re-bloat triage: check SkipGlobalHub defaults to true (the agentops-b3v / soc-ujls fix), then grep -h '^source_rig:' ~/.agents/learnings/*.md | sort | uniq -c | sort -rn to identify the regressed writer. Use --target-size, never raw rm.

Key Rules

  • Monitor regularly - flywheel needs attention; address bottlenecks early
  • Feed the flywheel - run /post-mortem (or /post-mortem --quick)
  • Prune stale knowledge - archive old artifacts

Examples

User says: /flywheel — Counts pool depths, checks recent activity, validates artifact consistency, writes health report to .agents/flywheel-status.md. Hook trigger: After /post-mortem — Compares current vs historical metrics, flags velocity drops and friction points.

Troubleshooting

ProblemCauseSolution
All pool counts zero.agents/ directory missing or emptyRun /post-mortem (or --quick) to seed knowledge pools
Velocity always zeroNo recent extractions (last 7 days)Run /post-mortem (or --quick) to extract and index learnings
"ao CLI not available"ao command not installed or not in PATHInstall ao CLI or use manual pool counting fallback
Stale artifacts >50%Long time since last session or inactive repoRun /provenance --stale to audit and archive old artifacts

Reference Documents

  • references/artifact-consistency.md
  • references/promotion-tiers.md
  • references/hub-budget.md
  • references/cache-eviction.md
  • references/flywheel-cli.feature — Executable spec: ao flywheel CLI command behavior, linked to cmd tests (soc-jnfgi)

FAQ

What does the flywheel skill do?

Check knowledge flywheel health. Triggers: "flywheel", "check knowledge flywheel health.", "flywheel skill".

How do I install flywheel?

Run npx skills add https://github.com/boshu2/agentops --skill flywheel in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/flywheel/ (personal) or .claude/skills/flywheel/ (project).

Which AI agents can use flywheel?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is flywheel safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains flywheel?

It is published by boshu2 in boshu2/agentops. It has 1,045 recorded installs.

More from boshu2/agentops

View all →

council

boshu2/agentops

Compare independent opinions from several models or contexts without inflating agreement. Use when: wanting a second opinion or debate, or summarizing several reviewers' results.

3K installs

doc

boshu2/agentops

Write source-checked docs, READMEs, change descriptions and handoffs. Use when: documenting a change, leaving or resuming a handoff, or drafting a questionnaire for someone else.

research

boshu2/agentops

Answer one cited question on code, history, claims or patterns. Use when: asked how it works, why it changed, if a claim or done/shipped report holds, or a pattern warrants a rule.

plan

boshu2/agentops

Shape a request into one end-to-end slice with observable behavior; review write scope and reversible decisions. Use when: planning, breaking down or scoping a change.

swarm

boshu2/agentops

Dispatch explicit disjoint packets exactly once through a caller-selected executor. Triggers: "swarm", "dispatch disjoint packets", "parallel explicit tasks".

1.5K installs

rpi

boshu2/agentops

Drive one accepted change through implementation and checks to done, with one fresh review only where a mistake is costly. Use when: asked to run or orchestrate work through RPI.

Popular education & science skills

View category →

teach

mattpocock/skills

Teach the user a new skill or concept, within this workspace.

Education & Science874K installs

scaffold-exercises

mattpocock/skills

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

Education & Science488.2K installs

paper-context-resolver

lllllllama/rigorpilot-skills

Rigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing README guidance by default.

Education & Science478.3K installs

caveman-learn

juliusbrussee/caveman

Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned. Use when asked to lower an agent's token cost, what caveman has saved, to trim a heavy CLAUDE.md, or to offload re-pasted context into cavemem.

Education & Science107.9K installs

gsap-plugins

greensock/gsap-skills

Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin, scroll-to, flip animations, draggable, SVG drawing, or plugin registration.

Education & Science67.9K installs

teach-impeccable

pbakaus/impeccable

DEPRECATED: Use /impeccable teach instead. This command has been folded into the impeccable skill.