Working with tasks
Acceptance criteria
ac.md, evidence lines, generated criteria, and checking them against the code and the running app.
Each task has its acceptance criteria in one file, ac.md, in the task’s context directory. Lonca writes it when the worktree is set up, from the criteria the issue states and the ones the rest of the issue asks for. A criterion is met only when each of its checks is ticked, and a tick carries an evidence line that says what it rests on. You and the stage agents work on the same file, and the task’s AC tab shows it, with the count checked on the tab (AC 4/7, green when all are done).
Where the criteria come from
During worktree setup Lonca reads the issue and writes the criteria to ac.md:
- From a Jira issue: the list under a heading such as
Acceptance criteriaorACin the description. List items, checkboxes and labelled criteria (AC1 – Header,### AC2, with the sentence below) all count. The section ends at the next heading. - From a local story: the same, from the story file (see Workspaces and issues).
- When the text has none, Background AI (
ai:in the config, set in Settings → Agents → Background AI) extracts them from the whole issue, and the file names its source asAI extraction.
A criterion is kept whole, up to 2,000 characters on one line, so a long Given/When/Then criterion reaches every stage agent as written; an evidence line, a reason or a line of the head is at most 300. A file holds at most 40 criteria. Refresh reads the issue again and derives the list again; your ticks and their evidence are kept, and a criterion an earlier version cut at 300 characters is still found the same criterion, with its id and ticks.
Generated criteria
An issue often asks for more than its criteria section says: a behaviour in a comment, a field in an attachment, a rule on a linked Confluence page. At setup, Background AI reads the whole issue (description, comments, attachments, fields, history) against the author’s list and adds what the list does not cover, at most 12 criteria.
- Each added criterion is marked Generated on the AC tab. Hover or focus the badge to see where in the issue it came from, such as “comment by Alice, 2026-10-12”.
- The author’s criteria are never restated, split, reworded, objected to or dropped.
- Which criteria are the author’s is read from the issue, never from
ac.md, which agents can write. With the issue unreadable, nothing counts as generated. - Inference runs once per task, at setup. A Refresh does not run it again; a dropped criterion is never inferred back.
- If Background AI could not run (it has eight minutes; a missing command fails at once), the setup step Writing the acceptance criteria says why in orange, with Try again beside it. That runs the inference alone, even once the pipeline is past setup; pause the task first while Lonca drives it (see Worktrees and setup).
Code Check and E2E Check
Every criterion has its checks underneath, each a box of its own:
- Code Check
- Closed on the code side, by a test. Its evidence is typically a spec name.
- E2E Check
- Closed by driving the running app. Its evidence is typically a step and a screenshot.
- A criterion gets an E2E Check only when its repository has an
e2e:block. Without one there is no app to drive, and only the Code Check applies. - Some criteria can be verified only in the code: passwords are hashed, a query is parameterised, no personal data reaches the log. Such a criterion has no E2E line at all. The absence means the check is not needed, not that it is not done.
- The criterion’s own box is derived: it is ticked once every check under it is. You cannot tick it by hand, so a criterion never reads as met while one of its checks is open.
- The Required switch beside each check turns it on or off for that criterion. Off: “Turn off when nothing can drive this check; the criterion then closes without it.” A criterion keeps at least one check, or it could never be met.
The file
ac.md is Markdown, and the indentation is what the parser reads: a criterion at the margin, its checks two spaces in, the evidence four spaces in, under the check it belongs to. Below the head Lonca also writes a short note on how to read the file, left out here.
# SHOP-142 Acceptance criteria
> Task: Export orders as CSV
> Source: Jira description
> Generated: 2026-10-30
> Inferred: 2026-10-30
## Criteria
- [x] AC-1 The orders page has an Export button
- [x] Code Check
- evidence: OrdersPage.spec.tsx › renders the Export button
- [x] E2E Check
- evidence: step 2 · export-button.png
- [ ] AC-2 The CSV holds one row per order, with a header row
- generated: description, 'Export' paragraph
- [x] Code Check
- evidence: csv.spec.ts › writes a header row
- [ ] E2E Check
- [ ] AC-3 Card numbers never reach the export
- [ ] Code Check
## Dropped criteria
- AC-4 The export runs in the background
- generated: comment by Alice, 2026-10-12
- dropped: person · not in this release- Each criterion keeps its id (
AC-1,AC-2) for good: a drop or a Refresh never moves one, since the ids are stored elsewhere (held objections, the E2E scenarios’ headers). - A
generated:line says where a generated criterion came from. It is for display only: whether a criterion is generated is decided from the issue. - The quoted head says where the list came from and when, and, once you have run one, when the code was last audited.
Evidence lines
A tick without evidence carries no more information than the tick, and nobody can audit it. So every tick gets a line under it, four spaces in, that says what it rests on: a file, a test, a screen.
- [x] Code Check
- evidence: src/export/csv.spec.ts › writes a header row- Lonca writes
- evidence:. It also reads- kanıt:, the word earlier versions wrote and older prompts may still ask for. The dash is optional and the keyword is read in any case. - The evidence goes with its box: removing a check removes the line under it, so evidence never attaches to the wrong box.
- The AC tab shows each check’s evidence under it, and no evidence recorded under a tick that has none.
- A verdict of “met” without evidence, from the final check, ticks nothing.
The AC tab
- The head counts criteria met, 3/5 met, and each check apart, code 4/5 · e2e 2/4. Each count is out of the criteria that have that check, so code-only criteria do not make the E2E count look short.
- Tick or clear a Code Check or an E2E Check by its box. The change is written to
ac.mdat once. - A generated criterion has Drop beside it: “Drop AC-2? It is no longer owed; you can restore it.” with an optional Why (optional) and Drop criterion.
- The author’s criteria have Drop too, with a warning: drop one only when this task will not deliver it; the PR lists it as dropped. Only you can drop an author’s criterion. Lonca keeps that drop in its own database, not in
ac.md, so no agent can undo it and a Refresh does not bring the criterion back. A lead can only recommend it, on a question card. - Dropped criteria (N) opens the dropped list, struck through, with who dropped each and why, and Restore on each.
- The foot says the source, when the file was generated, and the last audit.
When the issue has no criteria and none could be extracted, the tab says No acceptance criteria and how the list is made. When every criterion is met, you get a notification.
Audit the code
Audit the code asks Background AI to read the code in the task’s worktree and decide, for each criterion, whether it is met, with a file, a function or a test name as evidence. It runs only when you press it.
- While it runs the head shows Auditing the code · 2m 10s, and the step the model is on. It may take up to eight minutes; you can switch tasks and come back.
- It writes the Code Check only. Reading the code cannot show that a screen works, so it never touches an E2E box.
- A criterion it does not mention is left as it is, and so is one whose Code Check you switched off. It is told to answer “no” when it is unsure.
- The time of the audit goes in the file’s head as
Last audit.
Criteria in the pipeline
A task you hand off is held to its criteria from the plan to the PR (see Handing a task off):
- The planner reads them; the test scenario writer writes E2E scenarios that follow the criteria as they read now.
- Facts over opinions. When Lonca runs the E2E scenarios, their results tick the E2E boxes, and no model can overrule them.
- The final check holds each criterion against the code and the E2E evidence, and writes both boxes with evidence. It runs nothing itself.
- A criterion dropped during the work no longer has its scenario run. A round whose criteria did not change keeps the scenarios already written.
- The PR lists the criteria met, and the criteria dropped, each with why.
Open E2E boxes on verified code
When the final check passes and the only open boxes are E2E checks of criteria whose code is verified, the task does not go back to the implementer: it asks you. Accept them without E2E (their box is removed, and the PR names them), or tick the boxes on the AC tab and run the final check again. Neither a lead nor an answer to a stage agent can close an E2E box.
E2E checks the environment blocks
When Lonca’s own record shows that the environment blocks a criterion’s E2E check (see E2E and sign-in), the final check proposes closing it on its verified code. The card shows one row per criterion, with the reason, the evidence file, Accept AC-1 without E2E and Decline AC-1, and Accept all N without E2E when there are several. There is nothing to tick.
- Declined, the criterion is tested again, with what you write in What to try instead (optional) for the scenario writer. A criterion you declined is yours alone to decide after that.
- Under consultant and autopilot, the task lead may accept it. Its acceptance waits behind the usual countdown with its reason on screen; Stop — I will decide hands the proposal to you. Under assistant, only you decide.
- The AC tab says E2E not run: <reason> · accepted by you (or by the task lead), and the PR says the same under the criterion.
Criteria that cannot be checked here
When a lead finds that the loop keeps failing on criteria that cannot be checked where the task is tested, it can name them when it hands the question to you, and the card offers to skip those. Skipped, testing goes on without them: their scenarios do not run and the final check does not wait on them. Their boxes stay open in ac.md, and the PR names them as not verified. Only you can skip a criterion.
Each criterion the lead named has its own row on the card, with Skip AC-1 and continue testing or Drop AC-1 from this task. When it named several for the same action, Skip all N and continue testing or Drop all N from this task takes them in one go.
- Every criterion the lead named is accounted for on the card. One met or skipped already has no button, and the card says No action left for AC-1: met or skipped already. One that is not among the task's criteria is named as such.
- When the criteria cannot be read, the card says so with the criteria the lead offered, and Read again reads them again.
- A lead can offer Skip only at a test loop: a stop back from the E2E run or the final check, or the question about an implementation round that changed nothing which such a stop opened. An offer anywhere else is refused before it reaches you, and the lead asks again without it.
Setting E2E checks aside during testing
At the Test stage, a lead may find that some criteria need no E2E check: their code tests prove them, or the E2E check belongs to another task. It names them when it hands the question to you, and the card offers Accept AC-1 without E2E on a row for each, and Accept all N without E2E when there are several. Only criteria with an open E2E box get a button; for the others the card says No E2E check left to set aside for AC-4: ticked, set aside or gone. As with Skip, a criterion not among the task's is named, and criteria that cannot be read offer Read again.
- Accepted, only the E2E box goes from
ac.md. The criterion stays, owed by its Code Check; no scenario is owed for it, and the PR names it as not verified end to end. The AC tab says E2E check set aside · accepted by you. - While other criteria on the card are still open, the question stays for them, and the card says what you answered (Answered: Accept AC-1 without E2E). Once none is left, the work goes on: to the final check when no E2E box is left in the task, else testing goes on without them.
- Only you can accept one; a lead can only offer it, and only at the Test stage, not on the final check's own question about open E2E boxes. An offer anywhere else is refused before it reaches you, and the lead asks again without it.
Objections to a generated criterion
The planner and the test scenario writer may object to a generated criterion: wrong, not asked for, in conflict with the issue, or unclear. A pass that objects is held until the objection is settled.
| Autonomy | Who settles it |
|---|---|
| Consultant, autopilot | The task’s lead keeps, rewords or drops it, reading the issue. |
| Assistant, no task leads, or handed to you | A card lists the objections, each with Keep and Drop; Settle criteria lets the work go on. |
A dropped criterion moves to ## Dropped criteria with who dropped it (person, orchestrator for a lead, or reassessor) and why. Nothing owes it, and agents are told not to move it back. You can drop a generated criterion, or restore a dropped one, on the AC tab at any time. See Autonomy and decisions for the levels.
When the issue changes
Refresh reads the issue again and derives the author’s criteria again, keeping ticks, evidence, generated criteria and the dropped list. For a task in the pipeline, the reassessor also decides what the change means for the work, and its criteria edits are written at once. See When the issue changes.