# Cocoharvest

Decompose an approved plan into parallel workstreams, assign specialist personas...

- Repository: https://github.com/Snowflake-Labs/cocoplus (727 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-04
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Snowflake-Labs/cocoplus --skill cocoharvest -g -a claude-code -y`
Codex: `npx skills add Snowflake-Labs/cocoplus --skill cocoharvest -g -a codex -y`
Cursor: `npx skills add Snowflake-Labs/cocoplus --skill cocoharvest -g -a cursor -y`
Gemini CLI: `npx skills add Snowflake-Labs/cocoplus --skill cocoharvest -g -a gemini-cli -y`

## Description

Decompose an approved plan into parallel workstreams, assign specialist personas, classify stages as HITL or AFK (CocoLens), generate flow.json stages with checkpoints and dual-file state, and create per-stage prompt files. Includes adaptive parallelism, stall detection, shell identity injection, and consecutive failure escalation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Your objective is to decompose the approved plan into parallel workstreams and generate a complete flow.json pipeline.

Before proceeding, verify that `.cocoplus/` exists in the current directory.
If it does not, output: "CocoPlus not initialized in this directory. Run `$pod init` to begin." Then stop.

Read `.cocoplus/lifecycle/plan.md`. If it does not exist or is empty:
Output: "No approved plan found. Run `$plan` to create an execution plan first." Then stop.

## Step 1: Parse Workstreams

Read `.cocoplus/lifecycle/plan.md` section `## Workstreams`.
Extract each workstream as a discrete unit of work with:
- Name
- Description
- Dependencies (other workstreams this depends on)
- Artifacts it produces

## Step 2: CocoLens, HITL/AFK Stage Classification

For each workstream, classify it as **HITL** (Human In The Loop) or **AFK** (Away From Keyboard) before assigning a persona:

- **HITL:** The stage requires human judgment before it can proceed or before its output is consumed. Classify as HITL when: the stage makes architectural decisions, involves evaluation methodology choices, writes to production schemas, deploys or alters Snowflake objects with EHRB indicators, or its output is ambiguous enough that autonomous resolution could be incorrect.
- **AFK:** The stage can run and complete autonomously without developer input. Classify as AFK when: the stage implements a well-specified deliverable, the success criteria are unambiguous, and the stage's on_failure behavior is clear.

Write `hitl: true` or `hitl: false` to each stage's `flow.json` definition. HITL stages suspend pipeline execution after completion and surface a developer review prompt before downstream stages are spawned. The developer may override the classification: output the HITL/AFK assignment for each stage and ask "Does this classification look right? (yes / override <stage-id> <hitl|afk>)" before writing `flow.json`.

## Step 3: Classify Workstreams by Domain

The rest: https://github.com/Snowflake-Labs/cocoplus/blob/HEAD/.cortex/skills/cocoharvest/SKILL.md
