Add the ticket, project, and label command groups with logged aliases #1622

Closed
opened 2026-11-06 20:06:25 +00:00 by jared · 2 comments
Owner

Problem

The command names do not show the domain objects, and they do not form a consistent set. Skills call the old names, so the new names must arrive with aliases.

Approach

Add Thor groups ticket, project, and label, with the 19 names from the design record. Each of the 18 old names stays as an alias. Each alias call writes one line to ~/.cc-os/os-backlog-old-names.log. An alias call also keeps its old output and exit status.

Required work:

  1. Add the three Thor groups — check: present os-backlog-old-names.log in plugins/os-backlog/lib/backlog/**/*.rb
  2. Keep each old name as a logged alias.

Acceptance criteria

  1. Given each new name, when it runs, then it gives the same output as the old name.
  2. Given an old name, when it runs, then its behavior is unchanged and the log gains one line that names it.
  3. Given os-backlog help, when it prints, then the three groups appear.

Owner sketch

class Backlog::CLI::Group < Thor          # config: state_dir, runner, client, env
  extend Backlog::CliOptionSets, Backlog::CliStartup
  def issue_commands
  def project_commands
class Backlog::CLI < Backlog::CLI::Group  # the 18 old commands stay as they are
  subcommand "ticket",  Backlog::CLI::TicketGroup
  subcommand "project", Backlog::CLI::ProjectGroup
  subcommand "label",   Backlog::CLI::LabelGroup
class Backlog::CLI::TicketGroup < Backlog::CLI::Group
  map "return" => :return_to_queue
class Backlog::CLI::ProjectGroup < Backlog::CLI::Group
  map "inspect" => :inspect_command
class Backlog::CLI::LabelGroup < Backlog::CLI::Group
class Backlog::CLI::OldNames
  NAMES = { "issue-show" => "ticket show", ... }
  def self.record(argv, state_dir:)   # appends "<old>\t<new>" to state_dir/os-backlog-old-names.log
module Backlog::CliStartup
  def start(given_args, config)       # OldNames.record(given_args, state_dir: config.fetch(:state_dir))

Each group command calls the same IssueCommands or ProjectCommands method as its old name, with the same options, so output and exit status match. Thor subcommand passes the parent config to each group. OldNames.record runs only in the top-level start, because close, comment, and categorize are also names inside ticket. The log path comes from state_dir: bin/os-backlog sets it from CC_OS_HOME, or else $HOME/.cc-os. Tests give a temporary state_dir.

Old New
issue-create ticket create
issue-show ticket show
issues ticket list
issue-edit ticket edit
categorize ticket categorize
comment ticket comment
issue-comments ticket comments
validate-template ticket check
bounce ticket return
close ticket close
none (close --needs-review) ticket review, with a required --needs-review
occurrence ticket log-occurrence
checkout ticket claim
projects project list
inspect project inspect
config-write project configure
resolve project route
labels label list
ensure-labels label sync

Non-goals

No caller changes here. Slice 10 changes them.

Blocking edges

Blocked by #1621

Origin

  • Trigger: port plan, section 5 of docs/system-design-format/proof/2026-11-06-os-backlog-domain-objects.md, slice 9
  • Improvised this session: none
  • Chain: os-backlog code has no domain objects ← commands own their own reads and writes ← DESIGN (ADR-0307, plugins/os-backlog/CONTEXT.md)
  • Root candidate: none found; searched ticket/project/label groups, aliases, #867
  • Where: plugins/os-backlog/lib/backlog/cli.rb
  • Session: 9d8c2e15-00c1-4dec-b177-e749fa05ec67
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/9d8c2e15-00c1-4dec-b177-e749fa05ec67.jsonl

VERDICT: CREATE

## Problem The command names do not show the domain objects, and they do not form a consistent set. Skills call the old names, so the new names must arrive with aliases. ## Approach Add Thor groups `ticket`, `project`, and `label`, with the 19 names from the design record. Each of the 18 old names stays as an alias. Each alias call writes one line to `~/.cc-os/os-backlog-old-names.log`. An alias call also keeps its old output and exit status. Required work: 1. Add the three Thor groups — check: present `os-backlog-old-names.log` in `plugins/os-backlog/lib/backlog/**/*.rb` 2. Keep each old name as a logged alias. ## Acceptance criteria 1. Given each new name, when it runs, then it gives the same output as the old name. 2. Given an old name, when it runs, then its behavior is unchanged and the log gains one line that names it. 3. Given `os-backlog help`, when it prints, then the three groups appear. ## Owner sketch ```ruby class Backlog::CLI::Group < Thor # config: state_dir, runner, client, env extend Backlog::CliOptionSets, Backlog::CliStartup def issue_commands def project_commands class Backlog::CLI < Backlog::CLI::Group # the 18 old commands stay as they are subcommand "ticket", Backlog::CLI::TicketGroup subcommand "project", Backlog::CLI::ProjectGroup subcommand "label", Backlog::CLI::LabelGroup class Backlog::CLI::TicketGroup < Backlog::CLI::Group map "return" => :return_to_queue class Backlog::CLI::ProjectGroup < Backlog::CLI::Group map "inspect" => :inspect_command class Backlog::CLI::LabelGroup < Backlog::CLI::Group class Backlog::CLI::OldNames NAMES = { "issue-show" => "ticket show", ... } def self.record(argv, state_dir:) # appends "<old>\t<new>" to state_dir/os-backlog-old-names.log module Backlog::CliStartup def start(given_args, config) # OldNames.record(given_args, state_dir: config.fetch(:state_dir)) ``` Each group command calls the same `IssueCommands` or `ProjectCommands` method as its old name, with the same options, so output and exit status match. Thor `subcommand` passes the parent config to each group. `OldNames.record` runs only in the top-level `start`, because `close`, `comment`, and `categorize` are also names inside `ticket`. The log path comes from `state_dir`: `bin/os-backlog` sets it from `CC_OS_HOME`, or else `$HOME/.cc-os`. Tests give a temporary `state_dir`. | Old | New | |---|---| | `issue-create` | `ticket create` | | `issue-show` | `ticket show` | | `issues` | `ticket list` | | `issue-edit` | `ticket edit` | | `categorize` | `ticket categorize` | | `comment` | `ticket comment` | | `issue-comments` | `ticket comments` | | `validate-template` | `ticket check` | | `bounce` | `ticket return` | | `close` | `ticket close` | | none (`close --needs-review`) | `ticket review`, with a required `--needs-review` | | `occurrence` | `ticket log-occurrence` | | `checkout` | `ticket claim` | | `projects` | `project list` | | `inspect` | `project inspect` | | `config-write` | `project configure` | | `resolve` | `project route` | | `labels` | `label list` | | `ensure-labels` | `label sync` | ## Non-goals No caller changes here. Slice 10 changes them. ## Blocking edges Blocked by #1621 ## Origin - Trigger: port plan, section 5 of `docs/system-design-format/proof/2026-11-06-os-backlog-domain-objects.md`, slice 9 - Improvised this session: none - Chain: os-backlog code has no domain objects ← commands own their own reads and writes ← DESIGN (ADR-0307, `plugins/os-backlog/CONTEXT.md`) - Root candidate: none found; searched ticket/project/label groups, aliases, #867 - Where: plugins/os-backlog/lib/backlog/cli.rb - Session: 9d8c2e15-00c1-4dec-b177-e749fa05ec67 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/9d8c2e15-00c1-4dec-b177-e749fa05ec67.jsonl VERDICT: CREATE
Author
Owner

Work started on branch ticket-1622.

Work started on branch ticket-1622.
Author
Owner

Resolution

Done: Thor groups ticket, project, and label give the 19 new names. The 18 old names stay as aliases with unchanged output and exit status, and each alias call appends one line to os-backlog-old-names.log in the state directory. ticket review is the new name with no old name; it takes the required --needs-review option of close.

Evidence: Implementation 259 complete (16 dispatches, 17 min), commits 30e24f8c and e04da24b on ticket-1622. os-backlog 528 runs, os-sdlc 3502 runs, takedown 623 runs, 0 failures. Rubocop clean on the 14 changed files. Live check: six old/new read-only pairs give identical output and exit status, the log gains one line per alias call, and help shows the three groups.

Follow-ups: none; callers move in #1623 and the aliases go in #1624

## Resolution **Done:** Thor groups ticket, project, and label give the 19 new names. The 18 old names stay as aliases with unchanged output and exit status, and each alias call appends one line to os-backlog-old-names.log in the state directory. ticket review is the new name with no old name; it takes the required --needs-review option of close. **Evidence:** Implementation 259 complete (16 dispatches, 17 min), commits 30e24f8c and e04da24b on ticket-1622. os-backlog 528 runs, os-sdlc 3502 runs, takedown 623 runs, 0 failures. Rubocop clean on the 14 changed files. Live check: six old/new read-only pairs give identical output and exit status, the log gains one line per alias call, and help shows the three groups. **Follow-ups:** none; callers move in #1623 and the aliases go in #1624
jared closed this issue 2026-11-07 12:53:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1622
No description provided.