Skip to content

Complete One Feature

This example has one continuous subject: exporting saved-search names and queries as CSV. The requirement, documents, files and tests all refer to that subject. The bundled implementation is a deliberately small serialization boundary, not a complete web application.

Do not copy the demonstration documents into a project and call them approved. They are real native-rendered drafts created for this guide. The workflow must classify your actual request, collect your decisions and establish its own current approvals and evidence.

Reading these drafts and running the standalone Python exercise needs no host authority. Completing new full-lane HTML work is different: the current production verification and review adapters cover Codex and Claude Code only, and Pi has no qualified prompt-approval seam. Stop at an unsupported boundary rather than substituting a chat claim or a Markdown pair. Check the typed-artifact host boundary for your exact installation before attempting the end-to-end lane.

Use a disposable repository, not production. Confirm the repository open in the host matches git rev-parse --show-toplevel in your native terminal. Inspect git status --short; preserve unrelated changes. Run the host’s doctor and resolve failed checks before starting.

State the requirement to your host:

Add a saved-search CSV export. Export names and queries in their existing order. Preserve commas, quotes, newlines and Unicode through CSV round-trip. Return no export for an empty collection. Keep authentication, file writes, and browser download delivery outside this serializer change.

An explicit Claude Code entry is /ca:feature "add the saved-search CSV export contract". Codex uses $ca-feature; Pi uses /ca-feature. Understood intent can route without command syntax.

Let the classifier explain full lane, small lane, or resume. A new public application interface can require the full lane; a two-file serializer repair may meet the small-lane limits. The existence of a full-lane demonstration here does not force your tiny fixture into that lane. Do not invent extra scope to obtain an HTML pair. Small work keeps its confirmed mini-spec and triage record; existing Markdown authority retains its exact format.

The specification should make these three observations explicit:

CriterionObservable resultNamed fixture check
AC-001
A parsed export has name,query headers and one row per input record in order.
TestExport.test_rows
AC-002
Quoted commas, quotes, newlines and Unicode round-trip without changing field values.
TestExport.test_round_trip
AC-003
Empty input returns None, rather than a header-only export.
TestExport.test_empty

Replace “handle special characters correctly” with the AC-002 observation above. Check that “no export” really means None at this function boundary, not a UI message or an empty file. Those are different interfaces and would require different acceptance criteria.

Request corrections before proceeding. For example: “Keep the existing search order; do not sort by name. Make the empty return value explicit.” The example artifacts are drafts even though their structure validates. Your actual feature or sprint owns its approval ceremony; viewing an HTML file never grants that approval. See Review artifacts.

In a qualified full-lane run, locate .codearbiter/specs/<slug>.html and its same-slug plan. The plan should refer to the specification’s criterion IDs and name the files, dependencies and checks needed to deliver them. A draft preview can exist before it is ready or authorized to run. The following workbench projects those relationships from the real demonstration drafts.

One goal. Connected records.

Export saved searches

Unapproved fixture

Choose a criterion to follow its connection into the plan. These are real native-rendered drafts, not a live coding session.

Specification Draft

AC-001 · Preserve fields and order

Parsed CSV has name/query headers and one row for each record in input order.

Given
Two saved searches with plain text fields.
When
Export the collection.
Observe
Parsed CSV has name/query headers and one row for each record in input order.
Open the native specification

Implementation plan Pending

T-001 · Preserve fields and order

References AC-001

export_csv.py + test_export_csv.py

python -m unittest -v test_export_csv.TestExport.test_rows

Required check: TestExport.test_rows

Open the native plan

Specification Draft

AC-002 · Round-trip special characters

Every field equals the original text after CSV round-trip.

Given
A record containing commas, quotes, newlines and Unicode.
When
Export and parse using the standard CSV reader.
Observe
Every field equals the original text after CSV round-trip.
Open the native specification

Implementation plan Pending

T-002 · Round-trip special characters

References AC-002

export_csv.py + test_export_csv.py

python -m unittest -v test_export_csv.TestExport.test_round_trip

Required check: TestExport.test_round_trip

Open the native plan

Specification Draft

AC-003 · Keep an empty result explicit

The function returns None, not a header-only export.

Given
The input collection is empty.
When
Request an export.
Observe
The function returns None, not a header-only export.
Open the native specification

Implementation plan Pending

T-003 · Keep an empty result explicit

References AC-003

export_csv.py + test_export_csv.py

python -m unittest -v test_export_csv.TestExport.test_empty

Required check: TestExport.test_empty

Open the native plan

Structural checks passed. Approval checks did not. Task eligibility was refused with DRAFT_BINDING. The local Python tests shown in the tour do not approve or accept these drafts.

Inspect validation resultsSource and capture identities
Inspect the structured criterion
{
  "applicability": {
    "mode": "conditional",
    "rationale": "Two saved searches with plain text fields."
  },
  "constraint_refs": [],
  "guarantees": [
    "Parsed CSV has name/query headers and one row for each record in input order."
  ],
  "id": "AC-001",
  "intent_refs": [
    "SCOPE-01"
  ],
  "kind": "behavior",
  "obligation": "must",
  "preconditions": [
    "Two saved searches with plain text fields."
  ],
  "scenarios": [
    {
      "given": "Two saved searches with plain text fields.",
      "id": "SCN-AC-001",
      "then": "Parsed CSV has name/query headers and one row for each record in input order.",
      "when": "Export the collection."
    }
  ],
  "source_refs": [],
  "statement": "Parsed CSV has name/query headers and one row for each record in input order.",
  "title": "Preserve fields and order",
  "trigger": "Export the collection.",
  "verification": {
    "evidence_state": "planned",
    "id": "VER-AC-001",
    "method": "automated",
    "negative_control": "An implementation returning None for every input fails the export checks.",
    "oracle": "Parsed CSV has name/query headers and one row for each record in input order.",
    "planned_target": "TestExport.test_rows"
  }
}

The example plan maps T-001, T-002 and T-003 to the three criteria and to the same export_csv.py and test_export_csv.py files. The shared files are a reason to respect ordering, not dispatch all tasks concurrently. Task entries are not separate proof that the whole scope is accepted; typed scope acceptance belongs to the existing review/evidence workflow.

4. Reproduce the bounded fixture without a model

Section titled “4. Reproduce the bounded fixture without a model”

For a plain Python exercise, save the linked baseline as export_csv.py and the tests as test_export_csv.py in a separate disposable folder. These native-terminal steps do not prove that codeArbiter’s host hooks or workflow ran.

From that folder, run the interpreter that resolves on your system:

Terminal window
python -m unittest -v test_export_csv

The incomplete baseline returns None for every input. Expect three tests, with two assertion failures and the empty-input test passing. An import error, missing file or missing Python is not the intended RED result. Fix the setup before treating a failure as behavioral evidence.

In your actual governed feature, let the host perform its approved implementation and review rather than copying an answer to bypass the lane. In the standalone exercise only, replace export_csv.py with the completed serializer and rerun the same command. Expect all three tests to pass. Both observed local runs are preserved in the capture envelope, including implementation and test digests.

5. Review the result and handle interruption

Section titled “5. Review the result and handle interruption”

The serializer uses Python’s CSV writer rather than joining fields with commas. Inspect the actual diff: it must not add persistence, authentication, dependencies or unrelated formatting. Run your repository’s required verification in addition to the focused tests. Check reviewer findings and ensure their dispositions refer to the current work, not a stale version.

If a real task is interrupted, resume the same pipeline. Inspect uncommitted changes and the recorded state. Reconcile IN_PROGRESS before redispatch; collect fresh evidence for REVIEW; resolve the reason for BLOCKED. Do not set a status in the HTML yourself. Use Resume and recover for the exact diagnostic.

Follow one bounded change

This is an explanatory walkthrough. Only the native draft generation and the Python test runs are captured execution; conversation, review and PR steps below are illustrative.

Start with the outcome

Export my saved-search names and queries as CSV, preserving their order and punctuation. Do not create an export when there are no searches.

This fixture covers a pure serialization function. It does not implement a download UI, authenticate a user, or write a file.

Make the ambiguous part testable

Handle special characters correctly.

After parsing the export with the CSV reader, names and queries containing commas, quotes, newlines and Unicode equal their original values.

This is an illustrative review correction, not a recorded human approval. Inspect AC-002 in the workbench and request revisions through your own workflow.

Observe actual local fixture tests

Incomplete baseline · exit 1

test_empty (test_export_csv.TestExport.test_empty) ... ok
test_round_trip (test_export_csv.TestExport.test_round_trip) ... FAIL
test_rows (test_export_csv.TestExport.test_rows) ... FAIL

======================================================================
FAIL: test_round_trip (test_export_csv.TestExport.test_round_trip)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<fixture-root>/test_export_csv.py", line 19, in test_round_trip
    self.assertEqual(self.parse([record]), [["name", "query"], [record["name"], record["query"]]])
                     ~~~~~~~~~~^^^^^^^^^^
  File "<fixture-root>/test_export_csv.py", line 10, in parse
    self.assertIsInstance(result, str, "Non-empty searches must produce CSV text")
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None is not an instance of <class 'str'> : Non-empty searches must produce CSV text

======================================================================
FAIL: test_rows (test_export_csv.TestExport.test_rows)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<fixture-root>/test_export_csv.py", line 14, in test_rows
    rows = self.parse([{"name": "Open", "query": "state:open"}, {"name": "Mine", "query": "owner:me"}])
  File "<fixture-root>/test_export_csv.py", line 10, in parse
    self.assertIsInstance(result, str, "Non-empty searches must produce CSV text")
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None is not an instance of <class 'str'> : Non-empty searches must produce CSV text

----------------------------------------------------------------------
Ran 3 tests in 0.001s

FAILED (failures=2)

Completed serializer · exit 0

test_empty (test_export_csv.TestExport.test_empty) ... ok
test_round_trip (test_export_csv.TestExport.test_round_trip) ... ok
test_rows (test_export_csv.TestExport.test_rows) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.000s

OK

The empty-input check already passes in the baseline. The other two fail by assertion, not by import or fixture error. These results are not workflow acceptance receipts.

Read the captured test envelope

Do not turn an interruption into a new authority

In a real interrupted run, inspect the persisted task and working changes. An IN_PROGRESS task requires reconciliation before redispatch; REVIEW requires fresh evidence. The demonstration documents remain draft throughout this tour.

Follow the recovery guide

Check the complete delivery boundary

A real finish includes current requirements, relevant tests, review findings and their dispositions, the authorized commit, and a PR. Passing the three serializer tests is not enough to claim that whole chain.

No PR for a saved-search application was created by this fixture. Use the complete feature guide to perform those actions in your own repository.

Complete one feature

Use the normal governed commit and PR flow for the repository you are changing. Explicit entries are /ca:commit and /ca:pr on Claude Code, with the documented host-native equivalents on Codex and Pi. Inspect the staged paths and diff, require current verification, and authorize the actual actions. A command transcript or sample green result is not authorization.

Before calling the work complete, inspect the approved definition, criterion coverage, current verification, reviewer findings, commit and PR. Confirm hosted checks on the exact PR head before merging; you retain the merge decision. This documentation fixture creates no application PR and provides no commit-gate receipt. Its local tests do not establish that a user approved the work, a host dispatched it, or a complete application was delivered.

Keep your resulting branch and records. Use Return to a project for the next session, or Arbiter Academy P01 after completing its published prerequisites for a separately verified practice environment.