Skills Product & Business Simulate Business Pod Sales Tick

Simulate Business Pod Sales Tick

v20260707
pod-sales
This skill runs a single, simulated tick of a defined business pod (Sales). It is designed for dry-run testing, allowing users to validate inputs, resolve agents, and reserve budgeted resources without invoking real LLM workers. It handles template loading, schema validation, budget management, and emits structured status reports for subsequent workflow consumption.
Get Skill
369 downloads
Overview

Surfaces pod-tick.mjs as a single-shot skill for the sales pod. Use when
Claude Code needs to demonstrate, smoke-test, or schedule one iteration of
the sales autopilot without spawning real LLM workers.

Algorithm

Implementation: scripts/pod-tick.mjs.

  1. Parse args (--pod-template, --base-path, --dry-run / --live,

--budget-cap-usd, --tick-id). --live is refused with exit code 3
in Phase 2.

  1. Load the pod template JSON (default: templates/sales.json).
  2. Validate via validatePodTemplate(json) — schema in

v3/@claude-flow/cli/src/business-pods/pod-schema.ts and inlined in
pod-tick.mjs so the script runs without a built CLI. Throws with a
JSON-pointer path on the first violation.

  1. Resolve every agent.agentType against KNOWN_AGENT_TYPES. Unknown

types abort with exit code 2 and an actionable error.

  1. Reserve min(budgetUsdPerRun, --budget-cap-usd) USD against the

file-based ledger at <base-path>/budget/<roomId>.json. Honors
reservationExpiryMs (default 60_000 ms, bounded to [5000, 300000]
per ADR-164.1 §3.2). TODO(adr-164.1): swap the file ledger for the
atomic SQLite tracker in Phase 3.

  1. Build per-agent prompts (kickoff scoped to the bench description +

pod's PII policy). In --dry-run they are logged to stderr and the
model is never invoked.

  1. Commit the reservation. Dry-run actual = $0; live actual = the

reserved amount (Phase 3 wires real claude -p --max-budget-usd
reporting).

  1. Append a pod-status envelope to the Phase-1 backing store at

<base-path>/.agentbbs/room-<derivedRoomId>.jsonl so subsequent
federation_bbs_watch calls see the tick.

  1. Emit a single JSON line on stdout:

{podName, tickId, agentsRan, totalUsd, envelopeId, status}.

Exit codes

  • 0 — tick succeeded (status === 'success')
  • 2 — invalid template / unknown agent type / budget exhausted / arg error
  • 3 — --live requested (refused in Phase 2)

Phase 3 surfaces (not in this build)

  • --live mode: dispatch each prompt through claude -p headless or a

Managed Agent and capture the actual --max-budget-usd reported spend.

  • Atomic SQLite budget tracker (ADR-164.1 §3.2).
  • Multi-pod variants (pod-marketing, pod-finance, ...) — each gets its

own skill once Phase 3 ships.

Info
Name pod-sales
Version v20260707
Size 3.03KB
Updated At 2026-07-09
Language