feat: add session-flow plugin - #67
Conversation
Four session-lifecycle skills as one cohesive capability: workflow (staged dev-workflow navigator), handoff (save-point + resume prompt for /clear-and-resume), retro (transcript-metrics retrospective with learning codification), and orchestration-brief (proactive-orchestration imperatives for a session or spawned worker). Closes melodic-software/medley#1284. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot 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_a53280fd-c7d1-4d01-ae79-fa6f530af641) |
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no additional reviewers were assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e1b0f589f
ℹ️ 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".
…README catalog append)
Bugbot couldn't run - usage limit reachedBugbot 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_7db46fc4-7584-465a-abd1-0ed20e98a979) |
|
Claude finished @kyle-sexton's task in 3m 11s —— View job PR Review:
|
| Criterion | Result | Notes |
|---|---|---|
| Repo-agnostic | ✅ | All paths via ${CLAUDE_PROJECT_DIR}, CLAUDE.md, env vars |
| Configurable without editing | ✅ | No userConfig needed; variability routes through consumer context |
| Plugin-form-safe | ✅ | ${CLAUDE_PLUGIN_ROOT} for assets, ${CLAUDE_PLUGIN_DATA} for state, no ../ |
| No PII / secrets | ✅ | Clear |
| Versioned | ✅ | 0.1.0 in plugin.json |
| Security | ✅ | No hooks, MCP, agents, network calls; parser is stdlib-only, reads only local user transcripts; writes only to user-visible project dirs behind approval gate |
| Marketplace entry | ✅ | category: productivity, tags correct, source path correct |
Verdict
Ready to merge pending the line-605 fix (and ideally an accompanying test). The rest of the plugin is well-engineered — the parser's type-safety and stream-parse approach are solid, the test suite is thorough, the shell wrapper's SKIP behavior is correct, and the skill content correctly defers convention/gate authority to the consumer repo.
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no reviewers assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3060add145
ℹ️ 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".
Multi-session parse now errors (exit 2) when every SID resolves to nothing, instead of reading as a successful all-zero retro; NotebookEdit now counts toward files_modified. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot 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_b176dfcc-287f-4015-bdbe-caeb48725b28) |
|
Claude finished @kyle-sexton's task in 4m 4s —— View job PR Review:
|
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no reviewers assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2990e5bca
ℹ️ 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".
Probe for a Python 3.10+ interpreter instead of assuming bare python, and derive the handoff chain directory from the consumer-documented save-point location rather than hardcoding the default. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot 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_0d7e52d0-985e-464b-89e9-e8ade75870d3) |
|
Claude finished @kyle-sexton's task in 2m 34s —— View job PR Review:
|
| Item | Status |
|---|---|
Bare /retro / /handoff sibling refs in steps.md, wrap-up.md, checklist.md |
Declined by author — stated rationale: sibling refs within a plugin stay bare; they resolve correctly from the session-flow: namespace during execution. Accepted as a design decision. |
test_chain_from_handoff_without_session_id doesn't assert returncode == 2 |
Minor incomplete assertion; behavior is correct. Not blocking. |
CLAUDE.md Checklist (unchanged — all pass)
| Criterion | Result |
|---|---|
| Repo-agnostic | ✅ |
| Configurable without editing | ✅ |
| Plugin-form-safe | ✅ |
| No PII / secrets | ✅ |
| Versioned | ✅ |
| Security | ✅ |
Verdict
c747602 correctly addresses both Codex findings from the prior round. The one new issue (unguarded "$PY" invocation when the empty-PY case is hit) is minor — a model following the skill will typically recover — but is worth a quick fix before merge since the snippet documents a contract it doesn't enforce inline.
Everything else is in order. Ready to merge after the PY-empty guard is addressed.
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no reviewers assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7476025c4
ℹ️ 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".
Bugbot couldn't run - usage limit reachedBugbot 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_f6b98fdc-7f6e-44bc-a0d5-a1d9a436d45f) |
|
Claude finished @kyle-sexton's task in 2m 37s —— View job PR Review:
|
| Criterion | Result |
|---|---|
| Repo-agnostic | ✅ |
| Configurable without editing | ✅ |
| Plugin-form-safe | ✅ |
| No PII / secrets | ✅ |
Versioned (0.1.0) |
✅ |
| Security (no hooks, MCP, network) | ✅ |
Verdict
The merge commit adds nothing to session-flow. The PY-empty guard from the prior review remains unaddressed — that was the explicit merge condition. Two new issues surface from the latest Codex round: MultiEdit missing from the write-tool allowlist (concrete data loss in files_modified) and unrelated handoff chaining (design edge case, needs at minimum a prose caveat).
Blocking: PY-empty guard + MultiEdit. Design note: handoff chaining caveat.
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no reviewers assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e37eeef90
ℹ️ 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".
…ntinuity Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot 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_8886e29e-f07e-444f-8f8f-10601ea4803c) |
|
Claude finished @kyle-sexton's task in 2m 37s —— View job PR Review:
|
| Item | Status |
|---|---|
MultiEdit in _FILE_MODIFYING_TOOLS + test |
✅ Fixed in b4b16e5 |
Handoff chaining caveat in structure.md |
✅ Fixed in b4b16e5 |
PY-empty guard in session.md:35–43 |
🔴 Still open (carried since c747602) |
| Silent chain traversal cap (no output warning) | 🟡 Still open (Codex finding from 9e37eee) |
Verdict
The b4b16e5 commit cleanly addresses both the MultiEdit gap and the handoff-chaining design note from the prior round. The PY-empty guard remains the one explicit merge condition that hasn't been touched across three review cycles — the probe loop is in place but the guard around the invocations is not. The chain-traversal silent cap is a secondary issue worth fixing before merge since it violates the output contract the file documents.
Ready to merge after the PY-empty guard and the chain-truncation warning.
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no reviewers assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4b16e5952
ℹ️ 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".
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot 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_8485588b-73c3-4dca-9ab2-ddfe4be9e14f) |
|
Claude finished @kyle-sexton's task in 2m 52s —— View job PR Review:
|
| Item | Status |
|---|---|
| Chain-traversal silent cap | ✅ Fixed in b5c6b34 — limit raised to 1000, cycle detection added, stderr warnings |
| Cycle-detection test | ✅ Added in b5c6b34 |
MultiEdit in _FILE_MODIFYING_TOOLS + test |
✅ Fixed in b4b16e5 |
| Handoff chaining continuity caveat | ✅ Fixed in b4b16e5 |
PY-empty guard in session.md:35–43 |
🔴 Still open — carried since c747602 (3 cycles) |
| SKILL.md:161 checklist vs task-continuity | 🟡 Design note — not blocking |
| session.md:43 retro multi-session gate | 🟡 Design note — not blocking |
Verdict
b5c6b34 correctly resolves the chain-traversal concern — cycle detection is the right primary fix, the raised limit makes the depth guard practically unreachable, and both conditions now emit explicit stderr warnings rather than truncating silently. The implementation diverges from the requested JSON warnings field but the result is sound.
The PY-empty guard is the last explicit merge condition and remains unaddressed after three consecutive review cycles. Everything else is in order.
Ready to merge after the PY-empty guard is applied to session.md:35–43.
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. Human review is needed before merge; no reviewers assigned (solo-maintained repo, author is the only human contributor).
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5c6b340ba
ℹ️ 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".
…s in parser Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot 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_b644811d-0023-47d1-865c-bc047c11f7b6) |
|
Claude finished @kyle-sexton's task in 2m 33s —— View job PR Review:
|
| Item | Status |
|---|---|
YAML comment stripping in _frontmatter_value() + test |
✅ Fixed in 1166073 |
session.md Phase 1.0 continuity gate |
✅ Fixed in 1166073 |
| SKILL.md:161 checklist vs task-continuity | ✅ Fixed in 1166073 |
| Chain-traversal cap → cycle detection + loud bound | ✅ Fixed in b5c6b34 |
MultiEdit in _FILE_MODIFYING_TOOLS + test |
✅ Fixed in b4b16e5 |
Handoff chaining caveat in structure.md |
✅ Fixed in b4b16e5 |
PY-empty guard in session.md:42–50 |
🔴 Still open — carried since c747602 (5 cycles) |
Verdict
1166073 cleanly resolves the YAML comment stripping finding — the _frontmatter_value() helper is the right abstraction, the strip logic is correct per YAML spec, and the test exercises the documented template exactly. The continuity gate prose and SKILL.md checklist alignment are also solid. Every Codex finding across all rounds is now resolved except one.
The PY-empty guard is the last remaining explicit merge condition and has not been addressed in five consecutive review cycles. Everything else is in order.
Ready to merge after the if [ -n "$PY" ] guard is wrapped around session.md:42–50.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 116607308b
ℹ️ 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".
| done | ||
|
|
||
| # Single-session form: | ||
| "$PY" "$PARSER" --sessions "${CLAUDE_CODE_SESSION_ID}" --base "$SESSION_DATA_DIR" |
There was a problem hiding this comment.
Guard parser calls when Python 3.10+ is unavailable
When the Phase 1 probe finds neither python3 nor python at 3.10+, PY stays empty, but this command is still executed before the documented skip note below. In that environment /retro session reports a shell “command not found”/parser failure instead of gracefully skipping metrics as promised; wrap the parser calls in a non-empty $PY check (as the test wrapper does) before running either form.
Useful? React with 👍 / 👎.



Closes melodic-software/medley#1284 (EPIC melodic-software/medley#1273).
What
New
session-flowplugin bundling four session-lifecycle skills as one cohesive capability:/session-flow:workflow/session-flow:handoff/clear-and-resume? Full handoff file (seven sections + TaskList snapshot + session-id chain frontmatter) or prompt-only; hard STOP gate after emitting the save-point/session-flow:retro/session-flow:orchestration-briefMarketplace entry:
category: productivity, tagsorchestration+ per-component. Explicit semver0.1.0inplugin.jsononly.Decoupling (playbook per-plugin gate)
medley, no.work/, no source-repo tooling paths). Source-repo-specific machinery re-seamed: workflow stages route to the CONSUMER's own stage skills when they exist and degrade gracefully to inline execution; convention/quality-gate content routes through the consumer'sCLAUDE.md/.claude/rules/..claude/handoffs/(project files by design — they travel with the repo). The bundled parser resolves handoff chains in both flat and subdir-prefixed layouts.${CLAUDE_PLUGIN_ROOT}; retro score history persists under${CLAUDE_PLUGIN_DATA}(per-project files), never in the consumer's repo. No../reach-outs./retro,/handoffinside the plugin); no dependency on any other plugin.userConfig— the only variability that surfaced (artifact location, stage skills, conventions) routes through consumer context (no speculative knobs).exceptclauses parenthesized so the script runs on Python 3.10+ (was 3.14+);matchstatements set the 3.10 floor.Gate evidence (speed-adjusted per issue)
claude plugin validate --strict ./plugins/session-flow→ Validation passed;claude plugin validate --strict .(catalog manifest) → Validation passed.claude plugin detailsprojected token cost: ~543 tok always-on (handoff ~110, orchestration-brief ~190, retro ~130, workflow ~110; on-invoke ~3.5k / ~2.4k / ~1.9k / ~2.1k).--plugin-dirsmoke test in a clean non-source fixture repo (headlessclaude -p): skill loaded under thesession-flow:namespace,context/steps.mdread from the plugin root, content answered correctly ("Skill invoked:session-flow:workflow. Loaded content defines 9 numbered workflow stages (0–8). Stage 7: Verify outcome.").parse-transcript.test.shwrapper integrates withscripts/run-plugin-tests.shand SKIPs cleanly when Python 3.10+/pytest is absent. shellcheck clean; markdownlint clean; typos clean.Security review (playbook acceptance)
userConfig. Surfaces 1/2/3: N/A.${CLAUDE_PLUGIN_ROOT}, state via${CLAUDE_PLUGIN_DATA}, no../reach-outs, no absolute/machine paths. The parser reads only local~/.claude/projects/transcripts and handoff files the consumer created.Docs consulted this session per the fresh-docs mandate: https://code.claude.com/docs/en/plugins-reference (manifest/marketplace schemas,
${CLAUDE_PLUGIN_DATA}resolution, validate--strictsemantics), https://code.claude.com/docs/en/skills (frontmatter fields, namespacing).Note
Low Risk
Adds markdown skills and an offline local transcript parser; the only writes are user-requested handoff files in the project and approval-gated rule/memory edits—no hooks, network, or privileged automation.
Overview
Adds the
session-flowplugin (0.1.0) to the marketplace and root README catalog under productivity, shipping four repo-agnostic skills for session lifecycle management.workflownavigates a staged pipeline (contract through retro), infers position from artifacts, and exposes modes for full steps, pre-PR gates, wrap-up, philosophy, and spec-first/clearbetween stages—routing to the consumer’s own stage skills when present.handoffimplements the/clear-and-resume pattern: durable save-points (default.claude/handoffs/) with chainedsession_id/previous_handofffrontmatter, TaskList reconstitution, and a mandatory STOP after the resume prompt;orchestration-briefprimes the session or exports paste-ready worker/handoff briefs for six delegation imperatives.retroruns session / codify / trends / quick modes with approval-gated codification into repo rules or auto-memory; score history lives under${CLAUDE_PLUGIN_DATA}. A new stdlib-onlyparse_transcript.py(Python 3.10+, pytest contract tests + optional shell wrapper) reads local Claude Code JSONL transcripts and aggregates metrics across handoff chains via--chain-from.Reviewed by Cursor Bugbot for commit 1166073. Bugbot is set up for automated code reviews on this repo. Configure here.