Working with tasks
Task context
Everything Lonca writes for the agents when you pick an issue, and where it keeps it.
When a task's worktree is set up, Lonca writes everything Jira knows about the issue into a context folder: every field, the comments, the history, linked issues, subtasks, web links, every attachment and the Confluence pages the issue links to. The folder sits outside the repository, so none of it ends up in commit history. Every agent working on the task is pointed at it, and the Documents tab shows it.
The context folder
| Issue | Folder |
|---|---|
| A Jira issue | <ticket_root>/<KEY>/ |
| A Jira issue with a parent (a subtask under its story) | <ticket_root>/<PARENT>/<KEY>/ |
| A local story | the story’s own folder, beside its story file |
The ticket root is jira inside the issues folder, ~/.lonca/issues/jira by default; see The issues folder. Revisions of one issue share its folder, as they share its ac.md. A folder made by an earlier version in another layout stays where it is and keeps being used.
What is in it
| File | Written by | Holds |
|---|---|---|
<KEY>.md | Lonca, from Jira | The snapshot of the issue. Rewritten on each Refresh. |
<KEY>-history.md | Lonca, from Jira | The issue’s full change history, every value whole (the snapshot cuts each at 200 characters). |
attachments/ | Lonca, from Jira | Every attachment of the issue. |
confluence/ | Lonca, from Confluence | The Confluence pages linked from the issue, as Markdown. |
ac.md | Lonca, then agents and you | The acceptance criteria and their evidence. See Acceptance criteria. |
brief.md | Lonca, from what you saved | The hand-off brief, a readable copy put back before every stage run; its images go in brief/. See The hand-off brief. |
figma/ | Lonca | The Figma selections linked from the issue, for the Figma UI step. |
pipeline/ | Lonca and stage agents | The pipeline's work: plans, reports, the hand-off between stages, gate results, and its log, pipeline/progress.md. See Handing a task off. |
A local story's folder holds its story file and ac.md, and the brief and the pipeline's files once it is handed off. There is no Jira snapshot: the story file is the issue.
The issue snapshot
<KEY>.md is the issue as Lonca read it, with where it came from and when, in these sections:
- Core Information: key, title, status, type, parent, assignee, labels, last update.
- Other Fields: every other field that has a value, custom fields under their Jira names.
- Task Description, converted to Markdown, with embedded images linked where they appear.
- Comments, oldest first, each with its author, time and whether it was edited.
- Linked Issues, Subtasks and Web Links.
- History, with a link to the full history file.
- Attachments: the files the description does not already show, such as an HTML export, a log or a spreadsheet.
- Missing From Jira: why comments, history or web links could not be read, when they could not. A gap is said, never left silent.
The snapshot is a mirror: Jira is the source, so Lonca overwrites it on every Refresh. Write your own notes in a file of your own in the folder.
Attachments
Every attachment belongs in the context, since a ticket's screenshot or log is often the whole report. Lonca downloads all of them into attachments/, with these guards:
- A single file over 50 MB, or a ticket over 500 MB in all, is named in a note instead of downloaded.
- File names chosen by whoever attached them are made safe for disk; the name a person recognises stays in the snapshot's text next to the link.
- Downloads go only to your Atlassian site: Lonca asks by attachment id, never by an address a response hands back.
- One file that fails does not cost the others; every failure goes into the note.
Confluence pages
With Confluence on, Lonca downloads the pages linked from an issue's description and comments and saves them as Markdown under confluence/. The same account and token as Jira are used.
atlassian:
url: https://acme.atlassian.net
email: you@acme.com
confluence:
base_path: /wiki # default: /wiki
max_pages: 5 # default: 5; 1–50 pages per issue
max_page_bytes: 500000 # default: 500000; a longer page is cut and marked as cutWhich links are read
- Only https links on your own Atlassian host. Any other host never gets a request.
- Lonca takes a numeric page id from the link and builds the request itself. It understands the reading address (
/spaces/…/pages/<id>/…), the olderviewpage.actionandeditpage.action, the editor address (/pages/edit-v2/<id>) and unpublished drafts (resumedraft.action?draftId=…). - A draft is marked Draft: yes with a warning line above it: planning against a contract still being written is not the same as planning against an agreed one. Someone else's draft cannot be read; the note then says to publish the page or share the draft.
- Past
max_pages, the rest are skipped and counted. A page pastmax_page_bytesis cut and marked Truncated: yes. - A Confluence link on your host that carries no page id is counted and reported: N Confluence link(s) in the description or comments could not be read.
Whatever could not be read reaches the agents as a note in their brief, so no agent takes the documents it has for all there are. A failure that trying again can fix (a timeout, a rate limit) leaves the setup step open, and the next setup run tries the pages again.
The parent story
The analysis a subtask is built on is usually linked from its story, not from the subtask. So for an issue with a parent, Lonca also reads the parent: its snapshot, attachments and Confluence pages go into the parent's own folder, once for all its subtasks. The agent brief points at the parent's snapshot and says to read it first, and the Documents tab lists the parent's pages as parent story analysis beside the task's own.
The orchestration log
Lonca keeps no progress.md of its own in a task's or a story's context folder since 11.0.0: it writes none and reads none. One an earlier version wrote stays as it is, as your notes, and Documents lists it as a note. What the pipeline did is in the orchestration log, pipeline/progress.md: each step's outcome and result file, what it asked and what was answered, and when Lonca let the task go. Lonca writes it; no model does. The Flow tab shows its newest line, and Documents lists it as Orchestration log.
The agent brief in the worktree
Setup writes a short brief into the worktree that points every agent at the context:
| CLI | File in the worktree |
|---|---|
| Claude Code | CLAUDE.local.md |
| Codex | AGENTS.override.md |
It names the task, lists the sources to read (the snapshot, ac.md, the Confluence pages, the parent story and any note on what is missing), the branch and its base, how commits are written, and the working order. It also says to tick a criterion in ac.md only with an evidence line under it.
- Lonca keeps the brief out of git through the repository's own exclude list: no tracked file changes, and no commit picks it up.
- An existing file is never overwritten; you may have edited it. A file that is a link is never written through.
- Codex reads only
AGENTS.override.mdin a folder that has one, so Lonca's brief for Codex carries copies of the repository's ownAGENTS.mdandCLAUDE.md, each whole, within the 32 KiB Codex reads. A file that does not fit is named instead. - For a handed-off task, the hand-off is the approval for the commits in the worktree: the implementer commits, only Lonca pushes.
The Documents tab
Documents lists the readable files of the context folder (Markdown and text at its top level, the Confluence pages and the orchestration log), each titled by its first heading and marked by kind:
| Mark | Document |
|---|---|
| Jira (Story for a local task) | A Markdown file at the top level: the issue snapshot (the story file for a local task), the history file, ac.md, or one of your own |
| brief | The hand-off brief, brief.md |
| log | The orchestration log, pipeline/progress.md, titled Orchestration log |
| analysis | A Confluence page linked from the issue |
| parent story analysis | A Confluence page linked from the parent story |
| note | A .txt file, or a progress.md an earlier version wrote |
Documents are read up to 512 KB; a longer one is cut and marked as cut. Markdown and text files you drop into the folder yourself appear here too. The tab opens once the worktree is set up.
What agents read, and how
- A stage agent reads the context through the brief, and is also given read access to the context folder, the parent story's folder and the folder of pasted images, so it can open them from its worktree.
- Text from Jira and Confluence reaches an agent as data to read, never as instructions, and never inside a shell command. Issue titles and paths are passed as argument lists or files.