Skip to content

feat: /uf.unleash should persist demo summary for /uf.finale PR body generation #707

Closed

Description

@jflowers

Problem

/uf.finale generates the PR body from scratch by analyzing git history, spec artifacts, and review-council findings at the time it runs. It has no awareness of the structured demo output that /uf.unleash Step 10 already produced — a summary synthesized directly from spec user stories, acceptance scenarios, and live test results.

This means:

  • "What Was Built" is re-derived from git log instead of reusing the spec-sourced summary /uf.unleash already generated
  • "How to Verify" is re-derived from spec files instead of reusing the verification steps already composed
  • Test results captured live during the /uf.unleash run are lost entirely

Proposed Solution

1. /uf.unleash writes a handoff artifact at end of Step 10

After presenting the demo output but before the CHECKPOINT, write a JSON artifact to:

.uf/artifacts/unleash-summary/<sanitized-branch>.json

Branch name sanitization: replace / with - (e.g., opsx/add-handoff → opsx-add-handoff.json).

Artifact schema (follows existing .uf/artifacts/ envelope pattern):

{
  "artifact_type": "unleash-summary",
  "schema_version": "1.0.0",
  "timestamp": "<ISO-8601>",
  "context": {
    "branch": "<branch-name>",
    "source_type": "openspec|speckit",
    "feature_dir": "<FEATURE_DIR>"
  },
  "payload": {
    "what_was_built": "<markdown from What Was Built section>",
    "how_to_verify": "<markdown from How to Verify section>",
    "test_results": "<markdown from Test Results section>"
  }
}

If the file already exists (re-run on same branch), overwrite it — the latest run is always authoritative.

2. /uf.finale checks for the artifact before generating PR body

Insert a new step d0 before the existing "d. Generate PR body" step:

  1. Get current branch name, sanitize it
  2. Check for .uf/artifacts/unleash-summary/<sanitized-branch>.json
  3. If found: use payload.what_was_built for ## Summary, payload.how_to_verify for ## How to Test, and payload.test_results as a note in ## How to Demo. Still generate ## Key Files Changed from git diff --stat. Still apply originating_issue detection, review-council findings, PR template mapping, and attribution footer.
  4. If not found: fall back to existing git-log + spec artifact analysis (no behavior change for standalone branches)

Files to modify

File Location Change
.opencode/commands/uf.unleash.md After line 746, before line 748 (between demo format block and CHECKPOINT) Add artifact write instructions
.opencode/commands/uf.finale.md Before line 387 (before "d. Generate PR body") Add new step d0 for artifact check
.opencode/commands/uf.finale.md Lines 387–390 Relabel "d." as fallback path

Design constraints

  • /uf.finale MUST remain fully functional without the artifact (standalone use on any branch)
  • No new directories committed — .uf/artifacts/unleash-summary/ is created at runtime
  • Follows existing .uf/artifacts/ patterns (dispatch, feedback-triage, issue-triage)
  • Overwrite on re-run — no round tracking needed (unlike feedback-triage)

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions