Rishikesh Ranjan — rishikeshranjan.com

// utility

Next

/ttm-next

Guide user to the right next command based on current campaign state. Use when unsure what to do next in the marketing workflow.

manual invocation
allowed-tools:ReadBashGlob

Overview

ttm-next is the scheduler for your marketing pipeline. It scans every active campaign in the project and proposes the single highest-priority next move across the whole portfolio, so you always know what to do next in the marketing workflow.

Invoke it with the /ttm-next command when you are unsure what to do next. It outputs a ranked list with one top recommendation plus up to three alternatives, each as a runnable /ttm-* command. This matters when more than two campaigns are active and "what should I do next" becomes a real decision that depends on which campaigns are stuck, which are about to lose momentum, and which have the soonest measurable outcome.

This is a read-only command: it only reads and displays information and never modifies any files. In particular, .taketomarket/POSITIONING.md is an architectural invariant and is never touched here.

How it works

The workflow lives at ${CLAUDE_PLUGIN_ROOT}/workflows/utility/next.md. It is the next-command routing workflow for /ttm-next: it looks across ALL active campaigns, prioritizes which needs attention most, and suggests the specific /ttm-* command to run. It uses the unfiltered campaign list (not --active) so that campaigns in the created and researched phases are included.

Required reading for this workflow is @${CLAUDE_PLUGIN_ROOT}/references/context-loading.md.

Step 0: First-run inline education

Read .taketomarket/CONFIG.md. Parse first_run_seen (object) and inline_education (boolean, default true).

If inline_education is false: skip this step. Else if first_run_seen.ttm-next is not true, print the explainer below verbatim, then mark this skill as seen:

node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" first-run mark ttm-next

Use this exact check (bash) to decide whether to print: node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" first-run check ttm-next --raw -- the JSON seen field is true once the explainer has run before.

Explainer for /ttm-next

/ttm-next scans every active campaign in the project and proposes the single highest-priority next move across the whole portfolio. Output is a ranked list with one top recommendation plus up to three alternatives, each as a runnable /ttm-* command.

Why it matters: when more than two campaigns are active, "what should I do next" becomes a meaningful decision that depends on which campaigns are stuck, which are about to lose momentum, and which have the soonest measurable outcome. This skill is the scheduler for your marketing pipeline.

(Canonical source: references/inline-education-blurbs.md. Embedded verbatim because workflows do not @-resolve files at runtime.)


Constraints

Read-Only Command

This workflow does NOT modify any files. It only reads and displays information.

Step 1: Load All Campaigns

takeToMarket > SCANNING CAMPAIGNS

Get the unfiltered campaign list:

CAMPAIGNS_JSON=$(node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign list --raw)

Parse JSON output. Filter out campaigns with phase archived or cancelled. Keep all other campaigns regardless of phase.

If no campaigns remain after filtering:

takeToMarket > NO ACTIVE CAMPAIGNS

No active campaigns found. Run `/ttm-new-campaign <slug>` to start one.

Exit.

Step 2: Determine Next Command Per Campaign

takeToMarket > ANALYZING PRIORITIES

For each non-archived, non-cancelled campaign, determine the next command using the phase-to-command mapping:

| Current Phase | Next Command           | Notes                              |
|---------------|------------------------|------------------------------------|
| `created`     | `/ttm-discover <slug>` | New campaign needs research        |
| `researched`  | `/ttm-brief <slug>`    | Research done, needs brief         |
| `briefed`     | `/ttm-produce <slug>`  | Brief ready, produce content       |
| `produced`    | `/ttm-verify <slug>`   | Content ready, verify quality      |
| `verified`    | `/ttm-review <slug>`   | Verified, needs human review       |
| `reviewed`    | See review result logic below | |
| `fixed`       | `/ttm-review <slug>`   | Re-review after fix                 |
| `shipped`     | `/ttm-measure <slug>`  | Awaiting measurement (Phase 9)     |
| `measured`    | `/ttm-learn <slug>`    | Extract learnings (Phase 9)        |
| `learned`     | `/ttm-archive <slug>`  | Ready to archive                    |

Review result logic (for campaigns in reviewed phase):

  • Read review.overall_result from the campaign state
  • If review.overall_result is 'revise' or 'needs-fix': /ttm-fix <slug>
  • If review.overall_result is 'approved' or 'ship-ready': /ttm-ship <slug>
  • If review.overall_result is null/unknown: /ttm-review <slug> (re-review)

Fix loop detection (per D-05):

  • If fix.run_count > 0 AND review.overall_result is 'revise': Suggest /ttm-fix <slug> with note about continuing the fix loop. Include fix attempt count in the reason (e.g., "attempt 2 of 3")

For each campaign, also get detailed state if needed for review/fix decisions:

node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign state "${SLUG}" --raw

Step 3: Apply Priority Algorithm

Sort campaigns by priority using this algorithm:

Priority 1 (Highest): Campaigns with review.overall_result = 'approved'

  • These are pending human action to ship -- closest to delivering value.

Priority 2: Campaigns with fix loops in progress

  • fix.run_count > 0 AND review.overall_result = 'revise'
  • Active work in progress that should be completed before starting new work.

Priority 3: Campaigns at earlier lifecycle phases

  • Use phase order index for sorting:
    • created = 0
    • researched = 1
    • briefed = 2
    • produced = 3
    • verified = 4
    • reviewed = 5
    • fixed = 6
    • shipped = 7
    • measured = 8
    • learned = 9
  • Lower index = earlier phase = higher priority (move campaigns forward)

Priority 4: Most recently active

  • Sort by last_updated timestamp (most recent first)

Tie-break: Campaign creation date (oldest campaign first -- finish what you started before starting new work).

Step 4: Display Recommendations

takeToMarket > NEXT ACTIONS

Display the top recommendation prominently, then show up to 3 alternatives in a table.

Output Format

## Recommended Next Action

**Run:** `/ttm-<command> <slug>`
**Why:** <Concise reason based on priority algorithm>

---

### Other Active Campaigns

| Priority | Campaign | Phase | Suggested Command | Reason |
|----------|----------|-------|-------------------|--------|
| 2 | <slug> | <phase> | /ttm-<cmd> <slug> | <brief reason> |
| 3 | <slug> | <phase> | /ttm-<cmd> <slug> | <brief reason> |
| 4 | <slug> | <phase> | /ttm-<cmd> <slug> | <brief reason> |

Reason examples by priority:

  • Priority 1: "Approved and ready to ship"
  • Priority 2: "Fix loop in progress (attempt 2 of 3). Review found positioning drift."
  • Priority 3: "Ready for content production" / "New campaign, needs research"
  • Priority 4: "Recently active, awaiting measurement"

If only one campaign exists, show only the primary recommendation without the alternatives table.

Commands not yet implemented: If the suggested next command is /ttm-measure or /ttm-learn (Phase 9), append a note: "(Note: this command is not yet available -- coming in Phase 9)"

Success criteria

  • All campaigns loaded via CLI (campaign list --raw without --active flag)
  • Phase-to-command mapping applied correctly for each campaign
  • Fix loop detection working (fix.run_count + review.overall_result check)
  • Priority algorithm applied (approved > fix-loop > earlier-phase > recent)
  • Primary recommendation displayed with reasoning
  • Up to 3 alternatives shown in table format
  • No files modified (read-only command)

Output

No files modified (read-only command).

What if this doesn't fit?

Looks like /ttm-next can't do that yet.

  • Want a new skill? /ttm-request-skill
  • Existing skill needs work? /ttm-improve-skill