/shape-idea drain-cycle should be able to drain a cycle or a project, project by passing…
- User
/shape-idea drain-cycle should be able to drain a cycle or a project, project by passing it a parameter
- User
shape-idea /shape-idea drain-cycle should be able to drain a cycle or a project, project by passing it a parameter
Assistant· claude-opus-4-8
I'll run the idea-intake skill. First let me capture the idea verbatim and ground my opening hypothesis in how drain-cycle currently selects work — so my restate isn't a guess.
Assistant· claude-opus-4-8
I've got the grounding I need. Here's how drain-cycle works today: zero-arg invocation drains the active Linear cycle (
linear.current_cycle_id()→pending_issues(cycle_id)filtered to Todo/Backlog), and run logs are keyed bycycle_id. Your idea swaps that fixed target for a passed-in one — a project instead of the active cycle.Let me run the intake. I'll lead with my read and confirm, rather than assume.
My one-sentence hypothesis (confidence ~0.5, anecdotal — it's your own tool, no usage data yet): You want to drain work that isn't in the active cycle — most likely a Linear project whose issues span cycles or sit in the backlog — without first having to drop those issues into the current cycle just to make drain-cycle see them.
Before I write the restate, two questions. Each carries my best guess so you can just confirm or correct.
Assistant· claude-opus-4-8
Good — that sharpens it. The driver is focus, not backlog-reach: drain one project as a unit even when the active cycle holds unrelated work. That lines up with your "focus is the multiplier" rule. Selector is a
--project <name/id>flag, active-cycle default preserved.Two more, then I'll write the restate for your explicit yes. There's one real design seam here: run logs and the scorecard key everything on
cycle_id. A project drain needs an identity too.Assistant· claude-opus-4-8
I have enough to predict your answers to the next questions. Here's the six-line restate — confirm with a yes, or correct any line.
Refined intent — drain a Linear project as a focused unit
- Outcome: drain-cycle can target one Linear project, running every Todo/Backlog issue in it as a unit, independent of the active cycle.
- User: you, the operator — when you want to push one project to completion without the active cycle's unrelated work coming along.
- Why now: focus is the multiplier (Rule A5); the active-cycle-only target forces project work and other work to drain together, diluting the run.
- Success: drains all the project's pending issues; zero-arg still drains the active cycle, unchanged; the scorecard groups the project run as its own unit (keyed on ).
- User
yes
Assistant· claude-opus-4-8
Confirmed. Continuing the intake.
Problem/solution gate: passes — the restate names a problem (the cycle-only target dilutes focus), not just a solution.
Evidence.
docs/app-context.mdis absent, and this is a capability for your own tool rather than a metric-bearing product change — so the assessment is ungrounded by baseline data. The evidence is your own stated workflow need: you want to drain a project as a focused unit. That's a single operator's direct assertion about their own workflow.- — anecdote / one-off observation (operator self-report, no usage data, no baseline).
- User
lets do a design
Assistant· claude-opus-4-8
On it. I'll finish the intake by filing the triage record, then move into
shape:designfor the spike.Assistant· claude-opus-4-8
Plan mode is on, so I'll design the spike rather than build it. The triage record becomes a deliverable in the plan. Let me explore the code paths the
--projecttarget would touch — the main unknown is the blast radius of thecycle_ididentity field.Assistant· claude-opus-4-8
Excellent — this resolves the core unknown. The findings are decisive:
cycle_idis pure identity in 11 of 13 sites. Only two sites carry real cycle semantics, both inlinear.py:current_cycle_id()and thecycle: {id: {eq}}filter inpending_issues. Everywhere else (run-log filename, scorecard grouping, resume-glob, telemetry, console) it's an opaque key that works identically with a project id.- Rename blast radius is huge — 29 prod + 136 test sites. You already chose "minimal schema change," which rules the rename out. So the design is overload the opaque identity field, not rename it.
- Project filtering is a near-drop-in: swap
cycle: {id:{eq}}→project: {id:{eq}}, same state filter, same post-processing, sameExecutionPlanshape. Plus one newresolve_project_id()helper parallelingcurrent_cycle_id().
Let me have a Plan agent validate the threading through the orchestrator and produce the detailed implementation design.
- Assistant· <synthetic>
API Error: 529 Overloaded. This is a server-side issue, usually temporary — try again in a moment. If it persists, check https://status.claude.com.
- User
try again
- Assistant· <synthetic>
API Error: 529 Overloaded. This is a server-side issue, usually temporary — try again in a moment. If it persists, check https://status.claude.com.
- User
try again
Assistant· claude-opus-4-8
The Plan-agent spawn keeps hitting server overload. I already have deep grounding from the two Explore passes — I'll read the remaining key sections directly and design it myself rather than block on the agent.
Assistant· claude-opus-4-8
Got the full picture. Let me confirm one convention before writing the plan — where triage records live in this repo.
Assistant· claude-opus-4-8
Confirmed: this repo files idea docs under
docs/ideas/(e.g.drain-past-the-merge-gate.md), so the triage record goes there, not the skill's genericdocs/idea-bank/. I have everything I need. Writing the plan.Assistant· claude-opus-4-8
The plan is written. Here's the shape of it:
The decision the spike resolved: overload the
cycle_ididentity field rather than rename it.cycle_idis opaque identity at 11 of 13 sites — onlycurrent_cycle_id()and thecycle:{id:{eq}}filter carry real cycle semantics. A rename would hit 29 prod + 136 test sites and break existing run-log archives; overloading costs only a cosmetic label, which the plan fixes with a smalltarget_kindthread.The change is small and additive:
linear.py— extract_pending_issues(filter_field, id), keeppending_issues(cycle_id)as a wrapper (signature unchanged), addproject_issues()andresolve_project_id().orchestrator.run/_run— one newproject=kwarg and a target branch; the local stays namedcycle_idso run-log, resume, telemetry, and the progress marker all flow unchanged.
Assistant· claude-opus-4-8
The writing gate requires a refinement pass on the plan before I can finalize it. Running it now.
Assistant· claude-opus-4-8
The sub-agent ran the refinement but couldn't write (it inherited plan-mode). The plan file is the one file I can edit, so I'll apply its three findings myself: drop the decorative words "lever" and "seam", and one active-voice tighten.
Assistant· claude-opus-4-8
Refinement applied (dropped "lever" and "seam"). Now finalizing.
Assistant· claude-opus-4-8
Plan approved. I'm on
main, so I'll branch first, then implement. Let me set up tracking and read the exact code I'll edit.Assistant· claude-opus-4-8
Now let me implement
linear.py. I'll refactorpending_issuesto share an internal helper, addproject_issues, and addresolve_project_id.- User
[Request interrupted by user]
- User
turn this into a project in linear
Assistant· claude-opus-4-8
Got it — you want this tracked as a Linear project with tickets, the way the scorecard and swimlanes work was shaped. Let me read the repo's Linear config and workflow rules first.
Assistant· claude-opus-4-8
This work fits your established pattern — a Linear project on team Personal with stacked seed issues (like the scorecard and swimlanes projects). Based on the approved plan, I'll break it into a clean bottom-up stack: docs/ADR → linear queries → orchestrator → CLI. Let me load the Linear tools and create it.
Assistant· claude-opus-4-8
You're right —
/deliveryis the proper tool for decomposing the approved design into a Linear delivery hierarchy. Let me invoke it.Assistant· claude-opus-4-8
The delivery skill drives this. Let me read its contract and helper scripts so the emitted plan passes the gates.
Assistant· claude-opus-4-8
The skill's
bin/gates and contract files aren't present in this install (onlySKILL.md), so I'll apply the delivery shape — deliverable → nodes → tasks, five-section node bodies, each task withDone when:+Model:— and land it directly in Linear, which is your tracked representation (the localdocs/delivery-plans/set is gitignored anyway). Let me grab the ADR numbering for the N01 task reference.Assistant· claude-opus-4-8
Next ADR is 0033. Let me draft the project and the four node issues, then run the writing gate over them before creating anything in Linear.
Assistant· claude-opus-4-8
Now the writing gate over the draft before I create anything in Linear.
Assistant· claude-opus-4-8
Refined and clean. Creating the Linear project now, then the four node issues with their dependency links.
Assistant· claude-opus-4-8
Project created. Now the four node issues — N01 first (independent), then N02→N03→N04 with dependency links.
Assistant· claude-opus-4-8
N01 = ABA-430, N02 = ABA-431. Now N03 (blocked by N02) and N04 (blocked by N03).
Assistant· claude-opus-4-8
All four issues created. Let me clean up the scratch draft and the premature feature branch (we're tracking in Linear now, not building yet).
Assistant· claude-opus-4-8
Done. The approved design is now a Linear project on team Personal, decomposed via
/deliveryinto a four-node build stack.Project: Drain a chosen Linear project, not only the active cycle — Planned