feat(pm): add --kind to set-field to correct an issue's type label post-filing#407
Merged
Merged
Conversation
…st-filing set-field gains --kind to change an issue's type:* classification label (bug/feature/docs/test/refactor/maintenance) in the same validated batch as --priority/--workstream/--parent. On a kind change to a kind-driven (Task) issue it realigns the title prefix via classification.yaml's title_prefix_by_value (e.g. [Chore] -> [Bug]), keeping label and prefix coupled through the same single source of truth create-issue uses. Refuses up front, before any mutation, when the kind is not permitted for the issue's structural type (epic/feature/umbrella carry kind 'feature' by definition) — conforming to the structural_restriction hard-reject in classification.yaml / DEC-011 rather than manufacturing the mismatch. Unknown values and the existing idempotent re-run posture are unchanged. Closes #404 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
Reviewer agent (local, reviewer): APPROVED pm-conventions review of PR #407 against the project-management capability's schemas. All criteria pass; no warnings, no audit-bypass findings.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
--kindto the project-managementset-fieldverb so an issue'stype:*classification label can be corrected after filing, in the same validated batch as--priority/--workstream/--parent.--kind <value>swaps thetype:*label and realigns the title prefix perclassification.yaml'stitle_prefix_by_value(e.g.[Chore] → [Bug]), keeping label and prefix coupled through the same single source of truthcreate-issueuses (axis_labels.resolve_write+ the shared prefix map — no duplicated tables).feature, a non-feature--kindis refused up front, before any mutation, conforming to thestructural_restrictionhard-reject inclassification.yaml/ [project-management:DEC-011-title-formats] rather than manufacturing the mismatch.--kind featureon those types is a clean no-op.--kindcomposes with the other fields in one batch.Why
Correcting a mis-filed
type:*previously required a rawgh issue edit --add-label/--remove-label(off the validated path) plus a manualedit-issue --titleto fix the prefix. Surfaced live: #402 was filedtype:maintenancebut a broken shipped verb is a defect; the relabel totype:bughad to go through raw gh.Design note (critic-reviewed)
The first cut allowed
--kindto swap the label on a non-task while leaving the structural prefix — a critic pass found that manufactures exactly the kind/structural mismatch DEC-011 declares a hard-reject, and is a live break:open-pr/validate-prderive PR conv-type from the closing issue'stype:*label, and a non-task owning issue is the closing issue of its integration→main PR (DEC-013), so an EPIC relabelledtype:bugwould drive its closure PR tofix(...)against an[EPIC]title and the reviewer gate would reject the naturalfeat. Reworked to refuse-on-mismatch, which conforms to the existing decision (no amendment).Verification
test_pm_set_field.py33 pass; pm suite 1749 pass; full suite 4137 pass.pkit schemas validate(13 pass);pkit migrations check-diff --include-working-tree --base mainclean (pure addition — new optional flag).--kind docs→type:bug → type:docs+[Bug] → [Docs]; EPIC--kind bugrefused up front naming the rule; EPIC--kind featureaccepted as no-op.Version / migration
Capability surface change (new flag) →
package.yaml0.41.0 → 0.42.0 (minor). No migration (additive optional flag).Doc impact
.pkit/capabilities/project-management/README.md— set-field row, failure-list bullet, and example block state the Task-only scope and the epic/feature/umbrella refusal.Test plan
featurekind on epic/feature/umbrella refused before any mutation.--kind featureon a feature/epic accepted as no-op.--kind --priority --workstreambatch.Follow-up (out of scope, surfaced by the critic)
DEC-011's
structural_restrictionhard-reject is currently enforced nowhere in code (create-issue/validate-issueboth skip the cross-check), so a mismatched issue still validates clean. This PR makesset-fieldconform; the broader enforcement gap (and a shared_libconsistency predicate the three callers want, COR-007) is a separate issue.Closes #404
🤖 Generated with Claude Code