os-backlog issue-edit NUMBER --body-file PATH edits an issue body without tea #728

Closed
opened 2026-09-25 18:12:28 +00:00 by jared · 2 comments
Owner

Problem

os-backlog has no command that edits an issue body.
Agents fall back to tea issues edit --description "$(cat file)".
The worktree guard refuses that shape with "too complex to verify ... cannot be shown not to be git".
tea has no --description-file option.
In #712 one body edit cost 5 calls and ended in a hand-written Ruby script.
No backend (TeaBackend, GhBackend, FileBackend) has a body-edit method today.
Related: #658, which adds --body-file to issue-create.

Approach

Add issue-edit NUMBER --body-file PATH [--title TITLE] to Backlog::CLI.
Read the file in Ruby, never through shell substitution.
Route through Backlog::Issues to a new edit method on each backend, the same way create routes.
TeaBackend runs tea issues edit --repo SLUG N --description BODY [--title T] as an argv array.
GhBackend runs gh issue edit N --repo SLUG --body-file PATH [--title T].
FileBackend rewrites the issue file body in place.
issue-edit does not run the issue-create gates (scope, origin, filed-by).

Required work:

  1. Add issue-edit to cli.rb with --body-file (required) and --title (optional) — check: os-backlog issue-edit --help lists both.
  2. Add Backlog::Issues#edit through route_to_backend with extra: [:title, :body].
  3. Add edit to TeaBackend, GhBackend, and FileBackend.
  4. Update capture SKILL.md and ticket-decompose SKILL.md so body edits point at issue-edit and not at tea.

Acceptance criteria

  1. Given an issue number and a file with a multiline body, when os-backlog issue-edit N --body-file f runs on a forgejo tracker, then the tea backend receives the full file contents as one --description argv element.
  2. Given the same on a github tracker, then gh receives issue edit N --repo SLUG --body-file f.
  3. Given the same on a repo tracker, then the issue file body is replaced verbatim.
  4. Given --title, when issue-edit runs, then the backend receives the new title.
  5. Given the capture and decompose skill docs, when an agent looks up how to edit a body, then the docs name issue-edit and not tea.

Owner sketch

class Backlog::TeaBackend
  def edit(repo_slug, number, title: nil, body: nil)
  end
end

class Backlog::Issues
  route_to_backend :edit, "edit an issue", extra: [:title, :body]
end

Origin

  • Trigger: audit of session ecfe6e11 (the #712 implementation); reshaped 2026-09-27 for the os-sdlc pipeline
  • Where: plugins/os-backlog/lib/backlog/cli.rb, issues.rb, tea_backend.rb, gh_backend.rb, file_backend.rb
  • Session: 17688436-99ef-4a59-9eec-74e4f87e9c1f
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/17688436-99ef-4a59-9eec-74e4f87e9c1f.jsonl

VERDICT: CREATE
REASON: user-named ticket; observed failure in #712 with a clear root (no edit command).

## Problem os-backlog has no command that edits an issue body. Agents fall back to `tea issues edit --description "$(cat file)"`. The worktree guard refuses that shape with "too complex to verify ... cannot be shown not to be git". tea has no --description-file option. In #712 one body edit cost 5 calls and ended in a hand-written Ruby script. No backend (TeaBackend, GhBackend, FileBackend) has a body-edit method today. Related: #658, which adds --body-file to issue-create. ## Approach Add `issue-edit NUMBER --body-file PATH [--title TITLE]` to Backlog::CLI. Read the file in Ruby, never through shell substitution. Route through Backlog::Issues to a new `edit` method on each backend, the same way `create` routes. TeaBackend runs `tea issues edit --repo SLUG N --description BODY [--title T]` as an argv array. GhBackend runs `gh issue edit N --repo SLUG --body-file PATH [--title T]`. FileBackend rewrites the issue file body in place. issue-edit does not run the issue-create gates (scope, origin, filed-by). Required work: 1. Add `issue-edit` to cli.rb with --body-file (required) and --title (optional) — check: `os-backlog issue-edit --help` lists both. 2. Add `Backlog::Issues#edit` through route_to_backend with extra: [:title, :body]. 3. Add `edit` to TeaBackend, GhBackend, and FileBackend. 4. Update capture SKILL.md and ticket-decompose SKILL.md so body edits point at issue-edit and not at tea. ## Acceptance criteria 1. Given an issue number and a file with a multiline body, when `os-backlog issue-edit N --body-file f` runs on a forgejo tracker, then the tea backend receives the full file contents as one --description argv element. 2. Given the same on a github tracker, then gh receives `issue edit N --repo SLUG --body-file f`. 3. Given the same on a repo tracker, then the issue file body is replaced verbatim. 4. Given --title, when issue-edit runs, then the backend receives the new title. 5. Given the capture and decompose skill docs, when an agent looks up how to edit a body, then the docs name issue-edit and not tea. ## Owner sketch ```ruby class Backlog::TeaBackend def edit(repo_slug, number, title: nil, body: nil) end end class Backlog::Issues route_to_backend :edit, "edit an issue", extra: [:title, :body] end ``` ## Origin - Trigger: audit of session ecfe6e11 (the #712 implementation); reshaped 2026-09-27 for the os-sdlc pipeline - Where: plugins/os-backlog/lib/backlog/cli.rb, issues.rb, tea_backend.rb, gh_backend.rb, file_backend.rb - Session: 17688436-99ef-4a59-9eec-74e4f87e9c1f - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/17688436-99ef-4a59-9eec-74e4f87e9c1f.jsonl VERDICT: CREATE REASON: user-named ticket; observed failure in #712 with a clear root (no edit command).
jared changed title from os-backlog issue-edit accepts --body-file to os-backlog issue-edit NUMBER --body-file PATH edits an issue body without tea 2026-09-27 14:15:23 +00:00
Author
Owner

Work started 2026-09-27 on branch ticket-728 via /os-sdlc:implement.

Work started 2026-09-27 on branch ticket-728 via /os-sdlc:implement.
Author
Owner

Resolution

Done: os-backlog issue-edit NUMBER --body-file PATH [--title] replaces an issue body verbatim through TeaBackend, GhBackend, or FileBackend; the file is read in Ruby, never through shell substitution; capture and ticket-decompose skill docs now point at issue-edit instead of tea.

Evidence: Implementation 50 on branch ticket-728, 16 dispatches, all gates green; new test plugins/os-backlog/tests/issue_edit_cli_test.rb; os-backlog suite green three times. Deviations: one phantom programmer dispatch from a resumed subagent stalled the run 15 minutes (captured as #773); one contract-auditor handoff was submitted by the orchestrator because the agent's loaded definition still named the retired os-sdlc-runner.

Follow-ups: gh temp body file written by GhBackend#edit is not deleted: dropped, one small file per edit under Dir.tmpdir, cleanup needs a test change and no harm observed.

## Resolution **Done:** os-backlog issue-edit NUMBER --body-file PATH [--title] replaces an issue body verbatim through TeaBackend, GhBackend, or FileBackend; the file is read in Ruby, never through shell substitution; capture and ticket-decompose skill docs now point at issue-edit instead of tea. **Evidence:** Implementation 50 on branch ticket-728, 16 dispatches, all gates green; new test plugins/os-backlog/tests/issue_edit_cli_test.rb; os-backlog suite green three times. Deviations: one phantom programmer dispatch from a resumed subagent stalled the run 15 minutes (captured as #773); one contract-auditor handoff was submitted by the orchestrator because the agent's loaded definition still named the retired os-sdlc-runner. **Follow-ups:** gh temp body file written by GhBackend#edit is not deleted: dropped, one small file per edit under Dir.tmpdir, cleanup needs a test change and no harm observed.
jared closed this issue 2026-09-27 15:21:08 +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#728
No description provided.