Workflow.
On this page
- The whole picture
- Hierarchy
- Set up
- Single-user GitHub setup
- Board sign-in
- Organizations, teams and access
- Connect a worker
- Workers on a board with sign-in
- Import a project
- Intake and refinement
- Intake
- Refine
- Doing it yourself
- Deliver
- Dispatch
- Worktrees
- Implementation
- Review
- Sign-off and delivery
- Delivery
- Learn
- When things go wrong
- States
This page follows a piece of work from an empty server to an accepted delivery. For what each part does, see the features. For the words used here, see the language.
The whole picture #
flowchart TD
Ask[Owner asks] --> Intake[Intake: Analyst classifies]
Intake -->|owner approves: epic| Backlog[Epic: To refine]
Intake -->|owner approves: story| Story[Story]
Backlog -->|owner starts refinement| Refine[Refine: Product Manager proposes stories]
Refine -->|owner approves| Story
Story -->|owner starts build| Build[Developer implements]
Build --> Review[Code Reviewer reviews]
Review --> Gates[Specialist reviews the gates require]
Gates --> SignOff{Owner sign-off}
SignOff -->|request changes| Story
SignOff -->|PR merged or direct push| Done[Done]
Done -->|last story of a refined epic| Learn[Learn: Product Owner gives a verdict]
Learn -->|owner approves| Closed[Epic Done, follow-up epics created]
Closed --> Backlog
Agents never move to the next step on their own across an owner gate. The automatic handoffs are that entering In review queues the Code Reviewer, and each required specialist review follows it.
Hierarchy #
Tickets can stand alone or be linked in the same project: Epic → Story → Sub-Task. A story is a WorkItem, classified as a User Story or Bug, or left unclassified. A parent is optional and always one level up.
Each agent Task targets one ticket. Its kind sets the role, the brief and the accepted outcomes. Each Run is one attempt on a Task, and a ticket’s runs appear in order in its Chat tab.
| Task kind | Role | Accepted outcomes |
|---|---|---|
clarify |
Analyst | needs_input, proposal |
plan |
Product Manager | needs_input, proposal |
implementation |
Developer | completed, blocked |
review |
Code Reviewer | findings, no_findings, insufficient_context |
architecture_review, security_review, ux_review, qa_review |
Architect, Security Officer, UX Designer, QA | the same three |
learn |
Product Owner | needs_input, proposal |
Upgrading from a board with Features: a Feature under an epic becomes one of its stories and its WorkItems move up to the epic; a Feature without an epic becomes an epic.
Set up #
Single-user GitHub setup #
- Run
mise run startand open http://127.0.0.1:8765. For Vite instead, setK0RTEX_BROWSER_URL=http://127.0.0.1:5173beforemise run devand open that exact origin. Use the same hostname throughout authorization so the browser can return its state cookie. - Create the board’s GitHub App once (below), give the server its ID and private key, and restart it. Settings → GitHub then shows the accounts it is installed on; Install on an account or organization adds another. The page never registers an app or asks you to authorize your own account.
The GitHub App #
Create it under GitHub → Settings (yours or an organization’s) → Developer settings → GitHub Apps → New GitHub App:
| Setting | Value |
|---|---|
| GitHub App name | Any free name, such as k0rtex |
| Homepage URL | The board’s URL |
| Callback URL | Leave empty; turn off Request user authorization (OAuth) during installation |
| Setup URL (optional) | <browser-url>/settings, with Redirect on update on |
| Webhook | Turn Active off |
| Where can this GitHub App be installed? | Any account (a public app) |
Repository permissions (leave every other repository, organization and account permission at No access; it subscribes to no events):
| Permission | Access | What the board does with it |
|---|---|---|
| Metadata | Read-only | Lists repositories and their default branches (mandatory) |
| Contents | Read-only | Compares commits and reads workflow definitions |
| Pull requests | Read and write | Opens pull requests and reads their comments |
| Actions | Read and write | Lists and dispatches workflows; reads runs, jobs and logs |
| Checks | Read-only | Reads check runs on a delivered commit |
| Commit statuses | Read-only | Reads commit statuses on a delivered commit |
The server never pushes through the app: workers push delivery branches with their own Git credentials, so the app needs no write access to contents or workflows. Branch protection still applies.
After creating it, note the App ID and choose Generate a private key. The deployment supplies them as secrets:
| Variable | Value |
|---|---|
K0RTEX_GITHUB_APP_ID |
The App ID |
K0RTEX_GITHUB_PRIVATE_KEY |
The downloaded .pem’s contents (in a .env file, on one line with \n escapes) |
K0RTEX_GITHUB_PRIVATE_KEY_FILE |
Instead of the key itself, the path to the mounted .pem |
The server refuses to start with only one of the ID and the key. On Kubernetes, put them in the board’s Secret (Kubernetes deployment). For local Compose, put them in
the repository-root .env file (ignored by Git) and run mise run compose:up; for Helm, put
them in the Secret named by existingSecret. Then install the app (from Settings or
https://github.com/apps/<slug>/installations/new) on each account or organization whose
repositories you want.
The board acts as the app itself: it signs a short JWT with the private key, lists every
installation and mints an hour-long installation token for the owner of each repository it
calls. Every organization the app is installed on is connected, whoever set up the board, and a
suspended installation is skipped. Tokens are minted again before they expire, so nothing has to
be reconnected. Requests that fail with a dropped connection, a 5xx or a 429 are retried with
backoff (a pull request that reached GitHub is not opened twice). K0RTEX_GITHUB_CLIENT_ID,
K0RTEX_GITHUB_CLIENT_SECRET, K0RTEX_GITHUB_SLUG and <data_dir>/github-connection.json from
earlier versions are no longer read.
Board sign-in #
Sign-in is required for a hosted origin and optional on loopback. Without it, the browser acts as
the board’s owner and every organization is open to it. Sign-in setup has the
steps for Google, Microsoft Entra ID, Okta, Keycloak and GitHub, and a troubleshooting table.
In short, set K0RTEX_BROWSER_URL to the public HTTPS origin, name an administrator, and
configure one or both providers:
| Variable | Value |
|---|---|
K0RTEX_ADMINS |
The board’s administrators, comma separated: verified emails, oidc:<sub>, github:<id> or github:<login> |
K0RTEX_OIDC_ISSUER |
Exact HTTPS issuer with OpenID discovery |
K0RTEX_OIDC_CLIENT_ID |
Registered client ID; its redirect URI is <browser-url>/api/v1/auth/callback |
K0RTEX_OIDC_SECRET |
Client secret (omit for a public PKCE client) |
K0RTEX_OIDC_NAME |
Optional button label, such as Google |
K0RTEX_OIDC_TRUST_EMAIL |
true for a directory issuer that sends no email_verified (Entra ID) |
K0RTEX_OAUTH_GITHUB_CLIENT_ID |
A GitHub OAuth app’s client ID; its callback is <browser-url>/api/v1/auth/oauth/github/callback |
K0RTEX_OAUTH_GITHUB_SECRET |
That OAuth app’s client secret |
K0RTEX_OIDC_SUBJECT |
One more administrator, by sub claim (the former single owner) |
The provider proves who someone is; the board decides who gets an account: a configured administrator, an email an organization invited, or an email in a domain an organization allows. Only an email the provider marks verified counts. The first administrator to sign in becomes owner of the default organization, which holds everything the board had before organizations existed.
For a standalone trusted board MCP client, configure K0RTEX_MCP_TOKEN and send it as an
Authorization: Bearer header; it acts as an administrator. A signed-in user may also use the
project-scoped /mcp/knowledge/{project}/ and /mcp/github/{project}/ mounts of projects they
can write to. Agent sessions receive their own short-lived, path-scoped credentials
automatically.
Organizations, teams and access #
An organization owns projects, teams and workers. Settings → Organizations manages them.
- Members have one role per organization: member, admin or owner. Owners and admins reach every project of the organization and manage its teams, invitations and workers. An organization keeps at least one owner.
- Teams group members and grant projects at read, write or admin access. Read shows the project; write creates tickets, answers agents and dispatches work; admin also changes the project’s settings, policies and review gates, and may push a delivery straight to a branch. A member reaches only the projects their teams are granted. Team maintainers manage the team’s members.
- Instance administrators change board-wide settings (agents, profiles, global policies and review gates, the GitHub App, embeddings), import repositories, create organizations, set the email domains that join one, and manage users.
The GitHub App’s installations serve the whole board, so only an administrator sees its repositories and imports one, choosing the organization it goes to (the one selected in the sidebar).
Cross-project views (Overview, All work, Runs, Inbox, the event stream) show only the projects the signed-in user can read. Tickets, comments, approvals and answers record the user who made them.
Connect a worker #
Nothing runs without a worker. Add one under Settings → Workers and pair the machine with its single-use link. Connect a worker has the steps.
Every worker belongs to an organization and has an owner:
| Owner | Runs | Registered and managed by |
|---|---|---|
| Organization | Tickets of every project of the organization, plus indexing and model discovery | Organization owners and admins |
| Project | The same, for that project only | The project’s admins |
| Personal (a user) | Only tickets that user requested, in projects they can write to | That user |
A ticket records who requested it; work an agent opens inherits its parent’s requester. A personal worker never indexes a project or runs someone else’s ticket, and only its owner can pin a ticket to it. A project served only by personal workers therefore has no knowledge index: give it an organization or project worker. Removing someone from an organization revokes their personal workers there and releases the tickets bound to them.
Workers on a board with sign-in #
Turning on sign-in or organizations changes nothing on a worker’s machine:
- Existing workers keep working. They become organization workers of the default organization. The worker protocol is unchanged, so no upgrade and no new pairing is needed.
- Workers do not sign in. A worker pairs once with its single-use link
(
POST /api/v1/worker-pair/{id}, which sign-in does not guard: the code is the credential), then connects out over SSH with its own key. Only creating the link in the browser needs a signed-in user who may register that kind of worker. - The same ports.
K0RTEX_SSH_BIND,K0RTEX_SSH_PORTandK0RTEX_SSH_PUBLIC_HOSTare unchanged. Agents on the worker also call the board’s/mcpover HTTPS atK0RTEX_BROWSER_URL, so that origin must be reachable from the worker. Each session gets short-lived tokens bound to its own run; nothing is configured on the worker for it. - Git access is the worker’s own. The server sends no GitHub credentials. A worker clones and pushes with the Git access of the account it runs under, so an organization worker needs a machine account that reaches the organization’s repositories, and a personal worker uses its owner’s.
- A worker is trusted with the projects it serves. It holds their checkouts, and during a run its agents can open pull requests and dispatch workflows through the board. Register a worker only for people and machines you would give write access to those projects.
- Restarts sign nobody out on the worker side. Restarting the board ends active runs as
interrupted, as before, and workers reconnect on their own.
Import a project #
Select Add project → From GitHub repository, select a repository, and assign a project key. Import registers the GitHub repository ID and queues indexing. A matching worker clones it on demand.
Settings → Projects → GitHub repositories searches every repository the app is installed on and switches each one on or off. Switching one off archives its project: tickets and history stay, but it leaves the board and pickers, takes no new work and starts no queued runs. Runs already going finish. Switching it back on restores it.
Intake and refinement #
A ticket with a workflow stage is in the staged process. The stages are Intake (clarify), Refine
(plan), Deliver (build) and Learn (learn). A stage is not a status. Intake, Refine and Learn
are conversations with one agent, and each turn is a Run.
A turn ends by asking a question or presenting a proposal. On a proposal you can:
- Approve it, which is the only thing that creates or changes tickets.
- Request changes, with a note, which queues another turn.
- Stop the request.
Intake #
- Click + New, select the project and describe what you want. The request then opens like any ticket: runs appear inline in its Chat tab, and questions are answered there.
- The Analyst asks what only you can decide, then proposes either a new epic or a story (standalone, or under an existing epic), with its intent, scope and non-goals.
- Approval turns the same ticket into that epic or story, in Backlog.
Intake only classifies. It does not plan, and approving it starts nothing.
Refine #
- A new epic waits in Backlog on the Board, marked To refine.
- Choose Start refinement when you want it, optionally with guidance.
- The Product Manager proposes ordered stories with acceptance criteria and dependencies. It consults the Product Owner on readiness, and the UX Designer or Architect when needed.
- Approve stories creates them in Ready under the epic, which moves to In progress.
Doing it yourself #
Your own tools can record the same results through MCP, with no k0rtex agent run:
intake_submit records a classified request and refinement_submit creates an epic’s stories.
See MCP. An epic refined this way gets no automatic Learn stage.
Deliver #
Ready never means automatic execution. You start each build.
sequenceDiagram
actor Owner
participant Server
participant Worker
participant Agent
Owner->>Server: Start build
Server->>Server: Queue a run with an agent snapshot
Server->>Worker: Claim, then prepare the ticket checkout
Worker->>Agent: Start a fresh harness session
Agent->>Server: Questions, permissions, activity
Owner->>Server: Answers
Agent->>Server: report_outcome
Server->>Server: In review, queue the Code Reviewer
Worker->>Agent: Review session in the same checkout
Agent->>Server: report_review
Server->>Owner: Proposal to sign off
Owner->>Server: Publish, then Mark story Done
Dispatch #
Start build creates a durable queued attempt. The scheduler claims it when a connected worker has a free slot, carries all the project’s required labels, matches any manual pin and the profile’s concurrency limit allows it. The first claim binds the ticket to that worker. A ticket has only one active attempt, and different tickets can run at the same time.
Worktrees #
Each ticket starts in a Git worktree on its assigned worker, on a branch named k0rtex/{ticket}
(for example, k0rtex/app-42). Customize the branch template per project; {slug} expands to a
shortened task title. The repository must contain an initial commit.
Retries and reviews use the ticket’s original checkout, including uncommitted edits, even if
project settings change. A run’s details show the managed branch and checkout path. Worktrees live
under tickets/ in the worker’s data directory. Marking a ticket Done leaves its branch and
files available for inspection.
Implementation #
The Developer implements the acceptance criteria, ticks checklist steps, runs the checks and, for
a story from the staged process, commits the result. Before ending its turn it must call
report_outcome:
{
"run_id": "<assigned-run-id>",
"data": {
"outcome": "completed",
"summary": "Implemented the change; verification passed."
}
}A completed implementation moves the ticket to In review and queues the Code Reviewer in the same transaction. A blocked outcome, a failure or an interruption leaves the ticket Blocked. Ending a turn without an outcome fails the attempt.
The Changes tab compares workspace contents immediately before and after each implementation attempt. It includes tracked files and non-ignored untracked files, even if the agent commits during the run. Edits made by other tools during the same interval also appear. Binary files and files over the preview limits are listed without line previews. An unavailable capture is shown separately from an attempt with no changes.
Review #
The Code Reviewer reads the implementation against the acceptance criteria and reports with
report_review. Findings are posted on the ticket. A review never moves the ticket.
Review gates decide which specialist reviews a ticket also needs: security, architecture, UX or QA. A requirement comes from
- a rule on the changed paths, tags or ticket type, applied when the ticket enters review,
- the plan you approved, where the Product Manager flagged a story,
- the Developer or Code Reviewer, who can ask for one with their result (required at once, or waiting for you if you turn off automatic acceptance in Settings → Review gates),
- you, at any time, from the ticket’s Reviews card.
After Code Review, each required review runs as its own Task, one at a time, in the same checkout: architecture, security, UX, then QA. QA may run the project’s test commands without asking. A review that fails, cannot judge or cannot run stops the chain: run it again, waive it with a reason, or Request changes. Waiving is recorded on the ticket and in History.
For a staged story, the sign-off proposal appears only once every required review is done or waived. It lists the commit, the verification, each review and each waiver. The next implementation attempt receives every open finding.
Sign-off and delivery #
- Check the committed SHA, the verification and the reviewer’s walkthrough.
- Deliver the reviewed commit under GitHub delivery (see below).
- Choose Mark story Done. Or choose Request changes, which returns the story to Ready for a new build.
Moving a story to Done yourself without a merge records that the merge is missing.
A ticket created directly on the board, outside the staged process, goes through the same build and review, and you move it to Done once you accept it.
Delivery #
Delivery is an action on any story or sub-task of a GitHub project, in Review or Done, once Code Review has finished on its latest build and that build made a commit. It waits while a run is active, including a specialist review, but not for the sign-off or for every review to succeed.
- Publish reviewed commit & open PR pushes that exact SHA to its managed branch and creates or reuses a pull request. Merge it on GitHub, then Refresh PR and checks.
- Or push it straight to the base branch. This is fast-forward only, never forced, available only to you in the UI and REST, and counts as merged.
The ticket shows PR conversation and inline comments, check runs and commit statuses, and warns when the PR head differs from the reviewed commit. The assigned worker must be online to push.
Learn #
When every story of an epic is Done or Stopped, the Product Owner compares what was delivered with the approved intent and proposes a verdict: accepted, accepted with follow-ups, or rejected. Close epic & approve follow-ups closes the epic and creates the follow-up epics, which wait To refine. Learn runs only for an epic that k0rtex refined itself.
When things go wrong #
| Situation | What happens | What you do |
|---|---|---|
| An agent is blocked or a run fails | The ticket moves to Blocked with a comment saying why | Answer it and choose Reply & resume, optionally with another Developer agent |
| A run failed, was cancelled or was interrupted | The Task keeps its identity | Retry agent task, if the scope and inputs are unchanged; otherwise start a new one |
| An agent asks a question or for permission | The run waits; it appears in Needs you and the Inbox | Answer it |
| An agent stays silent | The turn fails after K0RTEX_AGENT_IDLE_TIMEOUT (2 hours by default; waiting for you does not count) |
Inspect the transcript, then retry |
| A worker’s connection drops | The run ends interrupted. If the worker returns within a few seconds, the attempt’s changes are still collected | Reconnect and retry |
| The server restarts | Queued runs stay queued; running ones become interrupted | Retry what you need. Nothing is replayed automatically |
| A worker needs maintenance | k0rtex drain on the machine, or pause it on the board |
Wait for sessions to end |
| A worker is revoked | Its tickets are released, so another worker can claim them with a fresh checkout | Uncommitted work stays on the old machine |
| A specialist review fails or cannot run | The chain stops and the ticket shows Review needs you | Run it again, waive it, or request changes |
| A ticket is in the wrong status | Set it from the status menu or by dragging the card |
You can set any status at any time. Moving a ticket out of In progress cancels its running agent (the UI asks first) and withdraws a pending proposal. Moving into In review still queues the Code Reviewer, and Ready never launches anything.
Comments work on every ticket. Agents read yours on their next attempt.
States #
Ticket flow for agents and dispatch:
stateDiagram-v2
backlog --> ready
ready --> in_progress: build claimed
ready --> backlog
ready --> blocked
ready --> review
in_progress --> blocked
in_progress --> review
blocked --> ready
blocked --> backlog
blocked --> in_progress: build claimed
review --> done: owner only
review --> ready
review --> blocked
done --> ready
A ticket is in refinement while a request or stage turn is open, and any ticket can be
stopped. The owner may set any status, which cancels active runs and withdraws a pending
proposal. Ready and Blocked tickets are eligible for explicit dispatch.
Run flow:
stateDiagram-v2
queued --> starting
queued --> cancelled
starting --> running
starting --> failed
starting --> cancelled
running --> succeeded
running --> failed
running --> cancelled
running --> interrupted
starting --> interrupted
Cancelling queued work leaves the ticket status unchanged. Cancelling a running one asks the worker to interrupt the harness, and it terminates an unresponsive process if needed.
This page is docs/workflow.md in the k0rtex repository. Suggest a change.