Skip to content

feat(CC-439): /ship command — implement to PR with a single pre-flight consistency gate#360

Open
screenleon wants to merge 7 commits into
mainfrom
feat/CC-439
Open

feat(CC-439): /ship command — implement to PR with a single pre-flight consistency gate#360
screenleon wants to merge 7 commits into
mainfrom
feat/CC-439

Conversation

@screenleon

Copy link
Copy Markdown
Owner

Summary

  • Adds commands/ship.md (/ship <ticket-id>): takes one explicit backlog
    ticket from implementation through pr-gate to an open PR without stopping
    for step-by-step confirmation. Codifies the existing memory-level autonomy
    rule (implement → gate → fix → re-gate until GO → open PR) as a runnable
    command, with a pre-flight consistency check (BACKLOG Dependencies +
    DECISIONS.md Constraints introduced) as the only legal stopping point
    for a substantive discussion — ticket-id validation and a dirty working
    tree are separate deterministic fail-fast checks, not discussion points.
  • Adds structural contract tests to scripts/test-commands.sh for every
    behavior the command introduces.

Gate

  • Rounds: 7 (6 NO-GO fixing real diff-caused findings, converging to a
    clean approve/pass on round 7 with no findings and no escalation)
  • Final verdict: GO
  • Result file: .gate-results/gate-20260702-174122.md (via
    pmctl artifacts show gate-20260702-084121-994ea1 --cd <repo>)

Ticket: CC-439

🤖 Generated with Claude Code

…t consistency gate

Encodes the existing memory-level autonomy rule as a runnable command:
implement -> pr-gate -> fix -> re-gate until GO -> open PR, with the
only stop point being a fundamental conflict with BACKLOG/DECISIONS.
…ctly, count-check stop conditions

Addresses gate-20260702-080805-deb544 critic block-soft + qa-tester block:
the command and its tests referenced /pr-gate instead of the ticket's
required pmctl gate run --executor codex invocation, and the stop-condition
test only checked for presence, not an exact count of two.
…e pairing

Addresses gate-20260702-081316-817f1c critic block-soft + qa-tester block:
default pmctl gate run is detached and returns only a gate_id, so reading
Final: immediately after would read a stale/missing result. /ship has no
other work to interleave, so run foreground instead of the detached+wait
two-call dance /pr-gate uses to keep the main thread free.
…ot an ask path

Addresses gate-20260702-081820-a08344 critic advise + qa-tester block:
- Step 0 now fails fast on empty/malformed/nonexistent ticket ids, checking
  both BACKLOG.md and BACKLOG-ARCHIVE.md, distinct from the negotiated
  "fundamental inconsistency" stop.
- Step 1's dirty-tree handling is now a deterministic git stash -u, not a
  second ask-the-user path, so "the one legal stopping point" framing holds.
- Tests count all gate invocations (not just --cd-qualified ones) and count
  the genuine wait-for-user-direction occurrences to catch a stray ask path.
…s branch/push

Addresses gate-20260702-082540-d2de44 critic advise + qa-tester block:
- BACKLOG-ARCHIVE.md is now consulted only to distinguish "already archived"
  from "no such ticket" in the error message; the consistency check always
  reads from an active BACKLOG.md heading, never the archive.
- Added structural coverage for the git checkout -b and git push -u
  publication steps, which had no adjacent test.
…stop-count test

gate-20260702-083147-97804f returned GO with two critic/qa-tester advisories:
- Dirty-tree handling no longer auto-stashes (a surprising repo mutation);
  it now fails fast and asks the caller to clean the tree themselves, same
  fail-fast bucket as ticket-id validation, not the negotiated stop.
- The "exactly two stop conditions" test is now scoped to the
  "Stop the loop only when" section instead of counting numbered items
  file-wide.
Addresses gate-20260702-083655-f40009 critic advise + qa-tester block:
Step 5's close-out contract (introduced while fixing round-5 advisories)
had no adjacent test, so it could silently erode. Added direct assertions
for each of the four named outcomes: invalid ticket id, dirty-tree abort,
consistency-check stop, and PR opened with URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant