Skip to content

feat: ship run log persistence for /retro velocity tracking#324

Open
jithinraj wants to merge 1 commit intogarrytan:mainfrom
jithinraj:feat/ship-log
Open

feat: ship run log persistence for /retro velocity tracking#324
jithinraj wants to merge 1 commit intogarrytan:mainfrom
jithinraj:feat/ship-log

Conversation

@jithinraj
Copy link

@jithinraj jithinraj commented Mar 22, 2026

Summary

  • Adds structured ship run logging for /retro velocity tracking. /ship appends a JSONL entry (version, branch, PR URL, review findings, Greptile stats, coverage delta) after each PR creation. /retro reads the log to compute shipping velocity metrics.

Addresses the P2 "Ship log" item in TODOS.md (line 168).

Changes

  • bin/gstack-ship-log: read/write helper following gstack-review-log pattern, with --window date filtering for retro time ranges
  • ship/SKILL.md.tmpl Step 8.25: agent assembles and appends JSON after PR creation
  • retro/SKILL.md.tmpl: command 14 reads ship log, Step 2 aggregates Ship Velocity metric, Steps 13-14 include velocity in saved JSON and narrative
  • test/skill-validation.test.ts: updated assertion for retro command renumbering
  • test/helpers/touchfiles.ts: added ship-log (periodic) and bin/gstack-ship-log dependency to retro touchfiles

Test Coverage

All existing tests pass (1/2 pre-existing failure on main). Skill docs fresh for both Claude and Codex hosts. bash -n syntax check passes.

Pre-Landing Review

No issues found.

TODOS

Ship log (P2) addressed. No other TODOS affected.

Test plan

  • bash -n bin/gstack-ship-log passes syntax check
  • bun test passes (no regressions introduced)
  • bun run skill:check reports 27/27 skills healthy
  • bun run gen:skill-docs --dry-run reports all FRESH
  • bun run gen:skill-docs --host codex --dry-run reports all FRESH
  • Ship log write: gstack-ship-log '{"ts":"..."}' && cat ~/.gstack/analytics/ship-log.jsonl
  • Ship log read: gstack-ship-log read returns entries, gstack-ship-log read --window 7d filters
  • Empty state: gstack-ship-log read returns NO_SHIP_LOG when no log exists
  • Graceful failure: mkdir -p and echo >> use 2>/dev/null || true

@jithinraj jithinraj force-pushed the feat/ship-log branch 2 times, most recently from d268b5f to 61db776 Compare March 23, 2026 17:49
Adds structured JSONL logging to /ship and consumption in /retro,
enabling shipping velocity metrics across retrospectives.

- bin/gstack-ship-log: read/write helper with --window date filtering
- ship Step 8.25: appends entry after PR creation (version, branch,
  PR URL, review findings, Greptile stats, coverage delta)
- retro Step 1 command 14: reads ship log for velocity aggregation
- retro Step 2: Ship Velocity metric row
- retro Steps 13-14: ship_velocity in saved JSON and narrative

Follows existing JSONL patterns (gstack-review-log, gstack-telemetry-log).
Graceful fallback: log failures never block /ship workflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant