Skip to content
Back to skills

Execution Engine

ASecurity

Manage CocoFlow 2.0 execution plan templates under .cocoplus/flows/templates.

  • 724 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agents

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add Snowflake-Labs/cocoplus --skill execution-engine --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Execution Engine?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Execution Engine
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/snowflake-labs-execution-engine-8f536dbe/badge)](https://www.skillsdirectory.com/skills/snowflake-labs-execution-engine-8f536dbe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "flow-template"
description: "Manage CocoFlow 2.0 execution plan templates under .cocoplus/flows/templates."
version: "1.0.0"
author: "CocoPlus"
tags:
  - cocoplus
  - execution-engine
  - flow-template
---

Your objective is to manage reusable CocoFlow execution plan templates.

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

Templates live under `.cocoplus/flows/templates/`. They capture the orchestration pass output for a successful flow run: strategic assessment summary, dependency graph, dependency groups, model tier assignments, per-step context briefs, expected outputs, validation commands, and measured planning/execution cost split.

## Commands

### `$flow template list`

1. Read every `*.json` file in `.cocoplus/flows/templates/`.
2. Display: name, source session, archetype, saved_at, last_used_at, reuse_count, and estimated planning bypass savings.
3. If no templates exist, output: "No execution plan templates saved. Run `$flow template save --from <session-id> --name <name>` after a successful flow run."

### `$flow template save --from <session-id> --name <name>`

1. Locate the completed orchestration artifact for `<session-id>` in `.cocoplus/flows/runs/` or `.cocoplus/harvest/`.
2. Verify it contains:
   - `dependency_graph`
   - `dependency_groups`
   - `tier_assignments`
   - `context_briefs`
   - `expected_outputs`
3. Refuse to save if any per-step `context_briefs[*].text` exceeds 200 words.
4. Write `.cocoplus/flows/templates/<name>-plan.json` atomically.
5. Append a `FLOW_TEMPLATE_SAVED` entry to `.cocoplus/meter/template-benchmarks.jsonl` if meter state exists.

### `$flow template validate <name>`

1. Load `.cocoplus/flows/templates/<name>-plan.json`.
2. Compare template steps with current `.cocoplus/flow.json`.
3. Validate referenced Snowflake objects against available trace/context artifacts when present.
4. Report PASS, WARN, or FAIL with named incompatibilities. A FAIL means `$flow run` must use a fresh orchestration pass.

### `$flow template show <name>`

Display strategic fit, dependency groups, model tier assignments, and context brief shapes. Do not print full historical worker context unless explicitly requested.

### `$flow template delete <name>`

Archive to `.cocoplus/flows/templates/archive/<timestamp>-<name>-plan.json` rather than deleting.

## V2 Integration

At the beginning of `$flow run`, attempt template matching. If a validated template matches the current `flow.json` shape and context slots, skip the strategic assessment and orchestration pass and dispatch from the template. Otherwise, run fresh orchestration and offer to save the resulting plan after completion.

## Exit Criteria

- [ ] `list` reports all saved templates and handles the empty state.
- [ ] `save` refuses incomplete orchestration artifacts and context briefs over 200 words.
- [ ] `validate` names each incompatibility.
- [ ] `show` previews template shape without flooding worker context.
- [ ] `delete` archives rather than removes.

## Anti-Rationalization

| Shortcut / Temptation | Why It Fails |
|-----------------------|--------------|
| Treat the skill as complete because the file exists | Skill contracts must describe observable behavior and verification, not just command names. |
| Skip artifact and safety checks for a small command | Small commands still mutate state or guide execution; preserve the same gates. |

Files in this skill

  • flow-event-reader.skill.md3.1 KB
  • flow-gate-clear.skill.md1.6 KB
  • flow-gate-status.skill.md1.4 KB
  • flow-pause.skill.md1.2 KB
  • flow-research.skill.md1.9 KB
  • flow-resume.skill.md1.6 KB
  • flow-run.skill.md23.3 KB
  • flow-settle.skill.md2.1 KB
  • flow-status.skill.md3.4 KB
  • flow-template.skill.md3.4 KB
  • flow-view.skill.md4.3 KB
  • model-tier-resolve.skill.md1.6 KB
  • noop-check.skill.md1.5 KB
  • runtime-queue.skill.md3.3 KB
  • templates/drain-loop.md392 B
  • templates/hitl-gate.md358 B
  • templates/litmus-test.md398 B
  • templates/noop-workflow.md441 B
  • templates/per-project-working-directory.md408 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…