Skills

Patterns Promote

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

Install

npx skills add Snowflake-Labs/cocoplus --skill patterns-promote -g -a claude-code -y
Category
Engineering
Updated
1mo ago
License
MIT
Context cost
Lightabout 1,382 tokens
Runs scripts
No, instructions only

What it does

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.

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:

Read the whole SKILL.md on GitHub

More in Engineering