Skip to content

Support multiple PRs/sessions per work item #120

@dpuglielli

Description

@dpuglielli

Problem

The current plugin architecture assumes 1 issue = 1 branch = 1 session. This breaks down for:

  • Large issues that need multiple PRs
  • Iterative development with incremental PRs
  • Team handoffs where multiple people work on the same issue
  • Rework/revisions after initial PR is merged

Solution

Enable 1 issue = N sessions with two relationship types:

  • Phases - Sequential work with dependencies (Phase 2 depends on Phase 1)
  • Slices - Parallel work within a phase (can be done in any order)

Design Summary

Aspect Decision
Relationship model Phases (sequential) + Slices (parallel)
Session discovery Auto-detect existing sessions, prompt for relationship
Dependencies Tracked in session file `Depends-on` field
Branching Rebase from main after phase merges
Branch naming `issue/--p/`
Acceptance criteria Issue-level, progressively checked
Issue closure Explicit `/onus:close` with validation
Data storage Session files only (no central index)
Backward compat Existing sessions = phase 1, single phase

Acceptance Criteria

Phase 1: Data Model

  • Add `parsePhaseFromBranch()` to shared module
  • Add `findSessionsForIssue()` to shared module
  • Update session templates with Issue, Phase, Slice, Depends-on fields
  • Rebuild shared bundles

Phase 2: Memento Workflow

  • Add session discovery to session-startup.js
  • Update /memento:start command spec for multi-session
  • Add phased branch name generation
  • Add next phase/slice calculator

Phase 3: Onus Integration

  • Update /onus:status for multi-session aggregation view
  • Update /onus:close with session validation

Phase 4: Documentation

  • Update sessions.md context file
  • Update work-items.md context file
  • Integration testing

References

  • Design doc: `docs/plans/2026-01-01-multi-session-work-items-design.md`
  • Implementation plan: `docs/plans/2026-01-01-multi-session-implementation.md`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions