Skip to content

chore(work-items): fix deferred Codex publish-review findings#133

Merged
kyle-sexton merged 4 commits into
mainfrom
chore/fix-work-items-publish-review-findings
Jul 13, 2026
Merged

chore(work-items): fix deferred Codex publish-review findings#133
kyle-sexton merged 4 commits into
mainfrom
chore/fix-work-items-publish-review-findings

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Addresses the 8 Codex publish-review findings deferred from the work-items v2 republish, applied to the published plugin skill (plugins/work-items). The medley core PR mirrors these behaviorally so both stay aligned modulo the publish de-couple.

Findings addressed

  1. add default body skeleton restored — Context / Proposed work / Acceptance criteria / References / Metadata.
  2. add --recurring creates the schedule file with an {"items": []} skeleton (ask-first) when it does not exist yet.
  3. add --agent-ready appends the agent-ready meta label for autonomous pickup.
  4. needs-human added to the Meta group (label-taxonomy + SKILL).
  5. Seam invocations project-rooted (${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}) so they work from a subdirectory.
  6. done --pr no longer closes an item whose PR is still unmerged.
  7. due matches open recurring items on the full [Maintenance] {title}, not the bare prefix.
  8. recheck checklist aligned to the recheck action.

Refs melodic-software/medley#1460


Note

Low Risk
Documentation-only changes to agent skill markdown; behavior shifts are procedural guidance for agents, not executable product code.

Overview
Addresses eight deferred Codex publish-review findings in the published plugins/work-items skill (agent instructions only—no tracker runtime code).

add restores the default item body (Context, Proposed work, Acceptance criteria, References, Metadata), applies the agent-ready meta label when --agent-ready is set, and tightens --recurring: bootstrap .github/recurring-schedule.json (ask-first) before creating [Maintenance] items that due/recheck cannot reconcile.

Taxonomy documents needs-human in the Meta group so HITL slices align with list-frontier --autonomous exclusion (already described in decompose).

Seam snippets across actions use ${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)} so work-item-tracker.sh works from subdirectories; recurring jq examples use explicit if [[ -f "$SCHEDULE" ]] guards.

done --pr no longer closes an item when the named PR is still unmerged and will auto-close this issue via Closes #N (or respects per-issue opt-outs); closing keywords are evaluated for the target issue, not another issue on the same PR.

due (and matching guidance in work) requires exact [Maintenance] {schedule title} matches when cross-referencing open recurring items—no bare [Maintenance] prefix or substring matches.

recheck checklist in templates/checklist.md matches the real recheck flow (schedule lookup, date updates, close associated maintenance item).

Reviewed by Cursor Bugbot for commit 251051a. Bugbot is set up for automated code reviews on this repo. Configure here.

Resolves the 8 findings deferred from the work-items v2 republish
(claude-code-plugins#121), applied to the published plugin skill (the medley
core PR mirrors these behaviorally so both stay aligned modulo the publish
de-couple):

1. add: restore the richer default body skeleton (Context / Proposed work /
   Acceptance criteria / References / Metadata).
2. add --recurring: create the schedule file with an {"items": []} skeleton
   (ask-first) when it does not exist yet.
3. add --agent-ready: append the agent-ready meta label for autonomous pickup.
4. taxonomy: add needs-human to the Meta group (label-taxonomy + SKILL).
5. seam invocations: project-root the tracker path
   (${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}) so they work
   from a subdirectory.
6. done --pr: do not close an item whose PR is still unmerged.
7. due: match open recurring items on the full [Maintenance] {title}.
8. checklist: align the recheck section to the recheck action.

Refs melodic-software/medley#1460
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_117d3a46-c2e6-4048-aec8-be317f3262fa)

@cursor cursor Bot 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.

Stale comment

Risk: low. Not approving because Cursor Bugbot did not complete successfully (check skipped due to usage limit). Human review is needed before merge; no reviewers were assigned because the sole repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

…publish-review-findings

# Conflicts:
#	plugins/work-items/skills/work-items/actions/due.md
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f5b9d62e-1e9a-4554-a3d9-b723dce23ef5)

@claude

claude Bot commented Jul 13, 2026

Copy link
Copy Markdown

PR Review in Progress

  • Gather context and read changed files
  • Review each of the 9 changed files
  • Validate findings against CLAUDE.md guidelines
  • Post review summary

View job run

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 240bc1f1c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/work-items/skills/work-items/actions/done.md Outdated
Comment thread plugins/work-items/skills/work-items/templates/checklist.md Outdated

@cursor cursor Bot 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.

Stale comment

Risk: low. Not approving because Cursor Bugbot did not complete successfully (check skipped due to usage limit). Human review is needed before merge; no reviewers were assigned because the sole repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

…ering + schedule guards)

Mirrors the medley core fixes so both stay aligned:
- add/decompose: order the create-item snippet so the Write-to-$BODY_FILE step
  is shown after mktemp and before create-item.
- audit/due/recheck/work: convert '[[ -f $SCHEDULE ]] && jq' guards to
  'if [[ -f ]]; then jq; fi' so an absent schedule file returns exit 0.

Refs melodic-software/medley#1460
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_45b408ef-420d-4f67-a392-ff441d210c6f)

@claude

claude Bot commented Jul 13, 2026

Copy link
Copy Markdown

PR Review

  • Gather context and understand PR scope
  • Read changed files and diff
  • Review each finding addressed (1–8)
  • Evaluate Codex review comments already posted
  • Post comprehensive review summary

View job run

@cursor cursor Bot 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.

Stale comment

Risk: low. Not approving because Cursor Bugbot did not complete successfully (check skipped). Human review is needed before merge; no reviewers were assigned because the sole repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@claude

claude Bot commented Jul 13, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 42s —— View job


PR Review

  • Gather context and understand PR scope
  • Read changed files and diff
  • Review each finding addressed (1–8)
  • Evaluate Codex review comments already posted
  • Post comprehensive review summary

Summary

All 8 stated findings are addressed correctly. The seam-path fix (finding 5) is applied consistently across all 6 action files. The PR is low-risk markdown-only changes. I confirmed the two existing Codex P2 findings and found a third gap the Codex review missed.


Finding-by-finding verification

# Finding Status
1 add default body skeleton ✅ Correct — Context / Proposed work / Acceptance criteria / References / Metadata
2 add --recurring schedule file bootstrap ✅ Correct — {"items": []} skeleton + ask-first guard
3 add --agent-ready appends agent-ready label ✅ Correct — label appended in build-labels step
4 needs-human in Meta group ✅ Correct — added to both SKILL.md label table and label-taxonomy.md
5 Seam invocations project-rooted ✅ Correct — "${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}/tools/work-item-tracker/work-item-tracker.sh" applied to add, audit, decompose, done, due, recheck, start, work
6 done --pr no longer closes unmerged PR ✅ Correct logic — but see gap below
7 due / work Step 2 exact-title match ✅ Correct — full [Maintenance] {title} exact match in both files
8 recheck checklist aligned ✅ Correct action — but checklist wording has a boundary bug (see below)

Issues

1. checklist.md:40next_due advancement boundary is wrong (Codex P2 confirmed)

plugins/work-items/skills/work-items/templates/checklist.md:40

The checklist reads:

advance `next_due` only when it is past due

But recheck.md Step 2 says "past or today", and Step 3 is explicit:

If `next_due <= today`: set `next_due` to today + cadence days

A recurring item due today would have its checklist tell the agent not to advance next_due, leaving it at today. The due/work actions would then continue to surface it as overdue, and the next recheck run could cause a double-advance or confusion. The fix is one word: change "past due" → "past due or today". Fix this →


2. done.md:45 — Unmerged --pr path assumes keyword is guaranteed (Codex P2 confirmed)

plugins/work-items/skills/work-items/actions/done.md:45

Step 4 defers closure and says "run the keyword step below first so Closes #<N> is on the PR body." Step 5 then says:

if the (unmerged) PR body carries neither a closing keyword nor an opt-out marker, prepend Closes #<N>

The gap: if the PR already closes a different issue (Closes #OTHER) or has any opt-out marker (Refs #N, No related issue:), Step 5 skips prepending the keyword for #<N>. Step 4 still tells the user "will auto-close when #{pr} merges" — which is false. The item stays open after the PR merges.

Step 4 should gate on whether the keyword was actually placed (or already present for this item), falling back to a direct close when the keyword cannot be guaranteed. Fix this →


3. checklist.md:7,17,24 — Seam paths not project-rooted (new finding)

plugins/work-items/skills/work-items/templates/checklist.md:7

Finding 5 applied project-rooted seam paths to all 6 action files, but the checklist template still uses bare relative paths in its snippets:

Line 7:  `tools/work-item-tracker/work-item-tracker.sh reclaim "<id>"`
Line 17: `tools/work-item-tracker/work-item-tracker.sh create-item ...`
Line 24: `tools/work-item-tracker/work-item-tracker.sh reclaim "<id>"`
Line 25: `tools/work-item-tracker/work-item-tracker.sh claim "<id>"`

An agent following the checklist from a subdirectory will hit the same path-resolution failure that finding 5 fixed in the action files. The checklist snippets should use the same "${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}/tools/..." form, or the checklist note should say these are illustrative and the action file's rooted form takes precedence. Fix this →


Minor observations

  • add.md comment reordering (lines 73–77): The comment explaining the Write-tool-before-create-item sequence now precedes BODY_FILE=$(mktemp), which puts the instruction before the variable exists. The meaning is clear, but placing the comment after mktemp (as the old version did) better preserves the "read-and-understand-the-variable-then-its-usage" flow. Not a correctness issue.
  • start.md — second claim call (line 28): Step 2 uses "${CLAUDE_PROJECT_DIR:-...}" but without the TRACKER= variable set in Step 1 — inconsistency with Step 1's pattern. Not a real bug since both forms expand identically, but slight style drift.

Verdict

The core behavioral fixes (1–8) are all implemented correctly. The two Codex P2 findings are confirmed real. The third gap (checklist bare paths) is a missed application of finding 5. All three are small, targeted fixes — this PR is otherwise clean and ready to merge modulo those.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8327d28d14

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/work-items/skills/work-items/actions/add.md
…recurring)

- done: the unmerged --pr path now branches on THIS item's closing keyword —
  respects a deliberate opt-out (Refs #N / No related issue:) instead of
  falsely claiming auto-close, and never counts a different issue's keyword.
- checklist(recheck): advance next_due when due today OR past (next_due <= today),
  matching the recheck action (was 'only when past due').
- add(--recurring): resolve the schedule bootstrap BEFORE create-item so a
  declined/failed schedule doesn't strand an unreconcilable [Maintenance] item.

Refs melodic-software/medley#1460
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c31dc314-692f-430f-b06c-7951959ccb82)

@cursor cursor Bot 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.

Risk: low. Not approving because Cursor Bugbot did not complete successfully (check skipped). Human review is needed before merge; no reviewers were assigned because the sole repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@claude

claude Bot commented Jul 13, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 0s —— View job


PR Review (Round 2)

  • Load context and identify scope
  • Read diff at HEAD 251051a to verify prior findings are resolved
  • Check for new issues introduced in latest commits
  • Post final review summary

Summary

The two Codex P2 findings and the add --recurring schedule-bootstrap race confirmed in round 1 are all properly fixed in 251051a. One finding from round 1 remains unaddressed: the checklist template still carries bare relative seam paths.


Findings fixed in 251051a

Finding Status
Codex P2 — checklist.md:40 next_due boundary wrong ("past due" → "past due or today") ✅ Fixed — now reads advance next_due when it is due today or past due (next_due <= today)
Codex P2 — done.md unmerged --pr path assumes keyword is guaranteed ✅ Fixed — Step 4 now branches on THIS item's #<N> keyword specifically; a different issue's closing keyword no longer counts, and a deliberate opt-out for #<N> no longer falsely claims auto-close
add.md schedule bootstrap order — [Maintenance] item could be created before the user confirms the schedule ✅ Fixed — Step 5 now says to resolve the bootstrap FIRST; on decline/failure the item is created non-recurring or aborted

The done.md fix is well-structured. Step 5's keyword prepend check is now correctly keyed to #<N> (not any closing keyword), and Step 4's branching correctly scopes the opt-out check to this item — the logic is internally consistent.


Remaining gap — checklist.md bare seam paths (finding #3 from round 1)

plugins/work-items/skills/work-items/templates/checklist.md

Round 1 noted that the checklist template's seam snippets were not updated when finding 5 applied project-rooted paths to all 6 action files. 251051a only touched line 40 (the next_due boundary). Lines 7, 17, 24, and 25 still carry bare relative paths:

Line 7:  `tools/work-item-tracker/work-item-tracker.sh reclaim "<id>"`
Line 17: `tools/work-item-tracker/work-item-tracker.sh create-item ...`
Line 24: `tools/work-item-tracker/work-item-tracker.sh reclaim "<id>"`
Line 25: `tools/work-item-tracker/work-item-tracker.sh claim "<id>"`

An agent following the checklist from a subdirectory hits the same resolution failure that finding 5 fixed in the action files. The fix is to update these four lines to use "${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}/tools/work-item-tracker/work-item-tracker.sh". Fix this →


Verdict

The core behavioral fixes are all correct and well-implemented. The two Codex P2s are resolved. The only outstanding item is the four bare paths in the checklist template (a missed application of finding 5). Everything else is clean — the PR is ready to merge once those four lines are updated.

@kyle-sexton
kyle-sexton merged commit 077fd70 into main Jul 13, 2026
28 of 40 checks passed
@kyle-sexton
kyle-sexton deleted the chore/fix-work-items-publish-review-findings branch July 13, 2026 02:12
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