Skip to content

Save deferred wrap-up findings as a persistent artifact #478

Description

@williamthorsen

Problem

When /wrap-up runs at the end of a session, it triages findings into actions: apply as quick fix, create a ticket, or skip. After Phase 4 (Results), the disposition record exists only in the conversation transcript. Once the conversation ends:

  • Findings ticketed during wrap-up exist in GitHub, but the developer has no index linking those tickets back to the session that produced them.
  • Findings skipped from the menu have no persistence at all — they are lost.

There is no single artifact a developer can return to that answers "what remains to be done from that session?"

Context

  • The wrap-up skill (packages/agents/content/skills/wrap-up/SKILL.md) currently produces the disposition record only as a Phase 4 conversation report.
  • Existing ticket-level artifact types (devlog, change-summary, pull-request) follow a {timestamp}_{slug}_{type}.md filename convention with YAML frontmatter for indexable metadata.
  • create-devlog already implements ticket-scoped + project-scoped dual-homing; the same pattern fits here.
  • The orchestrated run-summary already has a ## Deferred items section, but that snapshot is pre-disposition (before the developer chooses actions in wrap-up). It does not distinguish ticketed from skipped.

Solution

Extend /wrap-up to write a wrap-up artifact at Phase 4, in addition to printing the report to conversation. The artifact records only what remains to be done: findings that were ticketed (deferred with tracking) and findings that were skipped (deferred without tracking). Items completed within the session — applied quick fixes, posted insights, devlog-bound insights — are not recorded; they are completed in the ordinary course of coding.

Artifact basics

  • New artifact type: wrap-up
  • Filename: {YYYYMMDD-HHMMSSZ}_{slug}_wrap-up.md
  • Path: ticket-scoped ({base_dir}/projects/{project_slug}/tickets/{ticket_id}/); falls back to project-scoped {base_dir}/projects/{project_slug}/wrap-ups/ when no ticket is in session, mirroring devlog dual-homing. The wrap-ups directory name is hardcoded — not configurable, no new preference key.
  • Written automatically at Phase 4

Skip rule

The artifact is written if and only if at least one finding was deferred — ticketed or skipped. Sessions where every finding was applied as a quick fix, or where nothing actionable surfaced, produce no artifact.

Frontmatter

---
provenance:
  skill: wrap-up
  timestamp: <ISO 8601 UTC>
  baseSha: <short SHA>      # omit if unresolvable
  isInteractive: true
ticket_id: <id>             # omit when no ticket is in session
run_id: <run id>            # omit when not invoked from an orchestrated run
branch: <branch name>
session_type: <orchestrated | interactive-dev | review | research>
counts:
  outstanding: <n>          # findings skipped without follow-up
  ticketed: <n>             # findings deferred to a created ticket
tickets_created:            # omit if none
  - id: <number>
    item: F1                # the wrap-up item ID this ticket addresses
outstanding_items:          # omit if none
  - id: T1
    prefix: todo
    summary: <one-line>
---

Body

  • Outstanding — findings skipped from the action menu, with their original prefix, ID, description, and source attribution. The primary content.
  • Tickets created — cross-references to created GitHub tickets, paired with the originating wrap-up item ID.

Excluded: applied quick fixes, posted insights, devlog-bound insights, legacy items not selected for ticketing.

Acceptance criteria

  • /wrap-up writes a wrap-up artifact at Phase 4 when at least one finding was ticketed or skipped
  • No artifact is written when nothing was deferred (everything applied, or empty session)
  • Artifact filename follows {YYYYMMDD-HHMMSSZ}_{slug}_wrap-up.md
  • Artifact path is ticket-scoped when a ticket is in session; falls back to {base_dir}/projects/{project_slug}/wrap-ups/ otherwise
  • Frontmatter includes provenance, session metadata, counts (outstanding, ticketed), tickets-created cross-refs, and outstanding-items index
  • Body contains an "Outstanding" section for skipped findings and a "Tickets created" section for ticketed findings
  • Body excludes applied quick fixes, posted insights, and devlog-bound insights
  • When invoked from an orchestrated run, frontmatter includes run_id
  • wrap-up artifact type is documented in _data/artifact-conventions.md and save-artifact/SKILL.md, including a "Wrap-up frontmatter" section parallel to "Devlog frontmatter"
  • The directory-structure diagram in _data/artifact-conventions.md is updated to show the wrap-ups/ non-ticket category

Metadata

Metadata

Labels

featureAdded or improved external functionalityscope:agents

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions