Skip to content

Refresh work-system: safe deps, md tables, sharper status - #11

Merged
gering merged 8 commits into
mainfrom
task/work-system-refresh
Jun 19, 2026
Merged

Refresh work-system: safe deps, md tables, sharper status#11
gering merged 8 commits into
mainfrom
task/work-system-refresh

Conversation

@gering

@gering gering commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bring work-system up to the safety/consistency level of pr-flow & knowledge-system.
  • Defuse the dependency auto-install footgun, modernize output, unify conventions.

Changes

  • /continue: project-local installs (npm/cargo/go/…) run without prompts; pip uses a local .venv; only ask when a global install is genuinely unavoidable.
  • /list: replaced heavy ASCII boxes with markdown tables (token cost, narrow terminals).
  • /status: merged-PR (--head task/<name>) + branch-merge are authoritative completion signals; commit-grep / file-activity demoted to weak corroboration.
  • /kickoff + /adopt: unified new-session launch to claude -n "<task-name>" "/continue" (named session + deterministic resume in one command).
  • /close: auto-delete remote branch when the PR was merged (no prompt); still asks on manual close.
  • README: documented the unified launch command.
  • Version: work-system 1.2.5 → 1.3.0 (plugin.json + marketplace.json).

Readiness

  • ✅ Version bumped to 1.3.0 (both manifests in sync)
  • ✅ README updated for the unified launch command
  • ✅ Structure check: 0 errors (scripts/check-structure.py)
  • ✅ Knowledge: no new generalizable patterns to capture
  • ➖ Tests / Build / Linter / Changelog: N/A (markdown-only plugin repo, no changelog)

Test plan

  • python3 scripts/check-structure.py passes (0 errors)
  • /list renders markdown tables (no ASCII boxes)
  • /continue shows the install command, skips when deps present, uses .venv for pip
  • /kickoff / /adopt print claude -n "<task>" "/continue" and it launches a named session that auto-runs the resume flow
  • /close on a merged PR removes the remote branch without prompting

🤖 Generated with Claude Code

gering and others added 8 commits June 19, 2026 09:05
- /continue: project-local installs run without prompts; pip uses a
  local .venv; only ask when a global install is unavoidable
- /list: replace ASCII boxes with markdown tables
- /status: branch/PR match is authoritative; commit-grep is weak signal
- /kickoff + /adopt: unify new-session command to
  `claude -n "<task-name>" "/continue"` (named session + resume in one)
- /close: auto-delete remote branch when PR was merged
- Bump work-system to 1.3.0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- /status: stop false-negating completion — treat a branch absent from
  `--merged` as inconclusive (squash/rebase rewrite SHAs), not "not
  merged"; restore a non-gh path via commit history in main; anchor the
  branch glob (`*task/<name>`, not `*..*`) so siblings don't match; add a
  broad fallback for adopted branches that kept their original name
- /continue: use `python3` (bare `python` is gone on modern macOS/Linux);
  pin bundler to `vendor/bundle` instead of a global gem install; fix the
  `—` missing-check gate so `go mod download` can fire; handle adopted
  non-`task/*` branches instead of assuming `task/*`
- /close: only `--delete` the remote branch when `ls-remote` shows it still
  exists (avoid an error on auto-delete-on-merge repos)
- README: dependencies are shown + run (project-local), not merely "suggested"
- kickoff: fix stale cross-ref "see step 11" -> step 12

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- /status: search both local and remote-tracking main (`origin/<main>`) so a
  PR merged on GitHub but not yet pulled isn't read as NOT STARTED; confirm
  merge with `git branch --merged origin/<main> --list "<branch>"` (local,
  exact) so a stale `origin/<branch>` ref can't falsely report COMPLETED
- /status + /close: resolve the task branch from the actual current branch
  (prefix-agnostic) so /adopt branches that kept their original name work
- /continue: step-7 output shows the actual branch, not `task/<name>`
- /close: fix stale cross-ref — the "not fully merged" error is `git branch -d`
  in step 8, not step 7

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- /status: build the main-ref set from refs that exist — include
  `origin/<main>` only when present (`git rev-parse --verify`), so a
  local-only / unfetched repo no longer `fatal`s into a false NOT STARTED;
  merge check targets `<merge-ref>`
- /status + /close: resolve an adopted (non-`task/`) branch by name too —
  `task/<name>` -> broad `grep` -> the branch recorded in the task file — not
  only when standing on the branch
- /status: fix the COMPLETED example — a deleted branch is corroboration, not
  authoritative `git branch --merged` (3b) evidence
- /close: when `gh` is unavailable, fall back to a local merge check and require
  confirmation before cleanup instead of silently skipping the merge gate
- /continue: Rust fetches deps (`cargo fetch`) instead of a full `cargo build`;
  clarify the table only fetches dependencies, never compiles

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four prose-review rounds showed /status, /close and /continue kept
re-deriving (and drifting on) the same fragile git/gh logic. Move it into
one tested helper and have the skills call it.

- New plugins/work-system/scripts/task-status.sh with `resolve` and `assess`
  subcommands: main-branch detection; task-branch resolution (current branch
  in a worktree, or task/<name> + local/remote fallbacks by name, read via
  --format so no stray whitespace/remote prefix); offline-safe main refs
  (origin/<main> only when it exists, never fatals); squash/rebase-aware merge
  detection (branch_merged=unknown rather than a false "not merged")
- /status: replace ~110 lines of evidence-gathering prose with one `assess`
  call + verdict/confidence rendering
- /close: resolve the branch and the merge gate from `assess`; drop the
  duplicate main-branch detection
- /continue: resolve the task via `resolve`
- Verified the helper against the live repo plus squash-merge and adopted-name
  edge cases

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Eight concrete, test-verified code bugs (the script made them findable +
fixable, unlike the prose rounds):
- S1: a no-PR branch now yields pr_state=none, not the literal "null"
  (`gh --jq '.[0] // empty | ...'`)
- S2: remote-only task branches are detected — merge via
  `git merge-base --is-ancestor` on the resolved ref; verdict no longer
  falls through to NOT_STARTED
- S3: the commit-history search is literal (`git log -F --grep`), not a regex
- S4: fuzzy substring resolution sets branch_ambiguous so /close disambiguates
  before destructive cleanup
- S5: a detached HEAD reports detached=yes instead of on_main=yes
- S6: a closed-unmerged PR (pr_state=CLOSED) maps to IN_PROGRESS, not a
  "no PR found" NOT_STARTED
- S7: /status only claims "Branch <task_branch> exists" when branch_exists=yes
- S8: /close skips the origin sync when there is no origin remote
Verified each against the live repo plus throwaway branch/worktree fixtures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- task-status.sh: rank ALL exact matches (local+remote) above fuzzy, so an
  exact remote branch isn't shadowed by an unrelated local substring (T1);
  a bare commit-message match implies COMPLETED only for a specific task name
  (multi-segment, or >=6 chars), not generic words like "fix"/"api" (T2)
- /close: disambiguation listing is case-insensitive to match the helper's
  `grep -i` (C1); step 8 skips the local-branch delete when branch_exists=no
  (C3); step 9 guards on an `origin` remote existing (C2)
- /status: the COMPLETED report renders the commit-count line only when >0 (C4)
- /list: resolve each task's real branch via the helper and match PRs by it,
  instead of a hardcoded `task/<name>` (C5)
- /kickoff + /adopt: create the worktree `.claude/` dir before copying
  settings.json, and copy only when it exists (P1, pre-existing latent bug)
Verified the script fixes against throwaway branch/ref fixtures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Remove fuzzy substring branch resolution; resolve a task name only via
  exact refs (task/<name>, <name>, origin variants) + the task/<name>
  convention. Kills the recurring hazard where a substring guess bound an
  unrelated branch — or even main — and fed /close's destructive steps.
- task-status.sh: topology never confirms a merge; only a MERGED PR yields
  COMPLETED/confirmed (no more false COMPLETED on a freshly-kicked-off
  branch). Refuse to resolve the main branch as a task. Drop the phantom
  origin/HEAD from remote resolution. Drop dead resolved_match/branch_
  ambiguous/merge_ref output.
- /close: gate local branch deletion on branch_scope=local; use <task-branch>
  in destructive commands; remove the now-moot disambiguation block.
- /status: report wording fixes (suppress merge-unconfirmed line when a live
  PR exists; correct nogh/commit wording).
- /list: bind tasks via branch_exists only.
- /continue + /close: resolve the main repo path via main-repo-path.sh.
- /adopt: include task/ in the prefix-strip list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gering
gering force-pushed the task/work-system-refresh branch from 6b578ff to e91b69a Compare June 19, 2026 07:06
@gering
gering merged commit e0237ce into main Jun 19, 2026
1 check passed
@gering
gering deleted the task/work-system-refresh branch June 19, 2026 07:09
gering added a commit that referenced this pull request Jul 16, 2026
First dogfooding run: /swarm:review --fix over its own diff (4 cluster
finders + codex + grok-4.5 + composer; 13 findings, 5 cross-family
consensus). Fixes the agreed findings:

- Keep validly tagged off-cluster lens prefixes: validate against the
  global lens set, not the finder's subset — coercion could flip kind
  and route a real defect through the applicability verifier (#1, consensus critical)
- Verify design clusters even with cross-family consensus: agreement
  attests agreement, not repo-grounded applicability (externals cannot
  open repo files); defect consensus stays auto-accepted (#2)
- Untagged external findings ('unspecified' lens) no longer vote in the
  cluster-kind derivation (#3)
- Derive CANDIDATE_LENSES from LENS_CLUSTERS — one list, no unchecked
  mirror; DRIFT WARNING on the SKILL.md external-prompt copy (#4, #9)
- Finder prompt: "issue (defect or substantive improvement)" + all lens
  prefixes; external prompt lead covers design improvements too (#5, #6)
- pr-post.py owns design-row ordering + [lens] prefixing via optional
  kind/lens row fields, unit-tested; SKILL.md step 5 passes rows through
  verbatim (#13)
- Doc sync: balance-spec finder count, README canonical cluster names +
  preset teaser wording, knowledge-index line trimmed (#8, #10, #11, #12)

Declined: #7 (per-cluster dilutes per-lens depth) — deliberate,
documented cost/coverage trade-off; --max is the depth profile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126cGxsBYxqgEFH4AcpriNk
gering added a commit that referenced this pull request Jul 16, 2026
Second dogfooding round at the deepest profile (/swarm:review --max --fix:
per-lens split live — gate pruned style, 10 xhigh finders + codex
gpt-5.6-sol@xhigh + grok-4.5 + composer; 24 findings, 10 consensus).
Fixes the agreed findings:

- Never auto-accept an all-untagged consensus cluster: no tagged lens
  backs it, so it is verified like a solo. Verify/auto-accept now derive
  from ONE needsVerify predicate (structural exactly-once partition);
  kind vote in clearer every-form (#1, consensus critical; #21, #22)
- Design verifier sees the finding's recommendation — the proposal the
  applicability rubric actually tests — and carries an escape hatch:
  a genuine defect mis-filed under a design lens is not refuted away
  (#12, #3); "solo" dropped from verifier prompts (#4)
- Untagged findings from multi-lens cluster finders fall back to
  'unspecified' (safe defect bucket), not lenses[0] (#7); merge-agent
  free-text lens validated, majority-member fallback (#9)
- Improvement invitation scoped to design finder units — defect-lens
  finders stay defect-only (#8); merge prompt clusters by issue, not
  only defect (#13); schema descriptions generalized for design
  findings (#14)
- LENS_BRIEF startup assertion (#6); gate prompt interpolates
  LENS_CLUSTERS.design (#19); new test_lens_sync.py guards all lens
  mirrors: SKILL HDR prompt, LENS_BRIEF, pr-post DESIGN_LENSES (#5)
- Workflow assigns stable finding num (defects first, shared sequence);
  presenter/pr-post render it verbatim (#20)
- pr-post.py: design lens is the backup kind signal when the handoff
  drops kind (explicit defect still wins); single-pass partition (#17, #24)
- Balance: REFUTED is its own segment (refuted ⊄ solo since design
  consensus can be refuted) (#2); LOCKED design-table column precedence
  in --loop rounds clarified (#11); "verifies solos" doc sweep across
  manifests/README/knowledge (#4); cluster failure-isolation trade-off
  documented (#10); knowledge index line trimmed (#15)

Declined: #16 (JS test harness for sandbox code; lens-sync test covers
the drift class), #18 (gate-fail under --max runs all lenses — the
documented never-silently-narrower degrade), #23 (micro-opt vs readability).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126cGxsBYxqgEFH4AcpriNk
gering added a commit that referenced this pull request Jul 17, 2026
First dogfooding run: /swarm:review --fix over its own diff (4 cluster
finders + codex + grok-4.5 + composer; 13 findings, 5 cross-family
consensus). Fixes the agreed findings:

- Keep validly tagged off-cluster lens prefixes: validate against the
  global lens set, not the finder's subset — coercion could flip kind
  and route a real defect through the applicability verifier (#1, consensus critical)
- Verify design clusters even with cross-family consensus: agreement
  attests agreement, not repo-grounded applicability (externals cannot
  open repo files); defect consensus stays auto-accepted (#2)
- Untagged external findings ('unspecified' lens) no longer vote in the
  cluster-kind derivation (#3)
- Derive CANDIDATE_LENSES from LENS_CLUSTERS — one list, no unchecked
  mirror; DRIFT WARNING on the SKILL.md external-prompt copy (#4, #9)
- Finder prompt: "issue (defect or substantive improvement)" + all lens
  prefixes; external prompt lead covers design improvements too (#5, #6)
- pr-post.py owns design-row ordering + [lens] prefixing via optional
  kind/lens row fields, unit-tested; SKILL.md step 5 passes rows through
  verbatim (#13)
- Doc sync: balance-spec finder count, README canonical cluster names +
  preset teaser wording, knowledge-index line trimmed (#8, #10, #11, #12)

Declined: #7 (per-cluster dilutes per-lens depth) — deliberate,
documented cost/coverage trade-off; --max is the depth profile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126cGxsBYxqgEFH4AcpriNk
gering added a commit that referenced this pull request Jul 17, 2026
Second dogfooding round at the deepest profile (/swarm:review --max --fix:
per-lens split live — gate pruned style, 10 xhigh finders + codex
gpt-5.6-sol@xhigh + grok-4.5 + composer; 24 findings, 10 consensus).
Fixes the agreed findings:

- Never auto-accept an all-untagged consensus cluster: no tagged lens
  backs it, so it is verified like a solo. Verify/auto-accept now derive
  from ONE needsVerify predicate (structural exactly-once partition);
  kind vote in clearer every-form (#1, consensus critical; #21, #22)
- Design verifier sees the finding's recommendation — the proposal the
  applicability rubric actually tests — and carries an escape hatch:
  a genuine defect mis-filed under a design lens is not refuted away
  (#12, #3); "solo" dropped from verifier prompts (#4)
- Untagged findings from multi-lens cluster finders fall back to
  'unspecified' (safe defect bucket), not lenses[0] (#7); merge-agent
  free-text lens validated, majority-member fallback (#9)
- Improvement invitation scoped to design finder units — defect-lens
  finders stay defect-only (#8); merge prompt clusters by issue, not
  only defect (#13); schema descriptions generalized for design
  findings (#14)
- LENS_BRIEF startup assertion (#6); gate prompt interpolates
  LENS_CLUSTERS.design (#19); new test_lens_sync.py guards all lens
  mirrors: SKILL HDR prompt, LENS_BRIEF, pr-post DESIGN_LENSES (#5)
- Workflow assigns stable finding num (defects first, shared sequence);
  presenter/pr-post render it verbatim (#20)
- pr-post.py: design lens is the backup kind signal when the handoff
  drops kind (explicit defect still wins); single-pass partition (#17, #24)
- Balance: REFUTED is its own segment (refuted ⊄ solo since design
  consensus can be refuted) (#2); LOCKED design-table column precedence
  in --loop rounds clarified (#11); "verifies solos" doc sweep across
  manifests/README/knowledge (#4); cluster failure-isolation trade-off
  documented (#10); knowledge index line trimmed (#15)

Declined: #16 (JS test harness for sandbox code; lens-sync test covers
the drift class), #18 (gate-fail under --max runs all lenses — the
documented never-silently-narrower degrade), #23 (micro-opt vs readability).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126cGxsBYxqgEFH4AcpriNk
gering added a commit that referenced this pull request Jul 17, 2026
First dogfooding run: /swarm:review --fix over its own diff (4 cluster
finders + codex + grok-4.5 + composer; 13 findings, 5 cross-family
consensus). Fixes the agreed findings:

- Keep validly tagged off-cluster lens prefixes: validate against the
  global lens set, not the finder's subset — coercion could flip kind
  and route a real defect through the applicability verifier (#1, consensus critical)
- Verify design clusters even with cross-family consensus: agreement
  attests agreement, not repo-grounded applicability (externals cannot
  open repo files); defect consensus stays auto-accepted (#2)
- Untagged external findings ('unspecified' lens) no longer vote in the
  cluster-kind derivation (#3)
- Derive CANDIDATE_LENSES from LENS_CLUSTERS — one list, no unchecked
  mirror; DRIFT WARNING on the SKILL.md external-prompt copy (#4, #9)
- Finder prompt: "issue (defect or substantive improvement)" + all lens
  prefixes; external prompt lead covers design improvements too (#5, #6)
- pr-post.py owns design-row ordering + [lens] prefixing via optional
  kind/lens row fields, unit-tested; SKILL.md step 5 passes rows through
  verbatim (#13)
- Doc sync: balance-spec finder count, README canonical cluster names +
  preset teaser wording, knowledge-index line trimmed (#8, #10, #11, #12)

Declined: #7 (per-cluster dilutes per-lens depth) — deliberate,
documented cost/coverage trade-off; --max is the depth profile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126cGxsBYxqgEFH4AcpriNk
gering added a commit that referenced this pull request Jul 17, 2026
Second dogfooding round at the deepest profile (/swarm:review --max --fix:
per-lens split live — gate pruned style, 10 xhigh finders + codex
gpt-5.6-sol@xhigh + grok-4.5 + composer; 24 findings, 10 consensus).
Fixes the agreed findings:

- Never auto-accept an all-untagged consensus cluster: no tagged lens
  backs it, so it is verified like a solo. Verify/auto-accept now derive
  from ONE needsVerify predicate (structural exactly-once partition);
  kind vote in clearer every-form (#1, consensus critical; #21, #22)
- Design verifier sees the finding's recommendation — the proposal the
  applicability rubric actually tests — and carries an escape hatch:
  a genuine defect mis-filed under a design lens is not refuted away
  (#12, #3); "solo" dropped from verifier prompts (#4)
- Untagged findings from multi-lens cluster finders fall back to
  'unspecified' (safe defect bucket), not lenses[0] (#7); merge-agent
  free-text lens validated, majority-member fallback (#9)
- Improvement invitation scoped to design finder units — defect-lens
  finders stay defect-only (#8); merge prompt clusters by issue, not
  only defect (#13); schema descriptions generalized for design
  findings (#14)
- LENS_BRIEF startup assertion (#6); gate prompt interpolates
  LENS_CLUSTERS.design (#19); new test_lens_sync.py guards all lens
  mirrors: SKILL HDR prompt, LENS_BRIEF, pr-post DESIGN_LENSES (#5)
- Workflow assigns stable finding num (defects first, shared sequence);
  presenter/pr-post render it verbatim (#20)
- pr-post.py: design lens is the backup kind signal when the handoff
  drops kind (explicit defect still wins); single-pass partition (#17, #24)
- Balance: REFUTED is its own segment (refuted ⊄ solo since design
  consensus can be refuted) (#2); LOCKED design-table column precedence
  in --loop rounds clarified (#11); "verifies solos" doc sweep across
  manifests/README/knowledge (#4); cluster failure-isolation trade-off
  documented (#10); knowledge index line trimmed (#15)

Declined: #16 (JS test harness for sandbox code; lens-sync test covers
the drift class), #18 (gate-fail under --max runs all lenses — the
documented never-silently-narrower degrade), #23 (micro-opt vs readability).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126cGxsBYxqgEFH4AcpriNk
gering added a commit that referenced this pull request Jul 23, 2026
External-only swarm review (codex + grok) on PR #42. Apply the agreed
findings to the decision record:

- AMQ send vs single-sequencer: workers send only to the Manager handle;
  Manager relays. `amq send --to <peer>` bypasses the sequencer (#1).
- Broadcast: reuse AMQ fan-out/presence/federation instead of hand-rolled
  multi-writer global.jsonl (the model Maildir superseded) (#2).
- Lane lifecycle: drain-on-/close + stale-mail guard so a reused path never
  reconsumes a prior occupant's undrained message (#3).
- Soften the "RESOLVES" overclaim: this ADR supersedes the herdr docs' enum;
  their refresh is pending (#4).
- Canonicalize the lane key via git rev-parse --show-toplevel, not raw cwd (#7).
- Fix ws-statusline states flag order: `states [--cached] <dir>` (#10).
- _index.md blurb: central ~/.agent-mail/ mailbox, not the superseded
  .mailbox/ protocol (always-loaded surface) (#11).
- Note the spike is decided, no open task file (#12).
- Trust-model residuals (convention-based identity, home-dir readable store)
  as accepted for a single-user local tool (#5, #6).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LTZx9DqrXPXQFoTrCvcJmD
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