build

A project setup command that creates a new project from an OpenSpec specification. OpenSpec is a format and tool for describing software requirements in detail.

In plain words
What is it for?
Use it to create the project directory, initialize OpenSpec for Claude, and copy the project context needed for coding.
Why use it?
It prepares a separate, clean project for implementation and checks that the required specification and OpenSpec command-line tool are available.

Command

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/arslan70/haytham/build
Clone the repo
git clone --depth 1 https://github.com/arslan70/haytham
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,947 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00014 $0.01947
Opus 5 $0.00007 $0.00974
Sonnet 5 $0.00003 $0.00389
Haiku 4.5 $0.00001 $0.00195

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

Security

Grade C, and why

build scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .haytham/session/
commands/build.md · 136 lines

How it starts

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

Haytham: Build Setup (Phase 5 - BUILD)

You are setting up a new project directory from Haytham's Phase 4 OpenSpec output. Implementation happens in a SEPARATE Claude Code session to ensure the code is generated purely from specs, not from the current plugin context.

Prerequisites

Verify .haytham/session/phase-4-specs/openspec/config.yaml exists. If it doesn't, tell the user:

"Phase 4 (specification) must be completed first. Run /haytham:plan to start."

Check that the user provided a project directory argument. If not, read .haytham/session/phase-4-specs/openspec/config.yaml, extract the name field, and use it as the directory name.

Verify the OpenSpec CLI is installed:

command -v openspec

If not found, tell the user to install it with npm install -g @fission-ai/openspec@latest and re-run /haytham:build. Stop here.

Build

  1. Check if the project directory already exists. If it does, ask the user if they want to overwrite.

  2. Create the directory and initialize OpenSpec:

    mkdir -p <project-directory> && cd <project-directory> && openspec init --tools claude
    
  3. Copy project context files:

    • Copy .haytham/session/phase-4-specs/openspec/project.md to <project-directory>/openspec/project.md, overwriting the default.
    • Copy .haytham/session/phase-4-specs/openspec/config.yaml to <project-directory>/openspec/config.yaml. This carries project metadata (name, description, tech choices) that downstream tools need.
  4. Copy domain specs: copy all spec directories from .haytham/session/phase-4-specs/openspec/specs/ into <project-directory>/openspec/specs/. Preserve the directory structure (each {domain}/spec.md).

  5. Create the initial-mvp change directory and seed it:

    mkdir -p <project-directory>/openspec/changes/initial-mvp
    cp -r <project-directory>/openspec/specs <project-directory>/openspec/changes/initial-mvp/specs
    

    Then read .haytham/session/phase-3-how/research-directives.json and generate <project-directory>/openspec/changes/initial-mvp/design.md containing the resolved research findings for capabilities that have research_required: true. Format as a markdown document with one section per capability. For each capability, list the research findings (verified integration patterns, env var names, SDK methods, API details) as actionable implementation guidance. If a directive has both questions and findings, present the findings as resolved answers. If a directive has questions but no findings, flag them explicitly as unresolved and mark them as requiring resolution during implementation: "⚠️ UNRESOLVED: [question]. This must be resolved during implementation. Do not proceed with assumptions." The coding agent must resolve these before implementing the affected capability.

Read the full file on GitHub · 136 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 · 136 lines · 14 tokens per session scan C f5ba3e17c726

Subscribe to this mod's changes

build is a command published in the GitHub repository arslan70/haytham (13 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 1,947 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.