Skip to content

Simplify the behavior-probes harness-ops plugin code (1 of 4) #14525

Closed

Description

@kyle-sexton

Agent Brief

Type: Task
Summary: Simplify these 15 files without changing their behavior (part of the /simplify epic).

Current behavior:
The files below work as they do on main. Their code changes; what they do does not.

Desired behavior:
Review the files through /simplify's four checks (reuse of existing helpers, simplification, efficiency, right level of abstraction), using subagents if useful, and apply the fixes. The files end up shorter and clearer, and whatever runs them gets the same results.

Files:

  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/ask-rule-denies-in-print-mode/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/bot-thread-resolve-allowed-with-allow-entry/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/bot-thread-resolve-conditional-allow-denied/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/bot-thread-resolve-denied-without-allow/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/classifier-denies-file-sourced-force-push/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/custom-soft-deny-benign-command-runs/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/dry-run-push-allowed-without-ask-rule/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/narrow-allow-rule-passes-classifier/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/project-automode-rule-ignored/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/soft-deny-without-defaults-keeps-defaults/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/subagent-ask-rule-denies/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/auto-mode/subagent-dry-run-push-allowed/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/autocompact/env-beats-flag/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/autocompact/flag-beats-project-settings/scaffold.sh
  • plugins/harness-ops/skills/behavior-probes/cases/autocompact/project-per-model-beats-top-level/scaffold.sh

Key interfaces:

  • Outputs, exit codes, written files and printed messages of these files: unchanged.
  • Command-line flags, exported names and anything another file calls: unchanged.

Acceptance criteria:

  • Behavior is unchanged: same outputs, exit codes, written files, printed text, command-line flags and exported names; no listed file renamed, moved or deleted.
  • The diff edits only the listed files, the lines of a test that assert on them when the change breaks that assertion, and changelog fragments.
  • The pull request stays within 400 changed lines and 15 hand-edited files (generated shared copies and changelog fragments not counted); anything beyond goes under ## Follow-ups in the pull request body.
  • ci-status is green.
  • Each touched plugin (harness-ops) has a fragment from scripts/new-changelog-fragment.sh <plugin> patch whose body is ### Changed and the line "Internal simplification, no behavior change."

Out of scope:

  • Moving code between files or deduping across them: the sub-epic's restructuring pass does that after these chunks merge.
  • Tests beyond the asserted lines a change breaks, eval cases, fixtures, and skill and agent text.
  • Files listed in other chunks.

Activity

  1. added
    status: ready
    on Nov 9, 2026
  2. added theissue type on Nov 9, 2026
  3. removed
    status: ready
    on Nov 9, 2026
  4. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"9b761b31411cabf34be384408edd53e61aca1413521efb863c7ead25babf0c55","body_sha256":"4037c84acea73307f37ebb67cc00745cdc22938efb44ef1e8898ee5b61ee1cef"}

  5. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 42625254226, the work-resolve-issue run that agent-ready started, before it finished; that run ended at 2026-11-09T14:24:44Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  6. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor
    No description provided.
  7. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 42684300973, the work-resolve-issue run that agent-ready started, before it finished; that run ended at 2026-11-09T20:05:53Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  8. 4 remaining items

  9. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor
    No description provided.
  10. github-actions commented on Nov 10, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 2; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  11. github-actions commented on Nov 10, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: a behavior-preserving simplification of 15 behavior-probes scaffold.sh files (auto-mode and autocompact cases) in harness-ops, as chunk 1 of 4 of the /simplify epic. The brief gives the files, the unchanged-behavior constraints, the size limits and the changelog fragment requirement, so nothing is missing. The sibling chunks (2 of 4 and 4 of 4) cover different files, so I don't treat them as duplicates. I found no merged pull request that already does this.

    Automated triage. A maintainer reviews it.

  12. melodic-automation-lanes commented on Nov 11, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 42705567380, the work-resolve-issue run that agent-ready started, before it finished; that run ended at 2026-11-09T22:28:50Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits the same limits.stranded-backoff-hours kill-switch hours after each refused run before re-firing it, never longer.

  13. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor
    No description provided.
  14. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor
    No description provided.
  15. melodic-automation-lanes commented on Nov 11, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (already-done): the run found the issue's work already on the default branch at a commit it cites, so the issue closes.
    Its reason cites no pull request merged into the default branch, or commit on it, made after the issue opened whose commit message closes this issue, so it retries instead of closing.
    It keeps agent-ready, and work-unblock starts it again (retry 1 of 2).

    In the run's words:

    already-done: on the default branch at 5fb798f, the 15 listed scaffold.sh files already need no simplification. 14 are one statement after set -euo pipefail: a call to a shared helper in cases/lib/ (diverged-repo.sh, bot-thread-repo.sh or autocompact-project.sh). The 15th (project-automode-rule-ignored) is a three-line mkdir/cp, and no helper in cases/lib/ does that copy. The shared-helper reuse the issue asks for is already in place, so any edit would only reshuffle these lines and would not leave them shorter or clearer.

    What the run says it did not do:

    • No changelog fragment written: the issue asks for one per touched plugin, and this run touched no plugin
    • Tidy, review and verify steps skipped: there is no diff to tidy, review or test
    • Could not cite the commit that moved these scaffolds onto the cases/lib/ helpers: the checkout's history is shallow (one commit), and the harness-ops CHANGELOG does not name the helpers

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42949554244

  16. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor
    No description provided.
  17. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor
    No description provided.
  18. melodic-automation-lanes commented on Nov 11, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (report-delivered): the issue asks for a report and no change, and the run posted that report, so the issue closes.
    It closes the issue as completed.

    In the run's words:

    report-delivered: all 15 listed scaffold.sh files are already in their simplest form, so the /simplify review finds nothing to change without changing behavior or moving code between files (out of scope).

    The run's report:

    I reviewed each of the 15 listed files at f04d91a using /simplify's four checks (reuse, simplification, efficiency, level of abstraction). None warrants a change.

    • 14 files (the auto-mode cases except project-automode-rule-ignored, plus the three autocompact cases) are each a shebang, set -euo pipefail and one line. That line hands PROBE_WORKDIR, plus any token-count arguments, to a shared helper in cases/lib/ (diverged-repo.sh, bot-thread-repo.sh or autocompact-project.sh). They already reuse those helpers, and there is no logic left to shorten. The ${VAR:?set by probe.py} guards are part of the behavior: they set the error text and the exit status when a variable is unset.
    • auto-mode/project-automode-rule-ignored/scaffold.sh runs two commands, mkdir -p "$work/.claude" and a cp of the case's project-settings.json into .claude/settings.json. No helper in cases/lib/ does this copy. Inlining work would repeat the PROBE_WORKDIR expansion and make the file no shorter or clearer. A new shared helper would mean moving code between files, which the issue puts out of scope for the later restructuring pass.
      So nothing was edited and no changelog fragment is needed: the fragment criterion applies only to a touched plugin, and harness-ops was not touched. Any deduplication of these one-line wrappers, for example one generic scaffold, belongs to the sub-epic's restructuring pass.

    What the run says it did not do:

    • Tidy step skipped: there is no diff to tidy.
    • Review, build and lint prep skipped: no change was made.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42956308434

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

    No labels
    No labels

    Type

    Fields

    Work status

    agent-ready

    Priority

    low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions