Repository navigation
Description
User Story
As an OpenShell maintainer managing issues and pull requests, I need consistent classification of accepted work so that relevant contributors receive useful area/topic notifications without repeated manual labeling or unaccepted-intake noise.
Description
Deliver Part 2 of #5276: extract a manually invocable /label-issue contributor skill and a reusable deterministic helper. Triage retains its assessment decisions and delegates label reconciliation to the shared skill.
Classify one issue or PR from substantive evidence and the current canonical taxonomy. Existing labels are reconciliation state, not authoritative evidence. Correct inaccurate or incomplete current labels and contextually migrate old and retired associations according to #5151. Both issues and PRs require exactly one primary area and any supported topics.
Keep ordinary ambiguity in preview/application reports for tuning. Make the best-supported choice without routine human escalation and never post labeling comments. Preserve unrelated labels and human-owned dispositions.
The helper owns eligibility, lifecycle exclusions, result validation, live rechecks, bounded GitHub API retries/timeouts, and label mutation. Persist successful examination checkpoints in label-addition event rationale metadata under #5276's protocol. Unchanged eligible items skip without model classification; partial or stale checkpoints must not suppress recovery. Show any bookkeeping label events in preview.
Context
- Overall delivery: chore: create an invocable agent for workflow and topic labeling #5276, which remains open after this part.
- Shared accepted-work library dependency: feat(review): automatically label new PRs for accepted work #5260.
- Taxonomy preparation, migration guidance, and prerequisites: chore: prepare area and topic labels for migration #5151.
- The later acceptance-triggered runtime and human PR-comment command are separate work; do not add those workflows in this extraction.
- Target Terra/Sonnet-level classification first. Validate through observed baseline and with-skill scenarios before automatic application.
Definition of Done
- Provide
/label-issuewith a concrete structured output contract and preview/apply commands. - Include the importable deterministic helper and shared issue-acceptance adapter without duplicating acceptance policy.
- Support contextual legacy migration, accurate current-label correction, and exactly one area on both item types.
- Preserve human dispositions and unrelated labels; no labeling comments or repository-wide label provisioning.
- Implement trusted event-metadata checkpoints, efficient model-free unchanged skips, and recoverable real-addition, removal-only, and no-classification-change paths.
- Delegate label reconciliation from triage while preserving read-only queue review and scoped confirmation requirements.
- Validate API resilience, evidence completeness, stale inputs, lifecycle gates, concurrency limits, and partial mutations with offline tests.
- Record observed classification validation and representative read-only previews; document missing prerequisites and practical limits.
Activity