craft-task

A guided writing tool for preparing task and operating documents for Pact, a contract-first software engineering framework. It asks about the product, scope, risks, technology, standards, and budget.

In plain words
What is it for?
Writing task.md and sops.md files, describing inputs and outputs, identifying difficult cases, recording technical standards, and choosing an appropriate build approach.
Why use it?
It helps turn an unclear software idea into instructions that other agents can divide, implement, and review. It also helps decide whether Pact is suitable for the work.

Command for Claude Code

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/jmcentire/pact/craft-task
Clone the repo
git clone --depth 1 https://github.com/jmcentire/pact

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 775 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.00000 $0.00775
Opus 5 $0.00000 $0.00387
Sonnet 5 $0.00000 $0.00155
Haiku 4.5 $0.00000 $0.00077

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

Security

Grade A, and why

craft-task 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 2d 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.

.claude/commands/craft-task.md · 76 lines

How it starts

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

You are helping the user craft an optimal task specification for Pact, the contract-first multi-agent software engineering framework. Your goal is to produce a task.md and sops.md that will lead to high-quality decomposition, contracts, and implementations.

Interview the User

Start by asking these questions one at a time (adapt based on answers):

  1. What are you building? Get a concrete description. Push for specifics: inputs, outputs, who uses it, what it replaces.

  2. What's the scope? Help them calibrate:

    • If it's a single module (<500 LOC), suggest build_mode: unary -- Pact still gives you contracts and tests but skips decomposition overhead.
    • If it has 2-7 independent subsystems with clean interfaces, that's Pact's sweet spot.
    • If it's a bug fix or small feature, suggest skipping Pact entirely.
  3. What are the hard parts? The risks, edge cases, and "this is where it usually goes wrong" moments. These become the most valuable contract invariants.

  4. What's your stack and standards? Language, framework, testing framework, coding conventions. These go in sops.md.

  5. What's your budget tolerance? Help them set a realistic pact.yaml budget based on component count.

Write the Artifacts

Once you have enough context, generate three files:

task.md

Write a task description that follows these research-backed principles:

  • Lead with action verbs. Pact's north-star validation checks that contract functions cover the verbs in your task. "Parse configuration files, validate schemas, and emit typed events" is better than "A system that handles configuration."

  • State constraints explicitly. "Must handle 10K concurrent connections" or "Must complete in under 200ms for inputs up to 1MB." Vague constraints produce vague contracts.

  • Name the boundaries. If you know the components, name them: "The parser reads YAML files and produces a typed AST. The validator checks the AST against a schema. The emitter converts validated ASTs to events." This guides decomposition toward natural boundaries.

Read the full file on GitHub · 76 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. 2d ago First seen · 76 lines · 0 tokens per session scan A 675d4c819ec2

Subscribe to this mod's changes

craft-task is a command published in the GitHub repository jmcentire/pact (164 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 775 tokens. 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-30.