refactor(gitea-labels-milestones): retrofit to the ADR-0020 context contract
Description 835 -> 214 chars, body 669 -> 426 words, Gotchas 8 entries/63% of body -> 3/20.4%. Clears the description FAIL, all three Vale CompositionNote errors and both Gotchas suggestions. 63% was the worst Gotchas ratio in the corpus. Cut the composition sentence to README -- it changes no routing decision and an agent picks this skill because the user asked about labels, not because two other skills call it. Cut the capability enumeration; 'list, create, edit, delete' decompose 'reading or writing' and add no trigger. Boundary clauses are now one arrow per target. The resolver extracts only the first name per arrow clause, so the previous '-> gitea-issues / gitea-prs' left gitea-prs neither dangling nor checked while validate.sh reported 1 of 1. Now 2 of 2. Makes org-scoped label resolution executable. The org label pool was reachable in principle -- four *_org_label* methods, and a claim to own name-to-ID resolution -- but list_org_labels takes org, and Step 1 derived only owner and repo, so both resolution procedures stalled at the fallback. Fixed once at the identity step rather than per-procedure. get_user_orgs is outside allowed-tools, so the failing call is the discriminator: a failure means the owner is a user account with no org pool, which is an answer, not an error. Corrects a Gotcha that was false for create_repo_label/create_org_label and collided with the literal tool name label_write. Same false claim removed from README. Refs #99
This commit is contained in:
@@ -4,7 +4,13 @@ Read and write Gitea labels and milestones, and resolve label/milestone identity
|
||||
|
||||
## What it does
|
||||
|
||||
This skill handles label and milestone CRUD (`label_read`/`label_write`, `milestone_read`/`milestone_write`) — listing repo or org labels, creating/editing/deleting a label, resolving a label name to the numeric ID required for any write, and listing/creating/updating/closing/deleting a milestone. It also owns label inference: mapping conversation context (bug report, feature request, urgency language) to this repo's `Kind/*`/`Priority/*`/`Status/*` taxonomy. It is a cross-cutting shared skill composed by `gitea-issues` and `gitea-prs`, which call into it for label/milestone resolution before their own `issue_write`/`pull_request_write` calls apply the resolved IDs.
|
||||
This skill handles label and milestone CRUD (`label_read`/`label_write`, `milestone_read`/`milestone_write`) — listing repo or org labels, creating/editing/deleting a label, resolving a label name to the numeric ID required to apply it to an issue or PR, and listing/creating/updating/closing/deleting a milestone. It also owns label inference: mapping conversation context (bug report, feature request, urgency language) to this repo's `Kind/*`/`Priority/*`/`Status/*` taxonomy.
|
||||
|
||||
## Composition
|
||||
|
||||
This is a cross-cutting shared skill. `gitea-issues` and `gitea-prs` both compose it whenever they need to apply a label or assign a milestone, rather than duplicating label/milestone logic: they call in for name/title → ID resolution, then their own `issue_write`/`pull_request_write` calls apply the resolved IDs. The split is deliberate — identity resolution lives here once, and the write that attaches an ID to a specific issue or PR lives with the skill that owns that object.
|
||||
|
||||
That relationship is documented here rather than in the skill description, which is preloaded into every session and carries routing information only: an agent reaches this skill because the user asked about labels or milestones, not because two other skills call it.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user