Next

From shenxingy/Clade · View interactive version

Next is an AI agent skill from the GitHub repository shenxingy/Clade. \\\"What should I work on next?\\\" — two modes. Fast mode (default): one-shot recommendation from docs + git state, ≤15 lines, no interview. Deep mode (`/next deep` or when user asks to explore priorities): multi-round interview to surface the best move.

How to use this skill

Skill file

Clade for Codex

This workflow runs directly in Codex. Do not launch the claude CLI or

delegate the workflow to Clade's MCP bridge.

Codex compatibility rules:

$clade:next; a bare $name does not select the installed Clade plugin.

has only CLAUDE.md, treat it as legacy project guidance and read it too.

state). Existing legacy Claude state may be read for migration, but do not

create new vendor-specific state.

$clade:skill-name plugin skill, or the same workflow invoked naturally when

explicit skill invocation is not available.

workflow names a vendor-specific tool. If a capability is unavailable, use

the documented fallback instead of spawning another agent CLI.

containing this SKILL.md; resolve that root before invoking a helper.

Canonical Clade workflow

You help the user pick the best next move. Two modes, picked automatically unless the user forces one.

Weigh findings by whether the layer runs

Before ranking anything, read docs/layers.json. It declares which surfaces of

this repository are actually run and how much a finding in each one is worth:

them below any load-bearing finding. Do not propose deleting the layer and

do not present its gaps as debt; new work there is opt-in.

plus its regen script, not in the copy.

This exists because an audit of this repository spent most of its effort on the

orchestrator, a layer the owner had switched off months earlier. Nothing in the

tree said so, so the effort looked well spent right up until it was reported.


Mode selection

Fast mode (default for drive-by asks like "下一步做什么"):

Deep mode (full multi-round interview):

If in doubt, start in fast mode and offer deep mode at the end: Want to go deeper? /next deep — the user can always escalate, but forcing them through 3 rounds for a casual ask wastes their time.

All estimates use AI-agent speed, not human programmer speed (see Time Scale Reference below).


Time Scale Reference (Codex speed)

| Human estimate | Codex equivalent |

|---|---|

| "a few hours" | 5–15 min (one focused session) |

| "half a day" | 20–40 min |

| "1 day" | 1–2 hours of agent time |

| "1 week" | 3–6 hours across sessions |

| "2+ weeks" | multi-session /loop, needs phasing |

When the user mentions effort, translate it: "you said 'a day of work' — that's probably one 30-min /loop run."

Task Type Reference

Execution task: Requirements are clear, outcome is known. Just run it.

Discovery task: Requirements are fuzzy or outcome is uncertain. Run a 10–20 min spike first to reduce unknowns before committing to a full implementation.

Always distinguish these. A discovery task disguised as an execution task is the #1 cause of stalled autonomous runs.



Fast mode — one-shot recommendation

Use when the user fired /next casually or with fast. Do all of this silently, then output.

  1. Read TODO.md, PROGRESS.md, GOALS.md if present (≤1 Read each; skip missing).
  2. git log --oneline -10 and git status -sb for momentum signal.
  3. Pick top 1 (and optional runner-up) using this priority order:

Output template (≤15 lines, no headers beyond these):

→ Top pick: {task}
  Type: {Execution | Discovery (needs spike)}
  Why: {one clause, referencing what you saw in docs/git}
  Done when: {observable criterion}
  Estimate: {one agent-session equivalent}

→ Runner-up: {task} — {when to pick this instead}

Parking lot: {1–3 items noted but not urgent, one line each} (omit if none)

Want to go deeper? /next deep

Then STOP. Don't ask a question. Don't run rounds. If the user agrees, they'll say so; if they want alternatives, they'll escalate with /next deep or name a different pick.

Skip Framing / Round 1 / Round 2 / Round 3 / Final Synthesis sections below — those belong to deep mode only.


Deep mode — multi-round interview

Runs only when the user invoked /next deep, or fast-mode judgment said "this isn't a drive-by — they actually want to think."

Setup — Read Context First

Before asking anything, read the project docs silently:

  1. GOALS.md — vision, phases, north star
  2. PROGRESS.md — what worked, what broke, current momentum
  3. TODO.md — backlog (prioritization, in-progress, stalled items)
  4. BRAINSTORM.md — unprocessed inbox

Build a mental model:

If any file is missing, that itself is a signal.


Pre-Round: Framing Check

Before scanning the backlog, do a framing check. Ask 1–2 questions to validate the problem space — NOT to score tasks, but to check if the backlog itself is tracking the right things.

Ask one or two of these (pick the most relevant):

Wait for the user's answers. This often surfaces the real priority before Round 1 even starts.


Round 1 — Wide Scan

Ask 4–5 targeted questions, one per angle. Present as a numbered list; ask the user to answer all before you continue.

Cover BOTH immediate and longer-horizon angles.

Angles (pick the most relevant given context):

Rules:


Round 2 — Dig Deeper

Pick 2–3 most interesting threads from Round 1 — ones with tension, uncertainty, or outsized impact.

For each thread, ask a follow-up that challenges assumptions or surfaces hidden constraints:

Follow-up angles:

Ask 2–3 follow-ups. NOT all of the above — only the ones relevant to what the user said.


Round 3 — Prioritization Challenge

Narrow to the top 2 candidates. Stress-test the front-runner:


Final Synthesis

After 3 rounds, synthesize into a structured plan optimized for Codex autonomous runs:

## Next Steps Plan

**Top pick**: [task name]
Type: [Execution | Discovery → spike first]
Why: [1–2 sentences from the conversation]
Risk: [main risk or open question]
Done when: [concrete, observable acceptance criteria]
Agent estimate: [e.g. "one 20-min session" / "2–3 sessions" / "needs /loop"]
Confidence: [1–5, with reason]
Parallelizable: [yes/no — if yes, which subtasks split into worktrees?]

IF Discovery task:
  Spike first: [10–20 min agent run to answer: "X?" before committing]
  Spike done when: [what the spike produces — a design doc, proof of concept, list of constraints]

**Runner-up**: [task name]
When to choose this instead: [condition — e.g. "if top pick blocked by X"]
Agent estimate: [same format]

**Sequencing**:
→ Do [A] first (it unblocks B), then [B] can run independently.
OR
→ [A] and [B] are independent — run in parallel worktrees.
OR
→ Spike [A] first (15 min), then decide between [B] and [C] based on findings.

**Parking lot** (surfaced but not urgent):
- [item] — [why it surfaced, why not now]

Then ask: "Want me to write this into TODO.md and BRAINSTORM.md?"

If yes:

- [ ] Task name [~20 min agent run, confidence 4/5]

- [ ] Spike: explore X approach [~15 min, unblocks task above]


Conversation Rules


Completion Status

3-strike rule: If the same approach fails 3 times, switch to BLOCKED — do not retry indefinitely.

Delivery completion

If this workflow changes files or external state:

repository task.

$clade:delivery and create a repository-compliant checkpoint or preserve

the work when committing is unavailable.

deployment, or live verification part of the task, do not silently downgrade

the result to local-only work.

or reachable external state, report BLOCKED or NEEDS_CONTEXT rather than

appending a "not committed/pushed/deployed" caveat after DONE.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.