cellm/skills/plan-to-spec/SKILL.md
Convert a Claude Code plan file into a CellmOS spec check with phases, tasks, and DAG edges. Use when: plan ready to execute, user wants spec-driven workflow, 'decompose this plan', 'plan to spec'. Reads plan markdown, extracts briefings, creates atomic spec tree in Oracle DB.
npx skillsauth add murillodutt/cellm cellm/skills/plan-to-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert a user-approved plan into a spec tree through the SCE decomposition bridge.
plan-to-spec as orchestration layer, not decomposition engine logic.spec_search).context_spec_decompose / decomposeSpec) is a single DB transaction that can auto-activate the check (autoStart, default true) and insert phases immediately — there is no server pause between check and phases inside that call.spec_create_node: new checks start pending; phase / task under a check require the root check to be active (spec_transition) or the API returns CHECK_NOT_APPROVED.context_spec_decompose as primary decomposition path.check.body.approvalTicket to support conditional Stage 2 skip in execute. Required fields:
ticketIdscope (decompose+execute-stage2)approvedBy (owner)sessionIdapprovedAt (epoch ms)ttlMinutes (default 30)executionMode (conservative | balanced | throughput)treeFingerprint (deterministic string from approved decomposition payload)check.body.guardrailsContract (v1 minimum) as the canonical execution policy consumed by execute.
docs/technical/guardrails-contract-v1.mdspec_search). Ask user only if a real duplicate/ambiguity exists; otherwise continue.Grep and Glob to scan target files for deadweight patterns: USkeleton, UCard containers, rounded-lg border-default wrappers, page-title/page-subtitle CSS, overflow-hidden on nc-bracket, inline styles, ds-* legacy classes. Results feed as gap nodes into the decomposition payload. Gate behavior: WARN only (does not block decomposition).balanced.conservative/balanced/throughput).check.body.approvalTicketcheck.body.guardrailsContract (from v1 template, optionally tightened by project context)safety_notes (Facts-first v0.1 — spec-655de45c F5): for each task, scan the plan markdown for a "Safety:" / "Safety notes:" / "### Safety" bullet list adjacent to or inside the task block. Extract bullets verbatim into task.body.safety_notes: string[]. If absent, omit the field. Forward-only — never invent notes.decisionMode (Facts-first v0.1): when the plan declares the path is already resolved (no A/B/C decision pending), set check.body.decisionMode = 'closed'. Otherwise omit (legacy=open).
Build treeFingerprint deterministically from approved payload summary:phaseCounttaskCount (recursive)edgeCountinjectConvergenceGate (0|1)
Format: p{phaseCount}-t{taskCount}-e{edgeCount}-cg{flag}.context_spec_decompose (fallback: spec_decompose / incremental spec_create_node only after check is active — never add phases/tasks under a pending check via incremental API).spec_get_tree AND spec_get_counters for the new check. If tree is empty or counters show 0 tasks, the decomposition FAILED silently. Retry once via fallback path (if using incremental path, ensure check is active). If still empty, ABORT and report: "Decomposition produced 0 tasks — check exists but is hollow. Manual intervention required." Never return success with 0 tasks.cellm:execute via Skill tool with the check ID returned from decomposition (e.g., spec-abc12345) in the same execution flow (no extra approval ask). All execution decisions (executor, autonomy, certification) are handled by cellm:execute as the single mandatory gate. Do NOT present execution menus here — cellm:execute owns M1/M2/M3 exclusively.When CELLM_DEV_MODE: true (verify via get_status MCP -> config.devMode):
After context_spec_decompose succeeds (step 5), generate a pure YAML fallback file at .claude/specs/{check-slug}.yaml.
| Rule | Detail |
|------|--------|
| Format | Pure YAML — no markdown code blocks, no backticks inside values |
| Multi-line | Use \| block scalar for action fields |
| Fields per task | id, title, action, fileRef, diffExpected, safety_notes |
| Sections | spec (id, title, briefing), decisions, gaps, dag_edges, phases with tasks, verification |
| Header | generated_at, stale_after: 24h, source_spec_id |
| Recovery | Include recovery_procedure field with instructions to recreate spec tree from this file |
| Max size | ~150 lines — condensed, IDs + actions + safety_notes only |
| Safety notes | Per-task risk notes — these do NOT exist in the DB, only in the YAML |
| Source of truth | DB is source of truth. YAML is read-only safety net for Worker crash recovery |
| Context embedding | Append [fallback: .claude/specs/{check-slug}.yaml] to the check's context field in spec_decompose. This lets execution skills find the YAML path by reading the spec context |
Ensure .claude/specs/ directory exists before writing (mkdir -p).
The decomposeSpec() service automatically injects a terminal Convergence Gate phase as the last phase of every spec. This phase:
successCriteria from all user phases into a single verification checklistdepends_on edges to ALL user phases (cannot start until all complete)Suppression: Pass injectConvergenceGate: false in the decomposition payload to skip gate injection (for trivial specs or tests).
Content governance (v1 → v2 transition, decision spec-1a5dee34):
convergenceGateAction field. Three agents with separated context (Autor → Revisor → Sintetizador) produce a validated convergence protocol per spec.When the spec is priority: critical or priority: high, the skill SHOULD run the A/B/C protocol before calling context_spec_decompose:
convergence-draftconvergence-reviewcontext_spec_decompose with convergenceGateAction: agentCOutputThe service replaces {{successCriteria}} placeholder in the custom text with the aggregated criteria list.
The skill does NOT need to manually add the Convergence Gate phase — it is injected by the service after all user phases are built.
spec_create_node to add phases/tasks under a pending check — server rejects with CHECK_NOT_APPROVED; use spec_transition to active first.approvalTicket.context_spec_decompose.cellm:execute. This skill redirects after decomposition, never duplicates menu logic.cellm:execute.check.body.guardrailsContract for new specs — execution must be contract-backed, not inferred.[+], [-], [!], [~] markers only (preserve emojis only inside literal user quotes).data-ai
Prose override — temporarily disable quantization and respond in readable prose. Use when relational density matters, for safety-critical explanations, onboarding handoffs, or when token economy is not the priority.
development
Govern explicit weekly Super PRs or maintainer-requested PR merges. Evaluates a 10-criterion readiness checklist and performs governed merge only when a user-requested PR is READY. Never creates or keeps permanent PRs. Use when: 'pr-check', 'pr-merge', 'merge this PR safely', 'is PR ready', 'guard merge', or /sk-git delegates pr-merge.
data-ai
Operational surface for the compress-llm Layer-1 token I/O compressor. Enable, disable, switch mode, and inspect status without editing config files. Use when tuning compression pressure for the current session or project.
tools
Generate structured upstream feedback for the CELLM engineering team. Produces evidence-first Markdown at docs/evidence/<date>-cellm-feedback-*.md for bugs, anti-patterns, deprecation gaps, and harness surprises, with optional atom registration via knowledge_ops. Use when: 'feedback for CELLM', 'send to CELLM team', 'register this as atom', 'document this anti-pattern', 'report this bug upstream'. Trigger proactively on MCP schema/runtime mismatches, mechanical edit loops (>=3 sequential edits), short deprecation windows (<6 weeks), or reusable harness surprises. Do NOT trigger for routine feature work or project-local bugs.