partition-dev

partition-dev is a command for coding agents from punt-labs/z-spec. It costs 12 tokens per session (5,360 once invoked), scanned A, original, MIT.

A command that derives test cases from a Z specification using the Test Template Framework, a method for dividing each operation into distinct behavior categories.

In plain words
What is it for?
Use it to partition all operations or one selected operation, export the results as Markdown or JSON, and optionally generate executable test code.
Why use it?
It helps reveal missing test situations by turning the specification's rules into a structured set of cases.

Command

Part of the z-spec-dev plugin — 42 commands, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/punt-labs/z-spec/partition-dev
Clone the repo
git clone --depth 1 https://github.com/punt-labs/z-spec

Or install z-spec-dev, the plugin that ships this one along with the rest of its 42 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for partition-dev

README.md
[![agentmods](https://agentmods.dev/badge/commands/punt-labs/z-spec/partition-dev.svg)](https://agentmods.dev/commands/punt-labs/z-spec/partition-dev)
Your own site
<a href="https://agentmods.dev/commands/punt-labs/z-spec/partition-dev"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/partition-dev.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,360 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.05360
Opus 5 $0.00006 $0.02680
Sonnet 5 $0.00002 $0.01072
Haiku 4.5 $0.00001 $0.00536

Measured 4d ago against content hash 78d4cd504591, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

partition-dev scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • partition — 95% identical, 22 lines differ
plugin/commands/partition-dev.md · 548 lines

How it starts

The opening of the file, as written. The whole thing — 548 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/z-spec-dev:partition-dev - Derive Test Cases from Z Specification

Apply Test Template Framework (TTF) tactics to operation schemas in a Z specification to produce a complete partition table of test cases. Each partition represents a distinct behavioral class that must be tested to verify the implementation conforms to the spec.

Input

Arguments: $ARGUMENTS

Parse arguments:

  • First positional argument: Z specification file (default: search docs/*.tex)
  • --code [language]: Generate executable test code (auto-detect language if omitted)
  • --operation=NAME: Partition a single operation (default: all operations)
  • --json: Output partition data as JSON instead of markdown

Process

0. Prerequisites

This command requires no external tools. It reads an existing Z specification and applies testing tactics analytically. The specification should already exist and have been type-checked (via /z-spec-dev:check-dev).

1. Locate the Specification

If a file path is provided, use it directly.

If no file specified:

  • Look in docs/ for .tex files containing Z specifications
  • If multiple found, ask user to specify

Read the specification file.

2. Extract Operation Schemas

Scan the specification for operation schemas. An operation schema is any schema containing \Delta or \Xi:

\begin{schema}{OperationName}
\Delta State \\        % or \Xi State
input? : Type \\       % inputs (optional)
output! : Type         % outputs (optional)
\where
% predicates
\end{schema}

For each operation, extract:

  • Name: The schema name
  • Kind: \Delta (state-changing) or \Xi (query)
  • State schema: The referenced state schema name
  • Inputs: Variables ending in ? with their types
  • Outputs: Variables ending in ! with their types
  • Predicates: All clauses in the \where block

If --operation=NAME is specified, process only that operation.

3. Resolve Context

Before partitioning, resolve the context each operation needs:

Read the full file on GitHub · 548 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 548 lines · 12 tokens per session scan A 78d4cd504591

Subscribe to this mod's changes

partition-dev is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed 4d ago), licensed MIT. It adds 12 tokens to every session and 5,360 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.