harvest

Cross-rig knowledge consolidation. One-time sweep + ongoing tiered promotion. Walks all .agents/ directories, extracts learnings/patterns/research, deduplicates across rigs, and promotes high-value items to global hub. Triggers: "harvest", "consolidate knowledge", "cross-rig sweep", "knowledge federation", "harvest knowledge".

244 stars

Best use case

harvest is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Cross-rig knowledge consolidation. One-time sweep + ongoing tiered promotion. Walks all .agents/ directories, extracts learnings/patterns/research, deduplicates across rigs, and promotes high-value items to global hub. Triggers: "harvest", "consolidate knowledge", "cross-rig sweep", "knowledge federation", "harvest knowledge".

Teams using harvest should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/harvest/SKILL.md --create-dirs "https://raw.githubusercontent.com/boshu2/agentops/main/skills-codex/harvest/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/harvest/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How harvest Compares

Feature / AgentharvestStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Cross-rig knowledge consolidation. One-time sweep + ongoing tiered promotion. Walks all .agents/ directories, extracts learnings/patterns/research, deduplicates across rigs, and promotes high-value items to global hub. Triggers: "harvest", "consolidate knowledge", "cross-rig sweep", "knowledge federation", "harvest knowledge".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Harvest — Cross-Rig Knowledge Consolidation

> **Nightly usage (2026-04-09):** `$dream start` now runs harvest as part
> of its bounded compounding loop. Use `$harvest` for manual sweeps, CI
> runs, or when Dream is disabled. Dream holds `.agents/overnight/run.lock`
> while running — manual `ao harvest` will refuse until the lock releases.

Sweep all `.agents/` directories across the workspace, extract learnings, patterns,
and research, deduplicate cross-rig, and promote high-value items to the global
knowledge hub (`~/.agents/learnings/`).

> **Naming gotcha.** `$harvest` promotes into `~/.agents/learnings/`, not
> `~/.agents/`. Users often say "harvest all to `~/.agents`" and mean the
> promotion hub. If you really want every raw artifact (not just the
> promotion set) mirrored verbatim, you want `rsync`, not `$harvest`.

## Which skill do I need?

See [docs/skills-decision-tree.md](../../docs/skills-decision-tree.md) for
the full "which skill next?" decision table covering harvest, compile,
dream, knowledge-activation, and quickstart.

## What This Skill Does

The knowledge flywheel captures learnings per-rig, but they stay siloed. Harvest
closes the loop by walking all rigs, extracting artifacts, deduplicating by content
hash, and promoting high-confidence items to the global hub where every rig can
access them via `ao inject`.

**When to use:** Before an evolve cycle, after a burst of development across
multiple rigs, or weekly as part of knowledge governance.

**Output:** `.agents/harvest/latest.json` (catalog) + promoted files in `~/.agents/learnings/`

## Execution Steps

### Step 1: Preview Scope (Dry Run)

```bash
ao harvest --dry-run --quiet
```

Read `.agents/harvest/latest.json` and report:
- Rigs discovered
- Total artifacts extracted
- Unique vs duplicate count
- Promotion candidates (artifacts >= min confidence)

### Step 2: Confirm Execution

**Skip if `--auto` is set.** Otherwise, show the dry-run summary and ask:

```
Harvest will promote N artifacts from M rigs to ~/.agents/learnings/.
Proceed? [Approve / Adjust threshold / Abort]
```

### Step 3: Execute Harvest

```bash
ao harvest --roots ~/gt/ --promote-to ~/.agents/learnings --min-confidence 0.5
```

### Step 4: Post-Harvest Cleanup

Run dedup on the promotion target to clean up any remaining duplicates:

```bash
ao dedup --merge ~/.agents/learnings/ 2>/dev/null || true
```

### Step 5: Report Results

Report to user:
- Rigs scanned
- Artifacts extracted and unique count
- Duplicates found (with top duplicate groups)
- Artifacts promoted (with provenance)
- Top discoveries (highest-confidence cross-rig patterns)

## Flags

| Flag | Default | Description |
|------|---------|-------------|
| `--auto` | off | Skip confirmation gate |
| `--roots` | `~/gt/` | Override root directories to scan |
| `--min-confidence` | 0.5 | Minimum confidence for promotion |
| `--include` | `learnings,patterns,research` | Artifact types to extract |

## Quick Start

```bash
$harvest                          # Full sweep with confirmation
$harvest --auto                   # Hands-free sweep
$harvest --min-confidence 0.7     # Only promote high-confidence items
$harvest --roots ~/gt/,~/projects/ # Scan additional directories
```

## Governance

See [references/governance.md](references/governance.md) for ongoing governance model:
size budgets, sweep frequency, staleness thresholds, and cross-rig synthesis triggers.

## See Also

- `$compile` — Single-rig Mine/Grow/Defrag
- `$flywheel` — Flywheel health monitoring
- `$inject` — Knowledge injection into sessions
- `$forge` — Transcript knowledge extraction

## Reference Documents

- [references/governance.md](references/governance.md) — Governance model for ongoing knowledge consolidation

Related Skills

vibe

244
from boshu2/agentops

Comprehensive code validation. Runs complexity analysis then multi-model council. Answer: Is this code ready to ship? Triggers: "vibe", "validate code", "check code", "review code", "code quality", "is this ready".

validation

244
from boshu2/agentops

Full validation phase orchestrator. Vibe + post-mortem + retro + forge. Reviews implementation quality, extracts learnings, feeds the knowledge flywheel. Triggers: "validation", "validate", "validate work", "review and learn", "validation phase", "post-implementation review".

update

244
from boshu2/agentops

Reinstall all AgentOps skills globally from the latest source. Triggers: "update skills", "reinstall skills", "sync skills".

trace

244
from boshu2/agentops

Trace design decisions and concepts through session history, handoffs, and git. Triggers: "trace decision", "how did we decide", "where did this come from", "design provenance", "decision history".

test

244
from boshu2/agentops

Test generation, coverage analysis, and TDD workflow. Triggers: "test", "generate tests", "test coverage", "write tests", "tdd", "add tests", "test strategy", "missing tests", "coverage gaps".

status

244
from boshu2/agentops

Single-screen dashboard showing current work, recent validations, flywheel health, and suggested next action. Triggers: "status", "dashboard", "what am I working on", "where was I".

standards

244
from boshu2/agentops

Language-specific coding standards and validation rules. Provides Python, Go, Rust, TypeScript, Shell, YAML, JSON, and Markdown standards. Auto-loaded by $vibe, $implement, $doc, $bug-hunt, $complexity based on file types.

shared

244
from boshu2/agentops

Shared reference documents for multi-agent skills (not directly invocable)

security

244
from boshu2/agentops

Continuous repository security scanning and release gating. Triggers: "security scan", "security audit", "pre-release security", "run scanners", "check vulnerabilities".

security-suite

244
from boshu2/agentops

Composable security suite for binary and prompt-surface assurance, static analysis, dynamic tracing, repo-native redteam scans, contract capture, baseline drift, and policy gating. Triggers: "binary security", "reverse engineer binary", "black-box binary test", "behavioral trace", "baseline diff", "prompt redteam", "security suite".

scenario

244
from boshu2/agentops

Author and manage holdout scenarios for behavioral validation. Scenarios are stored in .agents/holdout/ where implementing agents cannot see them. Triggers: "$scenario", "holdout", "behavioral scenario", "create scenario", "list scenarios".

scaffold

244
from boshu2/agentops

Project scaffolding, component generation, and boilerplate setup. Triggers: "scaffold", "new project", "init project", "create project", "generate component", "setup project", "starter", "boilerplate".