execution-context-builderlisted
Install: claude install-skill smicolon/ai-kit
# Execution Context Builder
Take a `full_context` record and write the two canonical artifacts.
## Activation Triggers
This skill activates when:
- `flow-detector` returned exactly **one** candidate (skip selector, come straight here).
- `flow-selector` has resolved the user's pick (or synthesized one from "Other").
This skill never asks the user a question. If the input `full_context` has missing fields, fill them with conservative defaults (see "Field Defaults" below) and move on.
## Inputs
The skill receives:
- `task` — the original task description (string), and optionally a source ref (e.g., `ENG-123`).
- `full_context` — the chosen candidate's context record. Schema is defined in `references/execution-context.json`.
## Process
### 1. Resolve the slug
Generate a slug from the task title:
- Lowercase, replace non-alphanumeric runs with `-`, strip leading/trailing `-`.
- Truncate to **60 characters** max, on a word boundary.
- If the result is empty (no usable characters), fall back to `clarification-YYYYMMDD-HHMMSS` using the current local time.
Examples:
- `"Send message on sign-in"` → `send-message-on-sign-in`
- `"Migrate auth to Better Auth (Phase 2)"` → `migrate-auth-to-better-auth-phase-2`
- `"!!!"` → `clarification-20260427-143022`
### 2. Fill defaults
If any required field in `full_context` is missing, fill with these defaults:
| Field | Default |
|-------|---------|
| `trigger.timing` | `"after"` |
| `trigger.preconditions` | `[]` |
| `action.channel`