Distill

From mikeprasad/aria-knowledge · View interactive version

Distill is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. Shape messy task input into an implementation-ready task spec with scope, criteria, risks, dependencies, and execution plan. Trigger on /distill or turn this into a task spec.

How to use this skill

Skill file

/distill — Task transformation

Turn raw task text into a tiered executable spec following TASK.schema.md. Auto-tiers by complexity or accepts explicit --tier. Optional --group loads CODEMAPs for cited-path context.

Step 0: Inputs

<!-- shared-block: group-loader -->

Read ~/.claude/aria-knowledge.local.md. Parse YAML frontmatter projects_groups (multi-line YAML block — see CONFIG.md "Skill-only fields" for canonical schema, including the optional stitch_path sub-field and custom-role conventions).

Look up <tag> in projects_list (get project_root) and projects_groups (get role → folder dict).

Auto-propose bootstrap (when projects_groups[<tag>] is missing but <project_root> contains multiple sync-bound codebases — separate repo dirs or a contract→clients seam):

  1. Scan <project_root> one level deep for sub-directories with repo or contract markers:
  1. Handle role conflicts: if two dirs inferred as same role, prompt user to assign distinct keys (web, web-admin, etc.).
  2. Propose the group structure to user: sub-repo names, inferred roles, YAML block to insert. Show a preview diff of the change to ~/.claude/aria-knowledge.local.md.
  3. On approval, edit the config file to add the projects_groups[<tag>] entry, preserving existing fields and YAML structure.
  4. On decline, stop with "proceed after registering group manually".

Resolve each (role, folder) pair to absolute path: <project_root>/<folder>. For each absolute path, read CODEMAP.md if it exists. Read <project_root>/STITCH.md if it exists. Return resolved path map + warnings for any missing CODEMAPs.

<!-- /shared-block: group-loader -->

| Signal | Points |

|--------|--------|

| >1 layer (FE+BE, BE+DB, …) | +2 |

| New endpoint / route / model / migration | +2 |

| External service (Stripe, Twilio, S3, SendGrid, Algolia, OpenAI, Vercel, …) | +2 |

| Auth / permissions / security | +2 |

| Input >150 words or multi-paragraph | +1 |

| Names >3 files | +1 |

| Single-sentence trivial edit | −3 |

Score ≤ 0 → micro; 1–3 → standard; ≥ 4 → full.

Step 1: Schema

Follow ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/template/distill/TASK.schema.md section tags [R] [L] [O] [F].

Step 2: Single chosen approach

One implementation path per layer section. No option menus inside a layer. Matches the discipline of Rule 22's Execute step: commit to one plan.

Step 3: Validation

On validation failure: self-correct once, then move remaining gaps to Assumptions as blocking items.

Step 4: Output

Default output path: TASK.md in CWD.

Overwrite safety:

Flags override defaults:

Writing steps:

  1. Determine final target path from flags / default.
  2. If archive applies: verify .aria-distill/archive/ exists (create if not), move existing file in with timestamped name.
  3. Write spec to target path.
  4. Print summary: tier chosen, score (if auto), target path, archive path (if any), advisory-vocab warnings (if any).

No backlog or side files beyond the archive.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.