build-harness

Runs, resumes, and reports build harness scenarios for prepare_rlm_org profiling and CCI TUI scratch org creation.

5|3|Updated Sep 9, 2026
One-click install
npx skills add https://github.com/SalesforceLabs/revenue-cloud-foundations --skill build-harness-salesforcelabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-harness
Source: https://github.com/SalesforceLabs/revenue-cloud-foundations/tree/main/.cursor/skills/build-harness
Command: npx skills add https://github.com/SalesforceLabs/revenue-cloud-foundations --skill build-harness-salesforcelabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires textual, pytest.

What problem does it solve? Running and debugging automated Salesforce scratch org builds with the prepare_rlm_org flow involves many scenarios, checkpoints, and artifacts; this Skill gives the agent the exact commands, resume rules, and artifact locations to operate the local build harness and CCI Build Manager TUI safely. ## Core Features & Use Cases - Scenario-based profiling runs: Execute dev/ent default and lightweight scenarios from scripts/build_harness/scenarios.json with run, resume, report, and prune commands, including JSON output mode for agent automation. - Checkpoint resume and failure classification: Resume failed scenarios from checkpoint.json with flag-consistency guards, and interpret transient/deterministic failure classes plus recommended_action policies in run_summary.json. - Guided scratch org creation via TUI: Launch the Textual CCI Build Manager with ./tui-cci, confirm shape/days/alias defaults with the user, and manage cleanup behavior such as delete_org_on_failure. - Use Case: A build fails mid-scenario on ent-default; the agent inspects .harness/runs/<run_id>/ artifacts, confirms flags match the checkpoint, and runs the resume command instead of a costly full re-run. ## Quick Start Ask the agent to run the build harness for the ent-default scenario and report the results from the latest run artifacts.

Frequently Asked Questions about build-harness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run build harness scenarios for prepare_rlm_org?

Run python scripts/build_harness/harness.py run from the repo root to execute all scenarios, or pass --scenario dev-default --scenario ent-default to select specific ones. Scenarios are defined in scripts/build_harness/scenarios.json and results are written under .harness/runs/<run_id>/.

How do I resume a failed build harness run?

Use python scripts/build_harness/harness.py resume --run-id <run_id> --scenario <scenario_id>. Resume starts from the failed step recorded in checkpoint.json, but it is blocked with exit code 30 if the current scenario flags differ from the checkpoint's effective_flags.

Why is my harness resume blocked after a failure?

Resume is blocked when checkpoint prerequisites are missing or when scenario effective flags changed since the checkpoint was written. Fix the underlying blocker and perform a full re-run instead of attempting to force the resume.

How do I create a scratch org with the CCI Build Manager TUI?

Launch ./tui-cci from the repo root and follow the wizard to pick org shape, alias, days, and runtime flag overrides. Confirm the defaults (shape ent, 30 days, auto-generated alias) with the user before creation, and use ./tui-cci --debug-launch if startup fails.

Does the harness delete scratch orgs after a failed run?

The CLI harness keeps failed run orgs for resume and deletes successful ones unless --keep-orgs is passed. The TUI deletes failed orgs only if they were created in the same run, and you can set delete_org_on_failure to false in scripts/build_harness/tui/settings.local.json to preserve them.

How do I test changes to the build harness code?

Run .harness/tui-venv/bin/python -m pytest tests/build_harness/ after implementation changes. The test suite covers config, failure classification, execution, reporting, scenario runner, and TUI behavior, using mocked subprocesses instead of real orgs.