Repository navigation
Description
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
- AC1: Outside a Git repository, preflight emits the existing
verdict: BLOCKED (not a git repository)report and exits 0. - 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. - 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 atpackages/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.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Work type
Projects
- StatusShow more project fieldsIn progress
Activity
tbhb-agent commentedon Nov 1, 2026
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.
tbhb-agent commentedon Nov 1, 2026
Refinement: READY — Dependencies are clear for this slice
Checked
originidentifiestbhb-dev/devtools. Issue Report prose preflight argument blockers from Go #1029 is open and unlabeled; its live comments contain no earlier “Refinement: NOT READY” comment. The requested round override sets the reported round.origin/main, the shell runs Git before the early reports atpackages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35.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.
Assisted-bytrailer andprovenance:agent-assistedPR label.Round: 2 of 3