How to Write Tasks

This document defines how a human must write tasks for the LLM.

Apply naming rules from prompts/flavors/01-semantic-sort-naming.md.

1. Task Structure

Follow the applicable project rules for all task-writing requirements.

Every task must contain these sections in order:

The task file ends with one OUTPUT: line that restates the response representation in a sentence, including whether the response ends with the VERIFICATION: line. It is the last line the LLM reads, which keeps the format requirement in recent context.

The phrase Execute the next TODO task selects the first unchecked TODO.md item; the LLM drafts a conforming task from it and the human ratifies it before execution.

1.1 Task and Feature Workflow

2. Section Meaning

3. Writing the TASK-DESCRIPTION Section

The operation lines are the machine-checkable statement of scope; TASK-FILES must agree with them (section 6).

A vague phrase such as “update related tests” or “adjust supporting files” authorizes nothing; only an operation line does.

Example:

## TASK-DESCRIPTION
    - Create: `scripts/site-build.sh`
    The script generates `site.out/` from `site.in/`.
    - Create: `site.in/hello.txt`

4. Writing the TASK-OUTPUT Section

TASK-OUTPUT must be explicit.

End the task file with the one-line OUTPUT: restatement (section 1).

Examples:

## TASK-OUTPUT
    Provide only the complete content of `scripts/site-build.sh`, then the `VERIFICATION:` line.
## TASK-OUTPUT
    Produce these complete files in this order, then the `VERIFICATION:` line:
    1. `sources/auth/auth_handler.cpp`
    2. `sources/auth/auth_handler.h`
## TASK-OUTPUT
    Provide a semantic-sort plan followed by the complete requested file content, then the `VERIFICATION:` line.

5. Writing the TASK-CONTEXT Section

Use TASK-CONTEXT for existing file contents, requirements, constraints, notes, and data samples.

Markdown headers collide with Markdown inside copied data, so delimit each component with an explicit tag:

6. Writing the TASK-FILES Section

Use TASK-FILES to declare the exact operations and paths in scope, as a table:

## TASK-FILES
    
    | Operation | Path |
    |---|---|
    | create | `scripts/site-build.sh` |
    | create | `site.in/hello.txt` |

6.1 Writing the TASK-VERIFY Section

Use TASK-VERIFY to declare how the work is checked, so verification is not buried in the description.

Example:

## TASK-VERIFY
    - Run: `make test` from the repository root.
    - Expected: exit status 0.

6.2 Writing the TASK-ACCEPTANCE Section

Use TASK-ACCEPTANCE to state which requirements the task claims to satisfy, so acceptance is traceable.

Example:

## TASK-ACCEPTANCE
    - `SITE-BUILD-R001`
    - `SITE-BUILD-R002`

6.3 Writing the TASK-FEATURES Section

Use TASK-FEATURES to list the feature files whose requirements the task applies.

Example:

## TASK-FEATURES
    - `prompts/features/01-site-build.md`

7. Task Patterns to Avoid

8. Human Override