/ccxp-skills:ccxp [task-id]from ccxp-skills
Use when the user explicitly asks to run the full XP engineering loop / day-or-week orchestrator (daily standup, focused work, Friday retro — the Monday IPM is a separate opt-in skill, see /ipm)
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.
Claude Code Extreme Programming: the master skill that orchestrates daily engineering work following XP best practices. Starts with a daily standup (review yesterday, check progress against the week's IPM commit if one exists, plan today), focused work via /drive, and a weekly retrospective on Fridays.
The Monday Iteration Planning Meeting is a separate, opt-in ritual, not something this orchestrator auto-triggers. The day-to-day planning loop is continuous /todo next + /drive pulling straight off dev/TODO/queue.md's existing priority order. A repo that wants an explicit weekly iteration commit invokes /ipm directly, any day — see ipm/SKILL.md. (/ccxp still never invokes it itself; the ccxp-agent persona dispatches the standup, the Monday IPM and the Friday retro as separate jobs, see agent-pairing/rituals.md.)
$ARGUMENTS is optional:
/ccxp — auto-mode: standup (+ retro on Fridays). IPM is opt-in — invoke /ipm directly when wanted.CCXP_CRON_MODE (default 0; dev/daily-ccxp.sh sets it to 1 for every cron-spawned session) draws the line between what the unattended loop does on its own and what stays reserved for a human sitting down with the agent.One thing is interactive-only — skipped whenever CCXP_CRON_MODE=1:
/drive
in cron mode — it exits after that day's rituals (standup any day,
+retro on Friday). Implementation work happens only when
a human runs /drive or /ccxp interactively (where CCXP_CRON_MODE is
unset/0 and Phase 3 runs normally, exactly as this skill originally did
end-to-end).(If a repo does invoke /ipm — ad hoc, per its own opt-in choice — that
skill reads CCXP_CRON_MODE itself and skips its interactive-only pre-IPM
design pass (step 3) the same way under cron; that branching lives entirely
in ipm/SKILL.md, not here.)
This mirrors the existing CCXP_PEER_MODE env-var pattern (default behavior
baked into the skill, one var flips it) rather than adding a second
skill/argument surface.
| XP Practice | How ccxp applies it |
|---|---|
| Planning game | Day-to-day: /todo next + /drive pull straight off dev/TODO/queue.md's priority order — no ceremony required. Optional, ad hoc: /ipm (invoked directly, not cron-triggered) budget-cuts whatever's design-ready → ipm-weekly.md, fed by the pre-IPM design pass (/ipm step 3, run as /incept per candidate) and continuous pre-IPM staging via /stage (candidates accrue all week under ## Candidates, IPM folds them in) |
| Small releases | Continuous PR flow — ship small, ship often |
| Simple design | KISS principle from dev/guidelines.md |
| Testing | TDD — test plan before code, bats tests/ before push |
| Refactoring | /simplify after implementation |
| Pair programming | Claude + human via Slack escalation; pre-IPM design passes and focused implementation (Phase 3) run interactively, human at the keyboard, not via the unattended cron |
| Continuous integration | Pipeline verification on branch + nightly RCA via /rca, included as a classified digest in the standup message (Phase 1.2, *🌙 Nightly* section) |
| Collective ownership | All code through PRs with review |
| Sustainable pace | Weekly retro grades focus list; estimation-vs-actual self-corrects budget |
| On-site customer | Slack escalations for real-time decisions; P0 escape hatch preempts WIP |
<skills-root> placeholder, used throughout this document: every <skills-root>/X/Y.sh reference below means: take the "Base directory for this skill" value reported when this skill loaded (e.g. /home/ci/ccxp-skills/ccxp), drop the trailing /ccxp, and substitute that literal absolute path — never run these cwd-relative, and never cd into it. cwd must stay the working/target repo for the dev/TODO/, dev/JOURNAL/, git log, and $(pwd)/dev commands used elsewhere in this document — a /ccxp session's cwd is not guaranteed to sit anywhere inside the ccxp-skills checkout (a headless cron session's cwd is commonly the target repo instead)./ipm step 5b's ephemeral roadmap clone, which cds into its own throwaway directory for that phase only — not a case this preamble governs.) Before Phase 0's first command below, verify the substituted path is real and fail loudly if not:[ -x "<skills-root>/_gh/gh.sh" ] || { echo "ccxp: <skills-root> (<the literal path you substituted>) doesn't look like a ccxp-skills checkout — check the Base directory reported above" >&2; exit 1; }
bash <skills-root>/ccxp/scripts/ritual-job.sh channel standup|standup-id|alerts (SLACK_STANDUP_CHANNEL, else CCXP_SLACK_CHANNEL; SLACK_STANDUP_CHANNEL_ID; SLACK_AUTOMATION_ALERTS_CHANNEL_ID; exported, then the profile .env, then the repo .env).not configured (this covers 1.1a, 1.4, the Phase 0.5 summaries and escalations); never fall back to a default channel. The one exception is the 1.4 webhook fallback, bound to its own channel: with the standup channel unset, 1.4 skips the MCP send and goes straight to the webhook.slack_search_channels first (a value that already looks like an ID, C or G plus capitals and digits, is used as is). In cron, standup-id supplies the ID for webapi.sh thread-replies; its exit 3 makes the 1.4a read-back UNVERIFIED, not a stop. Use MCP (slack_read_thread) for the read-back when its tools are present (a persona job), else this token path.Pull the latest code and skills, prune stale refs, and clean up local branches whose remote is gone. This ensures the TODO backlog, guidelines, and skill definitions are current — and git branch doesn't accumulate stale t<id>-… branches from merged PRs.
bash <skills-root>/ccxp/scripts/ritual-job.sh skip-sync \
|| bash <skills-root>/ccxp/scripts/sync-and-prune-branches.sh # acts on the cwd repo (or --repo DIR)
skip-sync decides, so the one line above runs the sync only on sync (exit 10). skip (exit 0) means CCXP_CRON_MODE=1 in a linked worktree, which is how the ccxp-agent persona dispatches ritual jobs (it already fetched): no clone sync, no branch prune, no skills-repo fast-forward. Any other cron-mode worktree skips too; that is intended, a worktree's owner does its own syncing.
In a skipped job Phase 0.5 runs its numbered items 1 and 4 against the worktree (the list has no item 2) and skips item 3's reclaim sweep: it branches off and returns to main, which a linked worktree cannot check out. The next non-worktree tick sweeps.
Fast-forwards the working repo and the shared skills repo, then deletes local branches whose remote tracking ref is gone (PRs already merged + remote branch auto-deleted by gh pr merge --delete-branch) — inlining the /cleanup-branches skill workflow so the cron-driven ccxp run stays self-contained, no nested skill dispatch needed.
The --prune in its fetch step is the prerequisite for the branch cleanup — without it, [gone] markers don't appear, and the cleanup is a no-op. See ccxp/scripts/sync-and-prune-branches.sh for the full recipe.
If the project worktree has uncommitted changes (leftover from a previous session), stash or report them before pulling. If git pull --ff-only fails (diverged history), report and continue — don't force-reset.
Do NOT pull sibling repos here — that's /drive's Phase 1.5 responsibility (just-in-time refresh of the target repo, gated on safety checks). ccxp Phase 0 is scoped to the working repo + the shared skills repo only.
One cheap, idempotent prune keeps session-coordination state lean.
1. Resolved drive-thread escalations. /drive records Slack escalations in .claude/state/drive-threads.json (gitignored — local session state, never committed) and /slack-check-reply flips them to resolved: true once a reply lands. Resolved entries are dead weight: nothing reads them, but every /drive Phase 0.5 re-reads the whole file. Prune resolved entries older than 7 days (the grace window keeps recently-resolved threads scrollable):
bash <skills-root>/ccxp/scripts/prune-drive-threads.sh
Idempotent — a no-op on a clean file; a malformed file is left untouched (non-zero exit). Age is measured from resolved_at, falling back to sent_at; the work is done by _threads/threads.sh prune. Unresolved escalations and recently-resolved ones are always kept; the Slack channel (the standup channel) remains the canonical archive of historical escalations, so this file is only /drive's working index, not a long-term record.
_session/task_claim.sh) is heartbeat-free by design — a claimed_by: line on main is what lets a claim survive restarts, but a claim whose owning CC session died (crash / kill / reboot) is never released.status: In Progress, claimed_by: <dead session>, and peer-mode /todo next excludes it from every other session, so it silently leaks out of the backlog (this is the orphaned-claim cause behind the recurring "PR stranded under a stale owner" escalations).CCXP_PEER_MODE=0 opt-out — symmetric with the lock):bash <skills-root>/ccxp/scripts/reclaim-sweep-pr.sh
No-op (prints nothing, exits 0) when CCXP_PEER_MODE=0 or when the read-only detect pass finds nothing to reclaim — nothing branched, nothing committed.
Otherwise it branches off main, applies the sweep, runs the doc-lint guard, commits, pushes, opens a PR, and returns to main (never leaves the cron working tree on a branch), printing the reclaimed-lines summary and the PR URL on stdout.
Then /address-pr the new PR (pure status-change → auto-merge tier) and MCP-Slack each reclaimed line to the standup channel — a reclaimed task may have had real WIP, so a reclaim is never silent.
Detect-on-main → branch-only-if-work keeps the cron working tree clean.
The reclaim decision reuses the unit-tested task_claim.sh reclaimable primitive: a claim is freed only when status is In Progress/Review, claimed_by is session-shaped (either the current cc1- form or the legacy <sid>@<machine> form — a non-session value like a bare human name is never auto-reclaimable), there is no caller-observed in-progress GH Actions run on the claim's open PR branch, AND both activity signals exceed TASK_CLAIM_STALE_DAYS (default 2) — the last commit mentioning it on main (the relevant signal for a no-PR task) and the open PR's last activity (updatedAt: push/comment/review — the relevant signal for an open-PR task).
Open PRs are no longer auto-excluded (the old "any open PR ⇒ live" rule leaked dead-owner open-PR tasks forever; PR ownership is now derived from this same claim, so reclaiming the claim reclaims the PR).
Self-reclaim-guarded (never frees this session's own claim) and idempotent (a clean board emits nothing, branches nothing). See _session/reclaim_sweep.sh + tests/reclaim_sweep.bats.
(The prior soft-claim TTL layer this sweep supersedes — claim.sh/heartbeat.sh/prune.sh/release.sh + the 4 Project fields machine/clone_path/cc_session_id/last_heartbeat — was fully retired; prune.sh no longer exists.)
4. Claim-gap detection. The opposite failure mode from #3: a task whose status is In Progress but whose claimed_by was never set — the gap left by any path that flips status via _session/status.sh (board visualization only, no lock) without also calling task_claim.sh acquire (/ccxp Phase 2a.3, now /ipm step 3, was the confirmed live example — fixed above).
Detector only, never mutates:
bash <skills-root>/_session/claim_gap.sh
Only In Progress is flagged — Design/Review + empty claimed_by is NOT a gap (corrected 2026-08-09, after this detector re-Slacked the same 7-task list every tick for a day, half of them genuinely misclassified): an abandoned-but-real design/review is the normal resting state of an unclaimed backlog item — /todo next's peer-claim filter only skips a task when claimed_by is non-empty, so nothing is actually invisible to claim-based coordination there.
Verified live: 3 of a previously-flagged set of 4 Design-status tasks had simply never been claimed at all (claimed_by empty since their seed-migration commit, untouched since) — flagging those was the bug, not a symptom of one.
In Progress is different: a task mid-implementation with no claimant means someone flipped status without acquiring the lock, which IS a real coordination gap.
No-op (prints nothing) when every In Progress task is properly claimed, or when the flagged list is unchanged since the last call (dedup — the script now remembers the last-posted list's hash in a durable per-user, per-repo file under ~/.claude/state/claim-gap/, shared by every clone of the repo, and stays silent on a repeat).
Otherwise, log each unclaimed <task-id> … line and Slack the summary to the standup channel — same "never silent" principle as the reclaim sweep, since a genuinely new (or changed) gap is exactly the kind of coordination issue a peer session could step into.
See _session/claim_gap.sh + tests/claim_gap.bats.
Generate a daily progress summary by reviewing yesterday's work.
Collect the facts once, deterministically (--date defaults to today; yesterday is computed portably). One JSON document, each section independent — a failed read leaves its default and a .errors.<section> message, never an abort:
STANDUP_DATA="$(mktemp)"; bash <skills-root>/ccxp/scripts/standup-data.sh > "$STANDUP_DATA"
It covers items 1–3 and 5 below, the nightly runs (1.2.1), the mechanical PR-attention rules (1.2a), attribution (1.3a) and the epic rollup (1.3c).
Still yours: item 5b, reading the files it names (journal_yesterday, previous_summary, ipm_file, item 4/6/7), and any section listed in .errors (run that item by hand).
Git log: git log --since="yesterday 00:00" --until="today 00:00" --oneline --stat
PRs merged yesterday: bash <skills-root>/_gh/gh.sh pr list --state merged --search "merged:>=YYYY-MM-DD merged:<YYYY-MM-DD" --json number,title,mergedAt (use yesterday's date then today's date)
PRs opened/updated: bash <skills-root>/_gh/gh.sh pr list --state open --json number,title,updatedAt
Journal entries: Check dev/JOURNAL/ for files dated yesterday
Current drive-threads: bash <skills-root>/_threads/threads.sh list --unresolved for unresolved escalations. This is this clone's local view only (the file is per-clone by design); escalations posted from other clones or as plain channel messages are absent, so a standup that shows "0 open escalations" must say "in this clone's state" and cross-check live Slack before claiming none.
5b. Check for maintainer replies — MANDATORY every tick: run /slack-check-reply all.
/slack-check-reply discovers and reads.slack_search_public_and_private (NOT slack_search_public, which only sees public channels and returns nothing here) and slack_read_thread with the channel_id+ts.Previous ccxp summary: Read the most recent dev/JOURNAL/*-daily-summary.md for continuity (for continuity only — never let a prior note about Slack-unreadability suppress step 5b)
Current weekly focus: Read the current committed IPM — IPM_FILE=$(bash <skills-root>/_ipm/current.sh) (staging-aware: skips the future-dated pre-IPM staging stub /stage writes). If $IPM_FILE is empty, no IPM commit exists yet — note "No active IPM commit (IPM is opt-in — invoke /ipm directly if this repo wants one)" and skip the progress block in 1.2.
3 * * * *), the pre-flight gate (dev/daily-ccxp.sh) starts a session whenever there is a signal — but it sees only the signal, not whether the work is actually doable this tick.task-due/inflight-task/pr-activity signal but where every candidate turns out gated (peer-owned / VPN-not-clearable / maintainer-owned-fork) would otherwise pay a full Phase-1 standup + a per-tick doc PR for zero forward progress — the dominant residual spend (~$6–14/standup; see the cost note in dev/daily-ccxp.sh).It is a gate, evaluated here using checks 1.1 already gathered (plus two cheap peeks) — it never skips a mandatory check. A "cheap hold" requires all of:
/slack-check-reply all (step 1.1#5b, already run — mandatory, never skipped) returned nothing actionable.gh run list --branch main --created ">=<last-tick>", conclusions only — not a full Phase-1.5 RCA) shows no new failure./address-pr) already exited non-actionable (every open PR owned:/draft/blocked, nothing mine/free/untracked + mergeable)./todo next yields nothing workable: its top candidates are all peer-owned / external-blocked. This is the genuine-gate determination from Phase 3 ("VPN and the Workflow tool are tools, not walls"), not the reflexive "all gated" bail — each candidate maps to a concrete gate.Decide with the script, not by eye. Feed it the four counts from the checks above (an input you did not obtain: omit the flag — a check that did not run never justifies a hold); it prints DECISION=hold|full + REASONS= (the Friday test is built in, in the cron's America/Chicago frame):
bash <skills-root>/ccxp/scripts/cheap-hold.sh --replies <N> --nightly-failures <N> --drainable <N> --clean-leg <N> --note --why "<1-line why each top candidate is gated>"
Anything other than an explicit DECISION=hold (full, exit 2, no output) means fall through to 1.2. On hold the --note output after the blank line is the Slack note below; the script sends nothing — posting it stays with slack_send_message. Which counts are non-zero (is a candidate genuinely gated?) remains your judgment.
When the gate holds — cheap-hold action:
Post the compact, bulleted hold note (the script's --note text) to the standup channel, threaded under the day's
standup parent (discover it live, exactly as /slack-check-reply does —
slack_search_public_and_private for the latest "Daily Standup", reply with thread_ts).
Same scannability principle as the full standup's Weekly focus/Attribution/Blockers sections
(maintainer feedback, 2026-07-19) — a dense single line is still hard to read even when it's
short. Format:
*hold HH:MMZ*
• slack: 0 new
• nightly: green
• drainable PR: 0
• clean leg: 0 ({1-line why each top candidate is gated, e.g. "T298901 peer, T240817 external"})
Still one Slack message (slack_send_message with thread_ts) — "compact" means brief
content, not a literal single text line. Omit a bullet only if that check genuinely didn't
run this tick (don't pad with "N/A"); never collapse back to the ·-joined prose form.
Run the 1.4a completion check (read the thread back and confirm this note landed), then exit the tick — do not run 1.2–1.4 (full standup regeneration), do not open a per-tick doc PR. The day's dev/JOURNAL/YYYY-MM-DD-daily-summary.md (written by the day's first full standup) is the durable record; the standup Slack thread is the daily rollup (each hold tick = one reply). The mandatory Slack-reply + nightly checks already ran above — nothing safety-critical is skipped.
Why Slack-thread, not a doc append: main requires a PR for any doc change, so appending a ## Hold ticks line to the daily-summary would still cost one doc PR per tick — the very churn this removes; and the cron wrapper restores main between sessions (restore-default-branch), so a rollup can't accumulate locally across ticks.
The Slack thread is already the canonical archive of session activity, so it is the rollup.
This is a hold-tick optimization, not a work-skip. If any gate input is non-clear — a reply landed, a nightly red, a drainable PR, or a genuinely workable task — fall through to the full standup (1.2 onward) and do the work.
The first full standup of the day always runs (the daily-floor signal guarantees it), so the day always has its summary doc; cheap holds only collapse the subsequent all-gated ticks.
Addendum ticks (the common in-practice middle ground) still owe 1.2.2a. In practice, a non-hold intra-day tick rarely re-runs the entire 1.2–1.4 sequence from scratch — it appends a ## Standup addendum (HH:MMZ) section to the day's existing dev/JOURNAL/YYYY-MM-DD-daily-summary.md via its own small PR, recording just what changed this tick (new failure classified, PR merged, etc.), rather than regenerating the whole doc.
An addendum tick owes 1.4a too: post the addendum to the standup thread, read it back, and confirm the doc PR merged before the tick ends.
That's a reasonable, established pattern — but an addendum that classifies a new nightly failure is still doing Phase 1.2's job for that failure, so it must still run 1.2.1a/1.2.2a (find the original alert post, reuse or reply with the RCA) before the tick is done — recording the reply outcome in the addendum the same way 1.2.4 does.
Skipping straight from "classified in the addendum" to "done" reproduces the exact gap 1.2.2a exists to close (confirmed live: a recurring known-flaky-check failure was classified and journaled in an addendum, but no RCA reply ever reached the original alert thread — caught only because a human checked the alert directly).
Between-iterations weekday note (Component 2 — decided "not worth it"). A separate wrapper-side weekday throttle for "between-iterations" hold-days was considered and rejected: the pre-flight actionability gate (
dev/daily-ccxp.sh:497) already skips a no-signal weekday tick, and this Phase 1.0 short-circuit handles the fired-but-gated case more precisely than a blunt calendar throttle. Re-introducing a weekday throttle would re-add the calendar-gating complexity the 2026-06-27HOLDDAY_THROTTLE=0decision deliberately removed.
(Slot formerly "1.2 (Removed)" — zombie session-claim pruning + Project-mirror sync, retired alongside the _claims/ coordinator; one-session-per-clone made it unnecessary. This is unrelated, newer content reusing the freed number.)
main are healthy. Run RCA on any failures, create tasks for real bugs.Lookback = yesterday through now. standup-data.sh already listed all runs on main in that window (not just failures — the total feeds the health summary) as .nightly = {total, failures[{id,name,createdAt}]}, using --limit 100.
A recurring single-workflow failure must never fall off gh's default 20-run page, so never lower that limit — the small over-fetch is the cost of never hiding a recurrence. If .errors.nightly is set, list the runs by hand (_gh/gh.sh run list --branch main --created ">=<yesterday>" --limit 100 --json databaseId,name,conclusion,createdAt) and never report "all green" from a failed read.
If .nightly.failures is empty, record "Nightly runs: all green ({N} runs checked)" and proceed to 1.2a.
Single-workflow recurrence safety-net:
--limit 100makes a dropped recurrence very unlikely, but the count is still a global page across all workflows./rca's own "has it happened before?" check (Step 4) sidesteps the busy-window problem entirely by querying per workflow (run list --workflow <name> --limit 5), so once a failure is being RCA'd its recurrence history is robust regardless of this page size.
/labrun-rca) already answered is not analysed twice.slack_read_channel on a window covering the run's time and match the run id in the message text and its blocks/attachments (a Block Kit alert carries the run link only in a button); without MCP use _slack/webapi.sh find-by-text "$SLACK_AUTOMATION_ALERTS_CHANNEL_ID" "actions/runs/<run-id>" (needs SLACK_BOT_TOKEN). Read its replies the same way (slack_read_thread, or webapi.sh thread-replies), one line per reply: ts, a TAB, then the text with newlines replaced by a space (or a literal \n).printf '%s\n' "$REPLIES" | bash <skills-root>/ccxp/scripts/ritual-job.sh rca-reuse --now "$(date +%s)" --live-job no # reuse<TAB><class><TAB><task-id|none> | wait (11) | run-rca (10)
reuse: record the per-failure line from it (classification, task id; the fields are tab-separated) and skip /rca for that run; the reply is already there, so 1.2.2a posts nothing.--live-job yes instead when a background job for this alert is known to be running (a persona alert-check job you can see in its job list): a stale ack then still waits.wait (exit 11): an RCA is in flight (a fresh "Running RCA" ack, under 60 minutes): record RCA in flight for that run, run no /rca and post nothing; the next tick re-checks.run-rca, or no alert found: run 1.2.2 for that run, then post the reply in 1.2.2a.SLACK_BOT_TOKEN/SLACK_AUTOMATION_ALERTS_CHANNEL_ID: skip this step with the note 1.2.1a skipped: no Slack access and run 1.2.2 for every failure.For each failed run that 1.2.1a did not answer with reuse, invoke /rca <run-id>. The rca skill will:
dev/TODO/ if actionable (Our code, Upstream, Configuration, or recurring Transient)Record one line per failure (workflow name, run ID, classification, task ID if one was created) as you go — 1.2.4 and 1.3/1.4 (the standup doc + Slack message) all consume this list, and re-deriving it after the fact means re-reading every RCA report.
The ./.github/actions/slack-notify composite action in synxdb-build-pipeline fires an immediate, unclassified alert to the alerts channel for a subset of release/build workflows the moment they fail on main (not every workflow on main — see 1.2.5's note).
Until now, whoever's watching that channel saw only the raw "build failed" ping and a lone :eyes: reaction — the classification, task ID, or "this is a known issue" only ever reached the standup digest (1.2.4 → 1.4) in the standup channel, a different channel.
Design rationale: anyone watching the alert itself should see the RCA there too, not have to cross-reference the standup. For each failure just classified in 1.2.2 whose alert was found in 1.2.1a:
Two transports. With the Slack MCP (a persona job, an interactive session) use slack_send_message; in a cron/headless tick, which has no MCP, use _slack/webapi.sh with the bot token. Pick MCP when its tools are present, else the token path.
The token path requires SLACK_BOT_TOKEN and SLACK_AUTOMATION_ALERTS_CHANNEL_ID (ritual-job.sh channel alerts). With neither MCP nor the token, skip 1.2.2a with a one-line note (1.2.2a skipped: no Slack access) recorded next to the per-failure line; it doesn't fail the tick.
Finding the alert and the already-replied check happen in 1.2.1a, before 1.2.2; only runs that came back run-rca (or had no alert) get a reply here.
Post the reply. Reuse labrun-rca's Step 5 format exactly (error / root cause / classification / impact / action / log link). Don't invent a second format here — this automated path and a manually-pasted permalink through /labrun-rca are two entry points to the same behavior, and should read identically to whoever's watching the thread:
bash <skills-root>/_slack/webapi.sh post "$SLACK_AUTOMATION_ALERTS_CHANNEL_ID" "<RCA text>" "<matched .ts>" # MCP: slack_send_message with thread_ts
Record the outcome next to the per-failure line from 1.2.2 (replied in thread / no matching alert / 1.2.2a skipped: no Slack access; already replied and RCA in flight come from 1.2.1a) — 1.2.4 surfaces a miss so it stays visible rather than silently dropped.
If any new tasks were created in dev/TODO/:
/gcpr nightly RCA — new tasks from failed runsIf no tasks were created (all failures were transient or infrastructure), skip this step.
Hold onto this tick's nightly-health facts — do not write them to a file yet; 1.3 renders them as the initial ## Nightly health section of the daily summary (the doc doesn't exist until 1.3, since this step now runs first):
*🌙 Nightly* section) — no second post needed.slack-notify composite action's alert, unchanged: that action fires an immediate, unclassified "build failed" ping at CI-failure time for a handful of release/build workflows and doesn't cover every workflow on main (e.g. Upstream Sync); expect some nights to see both a same-night raw alert from the slack-notify action and this tick's classified summary in the standup — they answer different questions ("is it red right now" vs. "what actually broke and is someone tracking it").Not every open PR needs a human — most are either actionable (Phase 0 will drain them in due course) or simply waiting on their own CI. Flag a PR here only when it's stuck on something this loop can't resolve by itself, so the section stays a short exceptions list, not a full PR roster.
standup-data.sh already fetched open PRs with body + mergeability and applies the three mechanical rules below as .attention[{number,title,reasons[]}] (a PR's task is resolved via _session/pr_task_id.sh, unresolved entries from _threads/threads.sh list --unresolved). The fourth rule (CI) needs run history — apply it yourself and pass the full list as attention in the judgment file.
Flag a PR as needing attention when any of:
- [ ] pre-merge item whose text names a human decision (case-insensitive maintainer, your call, decision, approve, escalation) — the shape of a real incident: weeks open on a "maintainer release-strategy call ... no reply yet" item. (script)mergeable is CONFLICTING. (script)<id> or <id>-pr<N>). (script)failure for 2+ consecutive checks (not a transient one-off that's likely to clear on retry). (you)For each flagged PR, record: PR number, title, and the one-line reason it's flagged (which condition above matched). Anything not flagged is left to Phase 0's normal drain — don't list it.
Run the /todo next logic (same walk that skill documents: queue order top-to-bottom, skipping blocked / peer-claimed / lint-frozen candidates) to get the top 5 actionable tasks. This is the same computation /ipm step 2 does when it's invoked — reuse it here for the daily glance; this call reports only, commits nothing.
CCXP_PEER_MODE=0): ccxp runs as a parallel peer alongside interactive sessions (even ones sharing GitHub state), coordinated by the durable claimed_by: task-claim lock on main (_session/task_claim.sh)./drive, which claims its task before working, so two sessions pick up different tickets and never race.CCXP_PEER_MODE=0 to restore the old one-session-per-clone global hold.Write the judgment the scripts must not decide into a JSON file, then render. Four sections carry the real content: Resolved, Nightly, Attention and Top 5; everything else is supporting context.
STANDUP_JUDGMENT="$(mktemp)" # write it (keys below), then:
bash <skills-root>/ccxp/scripts/render-standup.sh "$STANDUP_DATA" "$STANDUP_JUDGMENT" --format journal > dev/JOURNAL/YYYY-MM-DD-daily-summary.md
Judgment keys (full schema in the script header; all optional except top5):
resolved[{pr,text}] — one highlight per merged PR, not just a number/title: "<…|Tid> — what it does or fixes, and why it mattered, one line" (the renderer appends (PR #N)). Draw it from the task's ## Closed section when the task/journal entry resolves (richer than a PR title); a PR with no entry falls back to its title.nightly_failures[{run,classification,task_link,task_id}] — one per failed run in .nightly.failures (from 1.2.2's recorded lines); a missing one is an error (exit 4), not a guess. alert_replies{posted,no_alert,already} from 1.2.2a.attention[{pr,title,why}] — only to add the CI rule on top of .attention; absent means use the script's list.top5[] — from 1.2b (/todo next's top 5, reporting only): "<…|Tid> — one-line what + why it's next".weekly_focus{shipped,total,in_flight,not_started,trend,table} — from the IPM table; omit when ipm_file is empty (IPM is opt-in). trend is On-track / Slipping / At-risk from remaining days vs remaining cumulative estimate.links{<thread key>: "<…|Tid>"} — mrkdwn links for Blockers.retro_gap — Friday ticks only: pass the line from bash <skills-root>/_session/retro_gap.sh verbatim (omit when silent). Detector only; Phase 2b still runs /retro.Three optional sections come from standup-data.sh's dimensions (read-only, CCXP_CRON_MODE=1 safe), each omitted when empty: Today (when today or overdue), Waiting on (tasks Blocked by person:<alias>, grouped by alias, with days since the last edit) and Events this week (type: event within 7 days, by date). They render after Top 5 next; the trim ladder drops them at its last level.
The journal doc renders Resolved, Nightly health, PRs needing attention, Top 5 next, Epic progress (verbatim epic-status.sh render; never omitted), Weekly focus progress, Task attribution by location (omitted on a no-data day), Open escalations and Housekeeping. A failed data section renders "unavailable", never as a clean answer. To act on an epic rather than report it, see /epic.
"Today's plan" is retired — the Top 5 next section supersedes it (item 1 is today's plan); keeping both would just duplicate the same ranking under two headings.
Render the ## Task attribution by location section from the attribution helper
(_session/attribution.sh). It buckets task counts by the
claimed_by: cc1-<machine-id>:<path-hash> identity and labels each location
ccxp / interactive / unattributed, so the maintainer can see how much
shipped from the autonomous cron loop vs interactive sessions:
# Default window = yesterday (matches the standup "Yesterday" frame).
bash <skills-root>/_session/attribution.sh table "$(pwd)/dev"
## Task attribution by location heading.claimed_by from git
history, because task_claim.sh clears it at close (so a JOURNAL stub's live
frontmatter is empty). In-flight (dev/TODO) tasks use the current claim.ATTRIBUTION_CRONTAB_CCXP_PATHS (colon-separated clone
paths) — required config, no baked-in default; set it in
~/.claude/.env to the cron clone the dev/daily-ccxp.sh working tree runs
from (see README Prerequisites). Add another autonomous box's clone path to
the env var to label it ccxp too. Unset means every location classifies
as interactive — a cosmetic degrade, not a failure.main until a fix-PR lands..md this tick is actually about to commit — lint-docs.sh requires an explicit path and is check-only (it replaced the bare/default-scope --fix call this used to make, after it hit an EACCES running unscoped against the full 1509-file repo glob):CHANGED_MD=$(git status --porcelain | awk '
substr($0,1,2) ~ /D/ { next } # deleted — nothing to lint
{ line=substr($0,4); sub(/.* -> /, "", line); print line }
' | grep -E '\.md$' || true)
if [ -n "$CHANGED_MD" ]; then
# shellcheck disable=SC2086 # word-splitting is intended: one path per changed file
bash <skills-root>/_docs/lint-docs.sh $CHANGED_MD \
|| echo "::warning::lint-docs: markdown issues remain — CI Markdown Lint will gate"
fi
Check-only: a violation surfaces loudly but does not block (the PR's Markdown Lint check is the
authoritative gate) — same policy gcpr/SKILL.md Step 1.5 already uses (this is the same
$CHANGED_MD recipe, reused here for the ad-hoc standup-commit path that bypasses /gcpr).
bash <skills-root>/ccxp/scripts/epic-status.sh render
Paste the output verbatim under the ## Epic progress heading in the daily
summary (see 1.3's template). The script degrades gracefully — see its own
fail-quiet notes — so this call never blocks the standup and never needs a
try/catch here.
Send daily summary to the standup channel via MCP slack_send_message.
Webhook fallback on MCP send failure. slack_send_message has shown
chronic intermittent MCP error -32603: Internal Server Error failures — a 7-consecutive-day
miss streak on the daily standup, 2026-07-30 through 2026-08-05. Don't let a failed send silently drop the day's standup from Slack:
If slack_send_message is not available (tool absent from the toolset or unauthenticated — the
headless cron case), skip straight to step 2 — no attempt, no retry. Otherwise attempt it once, then
one retry on error — per the design decision ("don't loop retries in a single session — 2 attempts
is enough evidence per occurrence"). Looping past that second attempt is not warranted.
If the tool is unavailable or both attempts error, fall back immediately to the wrapper around the
script the /slack skill's dev channel uses (routes to whichever channel SLACK_WEBHOOK_URL_DEV is bound to).
It prints a one-line status, appends it to the journal file, and exits 1 on failure (it can't
rely on slack-send.sh's exit code — that exits 0 on a webhook 404):
STANDUP_MESSAGE="$(cat <<'EOF'
<the *Daily Standup* (YYYY-MM-DD) mrkdwn block composed above>
EOF
)"
bash <skills-root>/slack/scripts/slack-fallback.sh --journal dev/JOURNAL/YYYY-MM-DD-daily-summary.md "$STANDUP_MESSAGE"
Requires SLACK_WEBHOOK_URL_DEV resolvable via the same three-tier lookup slack/SKILL.md's
Prerequisites documents for every webhook var: an already-exported env var, then
~/.claude/.env (machine-global, recommended), then the working repo's own .env
(see your own repo's secrets-rotation docs for how that's provisioned, e.g. 1Password-routed).
Record which path succeeded in that day's dev/JOURNAL/YYYY-MM-DD-daily-summary.md
Housekeeping section (Posted via MCP vs. Posted via webhook fallback — MCP unavailable); the
wrapper already appended the webhook line, so only add the MCP line yourself. If the summary was
already committed, include that line in a follow-up doc commit rather than leaving it uncommitted.
Known limitations of the webhook path — accept, don't block on:
SLACK_WEBHOOK_URL_DEV's other consumers already have).ts, so this session can't thread a same-tick reply
directly onto the post it just sent. /slack-check-reply's live
slack_search_public_and_private discovery is unaffected — a webhook-posted message is
searchable and repliable-to like any other once found — so next-tick reply-checking still
works; only this tick's immediate self-threading is unavailable.If both the MCP send and the webhook fallback fail, never stay silent: the wrapper has already
written - Slack post FAILED: <reason> to the journal; also state it in the session output
(final report) so it's visible in the cron log. Something's wrong beyond the known MCP flakiness.
/ipm step 6 (Weekly Focus) — the two sends across this file and /ipm that fire unconditionally on their cadence (daily / weekly).slack_send_message call sites (Phase 0.5's reclaim-sweep and claim-gap summaries in this file, /ipm step 5b's ROADMAP-failure escalation) are conditional — they post only when something's already been found — so an occasional miss there is lower-stakes than losing a guaranteed daily/weekly notification.*hold HH:MMZ* header, the Standup addendum (HH:MMZ) title, or for a full standup its Daily Standup (YYYY-MM-DD) title.slack_read_thread, or bash <skills-root>/_slack/webapi.sh thread-replies <channel_id> <parent_ts> in cron) and require a message carrying this tick's marker (above).
ts and the post lands in the channel, not the thread: verify it with bash <skills-root>/_slack/webapi.sh find-by-text <channel_id> "<HH:MMZ marker>", or accept the fallback script's exit status as the verification.Slack post UNVERIFIED (HH:MMZ) in the session output and the day's journal doc./address-pr <n> run to completion), not merely opened.Render every task reference as a clickable link. Resolve each task ID through the sidecar helper so the maintainer can jump straight to the task file on GitHub:
source <skills-root>/_taskid/url.sh
taskid-slacklink T20260427-298901 # -> <https://github.com/…/blob/main/dev/TODO/T…-….md|T<id>>
taskid-slacklink T20260427-298901 --issue # -> link to the stable issue instead of the file
dev/{TODO,PARKING,JOURNAL}/ in the cwd repo (map-free), so the link points at the task's current path even after it moves TODO → JOURNAL on close; unresolvable tasks fall back to a code-search link.<url|text>, not [text](url) (which renders literally). Build each link with taskid-slacklink and drop the <…|Tid> string straight into the message; never paste a bare T… ID.Render the message from the same two files (epic lines come from the data file; do not compose the template by hand):
STANDUP_MESSAGE="$(bash <skills-root>/ccxp/scripts/render-standup.sh "$STANDUP_DATA" "$STANDUP_JUDGMENT")"
*Daily Standup* (YYYY-MM-DD) block: Resolved, Nightly, Needs your attention, Top 5 next, then the optional Epic progress / Weekly focus / Attribution blocks (each omitted when it has no data), then Blockers. The five headline sections (Resolved, Nightly, Needs your attention, Top 5 next, Blockers) always render with their None/Nothing/all-green fallback — a missing one reads as broken, not empty.--max-chars defaults to it. The renderer trims in the documented order (one line per highlight and the first reason per PR, then the whole Attribution block). If it still exits 5 (too long), shorten the judgment text and rerun — never truncate mid-sentence.CCXP_CRON_MODE=1, persona ritual job)No step waits on a human in a ritual job:
/gcpr + /address-pr run to completion; a PR that is not mergeable (CI red, review pending, approval needed) stays open and is named in the standup's attention section.not configured (see Channels above)./routine run standup (the persona's dispatch): the runner does done/release from the step outcome, so do not call ritual-due.sh yourself; record a partial run as a failed step with the reason in its note./ccxp agent inside the job, is ritual-due.sh --repo <session repo> done <ritual> <key> (agent-pairing/rituals.md).ritual-due.sh release <ritual> <key> instead of done, so the ritual is due again at the next check; done is only for a run that finished. A read-back that was impossible only because no channel ID is configured (UNVERIFIED) does not make the run partial when the post itself succeeded: report done and keep the UNVERIFIED note, so the standup is not posted twice./ccxp's automatic sequence, in either cron or interactive mode. The mandatory Monday budget-cut ceremony was retired: continuous /todo next + /drive off dev/TODO/queue.md's existing priority order is the documented day-to-day planning loop (it never required a weekly ceremony to pick the next task)./ccxp does not check the day of week to decide whether to run /ipm, and never calls it itself./ipm remains a fully-functional, standalone skill for a repo that wants an explicit weekly iteration commit snapshot. Invoke it directly, any day: /ipm (see ipm/SKILL.md). It reads CCXP_CRON_MODE from the environment itself, so a cron-spawned session that chooses to call it still gets the interactive-only pre-IPM design pass (step 3) skipped correctly — no extra plumbing needed here.
(Historical note: this phase used to trigger only on Monday via a TZ=America/Chicago date +%u check, pinned because the crontab sets CRON_TZ=America/Chicago while the spawned shell inherits the server timezone. That trigger is dead code now that nothing calls this phase automatically; kept here only in case a repo wants to reintroduce a day-gated cron call to /ipm itself.)
Trigger: Only when today is Friday in the cron's reference frame — TZ=America/Chicago date +%u = 5. Skip on all other days. (See Phase 2a for the rationale — same CRON_TZ vs server-TZ mismatch applies.)
Run /retro before starting any focused work. This ensures the weekly retrospective happens reliably — /drive runs in continuous mode and doesn't return control, so retro must run first.
/retro to generate the weekly retrospectiveipm-weekly.md: shipped / in flight / partial / dropped, plus estimate-vs-actual deltas, and any delivered-but-not-planned closuresdev/TODO/dev/JOURNAL/dev/EPICS/E*.md directly (no hub repo, no ephemeral
clone) — member lines use the link form (bash <skills-root>/_taskid/epic-links.sh add E<n> T<id>, then sync) — and fold the change into the retro's own commit/PR. This is the
only write path for the epic files — Phase 1.3/1.4's daily render stays
strictly read-only. Skip silently when there's nothing to propose; never
block the retro on this step.If a Friday session is missed, the next Friday's retro covers the gap (it always looks at the last 7 days).
CCXP_CRON_MODE=1CCXP_CRON_MODE=1, ccxp ends its run after that day's rituals (Phase 1/1.5/0.5, +2b Friday) — do not invoke /drive. Implementation work is reserved for interactive sessions (a human running /ccxp or /drive directly, where CCXP_CRON_MODE is unset/0).Invoke /drive and monitor it. /drive runs in continuous mode (complete task → pick next → repeat), but it can exit for several reasons. ccxp supervises and re-invokes as needed.
Invoke: Run /drive (no arguments — let it auto-pick via /todo next). On Fridays, retro action items are already in the backlog and will be picked up naturally.
Pick and work the task — do NOT pre-empt /drive with a "supervise, nothing's actionable" triage. /drive's /todo next does the picking; your job is to let it run, not to hand-filter the backlog down to "no clean leg" and bail to "supervise." (Audit 2026-06-27: of 16 due-now Open tasks, 12 had an autonomous path — the "all gated" posture was wrong on ~10 of them.) Two capabilities the headless cron HAS — treat them as tools, never as walls that justify "supervise":
A company VPN is a tool, not a wall. A task whose only blocker is a company-internal VPN-gated resource (an internal GitLab/registry, inspecting internal source, mirroring an internal image, filing an internal MR) is often still doable headless — connect via whatever VPN mechanism your team provides and use the appropriate credential/token over HTTPS. Do NOT reflexively classify such a task "VPN-gated → supervise."
The Workflow tool is the substantive-work path — ultracode is NOT required. Phase 3.1 of /drive drives design→implement→test as a sequential Workflow, which runs fine headless. Do NOT defer a substantial task to "supervise" for lack of ultracode.
A task is genuinely not an autonomous cron leg ONLY when it: needs a real production release build, or a workflow whose failure posts to a public/product Slack channel; is claimed by another clone (peer-owned); is external-blocked (org-admin / upstream-vendor-tag the VPN can't clear); or is genuinely multi-session-large.
Everything else — BATS / script / config / docs work, and any VPN- or Workflow-clearable task — is fair game: pick it, don't park it.
Peer mode (default; CCXP_PEER_MODE=0 to disable): do not hold Phase 3 just because an interactive claude session is alive on the box.
Run /drive normally — its peer-mode claim (_session/task_claim.sh acquire, the claimed_by: lock on main) guarantees it picks a task no other live session holds, so ccxp and the human work different tickets concurrently.
The only tasks ccxp skips are those another session has actively claimed (or that it can't claim because the claim-PR conflicts — it re-picks). Set CCXP_PEER_MODE=0 to restore the old one-session-per-clone global HOLD.
Monitor and re-invoke: When /drive returns control, check why:
| Exit reason | ccxp action |
|---|---|
| Task completed + no unblocked tasks remain | Report "All tasks clear." Wait. |
| Task parked + no other unblocked tasks | Report parking lot status. Wait. |
| Escalation sent (design decision, blocker) | Report escalation. Wait for reply (via /slack-check-reply). Re-invoke /drive once resolved. |
| Error or unexpected exit | Diagnose: read the last tool output, check git status. If recoverable (e.g., transient API error, merge conflict), fix and re-invoke. If not, slack the user and stop. |
| Context budget exhaustion | Report progress so far. The next cron invocation picks up where this left off. |
Safety valve: After 3 consecutive re-invocations without completing a task, stop and slack the user — something is stuck.
A long-running ccxp child at 0% CPU is not proof of hang. ccxp sessions often emit an intermediate "Session summary" + DONE-looking line mid-run, then go silent for 60–120 min, then do 10–20 more turns before the real final DONE. Killing on the intermediate signal wastes the user's attention and discards real work.
Before escalating, verify with log-activity age — not just DONE markers. tail -F the day's log and check whether new lines (TOOL, text, SESSION) are still landing.
| Signal | Interpretation |
|---|---|
| PID alive + new log lines in last 30 min | Working. No action. |
| PID alive + silence < 3h + last line is DONE or "Stopping here" | Probably still working — wait, do not slack. |
PID alive + silence ≥ 3h + no external event expected (no open pipeline, no slack-reply gate, no /loop tick) | Plausibly hung. Verify FDs/network before escalating. |
| PID alive + silence ≥ 3h + 0% CPU throughout | Slack with kill command. |
| PID dead | Wrapper handles on next cron tick. No action. |
Expected long-silence patterns (don't call these hung):
/loop tick interval (silent between ticks by design).The decision rule is log-activity age + intermediate-vs-final DONE, not CPU%. CPU drops to 0% any time the agent is sleeping between tool calls — that's normal idle, not a hang.
This table describes the cron-mode (CCXP_CRON_MODE=1) schedule — what
dev/daily-ccxp.sh actually drives. An interactive /ccxp or /drive
invocation (CCXP_CRON_MODE unset/0) runs the pre-IPM design pass and
Phase 3 normally, any day, regardless of this table.
| Day | Phase 0 (sync) | Phase 1 (standup, incl. 1.2 nightly RCA) | Phase 2a (IPM) | Phase 2b (retro) | Phase 3 (focus) |
|---|---|---|---|---|---|
| Mon | Pull both repos | Normal (with ipm-weekly block — references the most recent committed /ipm focus, if any; checks last night's runs) | Skip (opt-in — invoke /ipm directly if this repo wants one) | Skip | Skipped (cron mode) |
| Tue–Thu | Pull both repos | Normal (with ipm-weekly block; checks last night's runs) | Skip | Skip | Skipped (cron mode) |
| Fri | Pull both repos | Normal (with ipm-weekly block; checks last night's runs) | Skip | Run retro | Skipped (cron mode) |
| Sat–Sun | Pull both repos | Normal (with ipm-weekly block; checks last night's runs) | Skip | Skip | Skipped (cron mode) |
The dev/daily-ccxp.sh script is the cron wrapper for this skill. It:
.env for secretsclaude --dangerously-skip-permissions -p /ccxp with CCXP_CRON_MODE=1
in the environment — restricting the session to standup, nightly
health/reclaim housekeeping, and the Friday
retro (see "Cron mode vs. interactive mode" above). The Monday IPM (opt-in,
invoked directly via /ipm when a repo wants it), the pre-IPM design
pass, and Phase 3 focused work are reserved for interactive pairing
sessions and never run under this wrapper..claude-ccxp-logs/Crontab entry — hourly, pinned to Chicago wall-clock so the Friday-retro day-of-week trigger fires in the cron's reference frame (see Phase 2b):
CRON_TZ=America/Chicago
3 * * * * /path/to/repo/dev/daily-ccxp.sh
/ccxp session starts only when the token-free pre-flight actionability gate finds a signal (daily-floor / PR-activity / CI-failure / due-or-in-flight task), and a fired-but-all-gated tick is made cheap by the Phase 1.0 cheap-hold short-circuit (above).HOLDDAY_THROTTLE=1 re-enables a weekend cadence throttle if weekend spend ever spikes again (disabled by default since 2026-06-27 — the root cause was an over-conservative Phase-3 triage, now fixed). See dev/daily-ccxp.sh./retro skill notes — the retro exists to improve the process, not to report status.dev/guidelines.md before making changes — this rule cascades from /drive./drive — all Slack escalations go to the standup channel via MCP slack_send_message.scripts/cheap-hold.sh (opens in a new tab)scripts/epic-status.sh (opens in a new tab)scripts/prune-drive-threads.sh (opens in a new tab)scripts/reclaim-sweep-pr.sh (opens in a new tab)scripts/render-standup.sh (opens in a new tab)scripts/ritual-job.sh (opens in a new tab)scripts/standup-data.sh (opens in a new tab)scripts/sync-and-prune-branches.sh (opens in a new tab)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