Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"anti-slop"
],
"license": "PolyForm-Noncommercial-1.0.0",
"version": "5.2.1",
"version": "5.3.0",
"homepage": "https://github.com/agent-kit-startup/agent-kit",
"repository": "https://github.com/agent-kit-startup/agent-kit",
"logo": "dashboard/logo-marketplace.svg",
Expand Down
2 changes: 1 addition & 1 deletion .cursor/agent-kit.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"version": "5.2.1",
"version": "5.3.0",
"protected": [
".cursor/HANDOFF.md",
".cursor/agents/test-suites.md",
Expand Down
11 changes: 10 additions & 1 deletion .cursor/commands/backlog-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Example: `/backlog-add Polish Mission Control empty-state icons`

Same planning blockers as `/start-project`: unresolved essential readiness → point to `/agent-kit-onboard`. Non-essential pending is advisory only.

**Never-Ask:** `confirm-provider` / `collaboration.provider` must not become an Ask. One-line advisory or silence, then continue Broad Intake → propose → write Ask. Do not halt enqueue. Distinct from an essential-readiness hard stop (that still points to `/agent-kit-onboard`). The Broad Intake worker inherits this: do not return a readiness-gate Ask for that check.

## What to Do

### 1. Broad Intake Review (required before plan proposal)
Expand All @@ -52,7 +54,7 @@ Before enqueueing a new plan, **scan** these sources (read/skim; do not deep-div
| **Archived context** | Prior packs for same theme | `.cursor/context/archive/**` (if present; glob by topic) |
| **Decisions** | ADRs that constrain the goal | `.cursor/memory/decisions/`, `_index.md` Decisions table |
| **Memory** | Errors, audits, consolidations, review logs, plan-monitors, findings audits | `.cursor/memory/errors/`, `.cursor/memory/plan-monitor-*.md`, theme-matched `plan-review-*.md`, `_index.md` (Audits + Decisions) |
| **Unprocessed dogfood** | Factory/consumer inbox notes awaiting triage (not sessionStart-only) | `dogfood/README.md` or `.cursor/dogfood/README.md` under `##` or `### Unprocessed Files`; skim titles/summaries only. Missing/empty inbox → no findings. Labels: ignore (owned by open plan), error/include (kit gap), note (inbox evidence only). Never auto-analyze or memory WRITE (ADR `decisions/2026-08-11_dogfood-unprocessed-broad-intake-bucket.md`) |
| **Unprocessed dogfood** | Factory/consumer inbox notes awaiting triage (not sessionStart-only) | `dogfood/README.md` or `.cursor/dogfood/README.md` under `##` or `### Unprocessed Files`; skim titles/summaries only. Missing/empty inbox → no findings. Labels: ignore (owned by open plan), error/include (kit gap), note (inbox evidence only). Never auto-analyze or memory WRITE (ADRs `decisions/2026-08-11_dogfood-unprocessed-broad-intake-bucket.md`, `decisions/2026-08-14_main-command-dogfood-audit-routing.md`) |
| **Local docs** | SoT / inventories / getting-started that the goal touches | `docs/**`, especially files named in the payload or related SoT |
| **Working tree** | Uncommitted local work that would collide | `git status`, `git diff` (staged + unstaged); do not commit |
| **Recent commits** | What already shipped for this theme | `git log` (short, recent), related PR titles if available |
Expand Down Expand Up @@ -83,6 +85,13 @@ The actual scanning and triage is delegated to a **Task(explore) subagent** usin

**Fallback:** If Task dispatch is unavailable, run the Broad Intake Review inline (same as pre-delegation behavior).

**Unprocessed inbox Ask (when non-empty):** after the skim, if Unprocessed has rows, **Ask questions** (one question; chat numbered-list fallback) with labels exactly:
- `Analyze inbox now` — start the ingest ritual (analyze → memory WRITE → triage). Notes become plans/memory after HITL, never `plan-monitor-*.md`. Then continue this enqueue.
- `Enqueue Fix now` — fold include/error Unprocessed rows into this proposal (already in Broad Intake). Do not start a nested `/backlog-add`.
- `Not now` — continue the write Ask. Treat remaining inbox rows as `note` only.

Never auto-analyze. Empty or missing inbox: skip this Ask.

### 2. Vague goal

If the goal is missing or vague, use **Ask questions** (chat numbered-list fallback):
Expand Down
6 changes: 5 additions & 1 deletion .cursor/commands/continue-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ Resume a plan from the last handoff. Confirm the next unit, then execute **only
1. **Read `.cursor/HANDOFF.md` first.** No handoff → say so and suggest `/start-project`. Do not invent progress.
2. **Pre-flight (API/usage limit):** if `- **Mode:**`, `- **Gaps:**`, or `- **Instruction for the next agent:**` still records an API/usage limit hard stop from a prior tick, **do not** mark a to-do `in_progress`, dispatch a Task, or edit product files until the operator confirms recovery (switch from Auto to a named model such as Claude Opus, Sonnet 4.6, or Composer 2.5 Fast; and/or wait for quota reset). Surface recovery via **Ask questions** when available. **Fallback after Auto→Grok:** Grok 4.5 and Auto often lack Ask questions (see `.cursor/memory/decisions/2026-07-20_ask-questions-model-availability.md`); use the numbered-list chat fallback (reply by number or label; typed answer = "Other"). Pre-flight is HANDOFF check plus operator model choice only; the kit has no remaining-quota API. Align with `context-guardian` Quota-blocked sessions and `/run-plan` Read-state pre-flight.
3. **Audits pre-flight** (config `externalPlanReview.preflight`: `off` | `warn` | `block`; missing = `off`): before the next-unit confirmation Ask, check owed / untriaged audits for the chosen plan slug (Field Report owed, untriaged `plan-monitor-*.md`, open cadence WARNING). `off`: skip. `warn`: surface once, then continue. `block`: arm via `.cursor/scripts/plan-external-review.sh` (prefer `--autonomous` when `mode: autonomous`, else `--paste-only`) or stop until the operator defers; never steal `/git-prod`. Distinct from the advisory pre-unit monitor skim below (ADR `2026-07-27_audits-autonomous-plan-review-contract.md`).
4. **Unprocessed dogfood preflight (advisory):** before the next-unit confirmation Ask, skim `##` or `### Unprocessed Files` in factory `dogfood/README.md` or consumer `.cursor/dogfood/README.md`. Non-empty: mention count and top titles once with standard triage labels (`ignore` / `error` / `include` / `note`). Empty or missing inbox: silent OK. Do **not** force analysis, memory WRITE, or Field Reports; do **not** block resume solely because the inbox is non-empty. Runs regardless of `externalPlanReview.preflight`. sessionStart inbox tip stays complementary (ADR `2026-08-11_dogfood-unprocessed-broad-intake-bucket.md`).
4. **Unprocessed dogfood preflight:** before the next-unit confirmation Ask, skim `##` or `### Unprocessed Files` in factory `dogfood/README.md` or consumer `.cursor/dogfood/README.md`. Empty or missing inbox: silent OK. Non-empty: mention count and top titles once with standard triage labels (`ignore` / `error` / `include` / `note`), then **Ask questions** (one question; chat numbered-list fallback) with labels exactly:
- `Analyze inbox now` — start the ingest ritual (analyze → memory WRITE → triage). Notes become plans/memory after HITL, never `plan-monitor-*.md`. `/dogfood` stays file-only.
- `Enqueue Fix now` — route include/error notes through the `/backlog-add` contract (Broad Intake + write-confirm; no Gate B, no activate).
- `Not now` — continue to the next-unit Ask. Do not start analysis.
Never auto-analyze, never invent Field Reports, never block resume solely because the inbox is non-empty. Runs regardless of `externalPlanReview.preflight`. sessionStart inbox tip stays complementary (ADRs `2026-08-11_dogfood-unprocessed-broad-intake-bucket.md`, `2026-08-14_main-command-dogfood-audit-routing.md`).
5. **Apply Agent Persona chrome.** Read `.cursor/context/config.json` for `agentPersona.modes.continue-plan` (fallback to legacy `workspaceSkin`, then "autopilot"). Use the corresponding persona's `chatHints` from `registry/personas/core/` for tone and confirmations.
6. **Confirm the next unit with Ask questions** before editing. Use concrete option labels (see What to Do step 5). Do not accept a typed "yes" as the gate.
7. **One unit per chat** (phase or one heavy to-do) unless the user explicitly ran `/run-plan`.
Expand Down
20 changes: 15 additions & 5 deletions .cursor/commands/dashboard-broadcast.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ node dashboard/start-broadcast.mjs
export MC_PORT=$(node -e 'import("./dashboard/lib/guards.mjs").then(m => console.log(m.preferredPortForRepoRoot(process.cwd()))).catch(e => { console.error(e.message); process.exit(1) })')
```

If you set an explicit `PORT`, use that value instead of the derivation.
If you set an explicit `PORT`, use that value instead of the derivation. `MC_PORT` is the *preferred*
port: when it is already held the starter walks to the next per-workspace candidate, so always prefer
the `Bind:` line it prints over the derivation.

1. **Prefer the starter** (handles token generation, `HOST=0.0.0.0`, detach, LAN URL print):

Expand Down Expand Up @@ -91,13 +93,19 @@ node dashboard/start-broadcast.mjs
```bash
curl -sf "http://127.0.0.1:$MC_PORT/dashboard-data.json?token=$MISSION_CONTROL_TOKEN" | node -e 'let d="";process.stdin.on("data",c=>d+=c);process.stdin.on("end",()=>console.log(JSON.parse(d).system?.repoRoot))'
```
- If a loopback `/dashboard` already holds the port, stop it before broadcast.
- **You do not have to stop anything to broadcast.** When the preferred port is held by this workspace's
loopback `/dashboard`, by another workspace, or by a token-gated instance the starter cannot identify,
it walks to the next per-workspace candidate and prints what it skipped ("left running"). Concurrent
Mission Control instances are supported; nothing is killed on your behalf.
- To **reuse** an existing broadcast for this workspace instead of starting another, export the same
`MISSION_CONTROL_TOKEN` it was started with. A freshly generated token cannot match a running instance,
so the starter treats it as someone else's and starts beside it.
- OS firewall may block inbound LAN TCP; allow the chosen port for your local network profile if needed.

## Notes

- Port: `PORT` env overrides; default is the per-workspace hash allocation (range `3333-3588`). Derive it with the snippet in step 0 or read the printed `system.port`.
- Log default: `/tmp/mission-control-broadcast.log`
- Port: `PORT` env overrides; default is the per-workspace hash allocation (range `3333-3588`), walking to the next candidate when one is held. Derive the preferred port with the snippet in step 0, or read the printed `Bind:` line / `system.port`. Explicit `PORT` refuses instead of walking, so a pinned port never silently moves.
- Log default: `/tmp/mission-control-broadcast-<rootId>.log` (per workspace; `MISSION_CONTROL_LOG` overrides)
- Loopback UX remains `/dashboard` / `npm run dashboard` / `agent-kit dashboard`
- Detach lessons match `/dashboard` (error `2026-07-25_dashboard-server-reaped-agent-shell`)

Expand All @@ -106,6 +114,8 @@ node dashboard/start-broadcast.mjs
| Symptom | Cause | Fix |
|---|---|---|
| Serve exits: non-loopback requires token | `HOST` set without `MISSION_CONTROL_TOKEN` | Use `dashboard:broadcast` or set a ≥16 char token |
| Port busy / token rejected | Existing instance on the allocated port | Kill LISTEN pid for **this** workspace only (verify `repoRoot`); retry broadcast |
| Port busy / token rejected | Existing instance on the allocated port | Nothing to do: the starter skips it and binds the next per-workspace candidate. Want that exact port? Kill the LISTEN pid **only** after verifying `repoRoot` is yours |
| Explicit `PORT` refused | You pinned a `PORT` that another instance holds | Unset `PORT` (auto-pick a free per-workspace port), or free that port yourself if it is this workspace's |
| A second broadcast appears each run | `MISSION_CONTROL_TOKEN` is regenerated per run, so the running one cannot be identified | Export a stable `MISSION_CONTROL_TOKEN` to reuse the existing broadcast |
| Phone cannot connect | Firewall or wrong IP | Confirm printed LAN IPv4; allow inbound TCP |
| Config save 403 from phone | Expected | Config writes are loopback-only |
3 changes: 2 additions & 1 deletion .cursor/commands/dogfood.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ If the operator chooses `Keep local only`, stop. The local file is the record.

### Step 6: Respond

> Dogfood filed: `dogfood/cursor_<topic>_<date>.md` (factory) or `.cursor/dogfood/cursor_<topic>_<date>.md` (consumer). Next: analyze → memory WRITE → triage, or ask for a public issue if the pattern is upstream-relevant.
> Dogfood filed: `dogfood/cursor_<topic>_<date>.md` (factory) or `.cursor/dogfood/cursor_<topic>_<date>.md` (consumer). This command stays file-only. Analysis is offered from `/continue-plan`, `/run-plan`, `/run-plan-all`, or `/backlog-add` preflight Ask (`Analyze inbox now` / `Enqueue Fix now` / `Not now`), not from `/dogfood`. Notes become plans/memory after HITL, never `plan-monitor-*.md`.

## Related

- `dogfood/README.md` — factory inbox and ingest ritual
- `.cursor/memory/decisions/2026-07-31_dogfood-factory-consumer-lanes.md` — lane decision
- `.cursor/memory/decisions/2026-07-31_dogfood-ingest-contract.md` — ingest contract
- `.cursor/memory/decisions/2026-08-14_main-command-dogfood-audit-routing.md` — main-command daily path; this slash stays file-only
- `.cursor/memory/decisions/2026-07-17_session-origin-not-product-usecase.md` — hygiene
- Cursor product-update gaps may route here via `/cursor-update-awareness` (Ask → `/dogfood`)
- Incoming **public** issue triage (factory-only) is `/public-issue-triage`, not this command
6 changes: 3 additions & 3 deletions .cursor/commands/plan-external-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Manually arm **optional plan audits** (external plan review via Claude Code or C
- You want a second-agent check of shipped work vs the plan (gaps, residuals)
- Auto-arm from the exhausted path was skipped (opt-in off, no `claude` on PATH, soft-fail tip) or you prefer a manual re-run

**Wired path:** when `/run-plan` (orchestrated / in-session) or headless `agent-kit run-plan` stops on plan exhausted, the kit arms or suggests `.cursor/scripts/plan-external-review.sh` (see `/run-plan` "Optional external plan review"). Use this command when you need to re-arm manually. Still not a Cursor `hooks.json` `stop` entry.
**Daily path:** `/run-plan` and `/run-plan-all` invoke this contract when audits are enabled (arm + `--wait-monitor`). Use this slash for paste, manual re-arm, or when auto-arm was skipped. Still not a Cursor `hooks.json` `stop` entry. ADR `2026-08-14_main-command-dogfood-audit-routing.md`.

Do **not** use this mid-plan for in-flight to-dos; the monitor method only verdicts `completed` work.

Expand All @@ -34,7 +34,7 @@ If any are missing: stop. Do **not** claim a review ran. Tell the user to run `a
1. Prefight files above exist.
2. `.cursor/context/config.json` has `externalPlanReview.enabled: true` (see `config.example.json`), **or** use `--force` for a one-shot arm without persisting opt-in. Missing file = disabled unless `--force`.
3. Prefer `externalPlanReview.mode: "autonomous"` for background/inspectable auto-launch. Missing `mode` keeps paste-compatible / legacy behavior.
4. A usable reviewer: `backend: "auto"` (default for new example/docs) uses Claude when present, else Cursor Agent. Pinned `backend: "claude"` still tips + no-op when Claude is missing. `--paste-only` still prints the command without requiring a binary yet. Same-family implementer and reviewer is an honest skip (including Auto/Auto). Claude review uses `reviewerModel` (default `sonnet` so `--permission-mode auto` can run); `advisorModel` (default `opus`) runs only on escalate. An explicit Haiku pin is valid and cannot run auto.
4. A usable reviewer: `backend: "auto"` (default for new example/docs) uses Claude when present, else Cursor Agent. Pinned `backend: "claude"` still tips + no-op when Claude is missing. Pinned `backend: "cloud"` (Cursor Cloud Agents over REST) needs `curl`, `node`, and `CURSOR_API_KEY`, and reviews the **pushed** branch — it soft-fails rather than auditing unpushed state, and is never reached by `"auto"`. `--paste-only` still prints the command without requiring a binary yet. Same-family implementer and reviewer is an honest skip (including Auto/Auto). Claude review uses `reviewerModel` (default `sonnet` so `--permission-mode auto` can run); `advisorModel` (default `opus`) runs only on escalate. An explicit Haiku pin is valid and cannot run auto.

## Manual arm

Expand All @@ -56,7 +56,7 @@ If any are missing: stop. Do **not** claim a review ran. Tell the user to run `a
- **Exit 3 is timeout-only:** it means the freshness gate was not satisfied inside the budget, never that the review finished. A monitor that appears later, including one written by a different or later arm, does **not** convert a `3` into success. Leave the target Field Report **owed** and re-arm. ADR: `decisions/2026-07-30_audits-pty-progress-gate-zombie-policy.md`.
- **Paste-only:** clipboard + printed interactive one-liner; review starts only after the operator pastes into their Cursor Terminal. After paste (Claude running), the session still waits for the monitor file then continues into triage Ask when possible.
- **`--dry-run`:** resolves mode/plan and prints `background-cmd` / `paste-cmd` / `focus-terminal` / `reviewer-backend` / `same-model-refuse` without spawning a reviewer (useful for smoke).
- **Reviewer cascade:** `--backend auto|claude|cursor` (or config). Claude spawn passes `--model` from `reviewerModel`. Cursor fallback cannot honor a Claude-family name; Auto/Auto is refused. Findings-only until `/plan-review-triage`. Never `/git-prod`.
- **Reviewer cascade:** `--backend auto|claude|cursor|cloud` (or config). `cloud` is an opt-in pin (Cursor Cloud Agents over REST) that `auto` never reaches. Claude spawn passes `--model` from `reviewerModel`. Cursor fallback cannot honor a Claude-family name; Auto/Auto is refused. Findings-only until `/plan-review-triage`. Never `/git-prod`.

### A. Script (preferred)

Expand Down
2 changes: 1 addition & 1 deletion .cursor/commands/plan-review-triage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Supports **multi-path walk**: iterate multiple monitors in blocking-first then d

- After Claude external plan review completed (monitor file exists under `.cursor/memory/plan-monitor-*.md`)
- You want to process findings from the monitor and decide next steps
- **Automatic after chat arm:** `/run-plan` / `/plan-external-review` (and `/run-plan-all` queue-end) wait for the monitor then continue into this command's Ask; operators should not need to type `done` or paste triage solely to resume
- **Daily path:** `/run-plan` (exhaustion) and `/run-plan-all` (queue-end) continue into this Ask after wait exit 0. This slash stays HITL SoT; operators should not need to type `done` or paste triage solely to resume. ADR `2026-08-14_main-command-dogfood-audit-routing.md`.
- **Not for mid-plan reviews** - this command expects `completed` work only

## Usage
Expand Down
Loading