Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/work-items/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "work-items",
"version": "0.35.19",
"version": "0.35.21",
"description": "Manages development work items through a provider-neutral tracker seam that ships with the plugin (bundled dispatcher plus github and local-markdown adapters; seam plugin-dir canonical, adapters consumer-local-first): dashboard, taxonomy-labeled creation, a race-safe assignee-plus-lease claim protocol, recurring-schedule checks, TODO scanning, stale-lease auditing, plan decomposition into vertical-slice items, raw-intake triage (issues and unsolicited PRs through raw, verified, briefed, autonomous-eligible states), plus the two work-items loop lanes of the loop-lane convention: a self-paced autonomous work-loop drain (work-class admission gate, adaptive item cap, PR-only) and an attended attend-queue escalation lane. The re-runnable setup skill binds the provider (.work-item-tracker.json), seeds the recurring-schedule seam (.github/recurring-schedule.json), and remaps canonical role labels.",
"author": {
"name": "Melodic Software",
Expand Down Expand Up @@ -54,7 +54,7 @@
"work_loop_frontier_item_cap_ceiling": {
"type": "number",
"title": "Work-loop frontier-tier item cap ceiling",
"description": "Quota guard for frontier-capability-tier items in the work-loop lane: such items run at concurrency 1 and their adaptive cap is bounded by this ceiling instead of the general one. Keep it at or below work_loop_item_cap_ceiling. The frontier tier is read from the item body, which any item author can write, so a frontier ceiling above the general one would let a body claim buy higher throughput; the lane detects that inversion and ignores this ceiling, bounding the item by the general one instead. The manifest cannot enforce the ordering \u2014 userConfig min/max are static bounds with no cross-key validation.",
"description": "Quota guard for frontier-capability-tier items in the work-loop lane: items carrying capability-tier: frontier run at concurrency 1 and their adaptive cap is bounded by this ceiling instead of the general one. Keep it at or below work_loop_item_cap_ceiling. The frontier tier is read from the provider-permissioned label only; absent label = general tier (fail-closed).",
"default": 2,
"min": 1
},
Expand Down
22 changes: 22 additions & 0 deletions plugins/work-items/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to the `work-items` plugin are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning.

## [0.35.21]

### Fixed

- **`/work-items:setup` provisions and backfills `capability-tier: frontier` (#1716 review).**
`check` probe 8 FAILs when the canonical member is absent; `apply` step 4 provisions it (same
mechanics as the work-class axis); step 5 backfills open items carrying legacy triage-briefing
body stamps via `scripts/backfill-capability-tier-labels.sh` — load-bearing because triage refuses
to re-triage already-triaged output. Legacy pattern detection lives in
`scripts/lib/legacy-frontier-tier-signal.sh`.

## [0.35.20]

### Fixed

- **`work-loop` frontier-tier signal is the `capability-tier: frontier` label (#1716).** The
adaptive-cap quota guard no longer reads a triage-briefing body claim. Missing label fails
closed to the general tier; body prose is context only. Carve-out instance removed from
`item-content-trust.md`; taxonomy, `capability-tier-labels.md`, tracker-seam, triage stamp,
and manifest/README descriptions updated. Label provisioning for this repo requires
`melodic-software/github-iac` — the reader lands fail-closed until the label exists.

## [0.35.19]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion plugins/work-items/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ reads it from.
| `work_loop_item_cap_start` | number<br>*min 1* | `2` | `CLAUDE_PLUGIN_OPTION_WORK_LOOP_ITEM_CAP_START` | Where the work-loop lane's adaptive per-cycle item cap starts. The cap ramps up by one after three consecutive clean items (never while a rate-limit warning is latched) and drops by one on any dirty item; enforcement is the loop body's own arithmetic. |
| `work_loop_item_cap_ceiling` | number<br>*min 1* | `3` | `CLAUDE_PLUGIN_OPTION_WORK_LOOP_ITEM_CAP_CEILING` | Upper bound the work-loop lane's adaptive item cap can ramp to for non-frontier-tier items. Frontier-tier items are bounded separately by work_loop_frontier_item_cap_ceiling. |
| `work_loop_item_cap_floor` | number<br>*min 1* | `1` | `CLAUDE_PLUGIN_OPTION_WORK_LOOP_ITEM_CAP_FLOOR` | Lower bound the work-loop lane's adaptive item cap can drop to on dirty items. |
| `work_loop_frontier_item_cap_ceiling` | number<br>*min 1* | `2` | `CLAUDE_PLUGIN_OPTION_WORK_LOOP_FRONTIER_ITEM_CAP_CEILING` | Quota guard for frontier-capability-tier items in the work-loop lane: such items run at concurrency 1 and their adaptive cap is bounded by this ceiling instead of the general one. Keep it at or below work_loop_item_cap_ceiling. The frontier tier is read from the item body, which any item author can write, so a frontier ceiling above the general one would let a body claim buy higher throughput; the lane detects that inversion and ignores this ceiling, bounding the item by the general one instead. The manifest cannot enforce the ordering — userConfig min/max are static bounds with no cross-key validation. |
| `work_loop_frontier_item_cap_ceiling` | number<br>*min 1* | `2` | `CLAUDE_PLUGIN_OPTION_WORK_LOOP_FRONTIER_ITEM_CAP_CEILING` | Quota guard for frontier-capability-tier items in the work-loop lane: items carrying capability-tier: frontier run at concurrency 1 and their adaptive cap is bounded by this ceiling instead of the general one. Keep it at or below work_loop_item_cap_ceiling. The frontier tier is read from the provider-permissioned label only; absent label = general tier (fail-closed). |
| `work_loop_no_progress_threshold` | number<br>*min 1* | `3` | `CLAUDE_PLUGIN_OPTION_WORK_LOOP_NO_PROGRESS_THRESHOLD` | Consecutive no-progress cycles (actionable work in view, no item advanced and no PR opened) before the work-loop lane raises its stall escalation. The lane escalates and keeps looping; it never stops on a stall. Idle cycles with nothing actionable neither count nor reset. |

### How to set these
Expand Down
77 changes: 77 additions & 0 deletions plugins/work-items/reference/capability-tier-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Capability-tier labels

Canonical `capability-tier:` axis members for the work-loop frontier-tier quota guard and
triage stamping. Dispatch model selection (frontier / strong / fast) is owned by the loop-lane
convention and agent frontmatter bindings; this leaf owns the **label strings** triage stamps
when an item needs the frontier tier's throughput bound.

## Canonical members

| Label | Tier | Description | Color (GitHub) |
|-------|------|-------------|----------------|
| `capability-tier: frontier` | frontier | Work-loop frontier quota guard (concurrency 1, separate adaptive cap ceiling) | `5319E7` |

Discover live members through the bound adapter's label listing (GitHub:
`gh label list --search 'capability-tier:'`). An item carries **at most one**
`capability-tier:` label. The work-loop adaptive cap reads the label only — never body prose
claiming a tier.

**Absent label = general tier (fail-closed).** Items with no `capability-tier:` label run under
the general adaptive cap ceiling. A body or brief that mentions frontier tier is context for the
operator; it does not select the quota guard.
Comment thread
kyle-sexton marked this conversation as resolved.

**Security-surface dispatch is separate.** Security-surface work still routes to the frontier
capability tier for model selection via work-class rules in the admission gate — that path does
not substitute for the label when the quota guard needs to bind.

## Escalation

When an item genuinely needs the frontier quota guard and lacks the label:

1. **Interactive triage** — apply `capability-tier: frontier` in the outcome edit when the
label exists in the repo.
2. **Autonomous lane** — note the need in the triage comment and leave the label unstamped when
the repo cannot provision it; the work-loop lane treats the item as general tier until triage
(or an operator) applies the label.
3. **Label-as-code owner** — route provisioning to that system (`melodic-software/github-iac` for
org repos). This plugin never creates the label ad hoc when label-as-code owns writes.

## Migration

Repos adopting the frontier-tier quota guard need `capability-tier: frontier` present **before**
triage stamps it.

1. **Label-as-code owner declared** — route provisioning to that system; `/work-items:setup`
validates presence only and never writes labels ad hoc.
2. **No label-as-code owner** — `/work-items:setup apply` may create the label with an
interactive user present, using the same mechanics as the work-class axis migration. An
unattended `apply` stops with explicit remediation instead of guessing.
Comment thread
kyle-sexton marked this conversation as resolved.

Triage preflights the label before stamping; when absent, it reports remediation and omits the
label rather than inventing one.

### Legacy body stamps (pre-#1716 backfill)

Before the label reader flip, `work-loop` read frontier tier from triage-briefing body prose.
Triage refuses to re-triage already-triaged output, so `/work-items:setup apply` runs a one-shot
backfill after the label axis is provisioned. A body matches the legacy signal when it carries
any of these **stamp** patterns (generic security-surface dispatch prose does not match):

- `Capability tier: frontier` or `capability-tier: frontier` in the briefing body
- `stamped for the frontier capability tier`
- `frontier-tier quota guard` as an item-level stamp (not dispatch-policy prose)
- `**Capability tier:** frontier` in an agent brief

Detection and apply mechanics live in
[`${CLAUDE_PLUGIN_ROOT}/scripts/backfill-capability-tier-labels.sh`](${CLAUDE_PLUGIN_ROOT}/scripts/backfill-capability-tier-labels.sh)
(with pattern helpers in `scripts/lib/legacy-frontier-tier-signal.sh`). The backfill pass:

1. **Skips** when the bound provider is not GitHub (no label listing / bulk listing) — report INFO.
2. **Skips** when `capability-tier: frontier` is absent from the repo — the label axis pass must
run first.
3. **Reports** candidates via `backfill-capability-tier-labels.sh check` (read-only).
4. **Applies** with an interactive user present: offer to run `backfill-capability-tier-labels.sh apply`
(RECOMMENDED: apply all candidates). Unattended `apply` runs `check` only and names the command
to run with a user present — never mutates items without confirmation.
5. **Label-as-code owner** — when declared, setup validates and reports candidates only; the owner
applies labels (or the operator runs backfill after IaC lands the label).
23 changes: 8 additions & 15 deletions plugins/work-items/reference/item-content-trust.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,10 @@ admission"
([`admission-policy.md`](https://raw.githubusercontent.com/melodic-software/claude-code-plugins/main/plugins/autonomy/reference/guardrails/admission-policy.md)).

A body-recorded claim that can only ever **tighten** — one that routes an item to a slower tier, a
smaller cap, a stricter gate, or a human — is not an authority input and stays usable as a signal:
believing it costs conservatism, not safety. Widening is the direction that needs an authenticated
surface. The instance shipped here is `work-loop`'s frontier-tier quota guard ("Adaptive item cap"):
its tier signal comes from the triage briefing in the item body, and what the guard does with that
signal is restrictive at the shipped defaults — concurrency 1, and a frontier cap ceiling below the
general one. It qualifies only while that ordering holds: an operator who configures the frontier
ceiling *above* the general one has made the ceiling half of the guard widen throughput, and that
half stops being an instance of this carve-out — the consuming site drops the separate ceiling and
bounds the item by the general one, keeping the concurrency-1 half, which can only tighten
([`work-loop`](../skills/work-loop/SKILL.md), "Adaptive item cap"). No other surface in this plugin
reads that signal, so a body claiming the frontier tier buys its item a throughput bound and nothing
else — no admission, no dispatch, no merge eligibility, no gate waiver.

Reading such a claim is still worth doing where it saves an operator a re-diagnosis: relay it as
context, attributed to the body, and let the authenticated surface decide.
smaller cap, a stricter gate, or a human — is not an authority input and stays usable as relayed
context: believing it costs conservatism, not safety. Widening is the direction that needs an
authenticated surface. Reading such a claim is still worth doing where it saves an operator a
re-diagnosis: attribute it to the body and let the authenticated surface decide.

## Handing item text to a subagent

Expand Down Expand Up @@ -86,6 +75,10 @@ These are instances of the rule above, not separate rules:
- **The merge partition's work class** — read from the provider-permissioned `work-class:` label,
never from a `Work-class: C<n>` body trailer, which any item author can write about their own
item (`source-control`'s `babysit-loop`, "Rung partition").
- **Capability-tier label** — `work-loop`'s frontier-tier quota guard reads
`capability-tier: frontier` from the provider-permissioned label projection, never from triage
briefing prose in the item body ([`work-loop`](../skills/work-loop/SKILL.md), "Adaptive item
cap"; [`capability-tier-labels.md`](capability-tier-labels.md)).
- **Role labels** — not ratification evidence either: unattended triage applies the
autonomous-eligible label to every briefed delegable item, so carrying it proves no operator
reviewed anything ([`work-loop`](../skills/work-loop/SKILL.md), "Admission gate").
1 change: 1 addition & 0 deletions plugins/work-items/reference/label-taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ These axes work in any repo and don't change per team. Do not snapshot their mem
| Meta | (none) | Tool-owned flat markers the automation sets: `automated`, `good-first-issue`, `migrated`, `stale`, plus the three canonical-role labels (defaults `agent-ready`, `needs-human`, `recurring` — see "Canonical roles" below). |
| Cadence | `cadence:` | Recurrence period for maintenance items. Members from the live set. |
| Work class | `work-class:` | Semantic risk class (C1–C5) stamped at triage for the fail-closed admission gate and merge partition. Canonical members and migration: [`work-class-labels.md`](work-class-labels.md). Classification criteria: the `autonomy` plugin's [`work-classes.md`](https://raw.githubusercontent.com/melodic-software/claude-code-plugins/main/plugins/autonomy/reference/guardrails/work-classes.md). |
| Capability tier | `capability-tier:` | Execution capability tier for the work-loop frontier quota guard. Canonical members and migration: [`capability-tier-labels.md`](capability-tier-labels.md). Absent label = general tier (fail-closed); body prose is never authority. |

## Canonical roles

Expand Down
1 change: 1 addition & 0 deletions plugins/work-items/reference/tracker-seam.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ from the tracker binding's `config.role_labels` (defaults `agent-ready` / `needs
| Ecosystem | `ecosystem:` | repo-specific | the consuming repo's language/toolchain mix — see [`${CLAUDE_PLUGIN_ROOT}/reference/label-taxonomy.md`](${CLAUDE_PLUGIN_ROOT}/reference/label-taxonomy.md) |
| Cadence | `cadence:` | repo-specific | e.g. `cadence:weekly`, `cadence:monthly` — members from the live set |
| Work class | `work-class:` | universal | C1–C5 semantic risk class — canonical members and migration in [`${CLAUDE_PLUGIN_ROOT}/reference/work-class-labels.md`](${CLAUDE_PLUGIN_ROOT}/reference/work-class-labels.md) |
| Capability tier | `capability-tier:` | universal | frontier quota-guard tier — canonical members and migration in [`${CLAUDE_PLUGIN_ROOT}/reference/capability-tier-labels.md`](${CLAUDE_PLUGIN_ROOT}/reference/capability-tier-labels.md); absent = general tier |

## Role-label resolution is an action-entry invariant

Expand Down
Loading
Loading