Skip to content

Report prose preflight argument blockers from Go #1029

Description

@tbhb-agent

Problem

The preflight at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35 has three distinct argument-handling BLOCKED reports. Each needs its own observable acceptance outcome without exceeding the 12-live-criterion limit in the related work.

The existing outcomes are grouped in one criterion, so they cannot each be verified independently while keeping the related work within its live-criterion cap. This issue gives each early argument-handling report a separate criterion.

Acceptance criteria

  1. AC1: Outside a Git repository, preflight emits the existing verdict: BLOCKED (not a git repository) report and exits 0.
  2. AC2: Inside a Git repository with no target argument, preflight emits the existing BLOCKED (no target in the arguments; ask which file) report and exits 0.
  3. AC3: Inside a Git repository with a target argument naming a nonexistent file, preflight emits the existing BLOCKED (no such file) report and exits 0.

Scope and non-goals

Scope: port the three early argument-handling reports and their existing ordering to agentrepo prose preflight. Preserve the complete report, stdout/stderr and exit status for each case, including the target display and repository-root path treatment already present in the shell.

Non-goal: scope probes, lint-command execution, leftover reports, executor implementation, cleanup, new shell logic, caller migration, shared context changes, guard changes, gate changes or harness configuration. The related work keeps probe behavior, lint-command behavior, leftovers and the executor helper consumed by #890. Edit canonical sources only and generate package/deployment output where required; do not hand-edit generated copies.

Approach

Use the repository context from #321 and command registration protected by #753. Match the early-return behavior of the existing shell: the three early returns run before any probe or lint-command execution; git still runs first at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35. Keep the shell as the parity oracle. This issue introduces no dependency on #886.

Dependencies

#753 is open and is only a rollout dependency that must merge before caller migration, which this slice excludes, so it does not block this additive implementation.

#321 is open and truly blocks this slice until open child #755 delivers its applicable repository-context contract; completion of the rest of the epic is not required. These are the same dependencies as #889. No dependency on #889, #886 or the #322, #323 and #324 transactions.

Size

S. One PR. The existing preflight measures 72 code lines with scc 4.1.0; no unbuilt Go size is claimed. Hard limits: 800 changed code lines and 2,000 prose lines. Exclude only generated output under packages/agents/{claude,codex}/.apm/skills/, .claude/skills/, .agents/skills/, and tokens.json; source, fixtures and all other copies count. Measure the actual staged diff before publication and split before exceeding either cap.

Verify plan

Run go test ./internal/agentrepo -run '^TestProsePreflight' -count=1 -v in the devtools module. The following checks compare complete stdout, stderr and exit status against executed fixtures of the unchanged shell:

  • AC1: invoke from a temporary directory outside any repository; assert the not-a-repository BLOCKED report and exit 0. This early return runs before any probe or lint-command execution; git still runs first at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35.
  • AC2: invoke inside a temporary repository without a target argument; assert the no-target BLOCKED report, including the (none given) target display, and exit 0. This early return runs before any probe or lint-command execution; git still runs first at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35.
  • AC3: invoke inside a temporary repository with a nonexistent target; assert the no-such-file BLOCKED report, including the missing target display, and exit 0. This early return runs before any probe or lint-command execution; git still runs first at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35. Exercise absolute and relative target spellings as fixtures of this one outcome.

Execute the AC1, AC2 and AC3 checks natively on macOS, Linux and Windows with the documented shell parity executor; report skips and cross-compilation separately.

At the merged head, record every sibling AC command and result in PR Verification. Obtain independent review of the exact head and record every finding's disposition. Required checks must pass without weakening gates. Run the repository's leak scans and the per-post leak review before any later publication. Sign every commit, including the squash commit, with the required Assisted-by trailer and apply the provenance:agent-assisted label to the PR. Match documentation to behavior or record no documentation impact. Verify the stated size limits against the actual diff. File follow-ups as issues and list them under Related. Close the issue by merge reference, set the board to Done, and post a final Status comment naming the merge commit. This proposal authorizes no publication.

Risks

Changing root resolution, early-return order or target spelling could alter a caller-visible report. Preserve each shell report exactly and leave the scope-probe, lint and leftover paths to #889. Avoid registration conflicts by using the #753 command contract. Undo: revert this additive Go behavior; the original shell preflight remains available until caller migration.

Operator authority

None.

Activity

  1. tbhb-agent commented on Nov 1, 2026

    @tbhb-agent
    ContributorAuthor

    Status: Filed as a sibling child of #327. The Feature issue type and the sub-issue link under #327 are not set: no sanctioned tool can set them yet (see #655), so both wait on that tooling or an owner action.

  2. tbhb-agent commented on Nov 1, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Dependencies are clear for this slice

    Checked

    Gaps

    None.

    Split

    No split indicated. The draft scopes one S-sized PR.

    Definition of done

    Planning coverage only: checked boxes indicate the ACs and Verify plan cover the item, not that work is complete.

    • D1 — Verify plan checks AC1–AC3 and records sibling AC commands and results at the merged head.
    • D2 — Verify plan requires exact-head independent review and disposition of findings.
    • D3 — Verify plan requires required checks to pass without weakening gates.
    • D4 — Verify plan calls for leak scans and per-post leak review before later publication.
    • D5 — Verify plan requires every commit, including the squash commit, to be signed.
    • D6 — Verify plan requires matching documentation or a record of no documentation impact.
    • D7 — Verify plan requires the Assisted-by trailer and provenance:agent-assisted PR label.
    • D8 — Verify plan requires checking actual diff size against the stated limits.
    • D9 — Verify plan says to file follow-ups and list them under Related, but does not cover the required Problem section, numbered ACs, issue link, or deferred-code link.
    • D10 — Verify plan requires a merge reference, board state Done, and a final Status comment naming the merge commit.

    Round: 2 of 3

  3. moved this from Backlog to In progress in devtoolson Nov 2, 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

    refinement:readyPassed the Definition of Ready; may be picked up

    Fields

    Priority

    None yet

    Work type

    None yet

    Projects

    • Status
      In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions