Skip to content

feat(tools): pin tuicr with a no-update-check config template and .tuicrignore #1884

Closed

Description

@dan-petty

Friction

A person who reviews an agent's diff has no review interface. The dashboard has no diff widget (grep -n diff src/devops_cli/ui/ finds only line counts). devops pr diff prints text. A person pastes comments into a chat by hand, and the agent gets no line numbers or comment ids.

An open tool fills this gap: tuicr, a terminal program that shows a diff, lets a person add typed comments on lines, and exports them as text or as JSON.

Evidence

Proposed remedy

  • src/devops_cli/tools_lock/tools.lock: the [binary.tuicr] block from tools-lock-entries.md.
  • .devops/tuicr.config.toml (18 lines): no_update_check = true, three comment types with definitions (issue, question, nit), and a short [export] intro. A person copies it once to ~/.config/tuicr/config.toml. The installer does not write it, because AGENTS.md requires a backup before an edit outside the workspace.
  • .tuicrignore (7 lines): docs/commands/*.md and docs/CLI_REFERENCE.md only. Lockfiles, the tools lock, CHANGELOG.md and docs/ROADMAP.md stay visible, because a change to one of them is a change to a trust root or a rule.
  • tests/test_tuicr_config.py: 3 tests.
  • tests/test_tools_lock.py: add "tuicr" to _REQUIRED_TOOLS.
  • pyproject.toml, [tool.mutmut] also_copy: add ".tuicrignore" (.devops is in the list already).
  • docs/DEVCONTAINER_USAGE.md: one sentence in the "Terminal tools" paragraph. It says: tuicr is for the person; copy the template once; start it with tuicr -r <release-branch>..HEAD or tuicr -w in the worktree of the agent; never use tuicr pr, tuicr update or curl | sh.
  • changelog.d/<issue>.md under ### Added.

What it deletes

Nothing. No internal diff review exists.

Tests

tests/test_tuicr_config.py: the template parses with tomllib and sets no_update_check to true; every comment type has a definition (the export legend shows it to the agent); every line of .tuicrignore is in the generated class of CONST_DOCS_INVENTORY. The tests run in under one second.

Person-run steps

  1. Run devops install-tools --tool tuicr, then devops install-tools --check.
  2. Copy the template: mkdir -p ~/.config/tuicr && cp .devops/tuicr.config.toml ~/.config/tuicr/config.toml. If that file exists, back it up first with the suffix .bak-<YYYYMMDD-HHMMSS>.
  3. In an agent worktree, run tuicr -r <release-branch>..HEAD. Add a comment, then press y and check the export.
  4. In another terminal, run tuicr review list --repo <worktree> and tuicr review comments --repo <worktree> --session <slug>. Check the JSON fields: id, location, path, start_line, end_line, side, comment_type, author, lifecycle_state, created_at, content.
  5. Judge the VS Code terminal. The clipboard (OSC 52) and Shift-Enter are not verified (tuicr issue chore(docs): plan the architecture review's deepening candidates and defects #782).

Cost (written)

  • Apply, from the drafts: about 100 lines; about half a day; about 25k to 40k tokens (estimate).
  • Upkeep: a bump edits 1 version, 4 URLs and 4 hashes. After a bump, run the CLI JSON check of the pull request "feat(review): 'devops review export-tuicr' ..." if that change exists.
  • Fix cost: tuicr is below 1.0 with one main maintainer. We rely only on the documented CLI JSON, never on the session file. If the project stops, pin the last good release.

Dependencies

  • feat(tools): pin gh-dash and ship .gh-dash.yml for the oldest-first PR queue and issue triage (both changes edit tools.lock and tests/test_tools_lock.py; merge that one first).

Acceptance criteria

  • devops install-tools --tool tuicr installs the pinned build, and devops install-tools --check exits 0.
  • A person has run one review in a worktree and has read the comments as JSON.
  • uv run pytest tests/test_tuicr_config.py tests/test_tools_lock.py passes, and uv run devops ci passes.

Size: S.


Second part (folded in by the intake duplicate check on 2026-10-22): the human review round

Friction

After a person reviews a diff, the comments reach the agent as pasted text. No rule says how an agent reads them, how it replies, or what it must never run. Without a rule, an agent can run tuicr review clear and delete the person's session, read the clipboard text instead of the JSON, or start a tool that needs a terminal. The docs also still describe the internal dashboard as the whole terminal answer (docs/VISION.md item 15).

Evidence

  • tuicr review clearc and clear delete the session file when it becomes empty. A later tuicr review comments then exits 1 with session not found (tuicr docs and earlier run).
  • tuicr review comments fails from another checkout unless --repo <worktree> is set (run on 2026-10-22).
  • Comments hold line numbers, and the session slug holds the HEAD sha. After the agent commits, the old session no longer matches the code (tuicr issue refactor(github): one github session per identity owning token, quota and transport #767).
  • Two sessions can be active in one repository. Active-session discovery is "a convenience signal" (tuicr issue fix(tui): correct the Docker, telemetry, Valkey and review panels #368, open), so the agent must ask when two are active.
  • docs/SDLC.md line 230 states the verdict rule: a person records verdicts with devops review verify. tuicr comment types carry no verdict, so this rule stays true.
  • The permission file .claude/settings.json today allows only Bash(uv run devops *).

Proposed remedy

  • A skill tuicr-review (38 lines, SKILL.md; draft: tui-tuicr-skill.md) in the skills directories that the pull request "feat(openspec): scaffold OpenSpec and gate its change folders in devops ci" creates. It tells the agent to: find the session with tuicr review list --repo <worktree> and use the entry with "active": true; read only the JSON of tuicr review comments --repo <worktree> --session <slug>; handle issue, question and nit comments in one round; reply by the first 8 characters of the comment id and the location; tell the person to start a new session after the commit; never run clear, clearc, delete, add, update or pr; never start tuicr or gh-dash; record no verdict.
  • One planning convention in openspec/config.yaml (the file that the OpenSpec scaffold creates): a change that alters code may end with the plain bullet Pending a person: review the diff in tuicr (tuicr -r <base>..HEAD). Merge this text with the OpenSpec change, not in parallel.
  • .claude/settings.json entries (draft: tui-tuicr-settings.json): allow Bash(tuicr review list *) and Bash(tuicr review comments *); deny Bash(tuicr review clear *), Bash(tuicr review clearc *), Bash(tuicr review delete *), Bash(tuicr review add *), Bash(tuicr update*), Bash(tuicr pr *) and Bash(gh-dash*). Reconcile them with the settings entries of the GitHub request budget design (no issue yet) so the file has one coherent set. The Gemini and Copilot equivalents are not verified.
  • docs/SDLC.md, Phase 6: a "Human review round" bullet. The person reviews the diff and the commit message in tuicr; the agent reads the JSON, changes the code, and replies by comment id; the person starts a new session for the new range. Phase 5, "Verdicts & Feedback Loop" bullet: add one sentence after the export-tuicr change ships, and only then.
  • docs/VISION.md item 15: replace the claim that the internal dashboard removes the need for web dashboards. New meaning: the terminal canvas is made of pinned open tools (k9s for Kubernetes, gh-dash for pull requests and issues, tuicr for diff review), and devops dashboard covers only what no open tool covers.
  • changelog.d/<issue>.md under ### Added.

What it deletes

Nothing.

Tests

No new Python test. Follow the checks that the OpenSpec scaffold adds for skills and for the openspec/ folder.

Person-run steps

Run one real round: review an agent diff in tuicr, ask an agent to address the comments, and report what failed. Check that the allow entries stop the permission prompt for the two read commands and that a deny entry blocks clear.

Cost (written)

About 80 lines of text and JSON; about 2 hours; about 15k to 25k tokens (estimate). No code, so no upkeep beyond the skill text.

Dependencies

Acceptance criteria

  • An agent that follows the skill reads the comments of a test session and replies by id.
  • The settings file holds the allow and deny entries, with no duplicate of the budget design's entries.
  • docs/SDLC.md and docs/VISION.md describe the review round and the open-tool canvas.
  • uv run devops ci passes.

Size: S.

Proposed design

Problem statement

The devops-cli project needs to integrate tuicr, a terminal-based tool for reviewing diffs and adding typed comments, into its tooling ecosystem. This involves pinning a specific version of tuicr, providing a configuration template, and ignoring certain documentation files during reviews.

Acceptance criteria

  • Criterion 1: The pinned version of tuicr is installed when running devops install-tools --tool tuicr
    Verification: Run devops install-tools --tool tuicr and verify that the tool is installed at the pinned version (0.27.0) with correct checksums.
  • Criterion 2: The devops install-tools --check command exits 0 after installing tuicr
    Verification: Run devops install-tools --check after installing tuicr and confirm it returns exit code 0.
  • Criterion 3: A person can run a review using tuicr in a worktree and read comments as JSON
    Verification: Execute tuicr -r ..HEAD in a worktree, add a comment, then use tuicr review comments --repo to verify JSON output includes fields like id, location, path, start_line, end_line, side, comment_type, author, lifecycle_state, created_at, and content.
  • Criterion 4: The test suite passes for tuicr configuration and tools lock
    Verification: Run uv run pytest tests/test_tuicr_config.py tests/test_tools_lock.py and confirm all tests pass.

Key questions

  • What is the specific version of tuicr to be pinned?: The specific version of tuicr to be pinned is 0.27.0. [sources: src/devops_cli/tools_lock/tools.lock]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#1883

Activity

  1. added
    source/agent
    type/feature
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/feature. The candidate proposes adding a new tool with configuration and related changes.
    • Priority: P2-Medium. It enhances developer experience but is not critical to core functionality.
    • Value: Medium. Improves workflow for developers reviewing diffs and comments, beneficial but not essential.
    • Effort: Medium. Involves adding configuration files, tests, documentation updates, and integration with the tools lock.
  3. added this to the v0.2.39 milestone on Oct 22, 2026
  4. added
    status/in-progress
    on Oct 22, 2026
  5. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at ae8c2d9 (see proposed design in issue body).

  6. added
    scope/cli
    on Oct 22, 2026
  7. added a commit that references this issue on Oct 22, 2026
    f259dbb
  8. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1906, merged into release/v0.2.39 as f259dbb.

    Cause
    A person who reviews the diff of an agent has no review interface. The dashboard has no diff widget, and devops pr diff prints text. The person pastes comments into a chat. The agent gets no line numbers and no comment ids. No rule tells an agent how to read the comments, how to reply, or which commands it must never run.

    Change
    tools.lock pins tuicr 0.27.0 with a SHA-256 for macOS and Linux, each on amd64 and arm64. The Linux builds are the static musl archives. The template .devops/tuicr.config.toml turns off the update check and defines the comment types issue, question and nit. The file .tuicrignore hides only the generated documents. docs/SDLC.md Phase 6 has a "Human Review Round" bullet. In it, the agent reads the comments as JSON, replies by comment id, and never runs the commands that delete a session or skip the pin. docs/DEVCONTAINER_USAGE.md, docs/VISION.md item 15 and openspec/config.yaml follow. pyproject.toml adds .tuicrignore to [tool.mutmut] also_copy as one new line. The task file holds the permission entries as a Pending a person bullet, and the deny list now blocks a start of tuicr.

    Existing tool considered
    Nothing is built. The open tool is tuicr (MIT license, Rust). This change is a lock pin, a config template and text. The cost of upkeep is one version, four URLs and four hashes for each bump. tuicr is below 1.0 and has one main maintainer. This change relies only on the documented CLI JSON, never on the session file.…

    12 file(s) changed.

    How it was verified

    Check runs at af9c22e:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping
    • Tests & Coverage: pass
    • DevContainer Image: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Fail-to-Pass Check: pass
    • Changed-Test Independence: pass
    • Rule Pack Tests: pass
    • Fail-to-Pass Self-Check: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Static Analysis: pass

    Acceptance Criteria of docs/agent/tasks/task-1884-pin-tuicr-and-ship-config.md:

    • tools.lock pins tuicr 0.27.0 with a SHA-256 and an https URL for each platform: test_the_packaged_lock_holds_every_tool_install_tools_installs and test_every_binary_build_is_an_https_url_with_a_sha256.

    • The template keeps the update check off: test_the_template_keeps_the_update_check_off.

    • Every comment type of the template has a definition for the legend: test_every_comment_type_of_the_template_has_a_definition_for_the_legend.

    • The ignore file hides only generated documents: test_the_ignore_file_hides_only_generated_documents.

    • tests/test_tuicr_config.py and tests/test_tools_lock.py pass. They run offline and never start tuicr. devops ci passes in the pre-push hook before the push.

    • docs/SDLC.md Phase 6 describes the human review round, docs/VISION.md item 15 describes the open-tool canvas, and docs/DEVCONTAINER_USAGE.md says how to start tuicr.

    • changelog.d/1884.md records the change. CHANGELOG.md and docs/ROADMAP.md are not edited.

    • Pending a person: merge these permission entries into .claude/settings.json. An agent must not edit its own permission file. The same entries close the gh-dash part of #1882. The gh-dash deny entry and the tuicr deny entries are one settings change. First compare the file with the settings entries of the GitHub request budget design. The file must hold one set and no duplicate.

      {
        "permissions": {
          "allow": [
            "Bash(tuicr review list *)",
            "Bash(tuicr review comments *)"
          ],
          "deny": [
            "Bash(tuicr review clear *)",
            "Bash(tuicr review clearc *)",
            "Bash(tuicr review delete *)",
            "Bash(tuicr review add *)",
            "Bash(tuicr update*)",
            "Bash(tuicr pr *)",
            "Bash(tuicr)",
            "Bash(tuicr -*)",
            "Bash(tuicr tui*)",
            "Bash(gh-dash*)"
          ]
        }
      }
    • Pending a person: check the three start patterns of the deny list. Bash(tuicr), Bash(tuicr -*) and Bash(tuicr tui*) must block a start of the interface. They must not match tuicr review list or tuicr review comments. They also block tuicr --help, which is acceptable. The Gemini and Copilot equivalents are not verified.

    • Pending a person: run devops install-tools --tool tuicr, then devops install-tools --check. The check exits 0 when every tool has its locked version.

    • Pending a person: copy the template with mkdir -p ~/.config/tuicr && cp .devops/tuicr.config.toml ~/.config/tuicr/config.toml. If that file exists, copy it first to ~/.config/tuicr/config.toml.bak-<YYYYMMDD-HHMMSS>.

    • Pending a person: run one real review. In a worktree of an agent, run tuicr -r <release-branch>..HEAD, add a comment, press y and check the export. In another terminal, run tuicr review list --repo <worktree> and tuicr review comments --repo <worktree> --session <slug>. Check the JSON fields id, location, path, start_line, end_line, side, comment_type, author, lifecycle_state, created_at and content. Judge the VS Code terminal. The clipboard (OSC 52) and Shift-Enter are not verified (issue 782 of the tuicr repository).

    • Pending a person: run one agent round. Ask an agent to address the comments of that review, with the "Human Review Round" bullet of docs/SDLC.md. Keep tuicr open during the round, or give the agent the session slug, because "active" is true only while tuicr is open. Check that the allow entries stop the permission prompt for the two read commands. Check that a deny entry blocks tuicr review clear and a start of tuicr. Report what failed.

  9. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope/clisource/agenttype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions