Sənədlər ingilis dilindədir.
Issue lifecycle
Every issue meiksense works on has one durable workflow, issue/<integration id>/<issue key> on Temporal, driven
by a pure state machine. It starts with the first command on the issue
and ends at DONE or CANCELLED. This page explains the states, what the bot writes, the budget, how far a merged
change is followed (done_when), how failures are diagnosed, and how stop, retry and revise work. The commands
themselves are in commands.
The diagram folds the work states for the BLOCKED, FAILED and CANCELLED edges: every state that does work
(ANALYZING, PLAN_REVIEW, QUEUED, DEVELOPING, PREVIEW_REVIEW, MR_OPEN, FIXING_PIPELINE, ADDRESSING_REVIEW, READY_TO_MERGE,
DEPLOYING_TO_TEST, VERIFYING_IN_TEST) can go to BLOCKED (limits, budget), to FAILED (infrastructure) and, with stop,
to CANCELLED; retry returns to the exact state the issue stopped in. In words:
- BLOCKED: limits reached, no progress, publishing refused, a task blocked, or the budget spent.
retrygoes back to where it stopped;revisestarts a new iteration (once tasks exist). - FAILED: an infrastructure error (a tracker or host that stays unreachable, an unroutable issue).
retrygoes back to where it stopped;revisestarts a new iteration (once tasks exist). - BLOCKED_EXTERNAL: waiting on someone outside meiksense — a pipeline or a test deployment failed for a reason
the change cannot fix (a missing secret, a quota, a tool that is down or refuses the pipeline). Not a failure:
meiksense posts the evidence, what is needed and who should act, re-checks on its own every
diagnosis.external_recheck(30m), and continues when it is fixed.retrychecks at once. - CANCELLED:
stop, or a merge request closed without merging. Final.
The states
| State | Meaning | Tracker (defaults) | The bot writes | Slack |
|---|---|---|---|---|
| DISCOVERED | the workflow exists, nothing started | |||
| ANALYZING | the read-only analyst reads the issue and the code | "Analysing this issue. I will post either questions or the acceptance criteria I am going to implement." | ||
| NEEDS_INFO | questions are open | label meik:needs-info (status only if statuses.needs_info is set) | "Before I can start, I need a few answers:" + numbered questions + "write @meiksense-agentik start …"; one reminder after issues.reminder_after (72h) | questions_posted (DM to the assignee) |
| PLAN_REVIEW | the project (plan_review: gate) or the issue (start --plan-review, feature items) wants a person to approve the plan first: what, where (repository ⇒ files / areas), risks, an estimate from the project's finished issues (or "no estimate yet"), the acceptance list — on the issue page (Approve the plan / Send back with a reason), as tracker commands and on the Slack card; approve-plan → QUEUED, reject-plan <reason> → ANALYZING (the reason reaches the analyst like an answer) | "Plan for approval. Nothing is built until someone approves it. …"; on approve: "<who> approved the plan. Starting the implementation."; on send-back: "<who> sent the plan back. Analysing the issue again with the reason given." | plan_ready (broadcast, DM) | |
| QUEUED | criteria accepted, tasks being created | "Ready to implement. Acceptance criteria: …" + repositories + risks | ||
| DEVELOPING | one task per repository implements, verifies and reviews the change | status "In Progress" | ||
| PREVIEW_REVIEW | the project shows changes before the MR (preview.enabled): the app built from the branch runs as a review deployment; people open it in the issue's Preview tab and approve it (→ MR_OPEN: the merge requests are opened) or send it back with revise (→ DEVELOPING) | "The change is built and running in a preview … reply @meiksense-agentik approve … otherwise revise <what to change>"; on approve: "<who> approved the preview. Opening the merge request(s)." | preview_ready (broadcast, DM) | |
| MR_OPEN | merge requests are open; meiksense watches pipelines and review threads | status "In Review" | "Opened merge request(s): …" (later "Updated the merge request(s): …") | mr_opened |
| FIXING_PIPELINE | a failed pipeline is being fixed | pipeline_fixed when pushed | ||
| ADDRESSING_REVIEW | review feedback is being fixed (comments that need no change are answered without entering it) | on the MR: "Addressed in <sha>: …" per fixed thread; a reasoned answer in the others | ||
| READY_TO_MERGE | the merge policy's conditions hold (under auto meiksense merges at once) | "The merge request(s) meet the merge conditions …" (human, command) | ready_to_merge (broadcast, DM; human, command) | |
| MERGED | every merge request is merged | "All merge requests are merged. Done." (done_when: merged) or "All merge requests are merged. I am following the deployment to the test environment …" | merged (broadcast) | |
| DEPLOYING_TO_TEST | a delivery deploys the change to a test-tier runtime environment | |||
| VERIFYING_IN_TEST | verify_runtime watches the deployment (rollout, soak, events, logs, health URLs) | "The change failed its verification …" when a follow-up fix starts | ||
| VERIFIED_IN_TEST | the verification passed in every test delivery | |||
| DONE | the level of done_when is reached and the tasks are finished; the workflow ends | status "Done" | "The change is verified in the test environment. Done." / "… deployed to the test environment …" / "… No delivery deploys them to a test environment … Done." | |
| BLOCKED | waiting for a person | label meik:blocked | "I stopped working on this issue: <reason>" + how to retry or revise (or the budget text) | blocked (broadcast, DM) |
| FAILED | infrastructure error | "Something went wrong: <reason>" + "Write @meiksense-agentik retry" | failed (broadcast, DM) | |
| BLOCKED_EXTERNAL | waiting on someone outside meiksense | label blocked_external (meik:blocked-external) | "Waiting on someone outside meiksense: …" with the cause, the evidence, what is needed, who should act and the re-check interval; "Delivery #n is blocked: …" for a blocked delivery; one comment per suggested connector | blocked; the status card names the owner |
| CANCELLED | stopped; the workflow ends | label meik:stopped (also on open MRs) | "Stopped. …" or "The merge request(s) of … were closed without merging, so I stopped." |
Statuses and labels come from issues.transitions / issues.labels and the tracker's statuses / labels
(jira-cloud.md §4). Syncing the tracker never stops the
work: a move the tracker's workflow refuses (a board that does not allow it, an MCP tool answering an error, a missing
permission) and a label change it cannot make (an MCP mapping without addLabel / removeLabel) are reported once
per problem as a note ("meik could not move this task to «In Review» — the board does not allow it; work
continues.") with the tracker's own words in the timeline event tracker.sync_refused. A tracker that stays down
(rate limited, unavailable) is retried, then reported the same way.
All bot comments are inert: they never contain a command, and text written by agents cannot mention people.
With the status card (notifications v2)
With notifications.status_card on (the default in service mode) the issue gets one status comment that
meiksense edits in place: the state, what the work waits for and on whom (reviewers and approvers of the merge
requests, the CAB ticket's assignee, the requester of open questions), what is needed, the links and the commands
that apply now. The same card is the root of the Slack thread, the issue's message in the Telegram chat, and a
notification in the bell of the meik users it waits on.
- The status texts of the table ("Analysing this issue", "Opened merge request(s)", "… meet the merge conditions", "All merge requests are merged", "Stopped", "… closed without merging") are no longer posted as separate comments; questions, the criteria, blocked / failed / budget texts, notes and replies to commands still are.
- In Slack,
mr_opened,pipeline_fixed,ready_to_mergeandmergedupdate the card instead of replying. - On Jira the living comment mentions nobody (Jira notifies mentioned people again on every edit); people are mentioned in the separate action-needed comments only.
- Waits have an SLA on working hours (
notifications.sla,calendar): when it is reached, a reminder mentions the waiting people in the Slack thread, DMs them on Telegram when they linked their chat, notifies them in meik and posts one comment on the issue; past the escalation threshold it goes to the configured roles (tech lead, product owner). Quiet hours hold Slack and Telegram, not the tracker or the bell. This replaces the one NEEDS_INFO reminder ofissues.reminder_after.
Step by step
start(comment, web UI or API). The issue goes to its project: the one it was started in from the web UI, else the one its narrowest matching tracker binding names (a binding narrowed to a component — a TaskSense squad — or a label beats a project-wide one, whatever order they were added in), elseissues.default_projectwhen it is set. Ifstart --reponamed repositories, only those are candidates; otherwise the binding's repositories (all repositories of the project when the binding lists none, or when the project was chosen). An issue that matches no binding and has no default project fails with "I cannot work on this issue: no tracker binding for … bind it on the project page or set issues.default_project" — from the web UI it is not started at all: the Start dialog asks which project should work on this (the projects the tracker project is bound to, else every project you may start work in) and, for a maintainer of that project, offers to remember the answer as a binding of the tracker project (narrowed to the issue's squad or component when it has one).- Analysis. The
analystagent (read-only: Read, Grep, Glob; policyreadonly) reads the issue, its comments, up to five linked issues and the configured custom fields — all wrapped as untrusted data — on read-only checkouts of the candidate repositories. Before it runs, routing takes the attachments in (screenshots, PDFs, logs; sanitised, never executed), reads the screenshots with a vision model, ranks the candidate repositories with evidence and narrows the checkouts to the best ones; the analyst gets the ranking and the attachments. It answers{ ready, questions, acceptance_criteria, repos, repo_evidence, type, risks }; when the evidence for a repository is weak or close it asks one question naming the candidates. The analysis is its own task (type research), so its cost and transcript are visible like any task's. - Questions or criteria. Not ready → NEEDS_INFO with the questions (at most ten). Answer in a comment and write
startagain; the analysis runs again with your answers. Ready → the criteria comment, then one task per chosen repository (issues.multi_repo, at mostissues.max_repos, 5). - Development. Each task runs a playbook (from
issues.playbook, the project'splaybooksfor the analysed type, or the defaults) on its ownmeik/*branch: plan, implement, verify against the baseline gates, review. The tasks get the acceptance criteria and the issue as untrusted data. A task that waits for an approval keeps the issue in DEVELOPING until someone decides. - Publishing. When every task is ready, meiksense pushes the branches, opens (or updates) one merge request per repository, links them to each other, comments the links on the issue and moves it to "In Review". A repository without changes is skipped; if none has changes, the issue is BLOCKED.
- The merge request loop (per merge request, every
scm.mr_loop.poll_seconds, 60 s, or at once on a webhook):-
a failed pipeline of the pushed head: the failed jobs' logs (trimmed, untrusted) go to a fix run, which is a new iteration of the repository's task with the implementer's session; its own gates must pass; then push and wait for the next pipeline;
-
review feedback: unresolved threads with notes by people, after a quiet period (
scm.review_feedback.quiet_minutes, 10; a submitted review ends it early). Approvals and meik commands are not feedback. meiksense first judges every comment against the code (the read-onlyreview-triageagent) and reviewers see one of these answers in their thread:- the comment is right → a fix run, push, then "Addressed in
<sha>: <what changed>"; - the code is already right → a short, polite explanation with evidence (file and line, a test, the acceptance criterion) that ends asking to resolve the thread if they agree;
- a question → the answer; the code already does it → where; unclear → a question back.
Answer in the thread when you disagree: meiksense looks again and may change its mind. After
scm.review_triage.max_disagreements(4) answers in which it held its position, your next note in that thread is applied ("Applied as you asked."). A valid comment may become a lesson for later work (a general engineering rule, a rule of the repository, or a business rule of the project), recorded once its fix is pushed. When a fix makes no change, the thread says why; when the task stopped to ask a question, the thread gets the question (answer it in the thread).scm.review_triage.enabled: falseturns the triage off (every comment is then a fix, as before). Threads are never resolved by meiksense; - the comment is right → a fix run, push, then "Addressed in
-
merge conflicts with the base (GitHub
mergeable: false/dirty, GitLabhas_conflicts/detailed_merge_status: conflict; GitHub'snullright after a push is unknown and looked at again): meiksense fetches the base (with the integration's token, outside the sandbox) and makes it the task's base, and a fix run merges it into the branch (git merge), resolves every conflict keeping both sides' intent, runs the gates and commits; then push and wait. The issue shows FIXING_PIPELINE ("merge conflicts with the base branch"). Areviseor chat message that mentions a conflict (conflict,konflikt,merge conflict) while a merge request is open takes the same path instead of a new development round. Resolutions sharemax_pipeline_fixes; conflicts again on a head already resolved is no progress (BLOCKED); -
limits:
scm.mr_loop.max_pipeline_fixesfor a failing pipeline streak (reset by a green pipeline; default:max_fix_attemptsof the verify stage of the issue playbook —issues.playbook, else thefeatureplaybook, 4 forfeature-standard— else 3),escalate_after(the same stage's, else 2),max_review_rounds(3, code rounds only: answers without a code change do not count), and the no-progress check (the same failures or the same threads coming back for a fix right after their fix). Beyond them the issue is BLOCKED with a note on the MR saying what is needed.
-
- Merging follows the merge policy. When all merge requests are merged: MERGED, the tasks
are accepted (worktrees removed), the deliveries start, and the issue follows them as far as
done_whenasks (below); then DONE, and the issue moves to "Done".- A merge or close made by people while the MR loop is stopped (FAILED, BLOCKED, BLOCKED_EXTERNAL) is seen too:
retry,reviseandstartlook at the merge requests first, and so does an MR state webhook. Merged → the normal path after the merge (the command is recorded ascommand.superseded); closed → CANCELLED. - Publishing a branch the base already contains (its merge request was merged meanwhile; GitHub's "No commits between …", GitLab's empty comparison) records the merge request as merged instead of blocking.
stoplabels open merge requests only; a merged or closed one is left as it is and none is ever created.
- A merge or close made by people while the MR loop is stopped (FAILED, BLOCKED, BLOCKED_EXTERNAL) is seen too:
After the merge: done_when
How far a merged change must get before the issue is DONE. Set per project (done_when in the project config) with
a global default issues.done_when:
| Value | DONE when |
|---|---|
merged | the merge requests are merged (the behaviour before amendment 3) |
deployed_test | a delivery deployed the change to a test-tier runtime environment (wait_for_deployment or trigger_pipeline targeting it) |
verified_test | its verify_runtime step passed there |
auto (default) | verified_test when an enabled test-tier runtime environment serves the project, else merged |
It is resolved when the issue reaches MERGED, from the deliveries that started. No delivery, or no delivery that
deploys to a test-tier environment: DONE at once with that reason. verified_test without a verify_runtime step
in the test environment is treated as deployed_test. A delivery that finishes without reaching the level ends the
issue with that reason too. Deliveries handed to a train are not followed (their departure is later).
Failures: diagnosis and reactions
A failed pipeline (with the MR open) and a failed verification in test are classified first: code, repo_config
(the change can fix it), flaky_infra, environment, external_tool, or unknown. The job logs, Kubernetes
reasons and events, and new exception signatures are matched against a signature catalog; everything is redacted
first (secrets and personal data never reach a prompt, the database or a comment). Below diagnosis.low_confidence
(0.6), or when unknown, the read-only diagnostician agent looks at the checkout and the runtime environment
(budgeted from the issue budget). Then:
| Class | Pipeline (MR open) | Verification after the merge |
|---|---|---|
| code, repo_config | fixed on the branch (the diagnosis guides the fix run; the MR loop's limits apply) | a follow-up fix: new tasks from the merged base on the same issue, a new merge request linking the original one and the runtime report; merged, it is delivered and verified again. max_pipeline_fixes and the no-progress check (the same failure again) apply |
| flaky_infra | the job is retried once (GitLab job retry / GitHub re-run), then classified again | — |
| environment, external_tool | BLOCKED_EXTERNAL, the MR stays open | BLOCKED_EXTERNAL |
| unknown (after the diagnostician) | BLOCKED_EXTERNAL: "needs a human" | BLOCKED_EXTERNAL |
A failure that involves a tool meiksense cannot read (SonarQube, Nexus, Argo CD, Vault, …) gets one comment per tool with what read access would help, the minimal permissions and a link that starts the connector setup. When an admin creates (or enables) a connector of that kind, the waiting issues are told and diagnosed again.
Re-checks of BLOCKED_EXTERNAL: a pipeline is looked at again (a new pipeline or a re-run job continues the MR
loop); a test deployment is verified again through its delivery's own retry. The same cause found again stays quiet;
a different one posts again. retry re-runs the failed jobs (pipeline) or the verification at once.
Budget
issues.budget_usd (default 25 USD) covers everything an issue spends: the analysis, every task and every fix
run. It is checked around every event. Each task gets what is left of it.
When it is spent, the issue is BLOCKED with "The budget of this issue is spent ($x of $y). Write
@meiksense-agentik retry --budget <usd> to add budget and continue." retry --budget 10 adds 10 USD and continues
where the work stopped; a retry without --budget while the budget is still spent gets the same answer.
Individual agent runs also have their own limits (turns, wall clock, cost) from the agent definitions, and the playbook's stages their fix and review limits.
stop, retry, revise
stopcancels everything that runs (tasks are cancelled or rejected; their branches stay), labels open merge requestsmeik:stoppedand leaves them open, comments, and ends the workflow (CANCELLED).retryworks in BLOCKED, BLOCKED_EXTERNAL and FAILED. It goes back to where the work stopped: the analysis, the development (blocked or failed tasks are resumed), the merge request loop with fresh attempt limits (after an external pipeline problem: the failed jobs run again), or the verification in test (its blocked delivery retries the step; fresh follow-up attempts).- A task's question (NEEDS_INFO from a task). A task can stop before writing code because its premise does not
hold — typically "nothing needs to change: the behaviour is already on the branch" after a revision. The issue then
waits in NEEDS_INFO with that task's question, and the issue page says which task asked. There are two ways on:
answer the question (here or in the tracker, then
start) — the analyst reads the issue again and the work goes to new tasks — or, when nothing needs to change, Keep the last result on the task's page (the task goes back to ready for review with its earlier result, no agent runs) and then Continue with these tasks on the issue page (retryin a comment). The issue goes back to DEVELOPING with the same tasks, no new analysis and no new tasks; when every task is ready it goes to PREVIEW_REVIEW if the project asks for a preview approval, else the merge requests are opened or updated. Aretrywhile the task still waits for its answer is answered with what to do, and the analyst's questions keep thestartpath only. approveworks in PREVIEW_REVIEW: the change looked right in the preview, so the merge requests are opened.revise <feedback>works once tasks exist (PREVIEW_REVIEW, MR_OPEN, READY_TO_MERGE, BLOCKED, FAILED). Every task gets a new iteration on its branch with your feedback (as untrusted data) and runs its playbook again; then the preview is rebuilt (or the merge requests are updated) and the loop starts over.ask <question>is not a state command: it goes to the issue's conversation and gets an answer with sources (conversations); the state does not change.- After DONE or CANCELLED the workflow has ended. The next
startreopens the issue (below). - Start an issue again as a new issue (Issues → Start, with the same key, after a Stop or while it runs; the
issue's ⋯ menu; API
POST /issues/start,fresh: truefor one in progress): the earlier run stays as its own issue under<key>~nwith its tasks, merge requests (labelledmeik:stopped) and history, and a new issue with the key starts clean — new tasks, branches and merge requests. While the issue runs the Start dialog asks first. Reopen (below) is the action that continues the same issue. The repositories you name are part of the change, not all of it: the analyst also picks the other repositories the issue needs.
Reopening a finished issue
A delivered change can turn out wrong (a bug found in test or in production) or incomplete (a change request). On a
finished issue — DONE, CANCELLED, or merged with no workflow left — start, retry and revise from the web UI or
the API, and start in a tracker comment, reopen it: a new run starts from DISCOVERED on the same issue. It is
not a blank start:
- the analyst gets, as an answer on the timeline, what was delivered before — the acceptance criteria, the merged merge requests with their branches, the task summaries — and whatever the person wrote (the web UI's Reopen asks "What is wrong now?", optional);
- whether it is a bug or a change request it tells from that and from the issue's new tracker comments and attachments;
- the work goes to new tasks (new keys, new branches) on the base branch that already holds the merged change; the old tasks and merge requests stay as they are;
- a workflow still finishing in a terminal state is closed first; one still working is never cut off (the command is refused as "already working").
The timeline records issue.reopened and the audit log issue.reopen. Reopening needs issue.act on the project
(developers and up, product owners in the simple view). The tracker comments retry / revise on a finished issue are
not converted into a reopen yet; start is.
Where to look
| What | Where |
|---|---|
| State, merge requests, tasks, cost, timeline (commands, replies, state changes) | the web UI's issue page; GET /api/v1/issues/<id>, /timeline, /cost; the status command |
| Who the issue waits on, what is needed, the commands that apply | the status card on the issue page; GET /api/v1/issues/<id>/status-card |
| Why a failure happened, runtime checks after a deployment, connectors meik asks for | the issue page (Diagnosis, Suggested connectors, the Runtime tab); GET /api/v1/issues/<id>/diagnoses, /runtime-reports, /connector-suggestions |
| A task's stages, gates, agent runs, diff, report | the task page; meik show T-12, meik logs T-12 -f, meik report T-12 |
| Command decisions (allowed or refused, with the reason) | the audit log (GET /api/v1/audit?action=command.start) |
| What the workflow waits for | Temporal UI: workflow issue/<integration id>/<KEY> (Queries → issueStatus; History); its tasks are child workflows task/T-<n>; pollers are poll/<integration id> |
| cli mode bookkeeping | ~/.meiksense/issues/state.json (control worker) |