Skip to content
Closed
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.0.0",
"version": "5.1.0",
"homepage": "https://github.com/agent-kit-startup/agent-kit",
"repository": "https://github.com/agent-kit-startup/agent-kit",
"logo": "dashboard/logo.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.0.0",
"version": "5.1.0",
"protected": [
".cursor/HANDOFF.md",
".cursor/agents/test-suites.md",
Expand Down
35 changes: 35 additions & 0 deletions .cursor/agents/mission-kit-comms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: mission-kit-comms
description: Dedicated Mission Kit comms/community agent. Drafts recap, release, contributor-ask, and reply copy under explicit HITL gates. Not an Agent Persona (personas are chat chrome only).
model: claude-sonnet-4
readonly: false
---

# Mission Kit comms agent

You draft adoption and contributor copy for **Mission Kit**. You do not post.

Follow skill `registry/skills/community/mission-kit-comms/SKILL.md` (factory overlay: `.cursor/skills/community/mission-kit-comms/SKILL.md`). Tone: short blocks, one ask per message ([ux-message-flows](../skills/community/ux-message-flows/SKILL.md)). Prompt shape: [prompts-markdown](../skills/community/prompts-markdown/SKILL.md).

## HITL contract

- Before any **public post or public reply**, Ask questions with `Post this` / `Edit draft` / `Discard` (chat numbered list if the tool is missing).
- Skip or cancel = stop. Never silent cross-network posting.
- Never `/git-prod`. Never buy ads. Never submit Cursor Marketplace (parked plan owns that).
- Never load Agent Personas (`autopilot` / `night-shift` / `ghost-runner`) as the poster.

## What you may do

- Draft from [docs/comms-templates/](../../docs/comms-templates/recap.md) and the [calendar](../../docs/comms-content-calendar.md).
- Run `node .cursor/scripts/comms-draft.mjs` for local files under `.cursor/comms-drafts/`.
- Align contributor asks with [CONTRIBUTING](../../docs/CONTRIBUTING.md), [contribute-upstream](../../docs/contribute-upstream.md), CoC, SUPPORT, SECURITY.

## What you must not do

- HTTP post, webhook, or `gh` issue comment that is marketing without Ask.
- Put tokens, webhooks, or cookies in files that can be committed.
- Claim product behavior that is not in CHANGELOG 5.0.0 / getting-started / five-layer matrix.

## Naming

Mission Kit = product. Agent Kit = CLI/npm/slash/pack. Mission Control = dashboard.
6 changes: 5 additions & 1 deletion .cursor/commands/git-prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ Follow the **git prod** routine to promote `origin/staging` to `origin/main` (pr
**Advisory (does not replace confirmation):** if Blocking untriaged `.cursor/memory/plan-monitor-*.md` match themes in the staging→main delta, mention them once in the summary. Never steal this Ask; Field Report / `/plan-review-triage` stay attention/HITL SoT.

**Fallback:** if Ask questions tool unavailable, ask for explicit confirmation in chat.
5. Run merge to main, push main, create/push annotated vX.Y.Z tag (when absent), confirm production.
5. Run merge to main, then push with the authorized inline form only:

`ALLOW_MAIN_PUSH=1 git push origin main`

Bare `git push origin main` stays denied by `agent-kit guard shell` and `git-hooks/pre-push`. Do not export `ALLOW_MAIN_PUSH=1` as a session environment variable. Do not add `--force`, `--no-verify`, or a non-main destination. Then create/push annotated vX.Y.Z tag (when absent) and confirm production. Details: `autogit/gitupdate.md` Prompt git prod step 9.
6. Update `.cursor/HANDOFF.md` ("promoted to production") and memory-loop WRITE if it applies.
7. In this monorepo: annotated tags trigger `publish-npm` + `sync-public` CI; `pnpm git:trigger-public-sync` fallback when needed per `autogit/gitupdate.md`.
8. **Post-prod verification (mandatory in this monorepo):** before ending, check tag CI jobs (`publish-npm`, `sync-public`), `npm view @dadado/agent-kit-cli version`, **public sync PR merged** (not CI-green alone), public `main` sync commit, and public GitHub Release Latest. Report each row. Silent npm success with a stale public Releases badge, or CI-green with an unmerged sync PR, is a kit failure mode; see `autogit/gitupdate.md` step 12.5.
Expand Down
2 changes: 1 addition & 1 deletion .cursor/commands/git-staging.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Follow the **git staging** routine to bring local changes to the pre-production
**Runs in the main window by default.** Do not dispatch this command to a Task subagent by default; Task isolation is opt-in and used only when the kit repo wants it.

1. **Read** the "Prompt: git staging" section in `autogit/gitupdate.md` (when it exists).
2. **Staging hygiene (monitors):** if `git status` shows untracked or unrelated dirty `.cursor/memory/plan-monitor-*.md`, **warn** before commit. Stage memory/monitor files **add-by-name only**; never broad `git add` of `.cursor/memory/` WIP into a product commit (ADR `decisions/2026-07-27_plan-monitor-consumer-awareness.md`, external-review staging hygiene).
2. **Staging hygiene (monitors):** if `git status` shows untracked or unrelated dirty `.cursor/memory/plan-monitor-*.md`, **warn** before commit. Stage memory/monitor files **add-by-name only**; never broad `git add` of `.cursor/memory/` WIP into a product commit (ADR `decisions/2026-07-27_plan-monitor-consumer-awareness.md`, external-review staging hygiene). Warn/add-by-name forbids sweeps; it does **not** mean leave soft kit artifacts dirty. Inventory remaining safe dirt into a `docs(memory):` / `chore(kit):` bucket and ship it in this run (SoT: `autogit/gitupdate.md` Prompt git staging §1 and §7). Do not stop-and-quiz solely because a path looks out of the current flow.
3. **Lint evidence (required when code/format paths change):** before claiming staging-ready, **run** the repo formatter/linter on touched files and **record the command + result** (pass/fail) in the worker summary or tick notes. Writing `Staging ready: yes` or the contract string alone is **not** evidence. Pure markdown / docs-only with no applicable linter: state `none applicable`. Same gate as `/run-plan` Staging-ready lint gate. **Dashboard CSS/HTML only** (`dashboard/dashboard.html` and similar, outside Biome scope): record `Tests: none applicable (dashboard-CSS); covered by plugin-ux-validation` when the UX suite pins the change (ADR `decisions/2026-07-29_dashboard-css-lint-evidence-convention.md`); do not claim Biome covered the HTML.
4. Run in order: validation (not on `main`), CHANGELOG (`[Unreleased]`), checkout staging, pull, working branch, Conventional Commits, push, MR/PR (**always `--base staging` / target `staging`**), merge, cleanup.
5. **Evidence-checks gate (before merge / Gaps-none):** run `gh pr checks <N>` and confirm `build` (including the **Evidence checks** step) is green. If Evidence checks fail, regenerate and re-push before merge; do not write HANDOFF `- **Gaps:** none` over red. ADR: `2026-08-01_evidence-checks-merge-gate`.
Expand Down
4 changes: 2 additions & 2 deletions .cursor/commands/handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Update the handoff document to preserve current state and allow continuation in
If they pick automatic, save `{ "autoHandoff": true }` in `.cursor/context/config.json`.

4. **DevOps spine (suggest, do not run without being asked):**
- If the phase produced commitable code, suggest `/git-staging` to promote to pre-prod.
- If the phase produced commitable changes (including versioned HANDOFF, `plan-monitor-*.md`, or `_index.md` Audits rows), suggest `/git-staging`. That command follows `autogit/gitupdate.md` inventory → theme-bucket → ship. Do not treat HANDOFF/memory as skippable dirt.
- If there was an error or a tradeoff decision, suggest a memory-loop WRITE (`.cursor/memory/`).
- Never suggest committing directly to `main`; production only via `/git-prod` after staging.
- Never suggest committing directly to `main`; production only via `/git-prod` after staging. `/git-prod` still requires a clean tree except hard excludes; staging must leave it that way.

5. **Respond to the user:**
> "Handoff updated! Continue: `/continue-plan`. With code ready: `/git-staging`. Production: `/git-prod`."
Expand Down
9 changes: 5 additions & 4 deletions .cursor/commands/plan-external-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Arm an optional external plan audit after /run-plan exhausts its im

## Goal

Manually arm **optional plan audits** (external plan review via Claude Code) after `/run-plan` has exhausted implementable to-dos. Claude writes an evidence-based monitor under `.cursor/memory/plan-monitor-*.md`. Cursor triage of findings is a **later** step (not this command).
Manually arm **optional plan audits** (external plan review via Claude Code or Cursor Agent) after `/run-plan` has exhausted implementable to-dos. The reviewer writes an evidence-based monitor under `.cursor/memory/plan-monitor-*.md`. Cursor triage of findings is a **later** step (not this command).

## When to Use

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. Claude Code CLI (`claude`) on PATH for autonomous / interactive / headless launch; if missing, soft tip + exit 0 (Field Report stays owed). `--paste-only` still prints the command without requiring `claude` yet.
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 `haiku`); `advisorModel` (default `opus`) runs only on escalate.

## Manual arm

Expand All @@ -51,11 +51,12 @@ If any are missing: stop. Do **not** claim a review ran. Tell the user to run `a

### What "operator-visible" means (smoke notes)

- **Autonomous success:** chat arm **must** use `--force --autonomous --wait-monitor`. The launcher prefers a background/inspectable PTY (no OS Terminal focus by default; `--focus-terminal` / `AGENT_KIT_AUDIT_FOCUS_TERMINAL=1` restores activate), then polls until a **fresh** monitor exists (`mtime >= arm epoch` or the HTML comment sentinel `<!-- audits-wait-fresh: created|updated -->` written into the monitor). Exit `0` = fresh ready; `3` = timeout; `4` = soft-fail while waiting. Spawn-only exit 0 without wait is **not** review done. **Chat continuation:** AwaitShell until `0|3|4`; on `0` run `/plan-review-triage` Ask in the same session. Do **not** stop at Final HANDOFF "after monitor lands" or require typing `done`. ADR: `decisions/2026-07-27_audits-wait-freshness-enforce.md`.
- **Autonomous success:** chat arm **must** use `--force --autonomous --wait-monitor`. The launcher prefers a background/inspectable PTY (no OS Terminal focus by default; `--focus-terminal` / `AGENT_KIT_AUDIT_FOCUS_TERMINAL=1` restores activate), then polls until a **fresh** monitor exists (`mtime >= arm epoch` or the HTML comment sentinel `<!-- audits-wait-fresh: created|updated -->` written into the monitor). Chat AwaitShell uses `waitSliceSeconds` (default 90); total budget is `waitTimeoutSeconds` (default 900) persisted in `.cursor/context/audit-wait/<slug>.json`. A new session resumes remaining budget and does not restart 900s. Early-ready still exits `0` at first freshness. Exit `0` = fresh ready; `3` = timeout (slice or total; not review done); `4` = soft-fail while waiting. Spawn-only exit 0 without wait is **not** review done. **Chat continuation:** AwaitShell until `0|3|4`; on `0` run `/plan-review-triage` Ask in the same session. Do **not** stop at Final HANDOFF "after monitor lands" or require typing `done`. ADRs: `decisions/2026-07-27_audits-wait-freshness-enforce.md`, `decisions/2026-08-13_audits-atomic-wait-reviewer-fallback.md`.
- **Autonomous soft-fail:** missing `claude` → tip + exit `4` when `--wait-monitor` was requested (Field Report owed). Background spawn unavailable → falls back to `--paste-only` UX with an honest "NOT running yet" banner. A **silent PTY** (spawn succeeded, no scrollback within the progress-gate grace window) is reported as a failed launch: the launcher disposes the session it just spawned, prints the paste fallback, and soft-fails instead of burning the wait budget. A **session-cap refusal** (detached `agent-kit-audit-*` sessions at the cap) never spawns at all. Soft-fail does **not** invent a monitor or run triage as if review completed.
- **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` without spawning Claude (useful for smoke).
- **`--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`.

### A. Script (preferred)

Expand Down
4 changes: 2 additions & 2 deletions .cursor/commands/run-plan-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ Read `externalPlanReview` before the queue confirm Ask and at each advance:
| Config | Behavior |
|--------|----------|
| Audits **pre-flight** (`preflight`: `off` \| `warn` \| `block`) | Before the confirm Ask and before each mid-queue advance: same owed/untriaged check as `/run-plan`. `block` arms or stops; never steals `/git-prod`. |
| `midBatchAudits: true` and audits enabled | After each plan Task returns `outcome: completed`, the **orchestrator** arms **one** full audit for that plan with `--force --autonomous --wait-monitor` (or one `--batch` + wait_all when batching is intentional) **before** advancing the cursor. No paste Ask between plans. Soft-fail → Field Report owed; still advance. AwaitShell until exit `0|3|4`; wait success requires a **fresh** monitor after arm start. Do **not** fan out N background sessions without wait. Do **not** insert a mid-queue triage Ask (operator non-stop preserved; record ready path for queue-end). Mid-batch stays findings-only: **never** auto-Write residuals or rewrite the Run queue between plans. |
| `midBatchAudits: true` and audits enabled | After each plan Task returns `outcome: completed`, the **orchestrator** arms **one** full audit for that plan with `--force --autonomous --wait-monitor` (or one `--batch` + wait_all when batching is intentional) **before** advancing the cursor. No paste Ask between plans. Soft-fail → Field Report owed; still advance. AwaitShell until exit `0|3|4` (chat slice ~90s; remaining budget in `.cursor/context/audit-wait/<slug>.json`). Wait success requires a **fresh** monitor after arm start. Reviewer cascade: `backend: "auto"` uses Claude (Haiku) when usable, else Cursor Agent. Same-model implementer/reviewer is an honest skip. Do **not** fan out N background sessions without wait. Do **not** insert a mid-queue triage Ask (operator non-stop preserved; record ready path for queue-end). Mid-batch stays findings-only: **never** auto-Write residuals or rewrite the Run queue between plans. |
| `midBatchAudits` false/missing | **Non-stop** mid-queue: do **not** pause for audit Ask/paste between plans. Mid-queue completed plans stay Field Report **owed** until reviewed. |
| Queue exhausted | Final HANDOFF; cadence `batch-complete`; then queue-end audit arm covering remaining owed/unreviewed targets (enabled → `--force --autonomous --wait-monitor` or paste per `mode`; else `offerOnExhausted` Ask). Prefer one launcher `--batch` + wait_all when multiple basenames. After wait exit `0`: run `/plan-review-triage` Ask with an **explicit path list** of fresh monitors (batch uniform Ask when outcomes match; sequential fallback when mixed; durable heading per file). **Batch exhaust without conveyor:** when remaining monitors are process-only / depth-capped, prefer uniform **Ack and stop** or **Fix nits only**; do not spawn unbounded `close-*` backlog from Write residuals (ADR `decisions/2026-08-11_plan-audit-residuals-termination.md`). Then suggest `/git-prod` if staging is ahead of `main` (separate HITL). |

Never steal `/git-prod` confirmation. Chat never runs silent headless `--force` / `claude -p` in the agent shell. Spawn-only exit 0 without `--wait-monitor` is **not** review done. Never stop at Final HANDOFF "when monitors exist, run triage" after arming: wait (freshness) then continue (mid-batch waits for file only; queue-end waits then triage Ask with explicit paths). ADR: `2026-07-27_audits-autonomous-plan-review-contract.md` (supersedes queue-end-only); wait freshness: `2026-07-27_audits-wait-freshness-enforce.md`.

**Exit 3 stays timeout-only across the queue.** A mid-queue or queue-end arm that returns `3` reviewed nothing: leave that plan Field Report **owed**, keep its path out of the queue-end triage list, and never narrate it as reviewed. Monitors that show up later, including monitors written by a different arm or a later queue position, do **not** retroactively upgrade an earlier `3`. Exit `4` covers the launcher soft-fails: missing `claude`, background spawn unavailable, a **silent PTY** early abort (spawn succeeded but produced no scrollback in the grace window), and a **session-cap refusal** (detached `agent-kit-audit-*` pile at the cap, so nothing spawned). Advance the queue on soft-fail, but record the target as owed, never as reviewed. ADR: `2026-07-30_audits-pty-progress-gate-zombie-policy.md`.
**Exit 3 stays timeout-only across the queue.** A mid-queue or queue-end arm that returns `3` reviewed nothing: leave that plan Field Report **owed**, keep its path out of the queue-end triage list, and never narrate it as reviewed. Monitors that show up later, including monitors written by a different arm or a later queue position, do **not** retroactively upgrade an earlier `3`. Exit `4` covers the launcher soft-fails: no usable reviewer (`backend: "auto"` tried Claude then Cursor; pinned `claude` still tips when Claude is missing), same-model refuse, background spawn unavailable, a **silent PTY** early abort (spawn succeeded but produced no scrollback in the grace window), and a **session-cap refusal** (detached `agent-kit-audit-*` pile at the cap, so nothing spawned). Advance the queue on soft-fail, but record the target as owed, never as reviewed. ADR: `2026-07-30_audits-pty-progress-gate-zombie-policy.md`.

### External plan review (legacy heading)

Expand Down
2 changes: 1 addition & 1 deletion .cursor/commands/run-plan-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ When invoked, follow [`run-plan.md`](run-plan.md) forcing the **in-session loop*

> "Heads up: `/run-plan-loop` is now `/run-plan`. Running with the in-session strategy."

The full tick contract (plan status per tick, HANDOFF, automatic `/git-staging` on diff, **never** `/git-prod`, stop conditions) lives in `run-plan.md`, including the headless runner (`scripts/plan-loop.sh`) section.
The full tick contract (plan status per tick, HANDOFF, automatic `/git-staging` on diff including HANDOFF/memory kit buckets, **never** skip those as trivial, **never** `/git-prod`, stop conditions) lives in `run-plan.md`, including the headless runner (`scripts/plan-loop.sh`) section.
Loading
Loading