Skip to content

Add pair-flow spec bundle - #28

Merged
inkatze merged 57 commits into
mainfrom
spec/pair-flow
Jun 5, 2026
Merged

Add pair-flow spec bundle#28
inkatze merged 57 commits into
mainfrom
spec/pair-flow

Conversation

@inkatze

@inkatze inkatze commented May 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds specs/pair-flow/ — a four-file spec bundle defining a spec-driven autonomous workflow that pairs human and agent from comprehension through execution and orchestration.
  • 53 D-IDs, REQ groups A through G, 15 tasks in dependency order, test-spec verifications pinned per REQ.
  • Built entirely on Claude Code primitives (skills, hooks, slash commands, scheduled remote agents) per D-18. No second agent framework introduced.
  • Personal workflow config stays out of shared repos (D-19): repo-level preferences live in ~/.claude/pair-flow.yml (tracked defaults) and ~/.claude/pair-flow.local.yml (agent-maintained, gitignored).
  • Implementation lands incrementally on this same branch as a single draft PR. Stays draft until every task in specs/pair-flow/tasks.md is in Completed and the human reviews the bundle.

Implementation progress

  • Task 1 — /panel-* underuse diagnosis. specs/pair-flow/research/panel-underuse.md. Primary cause: /panel-* shipped mid-window (2026-05-15), not underused. Confirms D-6 and D-12.
  • Task 3.6 — Spec validator. roles/osx/files/claude/scripts/spec-validate.sh. Status-aware structural validator (Draft warns, Active errors). Materializes via existing roles/osx/tasks/osx.yml directory symlink. Already used to self-validate this spec (0 errors, 0 warnings).
  • Task 3.5 — Config helper + defaults. roles/osx/files/claude/pair-flow.yml (codex-only panel default per D-6, 1h stale-lock per D-17, 30s inbox heartbeat per D-23) plus pair-flow-config.sh (subcommands: repo, defaults, repo-class, confirm-repo-class, show). PR-history inference filters bot logins so dotfiles classifies as solo despite the copilot reviewer history.
  • Task 2 — File-path PreToolUse guard. roles/osx/files/claude/scripts/path-guard.sh plus PreToolUse wiring in settings.json for Read|Edit|Write (D-26). Returns a structured permissionDecision=deny with a clean reason. End-to-end verification requires a fresh Claude Code session because PreToolUse loads at session start.
  • Task 6 — /spec-kickoff skill. roles/osx/files/claude/commands/spec-kickoff.md. Didactic seven-section walkthrough (Goal+glossary, Requirements, Design, Verification, Task graph, Risk register, Sign-off) using a read → restate → surface implicit terms → Socratic checks → D-42 inconsistency gate → wait-for-sign-off → incremental-append pattern (D-41). Retrofit-mode patches tasks.md at the Task-graph step. Partial-invalidation re-walk per D-27 plus D-51 wholesale-rewrite triggers. Sign-off flips all four spec files Draft → Active and bumps Last reviewed:; validator post-flip failure reverts. Repo-class via pair-flow-config.sh with needs-confirmation semantics (REQ-D9.1, D-20). Pre-flight stages traced cleanly against specs/pair-flow/; interactive bootstrap-test per REQ-A2.7 is the user's next move (D-7 quality gate needs the human in the loop).
  • Task 3 — Cross-session inbox substrate + tmux dashboard. Six inbox-*.sh scripts under roles/osx/files/claude/scripts/ (write/heartbeat/sweep/session-start/status/dashboard). Hooks wired in settings.json: SessionStart spawns the heartbeat in the background; Stop transitions to idle; Notification (permission_prompt / idle_prompt) transitions to awaiting-input next to the existing notify-event.sh. tmux.conf adds prefix + i popup binding plus a second dracula custom: plugin for the status-bar triplet (⚠N ●N ◆N). Display-only popup v1 (no row-jump) and triplet status segment per user pick. macOS notifications reuse notify-event.sh's tnotify-send chain. Heartbeat self-exits on parent claude PID death or entry removal, so no Stop cleanup hook needed. Smoke-tested end-to-end (init/tick/transition/sweep, multi-row render with correct colours+sort+truncation, status counts, no orphan processes). v1 verification per the spec's Done when is deferred to the user (needs two concurrent live sessions, a kill -9 to observe the 2-min sweep, and a real macOS notification firing — all require a fresh-session hook load).
  • Task 8 — Agent-resolvable bucket in /polish and /panel-pairing. New four-bucket Finding Categorization in user-global roles/osx/files/CLAUDE.md (Auto-applicable / Agent-resolvable / Needs sign-off / Needs human judgment), with the REQ-C1.2 five-condition predicate (failing regression test, test passes after fix, full project CI green, kickoff alignment, no hard disqualifier) and a repo-class behavior split (solo auto-applies, multi-reviewer surfaces for review with evidence). /polish and /panel-pairing gain pre-flight repo-class + active-kickoff-brief detection, a 4-bucket categorize/loop-fate path, and a new step (d-AR) Agent-resolvable application flow. /peer-review updated to four tables; /code-review's descriptive reference updated. Done-when verification deferred.
  • Task 9 — /polish opens draft PR on convergence (standalone mode). Added "Invocation mode" section to polish.md; standalone pushes and opens/updates a draft PR after normal exit, nested hands back to parent. New "Standalone-mode PR creation" section mirrors /self-review's shape. Auto-execution invariants split into in-loop and post-loop. Safety stops suppress PR in both modes.
  • Kickoff brief signed off; status Draft → Active. Full seven-section walkthrough. Amendments recorded for Task 13.
  • Task 7 — /spec-draft skill. Interactive five-phase drafting tool.
  • Task 12 — Scheduled remote agent runner. specs/pair-flow/scheduled-runner.md. Documentation for bookkeeping routine.
  • Task 11 — /orchestrate v1. Stateless step machine (D-5). Pre-flight, lockfile, dep graph, bundling, worktree creation, dispatch, bookkeeping mode.
  • Task 10 — /execute-task skill. Full task-execution workhorse. Test-first, CI with adaptive retry, /polish --nested convergence, draft PR.
  • Task 5 — /resume context-load skill. Read-only context loader for fresh sessions.
  • Task 4 — tasks.md state conventions + auto-update hook.
  • Task 13 — End-to-end validation (in progress). Spec amendments applied (D-6 profile-aware panel backends, D-17 stale-lock 1h→15m, D-24 effort fallback for low-data repos). Contract-consistency checker at roles/osx/files/claude/scripts/skill-contracts.sh wired as lefthook pre-commit. Observation convention added to /execute-task and /polish (Risk 6 Layers 1/1b). Polish iter 1: expanded pair-flow-config.sh invariant coverage. Remaining: tecpan end-to-end run + retrospective.

Test plan

  • Cold-read specs/pair-flow/requirements.md, design.md, tasks.md, test-spec.md end to end and confirm nothing important is missing
  • Verify specs/README.md index reflects the new bundle and documents the spec status lifecycle + Measurement plan conventions + tasks.md state sections + auto-update hook
  • Spot-check that the 53 D-IDs each include Decision, Alternatives considered, and Chosen because
  • Spot-check that D-15's partial reversal cross-reference to D-19 is coherent
  • As each task lands, confirm the deliverables match the task's Done when: line and the new artifact is referenced in the Completed section of tasks.md
  • Run ~/.claude/scripts/spec-validate.sh specs/pair-flow/ and confirm 0 errors at every milestone
  • Open a fresh Claude Code session in this repo and attempt a Read on /no/such/path — confirm path-guard.sh's deny message surfaces
  • Run /spec-kickoff specs/pair-flow/ — full walkthrough completed, surfaced D-6 amendment (gemini on personal/alt), D-17 threshold reduction, D-24 fallback, curiosity-driven maintenance gap, and effort-level calibration note; sign-off flipped status Draft → Active; validator post-flip: 0 errors, 0 warnings
  • Run mise run osx (or equivalent) so the new inbox-*.sh scripts and tasks-pr-sync.sh materialize, then open two concurrent Claude sessions in different worktrees, press prefix + i, and confirm both worktrees show up with correct colours + sort order; status segment shows ⚠N ●N ◆N matching state; kill -9 one session and confirm it disappears from the popup within 2 minutes
  • After the bootstrap-test flips specs/pair-flow/ to Active, exercise /polish (or /panel-pairing) on a real change in this repo and confirm an Agent-resolvable finding auto-applies with the failing-then-passing test + CI evidence + kickoff-alignment citation recorded in the iteration audit log
  • Run /polish standalone on a feature branch and confirm it pushes and opens a draft PR (or reuses an existing one) after the loop exits; confirm /polish --nested does NOT push or create a PR (mocked invocation since /execute-task ships in Task 10)
  • Invoke /spec-draft handover-brief (or another deferred item) and produce a four-file bundle that passes ~/.claude/scripts/spec-validate.sh with 0 errors and 0 warnings without manual cleanup; confirm every REQ has a stable ID + SHALL/MUST, every D-ID has Alternatives + Chosen because, every task has Done when + Dependencies + Citations, and test-spec.md covers every REQ
  • After configuring the scheduled runner via /schedule create --name "pair-flow-bookkeeping" --cron "0 * * * *" --prompt "/orchestrate --bookkeeping specs/<name>", wait for at least one scheduled cycle; merge a PR manually in the GitHub web UI, then confirm the next routine run reconciles the merge into tasks.md (task moves to Completed) without human intervention
  • With an Active spec containing two ready independent tasks, invoke /orchestrate twice from separate sessions; confirm: first picks task A, second picks task B (or no-ops if lock held), both produce independent draft PRs in separate worktrees with D-32 branch naming, bundle sizing is logged, and invoking on a Draft-status spec halts with the /spec-kickoff prompt
  • After the bootstrap-test flips a spec to Active and a kickoff brief exists, invoke /execute-task <task-id> on a real tecpan task; confirm: test written first and fails for the right reason, implementation makes it pass, full CI green, /polish --nested runs without pushing or creating a PR, and a draft PR is opened with the correct body fields (kickoff brief path, task IDs, REQs, test additions). Induce a transient CI failure (network mock or timeout) and confirm the adaptive retry fires (up to 2x with backoff) before escalating to Awaiting input
  • In a fresh session inside a worktree with an in-flight task (e.g., a tecpan worktree), invoke /resume and confirm it produces a summary covering: branch/spec identity, current task phase, git log highlights, PR status, blockers, and ready-next tasks; verify the summary is sufficient to continue work without re-reading the spec. Also test with uncommitted changes present and confirm git status is surfaced before proceeding (no auto-stash/commit/clean)
  • In a fresh session (so the PostToolUse hook loads), open a draft PR from a pair-flow/<spec>/task-<id> branch via gh pr create and confirm the matching task auto-moves from Forward plan to In progress with Status: PR #N draft + Last activity: <today> lines; then gh pr merge in-session and confirm the task auto-moves to Completed as a one-line bullet

inkatze added 30 commits May 22, 2026 13:22
Spec-driven pipeline that pairs human and agent from comprehension
through execution and orchestration. Defines /spec-draft, /spec-kickoff,
/execute-task, /orchestrate, /resume, the new Agent-resolvable finding
bucket, and the inbox + tmux dashboard substrate.

Status: Draft. 14 tasks in dependency order; 10 open questions and 7
deferred items captured for follow-up discussion before implementation.
Encodes the decisions from the 2026-05-22 review pass:

- D-19/D-20: two-file config model (~/.claude/pair-flow.yml tracked
  defaults + ~/.claude/pair-flow.local.yml agent-maintained), with
  discovery flow that never silently writes. Replaces the spec-config.yml
  proposal that would have leaked personal workflow into shared repos.
- D-21: PRs are always drafts; no auto-merge at any tier. Removes the
  v3 auto-merge from Deferred and moves to Out of scope as permanent.
- D-22/D-23: dashboard visual language (red/orange/blue/yellow/green/grey)
  with sort order, plus inbox heartbeat (30s tick, 2-minute stale sweep,
  24h legacy fallback).
- D-24 through D-30: bundle sizing, CI retry, path-guard scope, brief
  invalidation scope, validator reuse, PR-merge detection, telemetry
  layout.

Adds Task 3.5 for the pair-flow config helper. Resolves nine of the ten
open questions; only codex availability on personal/alt remains, gated
on Task 1's investigation.
Resolves the second round of clarifications surfaced after the initial
spec was committed:

- D-31: Spec status lifecycle (Draft -> Active -> Done) with explicit
  ownership of each transition.
- D-32: Branch naming convention for orchestrator-created branches.
- D-33: No bypass mode for /spec-kickoff; manual work remains available.
- D-34: Inbox keyed per Claude Code session UUID, presented per worktree.
- D-35 through D-48: kickoff walkthrough on partial invalidation,
  orchestrator behavior on unkickoffed specs, cross-spec concurrency,
  measurement plan convention, in-session skill composition,
  Last-reviewed auto-update, incremental brief writing, spec-looks-wrong
  escalation, gh auth failure handling, worktree ownership split,
  validator status-aware enforcement, brief retention, uncommitted
  changes on /resume, and no separate audit log.

Adds Task 3.6 for the validator port + extension (a precondition for
/spec-draft and /spec-kickoff). Extends /spec-kickoff and /orchestrate
tasks with status-flipping responsibilities. Documents the spec-status
and measurement-plan conventions in specs/README.md.

The codex availability question (last remaining open question after the
first clarification pass) is also resolved: codex is available on both
work and personal profiles.
…pe, rewrite threshold)

- D-49: Kickoff briefs are committed to git as part of the spec bundle,
  not gitignored. They're decisions, not secrets.
- D-50: Validator v1 enforces structural fields only (stable ID,
  Done-when, Dependencies, Citations). Measurement plan and Last
  reviewed are recommended but not blocking.
- D-51: Wholesale-brief invalidation fires when both requirements.md
  and design.md change in the same commit, or when >50% of REQ-IDs
  or D-IDs change in a single commit. Otherwise section-scoped.

Adds REQ-A2.11 and REQ-A2.12 to anchor the requirements.
Final consistency pass surfaced two gaps and two adjacent fixes:

- D-52: One task per /orchestrate invocation; intra-spec parallelism
  comes from multiple invocations (manual via parallel tmux panes, or
  the scheduled runner picking up successive ready tasks). Matches the
  user's existing "different workstreams in parallel" workflow.
- D-53: /execute-task weighs performance, security, and system-wide
  implications during research and records tradeoffs in the kickoff
  brief's risk register. CI is the hard gate; performance regressions
  that pass CI are still user-observable and excluded from
  Agent-resolvable by D-3.
- D-17 fix: reconcile lock path with D-37 (per-spec, not repo-wide) and
  pin lock-release timing (released before /execute-task runs, not held
  for its full duration).
- D-37 wording: clarify that "same-spec concurrency blocked" applies
  only to state-changing moves, not to concurrent task execution.

REQ-B1.5 expanded with explicit "industry standards, popular projects"
language and the performance/security/system-wide weighing instruction.
REQ-D2.2 added with the parallelism contract.
Diagnosis: /panel-* shipped 2026-05-15, mid 30-day window. /copilot-* count
(42) all pre-release; /panel-* count (14) all post-release; zero copilot
invocations after panel landed. Not underuse, just availability.

Recommendation: keep panel as default. Confirms D-6 (codex-only default,
drop "provisional") and D-12 (panel-pairing demoted to escalation, /polish
as default convergence). One LAN-Ollama auto-mode classifier denial logged
as follow-up.
Structural validator for spec bundles. Checks four-file presence, Status:
declaration, and per-task fields (stable ID, Done when, Dependencies,
Citations). Status-aware: Draft warns (exit 0), Active errors (exit 1).
Also flags prose-only REQs (the tecpan/specs/org counter-example pattern).

Self-tests pass on the three target fixtures:
- tecpan/specs/settings (Active): 0 errors, 0 warnings
- tecpan/specs/org (no status, prose REQs, bare tasks): 0 errors, 27 warnings
- specs/pair-flow (Draft, this bundle): 0 errors, 0 warnings

The REQ-G7.1 Gherkin scenarios verified via synthetic fixture: same gap
warns on Draft (exit 0), errors on Active (exit 1). Materializes through
the existing roles/osx/tasks/osx.yml scripts/ directory symlink; no
per-file symlink task added.
Adds roles/osx/files/claude/pair-flow.yml (tracked defaults: codex-only panel
backend, 1h stale-lock threshold, 30s inbox heartbeat) plus a per-file
symlink task in osx.yml materializing it to ~/.claude/pair-flow.yml.

Adds roles/osx/files/claude/scripts/pair-flow-config.sh with five
subcommands: repo, defaults, repo-class, confirm-repo-class <value>, show.
Per D-20 the helper never silently writes — repo-class on an unknown repo
exits 2 with `needs-confirmation:<inferred>`; only confirm-repo-class
persists. Inference reads gh pr list and filters known bot logins
(*[bot], copilot-*, dependabot*, renovate*, github-actions*) plus
PR-author self-reviews so a solo repo with copilot review history is
not misclassified as multi-reviewer.

Smoke-tested end-to-end on this dotfiles repo. spec-validate.sh still
emits zero errors and zero warnings on specs/pair-flow.
Adds roles/osx/files/claude/scripts/path-guard.sh wired from settings.json
as a PreToolUse hook with matcher Read|Edit|Write (Bash and NotebookEdit
out of scope per D-26). The hook denies via the PreToolUse JSON envelope
with permissionDecision=deny and a structured reason so the model gets
useful context, not a stderr blob.

Blocks: Read/Edit on missing file or directory path; Write on missing
parent directory. Allows everything else. Smoke-tested seven cases via
direct stdin; the hook returns the correct deny envelope or silent allow
in each. End-to-end behavior needs a fresh session because PreToolUse
hooks load at session start; the materialized settings.json is updated
for the next session to pick up.

The 82/month file-path-mistake baseline (April-May 2026 friction analysis)
will be re-measured in the next 30-day window per Task 2's Measurement
plan.
Adds roles/osx/files/claude/commands/spec-kickoff.md, the didactic
walkthrough that produces signed-off kickoff briefs. Seven sections
(Goal+glossary, Requirements, Design, Verification, Task graph, Risk
register, Sign-off) walked per a read → restate → surface implicit
terms → Socratic checks → D-42 inconsistency gate → wait-for-sign-off
→ incremental-append pattern (D-41). Retrofit mode patches tasks.md
at the Task-graph step with per-patch red-line. Partial-invalidation
re-walk uses D-27 section scope plus D-51 wholesale-rewrite triggers.
Sign-off flips all four spec files Draft → Active via Edit and bumps
Last reviewed: (REQ-A2.9, D-40); validator failure post-flip reverts
and halts. Repo-class discovery via pair-flow-config.sh with the
needs-confirmation semantics from REQ-D9.1 / D-20; never silently
writes.

Pre-flight stages traced cleanly against specs/pair-flow/: validator
0/0, repo-class solo, no prior brief. The interactive bootstrap-test
per REQ-A2.7 is the user's move and the D-7 quality gate.
Cross-session awareness layer (REQ-F). Six inbox-*.sh scripts in
roles/osx/files/claude/scripts/ (materialized via the existing
directory symlink): write/heartbeat/sweep/session-start/status/
dashboard. Hooks wired in settings.json: SessionStart spawns the
heartbeat in the background, Stop transitions to idle, Notification
(permission_prompt | idle_prompt) transitions to awaiting-input
alongside the existing notify-event.sh chain. tmux.conf gains a
`prefix + i` popup binding for the dashboard plus a second dracula
custom plugin for the status-bar triplet (⚠N ●N ◆N).

Display-only v1 (no row-jump) and triplet status segment per user
pick on PR #28. macOS notifications reuse notify-event.sh's
tnotify-send chain rather than duplicating it. Heartbeat self-exits
when its claude PID dies (walks up to 6 ancestors looking for
claude/claude-code) or when the inbox file is removed, so no Stop
cleanup hook is required and orphan processes do not accumulate.
The sweeper combines the spec's 2-min heartbeat threshold (D-23)
with a same-host PID-liveness backstop for kill -9 leaks.

Sync mechanism (iCloud vs Syncthing) stays Awaiting input; entries
are single-writer atomic-rename sub-1KB JSON so either works.

Smoke-tested end-to-end: hook init + tick + transition + sweep all
behave; dashboard renders 6 mixed states with correct colours, sort
weights, column truncation; status segment computes correct counts;
heartbeat self-exits within 30s of its inbox file being removed.
v1 verification's two-concurrent-sessions + kill-9 + macOS-notify
checks are deferred to the user (require fresh-session hook load).
Add the four-bucket Finding Categorization to user-global CLAUDE.md
(Auto-applicable / Agent-resolvable / Needs sign-off / Needs human
judgment). The new Agent-resolvable bucket carries the REQ-C1.2 five-
condition predicate (failing regression test, test passes after fix,
full project CI passes, kickoff alignment, no hard disqualifier), with
a repo-class behavior split (solo auto-applies, multi-reviewer surfaces
for review with evidence) routed through ~/.claude/scripts/pair-flow-
config.sh repo-class.

/polish and /panel-pairing gain a pre-flight step that resolves repo-
class and locates the active kickoff brief, a 4-bucket categorize/
loop-fate path, and a new step (d-AR) Agent-resolvable application
flow (write failing test → confirm failure mode matches finding → fix
→ test passes → wider CI → verify kickoff alignment → record
evidence). Iteration summaries now log repo-class, brief path, all
four bucket counts, and per-item Agent-resolvable evidence. Auto-
execution invariants extended.

/peer-review updated to four tables with an Agent-resolvable thread
table and matching option semantics. /code-review's descriptive
reference updated to four-bucket. /copilot-pairing left untouched; it
inherits by reference from CLAUDE.md.

specs/pair-flow/tasks.md: Task 8 moved to Completed.
Add an "Invocation mode" section to polish.md that splits behavior on
the literal --nested flag in $ARGUMENTS. Standalone (default) pushes
and opens or updates a draft PR after a normal exit; nested mode (used
by /execute-task in the pair-flow design) hands back to the parent for
PR creation.

The new "Standalone-mode PR creation" section mirrors /self-review's
shape: push, check for an existing PR via gh pr view and reuse it,
otherwise template / convention discovery then gh pr create --draft
with a body listing the Polish notes (per-iteration Auto-applicable
and Agent-resolvable items, test paths and kickoff-brief citations,
plus any unresolved Needs sign-off / Needs human judgment items).

Auto-execution invariants split into in-loop (no push, no PR ever)
and post-loop (standalone may push and open a draft PR, nested may
not). Force-push, amend, squash, and rebase remain forbidden at all
times. Safety stops suppress PR creation in both modes.

specs/pair-flow/tasks.md: Task 9 moved to Completed.
…date hook

Document the canonical tasks.md state sections (Completed, In progress,
Awaiting input, Deferred, Out of scope) and the In progress annotation
format in specs/README.md. Phase values: implementing, polish iter N,
PR #M draft. Bullet shape for Completed pinned.

Add roles/osx/files/claude/scripts/tasks-pr-sync.sh wired from settings
.json under hooks.PostToolUse with matcher "Bash". The script filters
`gh pr (create|merge)` from the tool call, parses the D-32 branch
(pair-flow/<spec>/task-<ids>, including bundles and dotted IDs),
extracts the PR number from tool_response.stdout via URL match, then
`#N` literal, then argv, then `gh pr view` fallback, and rewrites
specs/<spec>/tasks.md.

On open: move task block(s) Forward plan → In progress, insert the
two annotation lines right after the H3; strip existing Status /
Last-activity bullets first so the hook is idempotent. On merge:
replace the block with a one-line Completed bullet referencing the
PR. Bundle order preserved. Silent on no-op cases; python failures
log to stderr and leave tasks.md untouched.

Smoke-tested seven scenarios via synthetic stdin against ephemeral
fixtures (single-task open, gh pr merge with realistic #N stdout,
bundle open with correct order, non-pair-flow branch no-op, non-Bash
tool no-op, idempotent re-open). Out-of-session merge reconciliation
remains Task 12's scheduled-runner job.
…observation convention

Apply kickoff-brief amendments: D-6 profile-aware panel backends (codex
on work, gemini on personal/alt), D-17 stale-lock threshold reduced from
1h to 15m, D-24 effort-based fallback for low-data repos.

Add skill-contracts.sh contract-consistency checker wired as a lefthook
pre-commit job. Checks cross-file invariants (D-32 branch naming,
four-bucket presentation, --nested flag, pair-flow-config.sh, D-21
always-draft, D-33 Active gate, D-36 kickoff gate) across skill files.

Add observation convention to /execute-task and /polish (Risk 6 Layers
1/1b: passive record of opportunities for future /spec-draft seeds).
Add execute-task.md and peer-review.md to the pair-flow-config.sh
check list in skill-contracts.sh. Both make load-bearing calls to
pair-flow-config.sh repo-class in their pre-flight.
…ple, Task 15

- Add interaction style sections to /spec-draft and /spec-kickoff:
  progress indicator, progressive disclosure, visual aids, selectors
  over open-ended questions, smart defaults, running summary
- Add composability-by-default design principle to user-global CLAUDE.md
- Add Task 15 (work project e2e validation) to pair-flow tasks
- Add standalone project extraction to Deferred with gate conditions
Add explicit handoff presentation rules to /polish post-loop flow.
Items sharing a decision axis (e.g., test coverage gaps) cluster into
one question instead of individual confirmations. Reduces human
interaction count without losing granularity.
…ions

Same fix as polish: when the autonomous loop hands off residual items,
cluster shared-axis findings and use batched decisions instead of
defaulting to one-by-one confirmation.
/orchestrate said "navigate to the worktree" but didn't specify how,
so /execute-task ran in the wrong directory. Now explicitly uses
EnterWorktree/ExitWorktree. Also documents /loop wrapping for
multi-task autopilot.
Gated on the standalone extraction goal — current sources
(specs/README.md, validator, /spec-draft) are sufficient for personal
use, and a meta-spec would add a sync burden without immediate value.
Two integration surfaces identified (discovery rigor fan-out across
review skills, /execute-task conditional fan-out for multi-file
mechanical work). Gated on Anthropic publishing the API.
A stale local main in a long-lived worktree inflates the diff with
already-merged commits. Fetch first and diff against the remote-tracking
base; fall back to local main only when no remote is configured.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Comment thread specs/pair-flow/requirements.md
Comment thread specs/pair-flow/kickoff-brief.md
Comment thread scripts/claude-gemini-auth-sync.sh Outdated
- requirements.md REQ-G3.1: profile-aware default (work: codex; personal/alt:
  gemini) per D-6, replacing the stale 'codex on all profiles' text that
  contradicted the rest of the bundle.
- kickoff-brief.md Task Graph Reconstruction: mark it a sign-off-time snapshot
  (tasks.md is canonical) and correct the 15->16 task count.
- claude-gemini-auth-sync.sh: the default ITEM_UUID is the real 1Password item,
  not a placeholder; fix the stale comment (no behavior change).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Comment thread roles/osx/files/claude/scripts/path-guard.sh
Comment thread roles/osx/files/claude/scripts/inbox-session-start.sh
Comment thread roles/osx/files/claude/scripts/inbox-write.sh
Add an early 'command -v jq || exit 0' to path-guard.sh, inbox-session-start.sh,
and inbox-write.sh so they degrade cleanly on a machine without jq, consistent
with tasks-pr-sync.sh. The existing 2>/dev/null already suppresses the shell's
command-not-found under bash, but inbox-write.sh has write-side jq calls that
are not 2>/dev/null-guarded, and the explicit check makes the degrade-to-safe
behavior intentional rather than incidental. Verified: with jq absent all three
exit 0 silently; with jq present, path-guard still denies and inbox tick still
writes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Comment thread roles/osx/files/claude/scripts/tasks-pr-sync.sh
Comment thread roles/osx/files/claude/scripts/pair-flow-config.sh
Comment thread roles/tmux/files/scripts/inbox-status.sh Outdated
…t fix

- roles/tmux/files/scripts/inbox-status.sh: guard the exec so the dracula
  status slot degrades to 'inbox?' if the Claude script is not yet
  materialized (tmux role applied before osx role), instead of erroring.
- pair-flow-config.sh: fix the misleading infer_repo_class comment. The no-gh
  fallback keeps suggesting solo (the common case), but the comment no longer
  claims that 'surfaces for review' (it doesn't; solo enables auto-apply). The
  value is only a needs-confirmation suggestion the human confirms (exit 2).

(A third Copilot thread flagging the gh_pr regex '\$' as a bug was a false
positive: bash double-quote processing converts it to the '$' end anchor
before grep sees it; bare 'gh pr merge' is detected. Verified, dismissed.)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.

Comment thread roles/osx/files/claude/scripts/inbox-write.sh
Comment thread roles/osx/files/claude/commands/orchestrate.md
…arsing

- inbox-write.sh maybe_notify: pass the real cwd to notify-event.sh instead of
  a pre-built 'project · branch' string. notify-event derives project+branch
  itself (basename + git -C) and prepends that context; the old code broke
  branch detection (a non-path cwd failed the git lookup in the draft-pr-ready
  case) and duplicated the context in the awaiting-input permission body.
  Verified: done -> {cwd: <real path>}, permission -> {cwd, message:'awaiting
  input'}.
- orchestrate.md: clarify that flags (e.g. --bookkeeping) are ignored when
  resolving the spec path, so '/orchestrate --bookkeeping specs/<spec>' is not
  misread as treating --bookkeeping as the path.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Comment thread roles/osx/files/claude/scripts/inbox-write.sh
Comment thread roles/osx/files/claude/scripts/inbox-sweep.sh
Comment thread specs/README.md Outdated
… wording

- inbox-write.sh: the existing-entry update path now refreshes .branch (guarded
  to skip empty, e.g. detached HEAD), so switching branches in the same session
  no longer leaves a stale branch in the dashboard/status forever.
- inbox-sweep.sh: add the early 'command -v jq || exit 0' guard (degrade to
  no-sweep/empty-list), consistent with the other inbox scripts.
- inbox-dashboard.sh: same jq guard (message + exit 1, matching its missing-
  SWEEPER handling) so a fresh host degrades cleanly. (Proactively drained the
  same class Copilot flagged on inbox-sweep.sh.)
- specs/README.md: clarify that status controls task-structure-check severity
  only; the four-file presence check always errors regardless of status.
Verified: stale branch refreshes on next hook-event; sweep/dashboard degrade
cleanly with jq absent.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.

Comment thread scripts/claude-gemini-auth-sync.sh
Comment thread roles/tmux/files/scripts/inbox-status.sh
- ~/.gemini directory perms: add an Ansible 'file' task (state: directory,
  mode: 0700) in homebrew.yml before the sync task, mirroring the
  ~/.claude/inbox precedent in osx.yml, plus a best-effort 'chmod 700' in
  claude-gemini-auth-sync.sh as defense-in-depth. The dir holds the API key
  file (only the file was chmod 600 before; the dir used the umask).
- roles/tmux/files/scripts/inbox-status.sh: the iter-6 placeholder fallback
  returned immediately, which lets dracula re-invoke the custom: slot in a
  tight loop. Sleep for status-interval (default 5s) in the fallback too,
  matching the real inbox-status.sh and gpu-usage.sh siblings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Comment thread roles/osx/files/claude/settings.json
Comment thread roles/osx/files/claude/settings.json
Comment thread roles/osx/files/claude/scripts/inbox-write.sh Outdated
inkatze added 2 commits June 5, 2026 09:49
The comment claimed host_name() strips a .local suffix, but only 'hostname -s'
does that (the bare-hostname fallback, used only if -s fails, may keep the
suffix). Reword the comment to describe the actual behavior; no behavior change,
and the derivation stays consistent with the other inbox scripts.
Per the chosen resolution: keep the rich direct notify-event.sh permission/idle
hooks in settings.json (they carry the actual permission message) and stop
inbox-write.sh from emitting its own generic 'awaiting input' notification on
the same transition. inbox-write still records the awaiting-input state for the
dashboard, and still owns the draft-pr-ready notification (which has no direct
hook). Removes the duplicate macOS notification on permission_prompt/idle_prompt.
Verified: awaiting-input updates state with no notification; draft-pr-ready
still fires 'done'.
@inkatze
inkatze marked this pull request as ready for review June 5, 2026 17:38
@inkatze
inkatze merged commit a9fcc1f into main Jun 5, 2026
8 of 10 checks passed
@inkatze
inkatze deleted the spec/pair-flow branch June 5, 2026 17:38
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.

2 participants