Tune

From norrietaylor/distillery · View interactive version

Tune is an AI agent skill from the GitHub repository norrietaylor/distillery. Display and adjust feed relevance thresholds for alerts and digests

How to use this skill

Skill file

<!-- Trigger phrases: tune, /tune, adjust thresholds, change alert threshold, set digest threshold, tune my feed, show thresholds -->

Tune -- Feed Relevance Threshold Management

Displays and adjusts the alert threshold (high-priority items) and digest threshold (regular digest inclusion) used when scoring incoming feed items.

When to Use

Process

Step 1: Check MCP

See CONVENTIONS.md -- skip if already confirmed this conversation.

Step 2: Parse Arguments

| Flag | Description |

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

| --alert N | Set alert threshold (float in [0.0, 1.0]) |

| --digest N | Set digest threshold (float in [0.0, 1.0]) |

| --max N | Set max items per poll cycle (positive integer) |

| --reset | Reset to defaults (alert: 0.85, digest: 0.60) |

No flags = read-only mode (display current thresholds).

Validation rules:

Step 3: Retrieve Current Configuration

Read current thresholds by omitting the value parameter:

Extract the value field from each response.

Step 4: Apply Changes (if flags provided)

If --reset, target defaults (alert: 0.85, digest: 0.60; max unchanged).

Preview changes and ask for confirmation:

Proposed threshold changes:
  Alert:  <current> -> <new>
  Digest: <current> -> <new>
  Max items per poll: <current> -> <new>   (if --max provided)

Apply these changes? (yes/no)

If declined, display "No changes made." and stop.

Apply each change via distillery_configure:

Important: When both thresholds change, determine the correct order to satisfy the alert >= digest constraint:

If the user passes --max, inform them that max_items_per_poll is not yet configurable at runtime and skip that change.

If distillery_configure returns an error, display the error message and stop. Do not proceed with remaining changes if an earlier one fails.

Step 5: Display Results

Read-only mode:

Feed Relevance Thresholds

| Threshold | Value | Meaning |
|-----------|-------|---------|
| Alert     | 0.85  | Items at or above this score trigger an immediate alert |
| Digest    | 0.60  | Items at or above this score (but below alert) are included in the digest |

Items below the digest threshold (< 0.60) are discarded.
To adjust: /tune --alert <value> --digest <value>

After changes or reset: Same table with Previous/New columns sourced from distillery_configure response (previous_value and new_value fields). Include a confirmation line:

Changes applied at runtime and persisted to distillery.yaml.

If disk_written is false in the response, instead show: "Changes applied in memory only — no config file found to persist to disk."

Tuning guide (always include):

Tuning Guide:
- Raise alert threshold to reduce noise (fewer high-priority alerts)
- Lower digest threshold to capture more items in the digest
- Alert must always be higher than digest
- Defaults: alert=0.85, digest=0.60

Rules

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.