CLI-PR-001/002/003/004: Rename propose->proposal, add essential commands, improve accept, restrict story

- Rename 'propose' group to 'proposal' in surface, leaf help, and routing
- Keep 'hf propose' as backward-compatible alias via groupAliases
- Add essential subcommand group: list, create, update, delete
- Accept command now shows generated story tasks in output
- Accept command supports --json output
- Task create blocks story/* types with helpful error message
- All help text updated to use 'proposal' terminology
This commit is contained in:
zhi
2026-04-01 06:56:10 +00:00
parent fbfa866c9d
commit 97af3d3177
6 changed files with 404 additions and 21 deletions

View File

@@ -228,6 +228,11 @@ func RunTaskCreate(args []string, tokenFlag string) {
output.Error("usage: hf task create --project <project-code> --title <title>")
}
// story/* types are restricted — must be created via `hf proposal accept`
if taskType == "story" || (len(taskType) > 6 && taskType[:6] == "story/") {
output.Error("story tasks are restricted and cannot be created directly.\nUse 'hf proposal accept <proposal-code> --milestone <milestone-code>' to generate story tasks from a proposal.")
}
payload := map[string]interface{}{
"project_code": project,
"title": title,