一键导入
ap2
Check status + recent work of an ap2 daemon for a specific project (board state, daemon liveness, recent events, recent commits, last task summary).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check status + recent work of an ap2 daemon for a specific project (board state, daemon liveness, recent events, recent commits, last task summary).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when operating an ap2 board — running an `ap2 <verb>` operator-CLI command (start/stop/status/add/approve/unfreeze/rollback/cron/sandbox/…), or reaching for an `autopilot` custom MCP tool (`report_result`, `board_edit`, `operator_queue_append`, `cron_propose`, …) from an agent toolset.
Use when configuring an ap2 daemon — discovering or tuning an `AP2_*` environment knob, authoring `.cc-autopilot/config.toml` keys (`[core]` / `[components.*]` / `[agent_backends]`), or setting up the Codex agent backend.
Use when authoring or revising an ap2 project's `goal.md` (Mission / Done-when / Current focus / Non-goals / Constraints, the delete-test, and the TB-161/TB-164/TB-235 queue-time validators) or running the retrospective `ap2 audit` review of what shipped after a walk-away window.
Use when inspecting ap2 event types, the events.jsonl timeline, prose-judge verification diagnostics, `ap2 logs` / stats-dashboard output, or the `ap2 status` components block (which subsystems are wired and their on/off state).
Use when an ap2 daemon hit trouble — a task failed / froze / retry-exhausted, the daemon restarted with an Active task, a pipeline or agent crashed, the watchdog went quiet, or you need to intervene (`ap2 unfreeze` / `ap2 delete`) or answer 'why did TB-N fail / what just happened?'.
Add a task to an ap2 sandbox project's Backlog by authoring a briefing markdown file and passing it to `ap2 add --briefing-file` (locks TASKS.md, issues a fresh TB-N, no ID collisions). Auto-detects whether to run as the sandbox user directly or escalate via sudo from the main user. Also the operator-facing reference for the task-agent contract, authoring `## Verification` bullets (the `Prose:` prefix + the four shell-bullet pitfalls), and `ap2 classify` impact verdicts — mirroring the daemon-canonical authoring rules in `ap2/ideation.default.md`.
基于 SOC 职业分类
| name | ap2 |
| description | Check status + recent work of an ap2 daemon for a specific project (board state, daemon liveness, recent events, recent commits, last task summary). |
| user_invocable | true |
ap2
One-command snapshot of an ap2-driven project: is the daemon alive, what's on the board, what did it do lately, what's the last task summary.
/ap2 <project>
<project> is either:
stoch → resolved to ~$AP2_SANDBOX_USER/repos/<name> (AP2_SANDBOX_USER defaults to claude-agent — the canonical sandbox layout from the runbook)..cc-autopilot/ in it.If no argument is given, list projects under ~$AP2_SANDBOX_USER/repos/ and ask which one.
Resolve PROJECT_ROOT from the argument (see Usage). The paths below are relative to that root. To resolve the sandbox home, use eval echo "~${AP2_SANDBOX_USER:-claude-agent}".
Run all reads as the human user (you), not the sandbox user — state files in the sandbox clone are group-readable (staff on macOS, the daemon's primary group on Linux) so no sudo is needed. Exception: ap2 status needs sudo because it resolves through the daemon's PID file and may check via process inspection; prefer to compute daemon state manually instead (see below).
TASKS.mdCount task lines under each section. Output:
board: <A>A / <R>R / <B>B / <P>P / <C>C / <F>F
The five sections are Active, Ready, Backlog, Pipeline Pending (TB-103 long-running pipelines), Complete, Frozen — match the order ap2 status itself prints.
Use: grep or a small awk pass. Don't invoke ap2 status for this — more robust and avoids sudo.
.cc-autopilot/daemon.pidRead the PID file. Then ps -o pid,etime,command -p <pid> to confirm the process is alive and show uptime. Output:
daemon: running (pid <N>, up <ETIME>) OR stopped (stale pid file / no pid file)
.cc-autopilot/events.jsonlShow the last 10 events of interesting types (task_solve, task_verify, task_complete, task_error, task_timeout, retry_exhausted, backlog_auto_promoted, cron_complete, ideation_empty_board, ideation_complete, ideation_error, ideation_timeout, daemon_start, daemon_stop, daemon_pause, daemon_resume, task_unfrozen, task_deleted, operator_queue_append, operator_queue_drained, mattermost*). Skip noisy cron_start. (TB-385 renamed the per-task lifecycle verbs to task_solve → task_verify → task_complete; pre-TB-385 history still carries the old task_start / verify_passed / judge_call names, which readers accept alongside the new ones — don't read them as malformed in older ap2 events output.) Format one line per event:
<ts> <type> <key=val key=val...>
Keep summaries truncated to ~120 chars.
git -c safe.directory='*' -C PROJECT_ROOT log --oneline -5The real record of what shipped. Daemon commits carry task IDs in subject lines. The safe.directory='*' flag is required: the repo is owned by the sandbox user, so git refuses to read it from a different user without it.
.cc-autopilot/progress.mdprogress.md is oldest-first (tasks append at the bottom). Print the LAST ## [timestamp] section, not the first. Caps at ~40 lines.
awk '/^## \[/{start=NR} {lines[NR]=$0} END{for(i=start;i<=NR;i++)print lines[i]}' .cc-autopilot/progress.md | head -40
If the latest progress entry is much older than the latest task_complete in events.jsonl, flag it — means the daemon's task agents have stopped appending to progress.md.
Write a 2-line summary at the top of the output:
<project>: <daemon-status>; <board-counts>; last task <TB-N> at <ts> (<commit>)
open issues: <retries/errors from last 50 events, or "none">
If the daemon is up, also surface (one line each, only when present):
web: http://127.0.0.1:<port>/ — the bundled read-only UI URL (TB-130). The daemon prints this line in ap2 status whenever AP2_WEB_DISABLED is unset, so the operator doesn't need a separate ap2 web step.pending: N operator op(s) — depth of the operator queue (TB-131). Non-zero with the daemon up means the next tick will drain them; non-zero with the daemon down is a stalled-queue red flag worth surfacing in open issues.These two are sourced from ap2 status itself when available, OR by reading .cc-autopilot/operator_queue.jsonl line count for pending: and resolving the URL from AP2_WEB_HOST / AP2_WEB_PORT / defaults otherwise.
daemon.pid doesn't exist, report "stopped". If events.jsonl is empty, report "no events yet". If PROJECT_ROOT doesn't exist, say so and list available ~$AP2_SANDBOX_USER/repos/*.stoch: running (pid 98400, up 01:23:45); 0A / 0R / 0B / 0P / 10C / 1F; last task TB-11 at 2026-04-21T20:39Z (eb75288)
open issues: none
board: 0A / 0R / 0B / 0P / 10C / 1F
daemon: running (pid 98400, up 01:23:45)
web: http://127.0.0.1:8729/
pending: 0 operator ops
recent events:
2026-04-21T20:39:05Z task_complete task=TB-11 commit=eb75288 summary=TB-11 CLI + run-config landed...
2026-04-21T20:39:01Z task_verify task=TB-11 verdict=pass shell=2/2 prose=1/1
2026-04-21T20:29:49Z task_solve task=TB-11 title=CLI entrypoint + run config
2026-04-21T20:29:49Z backlog_auto_promoted task=TB-11
2026-04-21T20:28:49Z task_complete task=TB-10 commit=2d5474a summary=Added stoch/io/...
...
recent commits:
eb75288 TB-11: CLI entrypoint + run config
2d5474a TB-10: Trade log + result export
51149d9 TB-8: Baseline cross-sectional momentum strategy + runner
d27cd03 TB-7: Reporting (equity curve + trade diagnostics)
655f168 TB-6: Performance metrics module
last task:
## [2026-04-21 20:39] TB-11: CLI entrypoint + run config
- Result: complete.
- Summary: ...
This skill is read-only. If the operator follows up with a board-mutating
ask, route them to the right CLI — the post-TB-131 surface is queue-routed,
so each prints ... (will land at next tick) and the daemon drains on its
next tick:
ap2 unfreeze <TB-N> — Frozen → Backlog + reset retry counter.ap2 backlog <TB-N> — any-section → Backlog (used to be ap2 skip).ap2 delete <TB-N> — permanent removal; refuses Active/Ready without --force.ap2 reject <TB-N> [--reason "..."] — ideation proposals only (Backlog + @blocked:review); drops the row AND captures the rejection reason in .cc-autopilot/operator_log.md so ideation Step 0 stops re-proposing it. Use ap2 delete for everything else (typos, superseded tasks, etc.).ap2 ideate [--force] — manual ideation trigger (TB-159). Bypasses the cooldown / disable / non-empty-Ready-or-Backlog gates so the operator can run an ideation cycle on demand. Refuses if a task is currently Active unless --force (concurrent task-agent + control-agent SDK runs are risky — TB-122 split MM-handler vs task agent for this reason). Forced runs still call mark_run so the next natural cooldown clock resets.ap2 pause / ap2 resume — pause/resume daemon ticks (the flag file is
daemon-checked, not queue-routed; effective immediately).ap2 ack <TB-N> <decision> — record an operator decision so ideation
stops re-proposing actions whose effects aren't filesystem-visible.ap2 rollback ... — destructive history walk; not queue-routed.Do not invoke any of these from this skill — surfacing the command is fine, executing it isn't.
ap2 keeps no long-lived session: it is a Python daemon that drives a project
through a task list, running each unit of work (task / cron / ideation /
mattermost reply) as a fresh SDK query() with shared awareness living on
disk. When you need more than this status snapshot, read in this order:
.cc-autopilot/progress.md (tail) — recent task outcomes in
operator-readable prose..cc-autopilot/events.jsonl (tail) — the structured timeline (the
canonical record; see the ap2-observability skill for the event
schema).git log --oneline -30 — what code actually shipped (daemon commits
carry the TB-N task id in the subject).ap2/README.md (operator quickstart) and
ap2/architecture.md (design rationale, agent kinds, the daemon tick, the
sandbox + convergence models, the on-disk layout). The operator manual —
CLI verbs, env knobs, event schema, briefing-fix shapes — lives in the
auto-triggered domain skills: ap2-board-ops (verbs + MCP tools),
ap2-config (knobs + config keys), ap2-task (the task-agent
contract + ## Verification bullet authoring), ap2-observability
(events + ap2 status components), ap2-failure-recovery (how the
daemon self-heals + where to look when it doesn't), and
ap2-ideation-goals (authoring goal.md + the ap2 audit walk).