No work step here. This is probably a skill that reads or coordinates, not one that produces something.
.md file to compare - side-by-side diff against action-item-draft
action-item-draft
description: "Triggers on prompt mention of 'action-item-draft'."
What it does for you
Turns a to-do from a meeting into a ready-to-send follow-up for you to approve.
What it produces
A recent result, so you can see the kind of work it returns.
loading…
How to get it
These run inside the Snappy workspace. Want this working in your business? I set skills like this up with you, in one focused week.
For developers how this skill is built, graded, and how it runs
at a glance- the short version
what's inside - the parts that make up a skill 2/4 present
A skill is just a few plain-text files. Only the main one is required. The rest are optional, added as the work needs them. This is what the skill is made of; how it runs is just below.
state/skills/action-item-draft/SKILL.md
present
state/lib/action-item-draft.ts
not present
state/bin/action-item-draft/
not present
state/skills/action-item-draft/AGENTS.md
present
how it runs - the shared frame every skill uses 3/5 present
Every skill runs the same way. One part does the work, a separate part checks it, and a short loader hands the AI exactly what it needs for the job. Anything this skill doesn't use shows a one-line note saying why, on purpose, not by accident.
No separate check found. Without one, the part that makes the work could end up approving its own work, worth a closer look.
state/log/evals.ndjson - SCOPE-ONLY. Drafts land in state/log/action-item-draft/<utc-iso>-<short-id>-draft.md. Nothing publishes without a row in state/log/approvals.ndjson.
- Frontmatter MUST carry BOTH action_item_id AND meeting_id — cockpit links draft → source via these. Missing either ⇒ shape gate fails ⇒ score 0.
- Pick artifact shape (LinkedIn post / email / message) from the action item content. No default shape. Inference is the actor's job, not a fallback.
- Truncate the meeting document to 6KB before passing to the dispatch prompt. Anything bigger blows the context budget.
- Dispatch via state/lib/dispatch.ts with model: "sonnet" — NOT "claude" (no such alias; throws "unknown model alias"). Valid aliases: sonnet/opus/haiku/gemini. NEVER shell out to claude -p directly.
- Earnest voice. No "holler if anything is off", no "shoot me a note", no folksy closers. End with a concrete next step or "Looking forward to our call."
- +6 more in AGENTS.md →
what it has learned - fixes written back in over time sample
When a run hits something this skill didn't handle, the fix gets written back into the skill so it doesn't happen again. FIXED means it was corrected on the spot. LOGGED means it's queued for a bigger rewrite. Either way, the skill gets a little better and never makes the same mistake twice.
- Loading feedback rows…
SKILL.md- the skill, written out in plain English
Backed by: state/lib/krisp.ts, state/lib/dispatch.ts, state/bin/action-item-draft/run.ts
action-item-draft
The Krisp Loop closer. A meeting ends → action items appear in the cockpit → click "Draft" on one → this skill fires → a draft lands in /drafts linked back to its source action item + meeting. Robert reviews, approves, edits, or dismisses. The approval row teaches the system his taste.
Scope-only by default - drafts land in state/log/action-item-draft/ and surface in the cockpit Drafts page. Nothing publishes until approved.
Steps
The sidecar (state/bin/action-item-draft/run.ts) does the work end-to-end. Invoked by /run-skill action-item-draft::id:<aid>::meeting:<mid> from the KrispScreen "Draft" button. Reads SNAPPY_INTENT for the args.
- Parse
SNAPPY_INTENT→ extractaction_item_id(required) + optional
meeting_id. If meeting_id is missing, resolve via fetchActionItems from state/lib/krisp.ts. NOTE: Krisp's list_action_items silently returns [] when limit > 50 - pass limit: 50 (the true cap). If the action item id is not in the first 50 (older / completed), proceed with meeting-only context and score 0.5 - better degraded output than a hard fail.
- Fetch full meeting document via
fetchMeetingDocument(meeting_id).
Includes transcript, attendees, notes. Truncate to 6KB for the prompt.
- Dispatch via
state/lib/dispatch.tswithmodel: "sonnet"(NOT
"claude" - the alias is sonnet/opus/haiku; passing "claude" throws "unknown model alias"). On failure, fall back to model: "gemini" and score 0.5. Prompt: action item title + meeting context + earnest- tone + "draft the right artifact shape" instruction.
- Write the result to
state/log/action-item-draft/<utc-iso>-<short-id>-draft.md with frontmatter:
---
action_item_id: <aid>
meeting_id: <mid>
meeting_name: <name>
action_item_title: <title>
created: <utc-iso>
---
Body = the dispatched draft text.
- Call
score("action-item-draft", run_id, { score: 1, ... })with
distinct actor + auditor session ids. Include artifact_path so the eval row points back to the file it produced.
Eval
auto. Shape gate: artifact file exists, frontmatter has both action_item_id and meeting_id, body is non-empty. Score 1 when all true; 0 when any fail; 0.5 when the dispatch fell back to a non-Claude model (recoverable but degraded).
Why
This is the missing seam. Before this skill existed, a Krisp action item sat read-only in the cockpit and Robert had to context-switch to compose anything against it. With this skill + the KrispScreen Draft button + the DraftsScreen approval surface, the loop closes inside the cockpit: meeting → action item → draft → approve/edit/dismiss → done.
AGENTS.md- what the AI loads when this skill comes up
action-item-draft - loader
Per-turn rules. Full reference: state/skills/action-item-draft/SKILL.md. Do not skip these.
Critical Rules
- SCOPE-ONLY. Drafts land in
state/log/action-item-draft/<utc-iso>-<short-id>-draft.md. Nothing publishes without a row instate/log/approvals.ndjson. - Frontmatter MUST carry BOTH
action_item_idANDmeeting_id- cockpit links draft → source via these. Missing either ⇒ shape gate fails ⇒ score 0. - Pick artifact shape (LinkedIn post / email / message) from the action item content. No default shape. Inference is the actor's job, not a fallback.
- Truncate the meeting document to 6KB before passing to the dispatch prompt. Anything bigger blows the context budget.
- Dispatch via
state/lib/dispatch.tswithmodel: "sonnet"- NOT"claude"(no such alias; throws "unknown model alias"). Valid aliases:sonnet/opus/haiku/gemini. NEVER shell out toclaude -pdirectly. - Earnest voice. No "holler if anything is off", no "shoot me a note", no folksy closers. End with a concrete next step or "Looking forward to our call."
- Krisp's
list_action_itemssilently returns[]whenlimit > 50. Uselimit: 50. If the action item isn't in the first 50 (old/completed), proceed with meeting-only context and score 0.5 - degraded > fail. SNAPPY_INTENTparse: split on::first, THEN split each token on the FIRST:only. Meeting ids contain colons - naive global:split corrupts them.- Actor ≠ auditor (CONSTITUTION #3).
actor_session_id = sessionId();auditor_session_id = "action-item-draft-aud-<ts>-<hex>". Build independently. - Inject the latest
state/log/taste-hints.ndjsonline for(action-item-draft, <chosen-shape>)into the dispatch prompt when one exists - that's the closed taste loop withdistill-approvals. - A/B control arm: when a hint IS available, randomize 50/50 whether to inject it. The control arm (no hint) is what makes the loop measurable - without it we can't tell if hints are doing anything vs being placebo. Track
is_control: bool,active_taste_hint: string|null, andinferred_shape: DraftShapein eval rowextraso distill can later answer "does the treatment arm beat control by ≥10pp at n≥30?" Honest acknowledgment: this is randomized A/B, not RL. - Post-dispatch shape inference uses
state/lib/draft-shape.ts::inferShapeFromBody. Same libdistill-approvalsuses - drift here silently breaks the loop (writer says "linkedin-post", reader buckets "email", hint never matches the shape that produced it). Don't inline a parallel heuristic.
Commands
| ui dashboard | state/skills/action-item-draft/resources/ui.openui |
| purpose | invocation |
|---|---|
| invoke (cockpit) | POST /dispatch {key:"/run-skill", scope:"action-item-draft::id:<aid>::meeting:<mid>"} |
| invoke (cli) | SNAPPY_INTENT="id:<aid>::meeting:<mid>" npx tsx state/bin/action-item-draft/run.ts |
| fetch action item | import { fetchActionItems } from "../lib/krisp.ts" - pass { limit: 50 } |
| fetch meeting | import { fetchMeetingDocument } from "../lib/krisp.ts" - truncate result to 6KB |
| dispatch | import { dispatch } from "../lib/dispatch.ts" - { model: "sonnet", system, user } (fallback "gemini") |
| score | import { score, sessionId } from "../lib/eval.ts" - pass artifact_path |
| drafts dir | state/log/action-item-draft/ |
| approvals log | state/log/approvals.ndjson (read-only here; distill-approvals consumes it) |
| taste hints | state/log/taste-hints.ndjson (inject latest (action-item-draft, <shape>) line into prompt) |
| eval log | state/log/evals.ndjson (skill: "action-item-draft") |
Mandatory draft frontmatter
---
action_item_id: <aid>
meeting_id: <mid>
meeting_name: <name>
action_item_title: <title>
created: <utc-iso>
---
Artifact shape selection
| signal in action item | shape |
|---|---|
| "post about", "share", "LinkedIn", public framing | linkedin-post |
| "email <person>", "send <person>", reply needed, Subject-style | email |
| 1:1 nudge, Slack/iMessage tone, short ack | message |
Recoverable conditions (exit 0, not 1)
| condition | score | primary_issue |
|---|---|---|
Krisp 401 after fetchKrisp auto-refresh | 0.5 | krisp-auth-expired |
fetchMeetingDocument returns null (Krisp still processing) | 0.5 | meeting-not-ready |
Action item id not in first 50 from list_action_items | 0.5 | action-item-not-found |
Dispatch fell back to non-Claude model (e.g. gemini) | 0.5 | dispatch-fallback |
Hard fails (artifact missing / frontmatter incomplete / body empty / wrong model alias) ⇒ score 0. Never crash the run - the cockpit retries on the next tick.
Self-Test
Reading this loader, an agent should:
- [ ] Parse
SNAPPY_INTENT="id:<aid>::meeting:<mid>"without splitting meeting-id colons. - [ ] Resolve
meeting_idfrom the action item if absent in intent (withlimit: 50). - [ ] Truncate the meeting document to 6KB before dispatch.
- [ ] Pick shape from action-item content (no default), inject taste hint if present.
- [ ] Dispatch with
model: "sonnet"(NOT"claude"); fall back to"gemini"and score 0.5 on failure. - [ ] Write the draft with
action_item_idANDmeeting_idin frontmatter. - [ ] Call
score()with distinct actor + auditor session ids andartifact_path. - [ ] Exit 0 with
score: 0.5+primary_issueon recoverable failures (table above).
Self-report
If this loader fell short:
echo "[$(date -u +%FT%TZ)] action-item-draft: <what was missing>" >> state/log/loader-feedback.log
<!-- kernel-ok: historical attribution for the PID-loader pattern. -->
Self-correcting loader (PID feedback)
This is the rule that makes loaders learn. Ported from snappy-kernel, where it demonstrably worked: the snappy-dom-cartographer skill mapped Skool admin UI once, every later ship-agent inherited the full map for free.
Before you finish, do two things:
1. Fix gaps (P - proportional). MANDATORY. If this loader didn't cover your case - if you had to read another file, run an undocumented command, work around a wrong selector, or discover a quirk - you MUST attempt an Edit to this AGENTS.md before you log.
- Default action: edit this file. Surgical. Add the missing line, table
row, or code example where it belongs. No restructuring.
- Only
LOGGEDis allowed when: the fix needs >10 lines, spans multiple
files, or requires a structural rewrite. In that case the state/regen/drain.sh queue picks it up asynchronously.
- "I didn't have time" / "it's minor" / "the next agent will figure it out"
are NOT valid reasons. Minor gaps compound - that's the whole point of this loop.
- Concrete example of a valid P-fix: discover
agent-browser screenshot
takes path positionally not as --output <path>. One line in a table. Edit it in. Do not just log it.
- The goal: the next agent never has to leave the loader.
2. Log the result.
echo "[$(date -u +%FT%TZ)] action-item-draft: <what was missing or fixed> [FIXED|LOGGED]" >> state/log/loader-feedback.log
FIXED= you patched this loader inline (P-fix).LOGGED= too large for inline; the PostToolUse enqueue + Stop-hook drain
will rewrite the loader from scratch on next session-end.
Do not skip this. Every agent run must leave the system better than it found it. The loader is the setpoint; you are the sensor; the gap is the error signal; closing the gap is the correction.
OpenUI Resource
- Skill-owned OpenUI Lang resource:
state/skills/action-item-draft/resources/ui.openui. Read it before rendering or editing this skill's generated component surface. - Treat this resource as a first-class artifact of the skill, not a generic chat response. Improve it when the skill's user-facing output needs to become richer.
- System resources compose OpenUI primitives and inherit SnappyChat tokens. Use
ui_contract: brandedin SKILL.md only for deliberate platform or client visuals.
api.ts- the code it can call
⚠ no api.ts - this skill has no typed action surface
scripts- helper scripts it can run
prose-only skill - no sidecar under state/bin/ yet. Steps, if any, are described in SKILL.md.
how we check it- the checks, plus the last 10 runs
| timestamp | verb | score | primary_issue | artifact |
|---|---|---|---|---|
| 2026-04-27 02:15Z | - | 1.00 | - | - |
| 2026-04-27 02:11Z | - | 1.00 | - | - |
| 2026-04-27 02:11Z | - | 1.00 | - | - |
| 2026-04-27 02:11Z | - | 1.00 | - | - |
| 2026-04-27 02:11Z | - | 1.00 | - | - |
| 2026-04-27 02:11Z | - | 1.00 | - | - |
| 2026-04-27 02:10Z | - | 0.00 | - | - |
| 2026-04-27 01:44Z | - | 1.00 | - | - |
| 2026-04-27 01:41Z | - | 1.00 | - | - |
| 2026-04-27 01:39Z | - | 0.50 | - | - |