Author Cortex XSOAR / XSIAM playbooks from the ground up. Turns a described response workflow into a complete, schema-conformant playbook YAML with real commands, resolved context and a native layout.
7 stars
0 votes
0 copies
3 views
Added November 28, 2026
testingpythongoawstestingdocumentation
Works with
cli
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cortex Platform Playbook Author?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/gocortexio-cortex-platform-playbook-author)
---
name: cortex-platform-playbook-author
description: Author Cortex XSOAR / XSIAM playbooks from the ground up. Turns a described response workflow into a complete, schema-conformant playbook YAML with real commands, resolved context and a native layout.
version: 0.24.3
license: AGPL-3.0-or-later
---
<!--
SPDX-FileCopyrightText: GoCortexIO
SPDX-License-Identifier: AGPL-3.0-or-later
-->
# cortex-platform-playbook-author
Author Palo Alto Networks Cortex XSOAR and XSIAM playbooks as files, from a described response workflow, without the graphical editor.
The current version is 0.24.3; the per-version change history lives in [CHANGELOG.md](CHANGELOG.md).
Playbooks are normally built by dragging tasks in the user interface, and the resulting YAML looks like an export rather than something anybody would write. It is not. The format is a formal contract with a published schema, the vocabularies are small and closed, and almost every byte of a task is boilerplate determined by its type. What is left, once the mechanical parts are derived rather than typed, is the part that actually needs judgement: which commands to call, how the branches go, and what each task reads.
That is the division this bundle enforces. It derives the mechanical parts and checks the rest against the shipped catalogue of 13,749 integration commands and 1,438 automations.
## Announcing, and stopping loudly
Print a STAGE banner on entering every stage of this skill's own workflow, and NEVER ask the
caller a question outside a `!` or `?` banner. A question in a paragraph is how a run sits idle
while everyone waits for the other one; a stage nobody announced is a stage nobody can see you
are in.
COPY the templates from [references/console-output.md](references/console-output.md), at the
boundary, and never render one from memory -- a typed banner loses the squirrel first, then the
rules, then the named sections. That page is identical in every bundle in this project and carries
the three fills, the art and the rules for each. The banner is the FIRST thing in the reply that
enters a stage, and the LAST thing in a reply that stops.
## Scope
In scope: playbook content items (`Packs/<pack>/Playbooks/playbook-*.yml`) for Cortex XSOAR 6.x and 8.x and Cortex XSIAM, covering the six task types in live use (`start`, `title`, `regular`, `condition`, `playbook`, `collection`).
Out of scope:
- Integrations, automations and other content item types. The bundle READS integration and automation definitions to resolve commands, and never authors them.
- Test playbooks. A playbook needs one to pass content validation (WARN-009 says so), but authoring it is a separate job.
- Anything requiring a live tenant. Every check here is offline and static.
## Inputs accepted
1. Required: a description of the response workflow -- what triggers it, what it should look up, where it branches, what it does at the end. Prose is fine; the bundle turns it into a task graph.
2. Optional but recommended: the integrations the tenant actually runs. A playbook calling a command from an integration nobody has installed lints clean and never fires. Name them and the commands get chosen from those brands.
3. Optional: an existing playbook to extend or repair. `scripts/lint_playbook.py` reads any playbook, whoever wrote it.
If the workflow is described only as an outcome ("respond to malware"), ask what the first task reads and what the last task does. Those two answers fix the shape of everything between them.
## Outputs produced
One playbook YAML file. The file is emitted in the shape the platform's own editor writes -- block style, two-space indent, sequences at their parent key's indent, no anchors -- so it is a normal content item rather than something recognisably machine-made.
The spec is the source and the playbook is the build artefact. Keep both, and keep them together: name the spec after the playbook it generates and store it beside it, `playbook-<Name>.spec.json` next to `playbook-<Name>.yml` in the pack. Nothing in the scripts reads that convention, so a different layout costs nothing, but the two files are meaningless apart and a pack is already the unit that travels together. Edit the spec and re-scaffold rather than hand-editing the YAML: identifiers are derived rather than random, so a re-scaffold after an edit produces a reviewable diff instead of a file in which every identifier has churned.
Every emitted playbook satisfies, by construction:
- The published schema: no unknown key at any level, every required key present, `type` within the eight-member enum.
- The task identifier contract: `taskid` equals `task.id` (demisto-sdk PB109), and the `id` field equals the map key (PB108).
- Graph integrity: no orphan task, no dangling branch target, every task reachable from `starttaskid`, every condition label wired to a branch.
- Dataflow, within one file: every context reference in a `complex` root or a bare-path operand resolves to an upstream task's output, a declared playbook input, or a server-provided root. That holds only where the linter can read every producer. In a playbook that calls a sub-playbook, an undocumented Builtin, or a command whose outputs the index does not carry, an unresolved reference is WARN-010 and the playbook is still emitted, because one file cannot prove that producer does not write it; see [references/validation-codes.md](references/validation-codes.md), ERR-015. Two forms are checked less, and a typo in either is not caught: a filter's left operand is read against the item being filtered and resolves nothing, and a `${...}` reference only marks the inputs it names as used. See [references/context-and-dataflow.md](references/context-and-dataflow.md).
- Determinism: task identifiers are UUIDv5 over the playbook id and task id, so the same spec re-emits byte-identically and an edit produces a reviewable diff.
## Authoring workflow
1. Establish the workflow shape. What starts it, what it enriches, where it decides, what it does on each outcome. Write it as a task list before writing any YAML.
2. Resolve every command against the catalogue with `python3 scripts/lookup_command.py <command>`. Do this BEFORE drafting, not after. The script returns the brands that provide the command, the argument names with the required ones marked, and the context paths it writes -- which are the paths downstream tasks are then allowed to read.
3. Write the spec as JSON. The format is documented in `scripts/scaffold_playbook.py`; `python3 scripts/scaffold_playbook.py --example` prints a minimal one, and [assets/example_spec.json](assets/example_spec.json) is a complete worked one. Save it as `playbook-<Name>.spec.json` beside the playbook it will generate, and commit it: it is the file you edit from here on.
4. Scaffold: `python3 scripts/scaffold_playbook.py <spec.json> -o playbook-<Name>.yml`. Identifiers, per-type boilerplate, layout and file shape are all derived. The script lints a temporary copy first and writes only a clean playbook. It refuses a deprecated command, a task key it does not read, and a condition clause with no `op`: there is no default operator, because `isExists` and `isNotEmpty` disagree on `[]`, `false`, `0` and `""`. Which sub-playbook call fans out is said on that task, `"loop": {"forEach": true, "max": N}`, and `forEach` without `max` is refused; see [references/task-types.md](references/task-types.md).
5. Read the scaffold's last line. On `[FAIL]` nothing was written, and the file on disk is the previous one, so running `python3 scripts/lint_playbook.py <playbook.yml>` now reports on a playbook the spec no longer describes and can print `[OK]`. Fix the spec, earliest error first, since the rest is frequently cascade from it. `--no-lint` writes the failing file unchecked when you need to read it.
6. Re-scaffold until clean. Lint a playbook directly when it was not scaffolded here.
7. Read the playbook back as a human. The linter proves the playbook is well-formed and its references resolve. It cannot tell you the branches are the right way round, that a containment step is missing, or that the condition tests the wrong field. That reading is the last step and it is not optional -- see the hard rules.
8. Treat the first import as part of authoring, not as a formality. Every check here is offline, and the platform has acceptance rules this bundle does not know. Two were found on one day in September 2026, both on files that linted clean: a data-collection task with no form, refused with `does not have form defined (100302)` and now caught by ERR-024; and a sub-playbook naming a playbook absent from the tenant, which panicked the server with a nil pointer dereference rather than failing validation, and which WARN-011 now names as a consequence rather than a coverage gap. Expect a third. When one appears, bring it back here as a check or as a message, which is how those two got covered.
9. Never put a probe inside a deliverable. If something about the tenant is unknown -- whether a field populates, whether a sub-playbook exists -- ask it with the smallest file that can ask it. The sub-playbook reference above was shipped deliberately inside a 52-task playbook to find out whether it resolved. It took the whole upload down twice, and the same question was answered afterwards by a four-task file that risked nothing. A large playbook carrying an open question fails as a unit, and the answer arrives as an error message about the whole file rather than about the question. The rule is about IMPORT risk, which is why one probe is exempt: a condition whose labels are the candidate answers, every branch routed to the same next task, cannot fail an import and asks its question at run time. See [references/run-history.md](references/run-history.md).
## THE LAWS
Twenty-four laws. Sixteen are enforced by a lint code and eight have no check, and the
register says which is which, because a law nobody can find reads as a law the
linter does not know about, and a code belonging to no law is a check nobody
decided to make. `scripts/lint_playbook.py --laws` prints this table from the
declaration the linter itself uses, and a bundle test fails if the two drift:
every code maps to exactly one law, and no law names a code that
does not exist.
| Law | Statement | Enforced by |
|-----|-----------|-------------|
| P1 | Never use a deprecated command or automation | ERR-012, ERR-023 |
| P2 | Never invent a name; every command, automation and argument resolves through the index | ERR-011, ERR-013, WARN-001, WARN-016 |
| P3 | Never read context that nothing upstream produces | ERR-015, WARN-007, WARN-010, WARN-011 |
| P4 | Never promise an output the playbook does not produce | WARN-015 |
| P5 | The inputs declared and the inputs used are the same set | ERR-016, ERR-017 |
| P6 | Every input carries a default that resolves to something | WARN-013 |
| P7 | An issue-side field name is the XDM name flattened; the derivation is reliable, the presence is not | WARN-014, WARN-017, WARN-018 |
| P8 | Every required argument is supplied | ERR-014 |
| P9 | Task identifiers are machine-written and agree three ways | ERR-002, ERR-003, ERR-004, ERR-021 |
| P10 | The graph is connected and every outcome lands somewhere | ERR-005 to ERR-010, ERR-020, ERR-025, WARN-002, WARN-019 |
| P11 | The file is schema-valid and machine-written throughout | ERR-001, ERR-018, ERR-019, ERR-022, ERR-024 |
| P12 | Operators come from the platform vocabulary, not from memory | WARN-005, WARN-006 |
| P13 | Never hardcode an integration instance name | WARN-003 |
| P14 | Never destroy the whole context | WARN-008 |
| P15 | The drawn graph reads downward, and no two tasks share a position | WARN-004, WARN-012 |
| P16 | A playbook declares its test | WARN-009 |
| P17 | British English in every comment and description | nothing |
| P18 | Read the finished playbook as a reviewer before shipping it | nothing |
| P19 | An enrichment that can return nothing gets a branch for the case where it does | nothing |
| P20 | A new playbook ships with its write gate closed, and every run records the configuration it used | nothing |
| P21 | A branch is untested until the run history shows it executed | nothing |
| P22 | A guard asserts what CHANGED, not that nothing was destroyed | nothing |
| P23 | Every item a drain READS is marked before the run ends, on every path, unless the read itself was refused or its verdict has not yet SETTLED: a source it reads is still behind, or the event is younger than the age its settle rule waits for, the time-based form of a lag that a source's latest timestamp cannot show | nothing |
| P24 | A comparison that can fault runs in a regular task with an error route; the condition that consumes it tests only whether that task's key is there | nothing |
P19 is the only one where a check was actually built before being
refused. It fired on a known-bad control and stayed silent on a known-good one,
and three independent reviews still refused it, because it could verify only that
a condition EXISTED and never that it GATED: a condition testing the right path
whose branches both continue to the consumer satisfies it with the defect fully
intact. A check whose fix can be faked manufactures the confidence it was meant to
earn. The idiom it failed to enforce is written out in
[references/context-and-dataflow.md](references/context-and-dataflow.md), measured
over the 601 shipped playbooks that use it.
P17 and P18 are not gaps waiting to be closed. P17 has no check because spelling
is not decidable from a word list without flagging vendor strings, command names
and context paths, all American by origin and all of which must stay verbatim.
P18 cannot have one: every check here is structural, so a playbook can satisfy
every code, resolve every reference, and still be the wrong response to the
alert. Listing only the enforceable laws would quietly redefine the rules as
whatever the linter happens to do, which is the failure this register exists to
prevent.
The laws that need their reasoning written out have it below.
- P1. Never use a deprecated command. Not as a fallback, not for compatibility, not because the name is the one you remember. A deprecated command still resolves and still runs, so nothing downstream fails loudly and no test catches it; the cost arrives later, on somebody who cannot see why a playbook behaves oddly. The trap is that vendors rename rather than delete, so the live command is usually the same words in a different order -- `xdr-isolate-endpoint` against `xdr-endpoint-isolate`, `xdr-run-script` against `xdr-script-run` -- and memory picks between them at chance. The index records deprecation for all 1,340 deprecated commands and names a derived replacement for 251 of them. `lookup_command.py` refuses one with the replacement, `lint_playbook.py` raises ERR-012, and `scaffold_playbook.py` will not emit the file at all.
- P2. Never invent a command, an automation or an argument name. Every one must resolve through `scripts/lookup_command.py`. A wrong argument name is the quiet failure of this format: the task runs, the argument is ignored, and the command executes with a default nobody chose. `xdr-blocklist-files` takes `hash_list`, not `hashes`.
- P3. Never reference context that no upstream task produces. A reference to a path nothing writes does not fail at author time and does not fail loudly at run time: the value arrives empty and the playbook carries on. Trace every reference to a producing task, a declared input, or a server root before emitting (ERR-015).
- P5. Never declare an input the playbook does not use, and never reference one it does not declare (ERR-016 / ERR-017). Both are ways of describing a playbook that is not the one you built.
- P6, P7. Never leave an input without a default, and never invent an input for something the trigger already carries. An input with no `value` resolves to the empty string rather than to an error, so a `${inputs.X}` interpolated into a query argument splices nothing into the text and the query reaches the integration malformed -- `filter x <= ${inputs.N}` arrives as `filter x <=` and is rejected at a line and column nobody wrote, while `username = "${inputs.Actor}"` arrives as `username = ""`, parses cleanly and returns nothing. What it resolves TO depends on the input's SHAPE, and only a string resolves to nothing at all: a datetime resolves to the Go zero-time `0001-01-01T00:00:00Z`, which is non-empty, parses, and quietly sets a window at year one -- so an emptiness test placed around a datetime cannot fire in the case it was written for. Writing "defaults to 120" in the description does not create a default; only `value` does. `required: true` does not create one either, because required is enforced against a caller passing inputs and a playbook started from an issue has no caller. On the Cortex Platform the trigger is `issue` and its fields are arrays, so bind the default to it -- `{"ctx": "issue.user_name.[0]"}` -- or give a literal (WARN-013). There is a third route and it is the honest one when the issue-side name cannot be checked: bind it anyway, and treat WARN-014 as the record that the name is unverified. Binding to a name nobody has read off a real issue silences WARN-013 without making the input safe, so a rule offering only the first two routes asks for a guess and then congratulates it. For an address, on one pack's correlation issues on one tenant, the caller, which the query emitted only under `xdm.source`, was filed under the target fields and no `xdmsourceipv6` appeared, so `xdmsourceipv6` and an `alert_fields` key such as `action_remote_ip` are names those issues did not carry (WARN-018); an issue no correlation raised held the caller under `xdmsourceipv4`. Once a playbook has run, the direction reverses: change any of its issue bindings only on run-history evidence, never on inference, because a flattened XDM field has been seen to resolve on issues whose correlation never output that path. That half is P21 applied to an input and, like P21, is enforced by nothing; WARN-014, WARN-017 and WARN-018 read the file, not a run. See [references/platform-issue-context.md](references/platform-issue-context.md).
- P9. Never hand-write a task identifier. `taskid` must equal `task.id` and the `id` field must equal the map key. The platform states this as a system requirement and gives no useful error when it is violated. Let the scaffolder derive them.
- P11. Never emit YAML anchors. Not one playbook in the upstream checkout measured for 0.1.0 uses them, and a general-purpose YAML writer produces them by default the moment two tasks share a value: the shared empty `timertriggers` list becomes `&id001` on the first task and `*id001` on the rest. `scripts/_pbyaml.py` suppresses them; a third-party dumper will not (ERR-018).
- P10. Always give a condition somewhere to go for every outcome. A label declared with no matching branch is a dead end (ERR-008), and a condition whose only branch is `#default#` decides nothing (ERR-010). An error path is an outcome too: a task setting `continueonerrortype: errorPath` without an `#error#` branch declares a route and leaves it unbuilt (ERR-025). On a condition, do not build it: a condition was seen not to take the route at all (WARN-019), so the fix is P24, not a branch. Remember that YAML 1.1 resolves a bare `yes` to the boolean true, so an unquoted `yes:` branch key is not the string the condition label beside it is comparing against -- quote it.
- P24. Never let a condition carry a comparison that can fault. In one run on one tenant, 2026-10-31, a condition whose `isAfter` operand was text that is not a date stopped at Task Error with `continueonerror`, `errorPath` and an `#error#` branch all set, while a regular task with the same comparison took its error route. Run the comparison in a regular task with `continueonerror`, `errorPath` and an `#error#` branch, write a key only when it held, clear or force-set that key first so no earlier value stands in for it, and let the condition test only `isNotEmpty` or `isEmpty` on it. Only the first step was observed; the rest is reasoned and unwalked (P21). See [references/task-types.md](references/task-types.md).
- P19. An enrichment that can return nothing gets a branch for the case where it does, and the empty branch is wired somewhere explicit. A path that RESOLVES can still arrive empty: ERR-015 asks whether some upstream task declares the path, and no static check can ask whether the task returned anything. A command that declares an output still returns nothing on a search that matched nothing or an identifier that no longer exists, and then the next command runs with a blank argument and the playbook reaches its end having done nothing. Judges scoring playbooks authored with this bundle found exactly that on seven of eight. Availability is a different question -- an enabled integration still returns zero rows -- so a `modules` or `IsIntegrationAvailable` test does not discharge this. See [references/context-and-dataflow.md](references/context-and-dataflow.md).
- P18. Always read the finished playbook as a reviewer before shipping it. Every check in this bundle is structural. A playbook can satisfy all of them, resolve every path, and still branch the wrong way, contain nothing, or close an incident it should have escalated. That failure is invisible to static analysis and is the one that matters most.
- P17. Always use British English in comments and descriptions (normalise, analyse, behaviour, colour).
## What the checks are measured against
The catalogue and the vocabularies are derived from the public `demisto/content` corpus, and each asset records its basis: the vocabularies and the layout geometry were measured over 1,635 playbooks, 25,620 tasks and 32,729 parent-to-child edges (the `_meta` and `layout.basis` of `assets/operators.json` and `assets/task_defaults.json`), and the catalogue holds 13,749 commands from 1,311 brands and 1,438 automations. The hand-curated Builtin list was mined for 0.1.0, from a different checkout of 1,641 playbooks, as its note records.
The command catalogue is a snapshot of that repository's master as it stood on 2026-07-24, plus six commands from one open public contribution, so a command added upstream since is reported as unknown. [references/command-index.md](references/command-index.md) says which snapshot, and which six.
Two figures set expectations for the linter:
- Against shipped content, 72 per cent of the playbooks in the upstream checkout measured for 0.21.0 lint error-free, up from 60 per cent before that release. The largest error codes are ERR-012, 537 uses of deprecated commands, which are genuine; ERR-017, 303 reads of an undeclared input; and ERR-016, 232 declared-but-unused inputs, which demisto-sdk validates as PB118 too. ERR-016 was 644 before 0.21.0, and 412 of those were false: inputs read only by a filter or condition operand, or only through one of their fields. Legacy content predates these checks; new content has no reason to trip them.
- The residual tail is context that is only knowable at run time -- a `Set` automation writing a key named by an argument, a form writing its answers under its title, a sub-playbook whose outputs are not resolvable from one file. The linter models the first two and reports the third honestly as WARN-011 rather than guessing.
`scripts/_pbyaml.py` was verified for 0.1.0 against every playbook in the upstream checkout measured then: each parses to results identical to the reference YAML implementation, and re-emits so that implementation reads it back unchanged.
## Decisions this bundle has taken and will not revisit
A decision recorded only in the session that made it is a decision the next session
makes again, possibly differently. Anything here has been settled; re-open it only with
something new, and add the new thing.
| Decision | Reason |
| --- | --- |
| This bundle does not own a safe wrapper for the anchor-guard idiom, and does not document one. DECLINED, 2026-08-31. | The idiom never worked. Giving it a home here would make it look supported, and the honest form of "do not use this" is an absence rather than a wrapper with a warning on it. Where a value genuinely cannot be kept out of a query, the fail-closed character gate belongs to the caller that can walk the task graph and prove it, which this bundle cannot do from one playbook file. |
| This bundle does not author Triggers, and never has. | Its scope is `Packs/<pack>/Playbooks/playbook-*.yml`, nothing under `scripts/` emits one, and writing one needs the pack's correlation `alert_name`, which this bundle never sees. Trigger authoring is in any case paused, by a project decision of 2026-08-08. |
## References (load on demand)
- [references/playbook-structure.md](references/playbook-structure.md) -- the file's anatomy: top-level keys, the task map, what the platform requires
- [references/task-types.md](references/task-types.md) -- the six live task types, what each one needs, and the per-type boilerplate
- [references/context-and-dataflow.md](references/context-and-dataflow.md) -- how context is written and read, the `complex` reference, transformers and filters, and what makes a reference resolvable
- [references/validation-codes.md](references/validation-codes.md) -- every ERR / WARN code, what it means, and the demisto-sdk validator it mirrors
- [references/layout-geometry.md](references/layout-geometry.md) -- the measured grid, and why a layered DAG layout reproduces rather than approximates the editor
- [references/command-index.md](references/command-index.md) -- what the index carries, which commands are thin and why per-brand selection beat per-command, and the one lossy transform
- [references/platform-issue-context.md](references/platform-issue-context.md) -- the `issue` trigger root and its array fields, why an undefaulted input resolves to empty rather than failing, and the XDM field set GoCortexIO content puts on an issue
- [references/gotchas.md](references/gotchas.md) -- the traps that cost time: YAML 1.1 booleans as branch keys, deprecated command renames, anchors, argument aliases, open-argument Builtins, undefaulted inputs, what the XQL command does to a result without saying so
- [references/drain-playbooks.md](references/drain-playbooks.md) -- the shape of a playbook that drains a population on a schedule: the marking invariant and its two exceptions, convergence, clearing context first, the single writer and its two gates, one-pass scoring, and starting an adopted playbook from outside
- [references/run-history.md](references/run-history.md) -- why failure here is silent, what `playbook_tasks` can and cannot tell you, and how to make a playbook debuggable before you need to debug it
- [references/worked-example.md](references/worked-example.md) -- one end-to-end walkthrough from a described workflow to a lint-clean file
## Scripts
Python 3.9+ standard library only -- no third-party packages, no network access. Run from the bundle root.
- `python3 scripts/lookup_command.py <command> [...]` -- resolve a command, automation or Builtin against the catalogue: providing brands, arguments with the required ones marked, and the context paths it writes. `--search <text>` finds a command by name, `--brand <name>` lists what an integration provides, `--produces <path>` answers which command writes a context path. Deprecated commands are excluded from listings and reported as an error on direct lookup, naming the replacement. Exits 1 when any lookup failed or resolved to a deprecated command. `--brand` lists the commands of every brand whose recorded name CONTAINS the text, case-insensitively, and a recorded name can differ from the one an integration displays: CrowdStrike's main integration is recorded as `CrowdstrikeFalcon`, so `--brand "CrowdStrike Falcon"` lists only the other CrowdStrike integrations. Take the name from the `brands:` line of a direct lookup first.
- `python3 scripts/scaffold_playbook.py <spec.json> -o <file.yml>` -- build a complete playbook from a declarative task graph. Derives identifiers, boilerplate, layout and file shape; refuses deprecated commands, task keys it does not read and a condition with no operator; lints a temporary copy and writes nothing on a refusal or an error, exiting 1. `--example` prints a minimal spec, `--print` writes to stdout and prints nothing on a failure (use `-o` to keep the last good file), `--no-lint` writes unchecked.
- `python3 scripts/lint_playbook.py <playbook.yml> [...]` -- structural, catalogue and dataflow checks. `--list-codes` lists every check; `--json` emits machine-readable findings. Exits 1 on any error-severity finding; warnings never change the exit code.
- `scripts/_pbyaml.py` and `scripts/_index.py` are shared modules, not entry points: the playbook YAML reader and writer, and the asset loaders.
If Python cannot run, the references remain usable as documentation, and [references/validation-codes.md](references/validation-codes.md) is the checklist to walk by hand.
## Assets
- `assets/command_index.json.gz` -- 13,749 integration commands and 1,438 automations. Every one present by NAME, so a command name can be checked rather than remembered. Commands of the 549 brands any corpus playbook calls, the live brands, carry full arguments and output paths. Any other command that is not deprecated carries existence only and is marked `thin` -- 5,705 of them, `thin_commands` in the asset's `_meta` -- which `lookup_command.py` reports and WARN-016 raises rather than passing off as "takes nothing, returns nothing". Stored compactly and expanded on load by `scripts/_index.py`. See [references/command-index.md](references/command-index.md).
- `assets/builtin_commands.json` -- the 42 server-side `Builtin|||` commands, which no integration definition declares and which therefore cannot be derived from the corpus.
- `assets/operators.json` -- the condition, filter and transformer vocabularies with corpus frequencies, and the three reserved branch keys.
- `assets/task_defaults.json` -- per-task-type emission defaults and the measured layout geometry.
- `assets/example_spec.json` -- the worked example's spec.
## Bundle integrity tests
From the bundle root:
```sh
PYTHONDONTWRITEBYTECODE=1 python3 -m pytest tests -q -p no:cacheprovider
```
The scripts need only the Python 3.9+ standard library; the suite needs pytest as well (`python3 -m pip install pytest`), and `PYTHONDONTWRITEBYTECODE=1` and `-p no:cacheprovider` stop it writing `__pycache__` and `.pytest_cache` into the bundle. `python3 -m unittest` is not a substitute: without pytest it cannot import the standard suite, and with pytest installed it skips the pytest-style tests without saying so. See [tests/README.md](tests/README.md) for what each test guards.