# Patterns Promote

Promote a CocoCupper finding to a reusable pattern in the CocoGrove pattern library.

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

## Install

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

## Description

Promote a CocoCupper finding to a reusable pattern in the CocoGrove pattern library. Interactive: confirms the finding, asks for a name and tags, writes a .md pattern file.

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

Your objective is to promote a CocoCupper finding to a CocoGrove pattern.

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

## `$grove score <pattern-id>`, Promotion Scoring (Durability × Impact × Scope)

Before any promotion is confirmed, run `invoke cocogrove/grove-score --id <pattern-id>` (or run this scoring interactively when invoked directly as `$grove score`). Score the candidate pattern on three dimensions, each zero to three:

- **Durability**, 0: one-time fix · 1: temporary workaround · 2: stable pattern · 3: architectural truth. Assesses whether the pattern remains valid for 30+ days and across schema/data changes.
- **Impact**, 0: nice-to-know · 1: saves a minute · 2: prevents mistakes · 3: prevents breakage.
- **Scope**, 0: one file only · 1: one directory · 2: entire CocoPod · 3: all CocoPods of this type.

**Decision thresholds:**
- Total ≥ 6 → **promote** (move to CocoSkill or convention store)
- Total 4, 5 → **watch** (revisit next review cycle)
- Total ≤ 3 → **ignore** (leave in capture store or delete if stale)
- **Override:** a score of 3 on any single dimension is a strong promotion candidate regardless of total, any architectural truth, any breakage-preventing finding, or any CocoPod-universal pattern requires explicit human review before demotion, even if the total would otherwise suggest "watch" or "ignore".

Display the scoring summary and decision threshold result before promotion is confirmed:
```
CocoGrove Promotion Score, [pattern-id]
  Durability: [0-3]  Impact: [0-3]  Scope: [0-3]  Total: [N]
  Decision: PROMOTE | WATCH | IGNORE [+ override note if a single-dimension 3 applies]
```

## Distillation Rules

Apply all three before writing any convention entry, these are mandatory text transformations, not style preferences:

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