/ccxp-skills:retro [weeks-back]from ccxp-skills
Use when the user explicitly asks to run the weekly retrospective — review the last 7 days, grade the IPM, file action items
Ships in ccxp-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Weekly retrospective: review the last 7 days of engineering work, identify what's working well, what needs improvement, and what's fine as-is. Produce action items as new tasks.
<skills-root>= this skill's "Base directory" minus its last component; substitute the literal path (skill-conventions§9).
$ARGUMENTS is optional:
/retro — review the last 7 days (default)/retro 2 — review the last 14 days (2 weeks)Improve the engineering process and product quality over time through structured reflection. This is not a status report — it's an honest look at how work is getting done and what to change.
Optional env vars (no adopting-team default baked in — read ~/.claude/.env before running this skill; see README Prerequisites). Every one degrades gracefully when unset, including in an unattended cron run — never block the retro:
CCXP_SLACK_CHANNEL — the shared daily-ccxp Slack channel (e.g. #claude-notification); Phase 6's summary posts here. RETRO_SLACK_CHANNEL, if set, is an optional override that wins. If neither is set: in an interactive session, ask the user which channel to use; in an unattended run, skip Phase 6 and report "no CCXP_SLACK_CHANNEL configured" instead of the summary.METRICS_OWNER — the org/owner whose repos' dev/quality/metrics.jsonl Phase 4d reads. If unset, skip Phase 4d Step 1 entirely and report "no scoreboard reachable" the same way an unreachable individual repo already does.METRICS_REPOS — space-separated <repo> list (under METRICS_OWNER) running the quality probe. If unset or empty, same graceful skip as above. Extend as more repos adopt the probe.First fix the window — never hand-compute dates (GNU date -d breaks on macOS):
bash <skills-root>/retro/scripts/window.sh [weeks-back]
WEEKS, START, END, SINCE_ISO, THIS_MONDAY, IPM_FILE (empty when absent), PRIOR_RETRO (empty when none) as KEY=value lines (substitute the printed values wherever $START etc. appear below). Exit 2 = bad argument or date, 3 = missing repo root; stop and report it.bash <skills-root>/retro/scripts/metrics.sh --since "$SINCE_ISO" once: JSON with the commit, PR, CI, backlog, task-count and escalation numbers below (steps 3, 4, 5, 6, 7). Exit 2 = usage, 3 = any gh/git failure (nothing printed), 4 = malformed drive-threads.json (left untouched): report it, never estimate. .prs.truncated true means a PR list hit its 500 cap (counts are a floor). It is read-only. Use its numbers verbatim in Phase 3; judging them stays here.Collect the rest over START..END. Do all reads in parallel:
Git log: git log --since="$START" --oneline --stat — what shipped
Journal entries: Read all dev/JOURNAL/*.md files with dates in the window — completed tasks
Merged PRs: metrics.sh .prs.merged, .avg_cycle_hours, .additions/.deletions (explicit --limit 500; gh's default page of 30 undercounts a real week).
Open PRs: .prs.open and .prs.stale_open (created more than 3 days ago) — the Stale PRs row in Phase 3.
Current TODO backlog: .backlog.todo and .backlog.parking — backlog health; .tasks_completed counts task-ID dev/JOURNAL/ files dated in the window.
CI failures: .ci — total, green, pass_rate_pct, top_failing (top 3 by failure count, for the Top failing workflows row). The fetch uses an explicit --created filter and gh's 1000-run API cap; when a query hits the cap, metrics.sh auto-bisects the window into disjoint halves and merges them (.ci.fetches is the call count, 1 on a normal week), so no manual splitting. If .ci.truncated is still true, a window too small to split (or the call budget) was capped and runs were dropped: state that gap explicitly in the retro, never report the rate as complete (no silent caps; the undercount recurred 3 retros before this).
Slack escalations: bash <skills-root>/_threads/threads.sh list — what needed human intervention (counts: .escalations). This is one clone's view, never the week's total: drive-threads.json is gitignored, per-clone state by design (a shared file would race between concurrent sessions), so escalations posted from other clones, concurrent autopilot slots, or as plain channel messages are not in it. Treat the count as a floor and cross-check live Slack ($DRIVE_ESCALATION_CHANNEL_ID / the escalation channel) for the window before reporting a number; state both in the retro.
Previous retro: Read PRIOR_RETRO — check if prior action items were addressed, and extract the CI pass rate cell (e.g. 76% (...)) so Phase 3 can report the delta vs this retro.
This week's IPM commit: Read IPM_FILE (dev/JOURNAL/<THIS_MONDAY>-ipm-weekly.md) — the focus list to grade. If it is empty/missing (no IPM ran this Monday — holiday, off day, or pre-rollout), note "No IPM commit this week" and skip Phase 2's focus grading + Phase 3's focus rows.
Closures in the window: list the dev/JOURNAL/ task closures dated in the window (T<id> plus title). Phase 2 diffs them against IPM_FILE's list to find work delivered but not planned. No earlier IPM files are read: there is no bump counter.
Cron utilization (the feedback loop for tuning cron frequency without extra tokens): locate the ccxp cron clone's log dir — crontab -l names the daily-ccxp.sh path; its repo root contains .claude-ccxp-logs/. Fall back to <current-repo-root>/.claude-ccxp-logs if crontab is unreadable; if neither exists, report "no cron logs reachable from this clone" and skip the Phase 3 cron rows. For each ccxp-YYYYMMDD.log in the window (gunzip .log.gz archives as needed):
for f in "$CCXP_LOG_DIR"/ccxp-*.log; do
day=${f#*ccxp-}; day=${day%.log}
act=$(grep -oE 'duration=[0-9.]+s' "$f" | tr -d 'duration=s' | awk '{s+=$1} END{printf "%.0f", s/60}')
cost=$(grep -oE 'cost=\$[0-9.]+' "$f" | tr -d 'cost=$' | sort -n | tail -1)
tools=$(grep -c '] TOOL ' "$f")
stop=$(grep -oE 'STOPPED reason=[a-z_]+' "$f" | tail -1 | sed 's/.*=//')
skips=$(grep -c 'PREFLIGHT idle' "$f"); fires=$(grep -c 'PREFLIGHT actionable' "$f")
echo "$day active=${act:-0}min cost=\$${cost:-0} tools=$tools stop=${stop:--} preflight=$fires/$((fires+skips))"
done
active sums the DONE duration= wall-times (actual model work); cost is the session's cumulative total_cost_usd (max per file — DONE lines repeat it cumulatively on --continue resumes). PREFLIGHT counts are zero for pre-gate logs — report "n/a (pre-gate)" for those days rather than 0/0.
Read all memory files from the auto-memory system. These live in the Claude Code per-project memory directory (outside the repo — managed by the Claude Code harness, not version-controlled).
~/<repo>) and a cron clone (~/focus/<repo>) — or any other checkout of the same repo — each accumulate a separate memory pool.REPO_BASENAME=$(basename "$(git rev-parse --show-toplevel)")
ls -d ~/.claude/projects/*"${REPO_BASENAME}"*/memory 2>/dev/null
For each matched directory:
MEMORY.md to get the list of stored memories.md file. Memory types are: user (role/preferences), feedback (corrections and validated approaches), project (decisions, constraints, context), reference (pointers to external systems).claude-worktrees-cc-<timestamp>-<pid>) or any other one-off session naming pattern, especially if its files' mtimes cluster around a single old date with nothing since.For each memory entry, assess:
Is it still current? Check if the underlying fact is still true (e.g., a bug may have been fixed, a convention may have been adopted). Delete stale memories immediately (remove the file and its MEMORY.md entry).
Should it be codified? If a feedback memory has proven useful across sessions, it should be promoted to a permanent home:
dev/guidelines.mdSKILL.md in the ccxp-skills plugin source (<name>/SKILL.md, relative to the ccxp-skills repo root).claude/skills/<name>/SKILL.md instead of the global one (e.g. a repo's own release skill, not address-pr/ccxp)DEPENDENCIES.md or workflow commentsgotchas.mdfeedback memory that got violated again despite already being recorded → doc isn't enough; escalate to a technical hard-gate instead of (or in addition to) rewording the memory. Prose only works if it gets recalled and applied correctly every time — a repeat violation is evidence it doesn't. Concretely: a PreToolUse/PostToolUse hook in ~/.claude/settings.json (/update-config builds and pipe-tests these) when the violation is mechanically detectable from tool input (a command pattern, a file path, a target directory), or a wrapper/validation script the relevant skill shells out to (see _gh/, _taskid/) when it needs richer logic. Precedent: feedback_ephemeral_clone_cross_repo was violated twice (once in another repo, once in ~/.claude/skills) before ~/.claude/hooks/guard-interactive-clone-mutations.sh was added to hard-block mutating git/gh commands targeting named interactive clones.Create consolidation tasks for memories that should be codified. Each consolidation task must:
Tag with Category: process and Source: Retro YYYY-MM-DD (memory consolidation).
Include a Memory Review section in the retro report (Phase 5) summarizing:
.claude/state/drive-threads.json accumulates entries that were never marked resolved: true even after the underlying work shipped. Common shape: a PR-approval thread (T<id>-prN) whose PR has since merged, or a thread whose task has moved into dev/JOURNAL/.Procedure — for each entry in .claude/state/drive-threads.json where resolved is false:
List the candidates with bash <skills-root>/_threads/threads.sh list --unresolved (TSV: key, resolved, type, sent_at, summary). Every write below goes through threads.sh resolve (exit 3 = absent or already resolved, 4 = malformed file, left untouched); never edit the JSON by hand.
Rule A (PR-suffix auto-resolution). If the key matches the pattern T\d+-\d+-pr(\d+)$, extract the trailing PR number and run bash <skills-root>/_gh/gh.sh pr view <N> --json state,mergedAt. If the PR is MERGED, mark the entry:
bash <skills-root>/_threads/threads.sh resolve "<key>" --at "<mergedAt>" \
--resolution "PR #<N> merged <mergedAt> — auto-resolved by retro Phase 1c (stale-by-event)"
Rule B (task-closure auto-resolution). If the key starts with T<id> (with or without a PR suffix) and a file matching dev/JOURNAL/*T<id>-*.md exists, the underlying task has been closed. Mark resolved:
bash <skills-root>/_threads/threads.sh resolve "<key>" \
--resolution "Task closed in dev/JOURNAL/<filename> — auto-resolved by retro Phase 1c (stale-by-event)"
(resolved_at defaults to now.)
If both Rule A and Rule B match, prefer Rule A's resolved_at (the merge timestamp is the truer "resolved when" signal).
Surface anything left. For entries that match neither rule AND are older than 14 days (today − sent_at > 14d), collect them for the "Stale escalations" section in the retro report (Phase 5). Do not auto-resolve — these typically need explicit user action (a design pick, an external go/no-go, etc.).
Each resolve call writes atomically; there is no separate write-back step.
Track counts for Phase 5 + Phase 6:
auto_resolved_a: number of Rule A hitsauto_resolved_b: number of Rule B hitsstale_surfaced: number of stale-by-event entries surfaced for manual reviewdev/chore.md — a thin index, one row per chore: Goal + link to the chore's task file + Started date + Outcome (blank until evaluated).dev/chore.md is a clean no-op — skip this phase entirely and report nothing for it.List due chores:
bash <skills-root>/retro/scripts/chore-review.sh list-due --repo-root . --today "$(date -u +%F)"
Prints one T<id>\t<goal>\t<started> line per chore that is due: its Outcome column is
still blank (no Kept/Revised/Extended recorded) AND at least one full iteration
(7 days) has passed since Started. No output → no due chores this retro, skip to step 3.
Evaluate each due chore against its own goal/criteria (read the linked task file) using
this period's evidence — merges, reverts/fixups, incidents, the Phase 3 metrics. Most do-X
chores are a trivial "goal met? yes" look-back; hypothesis-style chores get the substantive
evidence check (the auto-merge trial's own 06-12 evaluation is the worked example — see
dev/chore.md's seed row). Record the verdict:
dev/chore.md row's Outcome cell.Category: process action item via Phase 4's task-creation steps (do not silent-revert
the underlying policy); update the Outcome cell pointing at the new task.**Extended** — next review <today + 7d> and the reason. chore-review.sh treats Extended as terminal (same as Kept/Revised) — it will not auto-resurface the row.
list-due. Fine for now since no chore has needed a second extension yet; revisit if one does.Commit the dev/chore.md + task-file updates in the same PR as the rest of the retro's docs changes (Phase 5).
Creation safety-net scan — flag process-looking dev/*.md changes with no matching row:
bash <skills-root>/retro/scripts/chore-review.sh scan-untracked --repo-root . --since "$START"
dev/*.md files (root-level only — not dev/TODO/, dev/JOURNAL/, dev/PARKING/, or dev/chore.md itself) changed in the window whose content doesn't reference any task ID already linked from dev/chore.md.dev/chore.md row added (if it's the kind of thing worth an evidence-based look-back) or an explicit "confirmed not a chore" note; a false positive (e.g. a docs typo fix) is dismissed with no action.Track counts for Phase 5 + Phase 6:
chores_evaluated: number of due chores evaluated this retro (Kept/Revised/Extended)chores_untracked_flagged: number of files flagged by the safety-net scanOrganize findings into three categories. Be specific — cite task IDs, PR numbers, and concrete examples.
For each task on this week's ipm-weekly.md, classify the outcome. Skip this section if no IPM ran this week — which is the common case for a repo that treats /ipm as the opt-in, ad-hoc tool it now is: this grading pass is dormant by design wherever the ceremony isn't run, not broken.
Render every Task cell as T<id> — {title} so the list reads without opening each task.
dev/JOURNAL/ (the expected case — /drive journal-moves immediately on every close) or still in dev/TODO/ with status: Done (a hand-closed task, or one closed by a session predating that change — dev/JOURNAL/-only is a stale check that undercounts these). Compute actual from PR created → merged. Compare revised est (from ipm-weekly.md) vs actual; flag when ratio > 2x or < 0.5x.In Progress or Review) but not merged. It will carry over automatically next IPM.Open or Design). It re-enters the candidate pool next IPM.Estimation-revision arc. The final estimation: value hides whether a task was estimated once and held, or revised repeatedly mid-week — and which way. Pull the revision arc for each graded task from its file's git history, so the grade shows the trajectory (filed → revised → revised), not just the endpoint:
bash <skills-root>/retro/scripts/estimation-revisions.sh \
--repo-root . --since "$START" T<id> T<id> ...
git log --follow over each task file (backlog + the post-close JOURNAL copy) and parses both metadata formats (frontmatter estimation: and the legacy - **Estimation**: bullet), windowed to the retro period.Closures from Phase 1 step 10 whose task ID is not in this week's ipm-weekly.md list. With the Shipped and Dropped counts this is the Monday-picked vs Friday-finished comparison; a chronic straggler just keeps showing as Dropped. Render each as T<id> — {title}; skip when no IPM ran this week.
Things that worked, shipped smoothly, or improved the process. Examples:
Pain points, recurring friction, or things that took longer than they should. Examples:
Things that are working adequately — not broken, not exceptional. Acknowledging these prevents unnecessary churn. Examples:
/drive Phase 4/Phase 7 always journal-moves a task immediately on close (retiring the old in-place-only default) — so this phase is no longer where the expected weekly volume gets swept./drive's close at all: a task closed by hand, one closed by a session that predates this change, or /todo sweep's own out-of-band "already shipped outside /drive" case.dev/TODO/ file with status: Done from one of those paths would linger indefinitely rather than accumulating for a week — still worth a sweep, just a rarer one now.Find every task in dev/TODO/ whose frontmatter status: is Done:
git checkout -b "retro/$(date +%F)-journal-sweep"
swept=()
swept_paths=()
for f in dev/TODO/T*.md; do
status=$(awk -F': ' '/^status:/ {print $2; exit}' "$f")
status=${status%% *} # leading token only — some files append narration after Done
if [ "$status" = "Done" ]; then
closed_date=$(awk '/^## Closed/ {gsub(/[()]/, ""); print $3; exit}' "$f")
dest="dev/JOURNAL/${closed_date:-$(date +%F)}-$(basename "$f")"
git mv "$f" "$dest"
swept+=("$(basename "$f" .md) -> $dest")
swept_paths+=("$dest")
fi
done
Zero candidates → skip cleanly. If swept is empty, do not open a PR or
add a report section — an empty sweep is a no-op, not a finding.
Otherwise, commit and open one PR with all the renames:
bash <skills-root>/_taskid/epic-links.sh sync && git add dev/EPICS # epic member links follow the moved files (no-op without epics)
# doc-lint guard, scoped to exactly the files just moved (lint-docs.sh
# requires an explicit path and is check-only) —
# shared script, see /gcpr Step 1.5
bash <skills-root>/_docs/lint-docs.sh "${swept_paths[@]}" \
|| echo "::warning::lint-docs: markdown issues remain — CI Markdown Lint will gate"
git commit -m "docs(tasks): batch journal-move for $(date +%F) (Friday sweep)"
bash <skills-root>/_gh/git.sh push -u origin "retro/$(date +%F)-journal-sweep"
bash <skills-root>/_gh/gh.sh pr create --title "docs(tasks): batch journal-move $(date +%F)" \
--body "Friday retro journal sweep — moves $(printf '%s\n' "${swept[@]}" | wc -l | tr -d ' ') Done task(s): $(printf '%s; ' "${swept[@]}")"
Run /address-pr on it — auto-merge tier per dev/guidelines.md (pure
status-move content, no design decisions inside).
Record the swept task IDs in the Phase 5 report's ## Journal sweep section
(below) so the maintainer sees what moved.
/drive closes journal-moves immediately at merge time (see Phase 2b's own header above) — so a task that went through /drive's close never appears in this sweep, by design, not a miss.Run this after Phase 2b's sweep, so every task actually closed this
window is in dev/JOURNAL/ before computing over it (a task still sitting
in dev/TODO/ with status: Done would otherwise be invisible to this
step, same reasoning as the sweep itself).
bash <skills-root>/retro/scripts/compute-velocity.sh --repo-root .
Recomputes, over a trailing 4-calendar-week window (Monday–Sunday, purely
calendar time — independent of scheduled:, IPM files, or whether /ccxp's
IPM ritual ever runs in this repo):
points_per_week — mean of (sum of points closed) per calendar week,
binned by each task's dev/JOURNAL/ filename date.hours_per_point — median(actual_hours / points) over the same
window's completed tasks, where actual_hours is wall-clock claim
(the commit that introduced claimed_by:) to close.Writes dev/velocity.json every run, including the bootstrap path (zero
qualifying samples in the window — a freshly migrated repo, or one that has
never run /retro): flat defaults hours_per_point: 1, points_per_week: 10,
bootstrap: true. This file is what /eta reads to project a task's
remaining wall-clock time (points * hours_per_point) instead of a static
duration-bucket lookup.
Commit dev/velocity.json alongside whatever else this retro's own PR
carries (the Phase 4/5 action items, the report) — it's a small, machine-
generated file with no design content, so it never needs its own PR.
Carry the one-line summary (hours_per_point, points_per_week,
sample_size, bootstrap) into the Phase 5 report so the trend is visible
to a human reading the write-up, not only in the JSON.
Compute and report these metrics for the review period:
| Metric | Value |
|---|---|
| Tasks completed | count of JOURNAL entries in window |
| PRs merged | count |
| PRs still open | count |
| Stale PRs (>3 days open) | count of open PRs with createdAt older than today − 3d; list the PR numbers if small |
| Avg PR cycle time | created → merged duration |
| CI pass rate | X% (green/total) plus Δ vs prior retro: +N pp / -N pp / unchanged (use the CI pass rate cell extracted in Phase 1 step 8 as the baseline) |
| Top failing workflows | top 3 workflow names by failure count in the window, e.g. Release AcmeDB (5), Upstream Prepare (3), AcmeDB Cloud Release (2) |
| Escalations sent | drive-threads.json count (this clone only, a floor) cross-checked against live Slack search for the window; report both when they differ |
| Escalations resolved | count where resolved=true |
| Backlog size | TODO count |
| Parking lot size | PARKING count |
| Net backlog change | new tasks created - tasks completed |
| Focus list grade | {shipped}/{total} shipped, {in_flight} in flight, {partial} partial, {dropped} dropped (skip if no IPM this week) |
| Plan adherence | {shipped}/{planned} planned tasks shipped, {unplanned} unplanned shipped (skip if no IPM this week) |
| Cron active time | avg + range of active model min/day from Phase 1 step 11 (e.g. 27 min avg, 16–39) — flag if trending down with a growing backlog (sessions starving) or up against flat throughput (churn) |
| Cron cost | avg + range $/day (e.g. $11.7 avg, $6.5–13.9); flag a band shift vs the prior retro — the gate should keep this flat while the hourly cron cuts latency |
| Cron preflight ratio | fires/total hourly fires that launched claude (e.g. 3/24); n/a (pre-gate) for pre-rollout days. A ratio near 1.0 means the gate never skips (signals always present — fine); near 0 with a stale backlog means probes may be missing real signals |
| Cron stop reasons | histogram of STOPPED reason= in window (e.g. no_actionable_items×6, rate_limit×1) — anything other than no_actionable_items deserves a line in Phase 5 |
For each "needs improvement" finding, create a concrete, actionable task:
Generate task IDs using the shared helper (same one every skill uses — see dev/guidelines.md and ../_taskid/new.sh):
bash <skills-root>/_taskid/new.sh --check ./dev
Run this once per action item. The helper checks dev/{TODO,PARKING,JOURNAL}/ and retries on collision. Do NOT invent sequential IDs (e.g. -100001, -100002) and do NOT inline the printf ... /dev/urandom ... command.
Create task files in dev/TODO/ using the repo's required TODO metadata bullets in this exact order:
1 (every action item files at the standard default — keep action items small; /incept revises upward later if grilling surfaces real scope)Retro YYYY-MM-DDIn the Description bullet, tag process improvements with Category: process
In the Description bullet, tag quality improvements with Category: quality
After writing each file, stamp its scheduled: into the current iteration so the action item lands on the board's Iterations view, not just the backlog: bash <skills-root>/_ipm/stamp-scheduled.sh dev/TODO/<id>-<slug>.md current (token-free: committed IPM → Project API → next-Monday fallback; update-forward-only).
Do NOT create tasks for "what's fine" or "what went well" — those are informational
Grade the skills exercised this week and improve the single worst offender. This is the recurring skill-quality loop; it consumes the Phase 2 grade and Phase 3 metrics. Hard cap: act on at most one skill per retro. Remaining candidates are listed in the report (Phase 5), not acted on.
Step 1 — gather candidate signals (graceful degradation; no signal is a hard dependency):
address-pr or drive prose; CI failures or reverts after /drive arcs → drive prose; tasks repeatedly Dropped (from Phase 2) → the planning skills (todo, ccxp). Exact attribution when a "Skills invoked" audit block is present: grep both the week's JOURNAL (dev/JOURNAL/<this-week>-T*.md) and any dev/TODO/T*.md with status: Done (a task closed but not yet swept by the Phase 2b backstop) for ## Skills invoked — JOURNAL-only misses a hand-closed or pre-immediate-move task still sitting in dev/TODO/.python3 <skills-root>/skill-conventions/scripts/skill_score.py <skill…> in the ccxp-skills checkout — deterministic 0–100 score, per-check breakdown, and maturity level (skill-conventions §10). Lowest score / broken refs escalate.python3 <skills-root>/skill-conventions/scripts/skill_feedback.py list — open items are observed misbehavior; a skill with any is a strong candidate. The fix follows §10's loop: failing eval case first, then the prose edit, then codify.Step 2 — pick the single worst offender (judgment-assisted, no formula): rank by outcome-pain first; use authoring + compliance to break ties and escalate. If no skill clears a "worth touching this week" bar, report "none flagged" and end the phase — a valid and common outcome.
Step 3 — triage bounded vs needs-design:
/address-pr — never a direct merge (see the feedback_invoke_address_pr_not_bypass_merge memory).Category: quality action item via Phase 4's task-creation steps (Source Retro YYYY-MM-DD) so it gets a proper superpowers:brainstorming → design pass when picked up.Guards:
gh/PAT fails while opening the draft PR: log it, downgrade to filing the task. Grading still completes.Report: add a ## Skill quality section to the retro report (Phase 5) and a Skill quality: line to the Slack summary (Phase 6).
The trailing half of the code-quality bar. /drive Phase 3.8 appends one record per code-class task to each target repo's dev/quality/metrics.jsonl; this phase reads the rolling 3-week window, gives per-task feedback, and files remediation chores for unresolved regressions. Pairs with Phase 4c — that grades how we work; this grades what we shipped.
Step 1 — locate the scoreboards. For each <repo> in METRICS_REPOS (see Configuration above — unset/empty means skip this whole phase, "no scoreboard reachable") read dev/quality/metrics.jsonl:
<repos-root>/<repo>/dev/quality/metrics.jsonl.main via the API (command below).<repo>" and skip it — never block the retro (same posture as the cron-log step).bash <skills-root>/_gh/gh.sh api \
"repos/${METRICS_OWNER}/<repo>/contents/dev/quality/metrics.jsonl" \
--jq '.content' | base64 -d
Step 2 — filter to the 3-week window. Keep records whose date is within 21 days of today. If the window is empty across all repos, report "no quality records this window" and end the phase.
Step 3 — per-task feedback (no silent drops). Each record carries the probe-computed delta. A metric regressed when coverage_pct or design_score fell, or any other metric (shellcheck_*, dup_pct, secrets, code_scanning_*, file_loc, max_fn_lines) rose — the direction rule in quality-probe/SKILL.md. For every task in the window:
Step 4 — remediation chores via /stage. Each unresolved regression (regressed and either unexplained, or explained but not yet restored) gets a chore — /stage takes an existing T<id>, so it is a two-step:
Category: quality, Source Retro YYYY-MM-DD, title quality: restore <metric> on <repo> (regressed in T<id>, Δ<delta>)./stage T<new-id> "restore <metric> regressed in T<id>".Idempotent — skip if an open chore for that same <metric> on <repo> regression already exists in dev/TODO/.
Step 5 — gate-readiness signal. Compute the hold-vs-regress rate over the window (holds / (holds + regressions)). This tracks whether record+warn is trustworthy enough to promote toward a soft/hard gate (the deferred enforcement upgrade). Report the rate and its trend vs the prior retro; do not change the gate posture here — that is a deliberate, separately-decided step.
Report: add a Quality trend row to the metrics table (Phase 3) — hold N / regress M (3wk); gate-readiness X% — a ## Quality trend section to the retro report (Phase 5), and a Quality trend: line to the Slack summary (Phase 6).
Pairs with Phase 4c — that grades skills in our own marketplace(s); this looks outward at every other installed marketplace for a skill that already does something leaner/better than ours, so the comparison stops depending on a human happening to notice (the concrete case that motivated this phase: ccxp-skills:grill-me vs. the newly-installed mattpocock-skills:grilling implementing the same interview algorithm, found only by a human manually diffing the two).
Step 1 — enumerate external marketplaces. Read enabledPlugins from ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json, excluding our own marketplace(s) — whichever repo /retro is currently running in, plus any sibling marketplace that repo's own CLAUDE.md/dev/guidelines.md names as "ours" (in this hub repo: ccxp-skills and synx-skills; a different adopting repo names its own instead — never a hardcoded list).
No external marketplaces enabled → report "no external marketplaces configured" and end the phase.
Step 2 — list each external marketplace's skills. For every remaining marketplace/plugin, read only the frontmatter description: (the trigger one-liner) from each ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/cache/<marketplace>/<plugin>/<version>/skills/*/SKILL.md — never the full body. This is the cheap side of the comparison, which is what keeps the phase affordable to run every week instead of on a slower cadence.
Step 3 — scope the comparison to whatever Phase 4c step 1 already produced this week. Reuse that evidence as-is:
A ## Skills invoked audit block was present this week (retro/SKILL.md:421) → compare those exact skill names' descriptions against the Step 2 list.
No audit block (the common case) → compare the member skills of whichever coarse domain buckets Phase 4c step 1 fell back to (drive, todo, address-pr, …) against the Step 2 list — never skip the phase just because the week had no audit block.
Step 4 — trigger-overlap judgment. For each skill from Step 3, scan the Step 2 description list for topic/trigger overlap — a judgment call, same nature as Phase 4c step 2's "pick the worst offender" (no formula).
A hit is a candidate, not a verdict; reading the external skill's full body (going past the cheap Step 2 description) is reasonable at this point, scoped to just the candidate(s) that cleared this filter.
Step 5 — report, never auto-adopt. For each candidate, file a Category: quality action item (Source Retro YYYY-MM-DD) proposing a follow-up comparison/design pass — the same "needs real design" downgrade Phase 4c step 3 uses for its own bounded-vs-needs-design triage.
Never draft a bounded fix here: adopting behavior from an independently-versioned external plugin is a materially different trust model than Phase 4c's own-repo bounded-edit path.
Guards:
retro/SKILL.md:436), shared rather than duplicated.Report: add a ## External skillset scan section to the retro report (Phase 5), directly after ## Skill quality, and an External scan: line to the Slack summary (Phase 6), directly after Skill quality:.
agent-pairing/assets/ccxp-agent.md) and a decisions log exist; otherwise report "no persona review" and skip. Never edit the persona and never run decision add/supersede; the one retirement allowed is step 3.P=<skills-root>/retro/scripts/persona-review.sh, deterministic; add --repo <dir> for a repo other than this one).bash $P size, bucket, overlap, and ledger.sh decision review. bucket rows are hints (confirm against the text): ref, bucket, reason, target stage, target repo. Buckets: persona, skill-task, script-or-hook (a script, gate, lint or hook can enforce it), profile-config, keep-in-log, already-covered, retire, contradiction.bash $P tasks: one row per proposed conversion. File each file row with /new-task (default tier, staged) in its target repo: one task per decision, goal in the owner's words, body naming the decision refs, the persona/skill/script target path or PR, and the retire reason. Skip exists: rows (an open task already names the ref).bash $P retire-enforced --apply: retires a decision whose enforced-by (set with ledger.sh decision enforce <ref> <path or PR>) is a merged PR number or a file on origin/main and a task names both. Pending rows stay; log each retired row in the report. commands lines (non-enforced retire hints) still go to the owner.size headroom under the bats cap, every addition needs an equal trim); offer one docs PR and report contradictions as questions.Report: add a ## Persona review section after ## External skillset scan: size line, bucket counts, filed tasks (ref to task), retirements applied, pending enforcements, retire commands, contradictions.
Create dev/JOURNAL/YYYY-MM-DD-retro-weekly.md with:
# Weekly Retro: YYYY-MM-DD
**Period**: YYYY-MM-DD to YYYY-MM-DD
**IPM commit**: `dev/JOURNAL/{this-week-Monday}-ipm-weekly.md` (or "No IPM this week")
## Metrics
(table from Phase 3)
## Focus list grade
(skip if no IPM this week)
Render every `Task` cell as a clickable markdown link, not bare text —
`taskid-mdlink T<id>` (from `_taskid/url.sh`, `--issue` mode by default: this report is written
once and never regenerated, so an issue-URL link that survives every future task-file move is the
right choice, same as the IPM template).
| Task | Status | IPM revised est | Revisions | Outcome | Actual | Notes |
|------|--------|-----------------|-----------|---------|--------|-------|
| T... | Carry-over | 2h | filed `1h` → `2h` (scope discovered) | Shipped | 4h | 2x over — design pass missed the registry side |
| T... | New pick | 1d | no revisions | In flight | — | Carries over next IPM |
| T... | New pick | 4h | no revisions | Dropped | — | Dropped again — surface in "needs improvement" |
| T... | Mid-week addition | 1h | filed `1h` | Shipped | 1h | Manually appended — fit slack cleanly |
The **Revisions** column is the per-task arc from `retro/scripts/estimation-revisions.sh` (Phase 2). `no revisions` = the estimate held all week.
Grade mid-week additions separately from the committed list (mid-week estimation-vs-actual is a separate signal): if the cumulative mid-week hours were large, flag in "needs improvement" — additions pushed committed work into next week. If the mid-week-addition count is consistently 0, that's also a signal — either the rhythm has no mid-week surprises (great) or appenders aren't using the convention (worth checking).
## Journal sweep
(skip if Phase 2b swept zero tasks)
Moved to `dev/JOURNAL/` this retro, in PR #N:
- `T...` — closed YYYY-MM-DD
## What went well
(findings from Phase 2, with citations)
## What needs improvement
(findings from Phase 2, with citations and linked action items)
## Delivered but not planned
(skip if no IPM this week; `T<id> — {title}` per closure from Phase 1 step 10 not on the IPM list)
## What's fine as-is
(findings from Phase 2)
## Action items created
Same link convention as the Focus list grade table above (`taskid-mdlink T<id>`, `--issue` mode).
| Task ID | Title | Est |
|---------|-------|-----|
| T... | ... | ... |
## Skill quality
- Worst offender: `<skill>` (signal: outcome | authoring | compliance | combined)
- Action: drafted ccxp-skills PR #N | filed T<id> (Category: quality) | none flagged
- Runners-up (noted, not acted on): `<skill>`, `<skill>` (or "none")
## External skillset scan
- Marketplaces scanned: `<marketplace>`, `<marketplace>` (or "none configured")
- Candidates found: `<our-skill>` vs. `<external-marketplace>:<external-skill>` — filed T<id> (Category: quality) | (or "none flagged")
## Persona review
- Persona: N bytes of cap C (headroom H); decisions: A active
- Buckets: persona N, skill-task N, profile-config N, keep-in-log N, already-covered N, retire N, contradiction N (or "no persona review")
- Proposed edits (with the trims that pay for them), retire/supersede commands for the owner, contradictions (or "none")
## Memory review
- Total: N memories across M clone(s) (user: X, feedback: Y, project: Z, reference: W)
- Per-clone breakdown (omit this list if only one clone's memory was swept): `<encoded-path>`: N files; `<encoded-path>`: N files
- Stale removed: (list or "none")
- To consolidate: (list with target file and task ID, or "none")
- Stale directories flagged for deletion (abandoned worktree/session clones — human confirmation needed, or "none")
## Stale escalations
(skip the section if Phase 1c surfaced none)
Auto-resolved by Phase 1c sweep:
- `T...-prN` — PR #N merged YYYY-MM-DDTHH:MMZ (Rule A)
- `T...` — closed in `dev/JOURNAL/<filename>` (Rule B)
Surfaced for user action (no automated resolution path, >14 days open):
- `T20260407-594056` (Nd open) — design decision, no automated resolution path. *User action needed: pick branching model.*
## Chore review
(skip the section entirely if the repo has no `dev/chore.md` — Phase 1d no-op)
Evaluated this retro:
- `T...` — **Kept** / **Revised** / **Extended** — one-line evidence summary
Creation safety-net — process-looking docs with no matching `dev/chore.md` row:
- `dev/some-doc.md` — checked, {added a row / confirmed not a chore} (or "none flagged" if the scan found nothing)
## Prior retro follow-up
(status of action items from previous retro — completed, in progress, or dropped)
## Housekeeping
- Slack summary: Posted via MCP / Posted via webhook fallback — MCP unavailable / Slack post FAILED: <reason> (see Phase 6)
Send a Slack summary to RETRO_SLACK_CHANNEL if set, else CCXP_SLACK_CHANNEL (see Configuration above) via MCP slack_send_message.
ccxp/SKILL.md Phase 1.4 / ipm/SKILL.md step 6). This is a weekly, unconditional send — same shape as the daily standup and Monday IPM sends, which already carry this fallback; Phase 6 previously didn't, and a 2026-09-11 retro's summary silently never posted as a result.If slack_send_message is not available (absent or unauthenticated — the headless cron case), go straight to step 2. Otherwise attempt it once, then one retry on error — 2 attempts total, no further looping (same policy as Phase 1.4).
If the tool is unavailable or both attempts error, fall back via the wrapper (same as ccxp/SKILL.md Phase 1.4; always the dev channel webhook, whatever RETRO_SLACK_CHANNEL is). It prints a status line, appends it to the report file, and exits 1 on failure:
RETRO_MESSAGE="$(cat <<'EOF'
<the *Weekly Retro* (YYYY-MM-DD) mrkdwn block composed below>
EOF
)"
bash <skills-root>/slack/scripts/slack-fallback.sh --journal <the retro report file written in Phase 5> "$RETRO_MESSAGE"
Requires SLACK_WEBHOOK_URL_DEV resolvable via the same three-tier lookup slack/SKILL.md's Prerequisites documents (already-exported env var → ~/.claude/.env → repo .env).
Record which path succeeded in the report's ## Housekeeping section (see Phase 5 template) — the wrapper already appended the webhook line; add Posted via MCP yourself when MCP worked.
If the webhook fallback fails too, never stay silent: the wrapper wrote - Slack post FAILED: <reason> into the report; also state it in the session output.
*Weekly Retro* (YYYY-MM-DD)
- Focus: {shipped}/{total} shipped, {dropped} dropped, {unplanned} unplanned shipped
- {N} tasks completed, {M} PRs merged, CI {P}% green
- Top win: {one-liner}
- Top improvement area: {one-liner}
- {K} action items created — see retro report
- Skill quality: {<skill> → PR #N | <skill> → filed T<id> | none flagged}
- External scan: {<our-skill> vs <marketplace>:<external-skill> → filed T<id> | none flagged | no external marketplaces configured}
- Escalation hygiene: {auto_resolved_a + auto_resolved_b} auto-resolved, {stale_surfaced} surfaced for user action (skip the bullet if both counts are 0)
- Chore review: {chores_evaluated} evaluated, {chores_untracked_flagged} untracked flagged (skip the bullet on repos with no `dev/chore.md`)
(Drop the first bullet on weeks with no IPM commit.)
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub synx-data-labs/ccxp-skills --plugin ccxp-skills57 skills in this plugin
/1password-env-setupUse when the user explicitly asks to bootstrap or refresh a repo's 1Password-backed .env — installs the refresh-env helper, generates a hash-checking .envrc, and materializes .env from .env.tpl via op inject/address-prUse when the user explicitly asks to address, verify, or merge a specific open PR (CI, Claude Code review, test plan, tiered merge)/agent-pairingUse when the user explicitly asks to toggle the ccxp-agent main-session agent on/off for this Claude Code profile or check its status