ai-team-library/claude/skills/orchestration-report/SKILL.md
# Skill: Orchestration Report ## Description Aggregates the per-bean **Orchestration Telemetry** blocks (BEAN-278) across recent Done beans and produces a markdown report that answers the architecture-aware-evaluation question: **is the orchestration paying for itself?** Distinct from `/telemetry-report` (which aggregates raw cost, duration, and tokens); this skill aggregates the orchestration-quality metrics layered on top — bounces, persona activations, contract violations, escape-hatch usag
npx skillsauth add beekeeper-lab/foundry ai-team-library/claude/skills/orchestration-reportInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Aggregates the per-bean Orchestration Telemetry blocks (BEAN-278) across
recent Done beans and produces a markdown report that answers the
architecture-aware-evaluation question: is the orchestration paying for
itself? Distinct from /telemetry-report (which aggregates raw cost,
duration, and tokens); this skill aggregates the orchestration-quality
metrics layered on top — bounces, persona activations, contract
violations, escape-hatch usage, dispatch-mode mix.
The report is meant to be read by the Team Lead (and any human reviewer) when deciding whether to keep, tune, or roll back orchestration changes introduced by the BEAN-269 / 270 / 272 / 274 cluster.
/orchestration-report slash command.| Input | Type | Required | Description |
|-------|------|----------|-------------|
| --since YYYY-MM-DD | String | No | Lower bound on the bean's Completed date. Default: 30 days before today. |
| --until YYYY-MM-DD | String | No | Upper bound on the bean's Completed date. Default: today. |
| --out PATH | Path | No | Override the output path. Default: ai/outputs/team-lead/orchestration-report-YYYY-MM-DD.md (today's date). |
| --include-incomplete | Flag | No | Include beans whose Orchestration Telemetry block is partly populated (default: only include beans where every field has a non-sentinel value). |
ai/beans/_index.md to enumerate beans.Status: Done.Completed (or Started when Completed missing) within
the [--since, --until] window.bean.md and locate the
## Orchestration Telemetry section.
— field AND
--include-incomplete is not set → bucket as partial
(counted in coverage stats, excluded from aggregations).For each eligible bean, parse:
Personas activated → comma-separated list. Strip whitespace, lowercase.Bounces → integer (strip the (hint) suffix).Scope changes → integer.Contract violations → integer.Inputs escape-hatch invocations → integer.Dispatch mode → one of in-process, tmux-worker, mixed.Also parse the bean's regular Telemetry summary so cost can be cross-cut:
Total Cost, Total Duration, Total Tokens In/Out, Total Tasks.The report MUST compute at minimum the following aggregations across the eligible-bean set. Each is a table or a one-liner in the rendered report.
| Aggregation | Computation |
|-------------|-------------|
| Coverage | eligible / (eligible + partial + legacy) Done beans in window have a fully-populated Orchestration Telemetry block. |
| Persona-set frequency | Group beans by their sorted Personas activated set. Show count and average bounces per group. Highlights whether 4-persona waves bounce more than 2-persona waves. |
| Average bounces by persona-set | Mean of Bounces within each persona-set group. |
| Average cost-per-bean by persona count | Group beans by len(Personas activated). Show count, mean Total Cost, median Total Cost. Tells whether more personas systematically cost more. |
| Dispatch-mode mix | Count of beans by Dispatch mode. Cross-cut: mean Total Cost per dispatch mode (does tmux-worker cost less or more than in-process per bean?). |
| Contract violations caught | Sum of Contract violations. Compare to total bounces — when a contract caught the issue, no bounce was needed. |
| Escape-hatch trend | Sum of Inputs escape-hatch invocations. If --since covers ≥60 days, also compute the by-month series so a trend is visible. A rising trend signals BEAN-272's Inputs: requirement may be too strict. |
| Outliers | Top 3 highest-bounces beans and top 3 highest-cost beans, with bean ID, title, and the offending value. |
Render to the --out path (or the dated default). The rendered markdown
has these sections in order:
# Orchestration Report — YYYY-MM-DD
| Field | Value |
|-------|-------|
| **Window** | YYYY-MM-DD → YYYY-MM-DD |
| **Eligible beans** | N (out of M Done beans in window) |
| **Coverage** | N / M (P%) |
## Verdict
<one-paragraph verdict — see template below>
## Persona-set frequency
<table>
## Average cost-per-bean by persona count
<table>
## Dispatch-mode mix
<table>
## Contract violations vs bounces
<one-liner with both totals + ratio>
## Escape-hatch trend
<by-month table when window ≥60 days, else single total>
## Outliers
<two short tables: highest bounces, highest cost>
## Coverage caveats
<explicit list of bean IDs that were partial or legacy and therefore
excluded from aggregations>
The verdict is the most-load-bearing prose in the report. It MUST cite at least two specific metrics with values, and it MUST be willing to deliver bad news. Use this template (substitute bracketed slots with computed values):
Across the [N] eligible beans completed [WINDOW], the orchestration changes [HELPED / DID NOT HELP / WERE NEUTRAL]. Bounces averaged [X] per bean overall and [Y] per bean for the [persona-set] wave — [interpretation]. Contract violations caught [Z] issues at compose time, [meaningful fraction] of the [Z + bounces] places where the contract layer or a bounce intervened. Dispatch-mode-mix shows [tmux-worker / in-process / mixed] beans cost [more / less / about the same] on average ([$A] vs [$B]). The honest read: [one sentence: keep, tune, or roll back].
If coverage is below 50%, prepend the verdict with a one-line caveat: "Coverage is [P%]; treat the figures as directional, not conclusive."
| Output | Type | Description |
|--------|------|-------------|
| report | Markdown file | ai/outputs/team-lead/orchestration-report-YYYY-MM-DD.md (or the --out override). |
| console_summary | Console text | One-line printout of the report path plus the verdict's first sentence. |
--since /
--until produces the same numbers (no time-of-day dependence beyond
the dated filename).| Error | Cause | Resolution |
|-------|-------|------------|
| NoEligibleBeans | Window contains zero beans with a fully-populated Orchestration Telemetry block | Report still emits, with empty aggregation tables and a verdict that says "insufficient data." |
| BacklogIndexMissing | ai/beans/_index.md does not exist | Fail with a clear message asking the user to run /show-backlog first. |
| MalformedTelemetry | A bean's Orchestration Telemetry table cannot be parsed | Skip that bean, log it under Coverage caveats, continue. |
| OutDirNotWritable | The output directory cannot be written | Fail with the path; suggest checking permissions. |
| WindowInverted | --since is later than --until | Fail with a clear message. |
ai/beans/_bean-template.md carries the canonical
Orchestration Telemetry block (added by BEAN-278)..claude/hooks/telemetry-stamp.py populates
Personas activated and Dispatch mode automatically; this skill
consumes those values, it does not re-derive them./spawn-task — writes the per-task dispatch-mode markers under
ai/beans/<BEAN-ID>-<slug>/.orchestration/. Workers MUST emit those
markers for Dispatch mode to be accurate./handoff — increments the Bounces counter on Tech-QA→Developer
hand-backs.ai/beans/_index.md for the candidate-bean list./telemetry-report covers raw cost/duration/token
aggregations; this skill layers the orchestration-quality metrics on
top. Run them together for a complete picture.development
# Skill: VDD (Verification-Driven Development) Gate ## Description Runs the programmatic VDD gate for a bean: parses the bean's `## Acceptance Criteria` section, dispatches each criterion's evidence type to the matching runner (test, lint, file, file-contains, or manual), aggregates the results into a pass/fail verdict, and writes a structured markdown report at `ai/outputs/tech-qa/vdd-<NNN>.md` (zero-padded NNN). This is the machine-checkable counterpart to the prose VDD policy in `ai/contex
tools
# Skill: Spawn Task ## Description Dispatches a single specialist persona to execute a single task with only that task's context. Auto-detects the runtime environment and chooses one of two execution paths: - **In tmux** (`$TMUX` set): spawn a worker in a git worktree using a child tmux window. Process-isolated, parallelizable, durable across the calling session's lifetime. Same pattern as `/spawn-bean` but at task granularity. - **Not in tmux**: invoke the `Agent` tool with `subagent_typ
development
# Skill: Health Check ## Description Runs all health checks defined in `ai/context/health-checks.md` and produces a table-format report. Can be called standalone or by other skills (e.g., `/long-run`). ## Trigger - Invoked by the `/health-check` slash command. - Called programmatically by `/long-run` at the start of each cycle. ## Inputs | Input | Type | Required | Description | |-------|------|----------|-------------| | health_checks | Markdown file | Yes | `ai/context/health-checks.md`
tools
# Skill: Validate Repo ## Description Runs a comprehensive health check against a generated project or any repo that follows the Foundry structure. Verifies folder expectations, required files, template completeness, broken internal links, and stack-specific tooling (lint, test, build commands). Produces a pass/fail checklist with actionable remediation for every finding. This skill works on any project regardless of stack because it adapts its checks based on the composition spec. ## Trigger