- CONVENTIONAL-COMMITS.md: vendored spec (v1.0.0); CLAUDE.md requires agent-written commits to follow it - tasks 0002-0020: remaining task breakdown of the gitea-axi spec (0019 reframed around the three-tier test taxonomy: unit, integration, end-to-end) - spec, CONTEXT.md, and ADRs 0006/0007/0011: pending design refinements from the planning sessions
1.5 KiB
1.5 KiB
spec, blocked-by
| spec | blocked-by |
|---|---|
| gitea-axi | 0004-issue-create-and-comment |
What to build
The label command group: label list, label create, label edit, label delete.
label list takes --limit (default 500) and outputs a count line plus labels: [ { name } ].
label create requires --name and --color (hex without #; the # is prepended before the API call) with optional --description; it is idempotent via a case-insensitive existence check, reporting create: already_exists instead of failing.
label edit <name> and label delete <name> resolve the positional name via the standard case-insensitive label lookup with VALIDATION_ERROR when not found.
label delete is deliberately not idempotent — a nonexistent label is refused rather than reported as success (see ADR 0010).
Acceptance criteria
label listrenders the count line andlabels:block; empty repos get the explicit empty statelabel create --name --colorcreates the label, prepending#to the color, and outputscreated: ok+label: <name>- Creating an existing label (case-insensitive) outputs
create: already_exists+ the existing name, exit 0 label edit <name>applies--name/--color/--descriptionand outputsedit: ok+ the resulting namelabel edit/label deleteon an unknown name yieldVALIDATION_ERROR(exit 2)label delete <name>outputsdelete: ok+label: <name>- Fixture-server tests cover create, idempotent re-create, edit, delete, and the unknown-name refusals