Harvest

From huytieu/COG-second-brain · View interactive version

Harvest is an AI agent skill from the GitHub repository huytieu/COG-second-brain. Capture durable session learnings, stage for human promotion to 05-knowledge/lizard, and propose skill/CLAUDE.md patches. Triggered by /harvest, SessionEnd hook staging, or nightly enhance. Never writes durable knowledge without your approval.

How to use this skill

Skill file

/harvest — session learning capture

Adapted from dwarves-kit harvest hook + vault lizard pipeline. Prevents tacit knowledge dying in the transcript.

Triggers

Phase 1 — Collect (automatic or manual)

Scan the current session for:

  1. Corrections you made ("no, actually X", rejected deliverables)
  2. New stable facts (IDs, URLs, decisions) not yet in 05-knowledge
  3. Process lessons (what worked, what failed, friction)
  4. Skill gaps (something that should be a Verify step or CLAUDE.md rule)

Append to 04-projects/harness/harvest/staging-<YYYY-MM-DD>.md:

## <HH:MM> — <trigger>
- type: correction|fact|process|skill-gap
- source: <file or "session">
- text: <one paragraph max>
- proposed_home: <path or "new lizard note">

Dedup: skip if same fact already in staging today or in 05-knowledge.

Phase 2 — Curate (`/harvest promote`)

Spawn harvest-curator (Sonnet). It writes /tmp/harvest-curate-<date>.md.

Lead (Opus) presents to the user:

Only after approval: write durable files. Update 05-knowledge/lizard/index.md.

Phase 3 — Retro line

One line to 01-daily/journal/<today>.md:

Harvest: <n> staged, <m> promoted, <k> folded

Rules

Nightly enhance (optional)

If you want harvest to run unattended, schedule a job that invokes the skills in

this order. There is nothing to install first, since COG ships no hooks.

/memory-hygiene
/harvest promote     # only if the staging file is non-empty
/content-factory     # only if scheduled
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.