mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-02 15:04:37 +01:00
* feat(retro): factory scorecard bin (lead time, gate cost, red-train and flaky rates) and the recommended-harness adoption doc Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(scorecard): register the recorded gh fixture with its free consumer Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(scorecard): cover --gate-event any, an empty window, a failed PR read and a bad --now Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Review pass 1 (core checklist, testing, maintainability, security, performance, simplification, state-machines, red team) over the whole diff: - the flaky line and cost-per-merge depend on every input they read, so a failed free-run or PR read prints unavailable (...) on its half instead of 0 - a PR verdict-comment cost backs one gate run per PR; a READY comment after the merge is ignored - one unreadable artifact leaves its run without cost or flake data instead of dropping the gate section - --repo defaults to the origin owner/name and is required without one (no built-in repository) - --max-artifact-runs, --pass-cap and --pass-marker are validated; --csv creates its directory - one artifact listing per gate run; PR comments are paged; issues use the exact window instant - every run appends its rows to trend.csv in --out-dir - new row: review passes per PR (median, p90, PRs at the cap) from the ship receipt or a comment marker - /retro: report format gains the Factory scorecard slot; the Step 7.5 fence quotes its placeholder - tests for each; <window-days> joins the placeholder allowlist Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: review pass 2 (delta): usage text, pass-marker capture group, GitHub-host origin parsing, idempotent trend.csv - usage() strips the header comment decoration again; --help text asserted - passCount takes the first all-digit capture group; --pass-marker without a capture group exits 2 - --repo falls back to the origin remote only on github.com or GH_HOST; a local-path origin exits 2 - trend.csv keeps one row set per repo and window (a rerun replaces its rows) and always carries its header - /retro Step 7.5 points at SCORECARD_TREND for the weeks; the doc cites the per-PR baseline CSV Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(host-conformance): delete a named section in the C3 broken-link case The case removed the first .md readdirSync returned under gstack-qa/sections. qa-patterns.md and system-functional.md are referenced only in table form, which setup --status does not count as section links, so on an ext4 directory order that listed one of them first the deleted file broke nothing and --status exited 0: deterministic red on remote-gate VMs, green on Actions. Delete scope.md, which every host's rendered SKILL.md reads. Closes #3479 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * v1.91.252.0 stamp Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
131 lines
5.8 KiB
Markdown
131 lines
5.8 KiB
Markdown
<!-- AUTO-GENERATED from report-format.md.tmpl — do not edit directly -->
|
|
<!-- Regenerate: bun run gen:skill-docs -->
|
|
Structure the output as:
|
|
|
|
---
|
|
|
|
**Tweetable summary** (first line, before everything else):
|
|
```
|
|
Week of Mar 1: 47 commits (3 contributors), 3.2k LOC, 38% tests, 12 PRs, peak: 10pm | Streak: 47d
|
|
```
|
|
|
|
## Engineering Retro: [date range]
|
|
|
|
### Summary Table
|
|
(from Step 2)
|
|
|
|
### Trends vs Last Retro
|
|
(from Step 12, loaded before save — skip if no matching history; in `compare` mode use **Current vs Prior Period** from the computed prior window even on the first run). Include the Recommendation follow-through line when Step 12 produced one.
|
|
|
|
### Time & Session Patterns
|
|
(from Steps 3-4)
|
|
|
|
Narrative interpreting what the team-wide patterns mean:
|
|
- When the most productive hours are and what drives them
|
|
- Whether sessions are getting longer or shorter over time
|
|
- Estimated hours per day of active coding (team aggregate)
|
|
- Notable patterns: do team members code at the same time or in shifts?
|
|
|
|
### Shipping Velocity
|
|
(from Steps 5-7)
|
|
|
|
Narrative covering:
|
|
- Commit type mix and what it reveals
|
|
- PR size distribution and what it reveals about shipping cadence
|
|
- Fix-chain detection (sequences of fix commits on the same subsystem)
|
|
- Version bump discipline
|
|
|
|
### Factory scorecard
|
|
(from Step 7.5 when it ran; the table as printed, `unavailable (...)` lines kept; omit the section when the step was skipped)
|
|
|
|
### Code Quality Signals
|
|
- Test LOC ratio trend
|
|
- Hotspot analysis (are the same files churning?)
|
|
- Greptile signal ratio and trend (if history exists): "Greptile: X% signal (Y valid catches, Z false positives)"
|
|
|
|
### Test Health
|
|
- Total test files: N (`TEST_FILES_TOTAL`)
|
|
- Test files changed this period: M (`TEST_FILES_CHANGED`; not newly added test cases)
|
|
- Regression test commits: list the `REGRESSION_COMMIT` lines (`test(qa):`, `test(design):`, and `test: coverage` commits)
|
|
- If prior retro exists and has `test_health`: show delta "Test count: {last} → {now} (+{delta})"
|
|
- If test ratio < 20%: flag as growth area — "100% test coverage is the goal. Tests make vibe coding safe."
|
|
|
|
### Plan Completion
|
|
Check review JSONL logs for plan completion data from /ship runs this period:
|
|
|
|
```bash
|
|
GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
|
|
setopt +o nomatch 2>/dev/null || true # zsh compat
|
|
SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG 2>/dev/null)
|
|
cat "$GSTACK_STATE_ROOT"/projects/$SLUG/*-reviews.jsonl 2>/dev/null | grep '"skill":"ship"' | grep '"plan_items_total"' || echo "NO_PLAN_DATA"
|
|
```
|
|
|
|
If plan completion data exists within the retro time window:
|
|
- Count branches shipped with plans (entries that have `plan_items_total` > 0)
|
|
- Compute average completion: sum of `plan_items_done` / sum of `plan_items_total`
|
|
- Identify most-skipped item category if data supports it
|
|
|
|
Output:
|
|
```
|
|
Plan Completion This Period:
|
|
{N} branches shipped with plans
|
|
Average completion: {X}% ({done}/{total} items)
|
|
```
|
|
|
|
If no plan data exists, skip this section silently.
|
|
|
|
### Focus & Highlights
|
|
(from Step 8)
|
|
- Focus score with interpretation
|
|
- Ship of the week callout
|
|
|
|
### Shipping Streaks
|
|
(from Step 11: team and personal streaks, including broken-streak disclosure)
|
|
|
|
### Shortcut Debt
|
|
(from Step 11.5: marker ledger and count, or the clean-ledger statement)
|
|
|
|
### Your Week (personal deep-dive)
|
|
(from Step 9, for the current user only)
|
|
|
|
This is the section the user cares most about. Include:
|
|
- Their personal commit count, LOC, test ratio
|
|
- Their session patterns and peak hours
|
|
- Their focus areas
|
|
- Their biggest ship
|
|
- **What you did well** (2-3 specific things anchored in commits)
|
|
- **Where to level up** (1-2 specific, actionable suggestions)
|
|
|
|
### Team Breakdown
|
|
(from Step 9, for each teammate — skip if solo repo)
|
|
|
|
For each teammate (sorted by commits descending), write a section:
|
|
|
|
#### [Name]
|
|
- **What they shipped**: 2-3 sentences on their contributions, areas of focus, and commit patterns
|
|
- **Praise**: 1-2 specific things they did well, anchored in actual commits. Be genuine — what would you actually say in a 1:1? Examples:
|
|
- "Cleaned up the entire auth module in 3 small, reviewable PRs — textbook decomposition"
|
|
- "Added integration tests for every new endpoint, not just happy paths"
|
|
- "Fixed the N+1 query that was causing 2s load times on the dashboard"
|
|
- **Opportunity for growth**: 1 specific, constructive suggestion. Frame as investment, not criticism. Examples:
|
|
- "Test coverage on the payment module is at 8% — worth investing in before the next feature lands on top of it"
|
|
- "Most commits land in a single burst — spacing work across the day could reduce context-switching fatigue"
|
|
- "All commits land between 1-4am — sustainable pace matters for code quality long-term"
|
|
|
|
**AI collaboration note:** If many commits have `Co-Authored-By` AI trailers (e.g., Claude, Copilot), note the AI-assisted commit percentage as a team metric. Frame it neutrally — "N% of commits were AI-assisted" — without judgment.
|
|
|
|
### Top 3 Team Wins
|
|
Identify the 3 highest-impact things shipped in the window across the whole team. For each:
|
|
- What it was
|
|
- Who shipped it
|
|
- Why it matters (product/architecture impact)
|
|
|
|
### 3 Things to Improve
|
|
Specific, actionable, anchored in actual commits. Mix personal and team-level suggestions. Phrase as "to get even better, the team could..." These are the items saved as `recommendations` in the Step 13 snapshot, which the next retro scores for follow-through, so name a concrete file, script or check in each.
|
|
|
|
### 3 Habits for Next Week
|
|
Small, practical, realistic. Each must be something that takes <5 minutes to adopt. At least one should be team-oriented (e.g., "review each other's PRs same-day").
|
|
|
|
### Week-over-Week Trends
|
|
(if applicable, from Step 10)
|