Export

The export phase transforms spec files into a format optimized for a specific AI agent.

intake export <SPEC_DIR> -f <format> -o <output>

Available Formats

FormatStatusWhat it generates
architectImplementedpipeline.yaml + spec copy
genericImplementedSPEC.md + verify.sh + spec copy
claude-codePlannedCLAUDE.md + tasks + verify.sh
cursorPlannedCursor format
kiroPlannedKiro format

Architect

Generates a pipeline.yaml compatible with architect and a copy of the spec files.

intake export specs/my-feature/ -f architect -o output/

Generated Structure

output/
├── pipeline.yaml       # Workflow with one step per task
└── spec/               # Copy of all spec files
    ├── requirements.md
    ├── design.md
    ├── tasks.md
    ├── acceptance.yaml
    ├── context.md
    └── sources.md

pipeline.yaml

name: my-feature
description: "Pipeline generated by intake from spec 'my-feature'"
steps:
  - name: task-1
    agent: build
    prompt: |
      Implement task 1: Setup project structure

      Create the initial project structure with the following files...

      Project context:
      [first 2000 chars of context.md]
    checkpoint: true

  - name: task-2
    agent: build
    prompt: |
      Implement task 2: Implement user model
      ...
    checkpoint: true

  # ... one step per task in tasks.md ...

  - name: final-verification
    agent: review
    prompt: "Verify that the entire implementation meets the spec requirements."
    checks:
      - "python -m pytest tests/ -q"
      - "ruff check src/"
      # ... all required command checks from acceptance.yaml ...

Each step includes:

FieldDescription
nametask-{id} based on the task ID
agentbuild for tasks, review for final verification
promptTitle + description + project context
checkpointtrue — pauses after each task for review
checksOnly in the final step: list of verification commands

Options

The ArchitectExporter accepts include_guardrails (configurable via export.architect_include_guardrails).


Generic

Generates a consolidated SPEC.md, an executable verify.sh, and a copy of the spec files. Compatible with any agent or manual workflow.

intake export specs/my-feature/ -f generic -o output/

Generated Structure

output/
├── SPEC.md            # Consolidated Markdown with all sections
├── verify.sh          # Executable bash script
└── spec/              # Copy of all spec files
    ├── requirements.md
    ├── design.md
    ├── tasks.md
    ├── acceptance.yaml
    ├── context.md
    └── sources.md

SPEC.md

A single Markdown file that consolidates:

  1. Project Context — contents of context.md
  2. Requirements — contents of requirements.md
  3. Design — contents of design.md
  4. Tasks — contents of tasks.md
  5. Sources — contents of sources.md

Useful for pasting directly into an agent’s context.

verify.sh

A self-contained bash script that runs the command checks from acceptance.yaml:

#!/usr/bin/env bash
set -euo pipefail

PROJECT_DIR="${1:-.}"
PASS=0
FAIL=0

check() {
    local name="$1"
    local cmd="$2"
    if (cd "$PROJECT_DIR" && eval "$cmd") > /dev/null 2>&1; then
        echo "PASS: $name"
        PASS=$((PASS + 1))
    else
        echo "FAIL: $name"
        FAIL=$((FAIL + 1))
    fi
}

check "Tests pass" "python -m pytest tests/ -q"
check "Lint clean" "ruff check src/"

echo ""
echo "Passed: $PASS  Failed: $FAIL"

if [ "$FAIL" -gt 0 ]; then
    exit 1
fi

The script:

  • Accepts an optional PROJECT_DIR argument (default: .)
  • Runs each check with the check() function
  • Reports PASS/FAIL for each check
  • Shows totals at the end
  • Exit code 1 if any check failed, 0 if all passed
  • Generated with automatic chmod +x

Usage Without intake

The generic exporter allows verification without having intake installed:

# In CI or on the developer's machine
./output/verify.sh /path/to/project

Exporter Protocol

Exporters follow the Exporter Protocol:

@runtime_checkable
class Exporter(Protocol):
    def export(self, spec_dir: str, output_dir: str) -> list[str]: ...

The export() method receives the spec directory and the output directory, and returns the list of generated files.

To add a new exporter there are two options:

Option 1: Built-in Exporter

  1. Create a file in src/intake/export/ (e.g.: cursor.py)
  2. Implement the export(spec_dir, output_dir) -> list[str] method
  3. Register it in create_default_registry() and as an entry_point in pyproject.toml

Option 2: External Plugin (V2 ExporterPlugin)

  1. Create a separate Python package
  2. Implement the ExporterPlugin protocol from intake.plugins.protocols
  3. Register as an entry_point in the intake.exporters group in your pyproject.toml

The exporter will be discovered automatically when the package is installed. See Plugins for details.

Note: Since v0.2.0, exporters are discovered automatically via the plugin system. The ExporterRegistry attempts plugin discovery first and falls back to manual registration if it fails.


export:
  default_format: generic                    # Default format
  architect_include_guardrails: true         # Guardrails in pipeline.yaml
  architect_pipeline_template: standard      # Pipeline template
  claude_code_generate_claude_md: true       # Generate CLAUDE.md (future)

The default format can be overridden with --format in the CLI:

# Uses the config default
intake init "My feature" -s reqs.md

# Overrides with architect
intake init "My feature" -s reqs.md -f architect