Documentation

Testing & Proof

Manifest integrates testing into the feature lifecycle. Agents write tests before implementation, record evidence with prove_feature, and cannot complete a feature without a passing proof. This ensures every implemented feature has verified test coverage.

TDD workflow

When an agent calls start_feature, the response includes testing guidance. The agent follows the red-green cycle:

  1. Write failing tests: based on the acceptance criteria in the feature spec
  2. Record red proof: call prove_feature with test results showing failures
  3. Implement: write code to make the tests pass
  4. Record green proof: call prove_feature again with passing results
  5. Complete: call complete_feature (requires exit code 0 from latest proof)

prove_feature

The prove_feature tool records test evidence for a feature. It accepts structured test results so Manifest can display pass/fail statistics and individual test outcomes.

prove_feature(
  feature_id: "...",
  exit_code: 0,
  results: [
    { name: "creates a user", suite: "UserSpec", state: "passed",
      file: "tests/user_spec.rs", line: 42, duration_ms: 12 },
    { name: "rejects duplicate email", suite: "UserSpec", state: "passed",
      file: "tests/user_spec.rs", line: 58, duration_ms: 8 }
  ]
)

Structured results

Each test result includes:

FieldRequiredDescription
nameYesTest name
suiteNoTest suite or module
stateYespassed, failed, errored, or skipped
fileNoSource file path
lineNoLine number in source
duration_msNoExecution time in milliseconds
messageNoError message (for failures)

The agent is the universal adapter: it runs whatever test framework the project uses, parses the output, and provides results in this structured format.

Test adapters

Manifest auto-detects common test frameworks and knows how to parse their output:

AdapterFrameworkDetected commands
cargo-testRustcargo test, cargo nextest
pytestPythonpytest, python -m pytest
jestJavaScript / TypeScriptjest, vitest, npx jest, pnpm test, npm test, bun test
go-testGogo test
dotnet-test.NET (xUnit, NUnit, MSTest)dotnet test
rspecRubyrspec, bundle exec rspec, bin/rspec
junitJava (Maven, Gradle)mvn test, gradle test, ./gradlew test
phpunitPHPphpunit, php artisan test, ./vendor/bin/phpunit
swift-testSwiftswift test
elixir-testElixirmix test
dart-testDart / Flutterdart test, flutter test

Custom adapters

For unsupported frameworks, create a Lua adapter in .manifest/adapters/. The adapter receives raw test output and returns structured results. See the prove_feature tool reference for the full interface.

Evidence panel

The web UI displays proof evidence in a collapsible sidebar panel on the feature detail view. The panel shows:

  • Proof stats: Total tests, passed, failed, skipped counts
  • Test results: Individual test outcomes with names, durations, and error messages
  • History: Previous proof recordings showing the red-green progression
  • Exit code: Whether the latest run passed (exit code 0) or failed

The panel appears when a feature has at least one proof recording. Click the test tube icon or the proof stats badge to expand it.

Completion gate

complete_feature enforces a passing proof:

  • The feature must have at least one prove_feature recording
  • The latest proof must have exit_code: 0
  • If the latest proof has failures, the agent must fix and re-prove before completing

This gate ensures that every implemented feature has verified, passing tests.

Next step

Continue to Product versions.