pod-sales
Run one tick of the sales business-pod (ADR-164 §4.1, Phase 2). Loads templates/sales.json, validates it against the pod-schema, resolves agents against ruflo's agent registry, reserves budget via the Phase-2 file-based stub ledger (atomic SQLite tracker is Phase 3 per ADR-164.1), constructs per-agent dry-run prompts, posts a summary envelope to room "sales" via the federation_bbs_publish JSONL backing store, and emits a structured {podName, tickId, agentsRan, totalUsd, envelopeId, status} line for /loop ingestion. Dry-run by default; --live is reserved for Phase 3.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- pod-sales
- description
- Run one tick of the sales business-pod (ADR-164 §4.1, Phase 2). Loads templates/sales.json, validates it against the pod-schema, resolves agents against ruflo's agent registry, reserves budget via the Phase-2 file-based stub ledger (atomic SQLite tracker is Phase 3 per ADR-164.1), constructs per-agent dry-run prompts, posts a summary envelope to room "sales" via the federation_bbs_publish JSONL backing store, and emits a structured {podName, tickId, agentsRan, totalUsd, envelopeId, status} line for /loop ingestion. Dry-run by default; --live is reserved for Phase 3.
- allowed-tools
- Bash
- argument-hint
- [--pod-template <path>] [--base-path <dir>] [--dry-run|--live] [--budget-cap-usd <amt>] [--tick-id <id>]
03 SKILL.md 正文
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.
- Parse args (
--pod-template,--base-path,--dry-run/--live,--budget-cap-usd,--tick-id).--liveis refused with exit code 3 in Phase 2. - Load the pod template JSON (default:
templates/sales.json). - Validate via
validatePodTemplate(json)— schema inv3/@claude-flow/cli/src/business-pods/pod-schema.tsand inlined inpod-tick.mjsso the script runs without a built CLI. Throws with a JSON-pointer path on the first violation. - Resolve every
agent.agentTypeagainstKNOWN_AGENT_TYPES. Unknown types abort with exit code 2 and an actionable error. - Reserve
min(budgetUsdPerRun, --budget-cap-usd)USD against the file-based ledger at<base-path>/budget/<roomId>.json. HonorsreservationExpiryMs(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. - Build per-agent prompts (kickoff scoped to the bench description +
pod's PII policy). In
--dry-runthey are logged to stderr and the model is never invoked. - Commit the reservation. Dry-run actual = $0; live actual = the
reserved amount (Phase 3 wires real
claude -p--max-budget-usdreporting). - Append a
pod-statusenvelope to the Phase-1 backing store at<base-path>/.agentbbs/room-<derivedRoomId>.jsonlso subsequentfederation_bbs_watchcalls see the tick. - 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 error3—--liverequested (refused in Phase 2)
Phase 3 surfaces (not in this build)
--livemode: dispatch each prompt throughclaude -pheadless or a Managed Agent and capture the actual--max-budget-usdreported 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.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.