Taskgertize a git project
This guide takes a git repository to the point where an agent picks up a task from the board, works it phase by phase, opens a pull request and deploys it to staging, while you watch it live. Follow the steps in order. Each one says what to run, what you see when it worked, and what to do when it did not. The reference pages have the details: Project contract, Run an agent on your machine and Troubleshooting.
Quick start
There are two ways in. With a runner, you install nothing yourself. By hand, you write the contract on your own machine.
With an agent (recommended, nothing to install on your machine):
-
Projects → New project, then Settings → Repository & contract: the repository URL, Generate key, and add that key to the git host as a deploy key with write access (step 3).
-
Agents → Add a machine, and run the command it gives on any machine with Docker (step 8):
bash curl -fsSL https://taskgert.com/agent/install.sh | sh -s -- --enroll tge_… -
Settings → Repository & contract → Taskgertize with an agent. The agent:
- writes
taskgert.ymland the kit; - proves lint, test, build and e2e;
- merges, releases and syncs the project (what it does).
Answer its questions in the console when it asks.
- writes
By hand (once the repository is connected, step 1 above):
# 1. The kit's commands (from a checkout of Taskgert's repository, for now)
git clone <taskgert repository> taskgert
(cd taskgert && pnpm install && pnpm --filter @taskgert/kit build && npm i -g ./packages/kit)
# 2. In your repository: write the kit and the contract, then check it
git checkout develop
taskgert init --project BOIL # your project's key
tg --validate
# 3. Commit it and put it on main, where Taskgert reads it
git add -A && git commit -m "chore: add the taskgert kit"
git push origin develop
git checkout main && git merge --no-ff develop && git push origin main
Then press Settings → Repository & contract → Way of working → Sync. When the card says Valid, new tasks come with the Phases checklist. To connect your own Claude Code, Cursor, opencode or Pi to the project, see Connect a client.
The numbered steps below explain each of these, with what you see when it worked and what to do when it did not.
1. What you get
flowchart LR
subgraph once["Once per repository"]
direction TB
repo["Your repository<br/>taskgert.yml"] -->|Sync| project["Taskgert project<br/>Phases, Checks"]
project -->|Run with agent| runner["Your runner<br/>taskgert-agent"]
end
subgraph task["Every task"]
direction TB
phases["Phases<br/>code, test, e2e"] --> pr["Pull request<br/>into develop"]
pr --> release["tg release<br/>vX.Y.Z"]
release --> deploy["tg deploy<br/>staging"]
deploy --> app["Live app"]
end
once --> tasktaskgert.ymlin the repository says how it is built, tested, released and deployed, under standard names.- The project in Taskgert reads that file, turns its phases into each task's checklist, and checks that the repository, the environments and the runners really work.
- A runner on a machine of yours runs the coding agent (Claude Code or opencode) in Docker. It checks each phase
with
tgitself and ticks the task as the phases pass.
2. Requirements
- A git repository on Gitea or GitHub (GitLab works without automatic pull requests), with a
mainbranch. - A
docker-compose.ymlat its root that runs the whole stack, where every service has a healthcheck (why).taskgert initwrites a starter one if there is none. - Docker with Compose on the machine that will run the runner, and on yours to run
tg e2e. - The kit's commands,
taskgertandtg, on your machine. For now they are installed from a checkout of Taskgert's own repository:
git clone <taskgert repository> taskgert && cd taskgert
pnpm install && pnpm --filter @taskgert/kit build && npm i -g ./packages/kit
tg --version && taskgert --version
The runner's image already has both commands, so agents never need this step.
3. Create the project and connect the repository
- Projects → New project. Choose the key with care: it is permanent, and every task key (
BOIL-12) uses it. - Settings → Repository & contract: the URL (
git@host:org/repo.git), the default branchmain, and the access Deploy key made by Taskgert. Save, then Generate key and Copy key. - On the git host, add the key as a deploy key with write access (Gitea: Settings → Deploy Keys; GitHub: Settings → Deploy keys), so agents can push their branches.
- A host behind a Cloudflare Tunnel (SSH through
cloudflared access ssh): set SSH connection to Through Cloudflare Access (cloudflared). Add a Cloudflare Access service token only if the Access application asks for a login. - For automatic pull requests: API token for pull requests (Gitea: an access token with
write:repository; GitHub: a fine-grained token with pull requests read and write, contents read). When the git host's web and API are not at the SSH host (Gitea behind a tunnel), fill Host API for pull requests, such ashttps://gitea.example.com/api/v1. If another project of yours already keeps a token for the same API, pick it under Or copy it from another project of yours instead of pasting it again (set the host API first: only projects with the same API are offered). - Create
developif the repository has none:
git push origin main:develop
When it worked: Check access shows Can read, Can push and Branch found. When not: Cannot push means the key was added without write access. Cannot read means the URL or the key is wrong, or the host is behind Cloudflare Access and the SSH connection is still Direct.
4. Add the kit and the contract
In a clone of the repository:
git checkout develop
taskgert init --project BOIL
It detects the stack (pnpm, npm, yarn, Python with uv, Go) and writes taskgert.yml, the skills and subagents in
.claude/, .claude/settings.json, the MCP servers in .mcp.json and opencode.json (merged into yours),
.codegraph/.gitignore, a block in CLAUDE.md and AGENTS.md, commitlint.config.js,
CHANGELOG.md, and a docker-compose.yml when there is none (what each file is).
Fill in taskgert.yml: the commands your project really uses under the standard names, git.pr (gitea or
github), and, once you have them, the environments (step 6). Then check it:
tg --validate
When it worked: taskgert.yml is valid · project BOIL, followed by the commands, git, the environments and the
numbered phases. When not: each error has its line (line 6: agent.merge must be one of none, develop, main).
Unknown keys are errors: the file holds nothing that is not used.
Commit, and get the file onto main (Taskgert reads the contract from the default branch):
git add -A && git commit -m "chore: add the taskgert kit"
git push origin develop
git checkout main && git merge --no-ff develop && git push origin main
Then Settings → Repository & contract → Way of working → Sync.
When it worked: the card says Valid and Synced … at <commit> (main), and lists the commands, git, the
environments, the phases and the compose services with ✔ for their healthcheck. New tasks get the Phases
checklist.

When not: "There is no taskgert.yml on main" means it was pushed to another branch, or not pushed yet. A push is not seen until the next Sync.
For your own sessions with Claude Code or OpenCode in this repository, .mcp.json and opencode.json read a bot
token from TASKGERT_MCP_TOKEN (how to get one). They also name codegraph, a code graph of the
repository for your agents: install it with npm i -g @colbymchenry/[email protected] and taskgert init indexes it
(more). The runner's jobs get it without any setup.
5. The commands
The same names in every repository; each runs what taskgert.yml maps it to, in the repository root, and ends with
a timed line (✔ tg test · 4.2s):
tg install
tg lint
tg test
tg build
tg e2e
tg e2e brings up docker-compose.yml as a compose project of its own on free ports (your own stack is never
touched), runs e2e.seed, runs e2e.run with E2E_BASE_URL, keeps the evidence in .taskgert/out/e2e-<time>/
and takes the stack down with the images it built, keeping the Docker build cache under 20 GB
(TG_E2E_BUILD_CACHE_MAX). --keep leaves it up.
When not: exit 2 with "service X has no healthcheck" means a service lacks one. "maps no command to …" means
commands.<name> is missing. Anything else is the project's own command failing: the line says its exit code.
6. Environments and deploy
Declare staging (and production when you have it) in taskgert.yml, each pointing at its Coolify application:
environments:
staging:
url: https://trylive.taskgert.com
from: develop
deploy: { provider: coolify, compose: docker-compose.yml, app: <application uuid> }
verify:
health: [https://trylive.taskgert.com/api/health]
In Settings → Environments → Add Staging: the Public URL, the Coolify URL, the Application uuid, then a Coolify API token (with deploy and write) and Store token. Agents get it only for an approved deploy; it is never shown again.
From your machine, with your own Coolify credentials in the shell:
export TG_COOLIFY_URL=https://coolify.example.com TG_COOLIFY_TOKEN=<token>
tg deploy staging --dry-run
tg deploy staging
--dry-run only checks (Coolify answers, the application exists and builds the right branch and compose file,
nothing is deploying) and prints the plan. The real one deploys the head of develop (or the newest v* tag for
from: tags), waits, verifies the verify.health URLs and the @smoke tests, and rolls back to the previous
deployment when verify fails. With TASKGERT_URL and TASKGERT_TOKEN set it also reports the deployment to the
project (details).
When it worked: ✔ tg deploy staging, and the app answers at its URL. When not: exit 2 is a refused check
(the message names it, nothing was deployed); exit 1 is a failed deployment or verify (the last lines of Coolify's
log are printed, and it was rolled back).
7. Checks
Settings → Checks → Run checks proves, live, that the repository, the environments, the runners and the contract work. Each line is ✔ (fine), ⚠ (works, but should be fixed), ✖ (broken) or – (skipped), with a Fix: line.

Agent jobs do not start while the repository or a runner has a ✖; the Run with agent dialog shows why. The usual fixes are in Troubleshooting.
8. A runner
On the Agents page, Add a machine gives the command, already pointing at your Taskgert. Run it on the machine that will run the agents (yours, or a server: any with Docker and internet):
curl -fsSL https://taskgert.com/agent/install.sh | sh -s -- --enroll tge_…
On the Agents page, Add a machine gives one command that already carries the registry pull login: run it and
the runner arrives paired. (Engine credentials, if you keep them on the machine instead of a brain, go in
~/taskgert-agents/.env.shared; other engines.) Each further run
adds another runner, isolated from the others on the machine (several runners on one
machine). Each runner is three containers: the agent, a
Docker-in-Docker sidecar where the projects' own docker compose runs, and an updater that swaps in new versions of it by itself while it
holds no job (Updates).
The log prints a code and a link. Open it, check the code, name the machine, tick the project under Projects it can work on, and Approve.
When it worked: the runner shows online on the Agents page, and the Checks card shows it under Runners.
When not: see the runner's troubleshooting (pull access denied,
Cannot reach Taskgert, claude: no credentials…).
9. The first agent job
Open a task with its goal and design in the description, and click Run with agent: choose the Runner, the Engine, optional Extra instructions, the Autonomy (step 10), and Start.

The job's console opens. Follow it there:
- Phases: a stepper with each phase pending, running, passed (its proof on hover), failed or skipped. The
runner checks each phase with
tg … --json, ticks the checklist item and comments the proof on the task. - The console: what the agent says, and each command as a terminal of its own, with its exit code and time. Type in the prompt line to tell the agent something.
- Decisions and approvals: when the agent needs a choice or asks before a guarded action (pushing to main, deploying), you get a notice, and answer or Approve / Deny in the console.
- Interrupt stops the current step (the job waits for a prompt). Cancel ends the job.
- Pull request: when the job ends Done, the runner pushes
agent/<KEY>and opens its pull request intodevelop; the link is in the console and in a comment on the task.

An agent attaches evidence (a screenshot, a video) to the task with tg-agent attach <file>, never as base64
through a tool (details).
When not: Queued for long means the runner is offline or not paired with the project. Suspended means its runner was stopped: start it again and the job resumes. A failed job can be Retry-ed.
10. Autonomy
How far a job goes alone is chosen in the Autonomy select of Run with agent (on a task or a Taskgert), up
to the ceiling
agent.autonomy in taskgert.yml:
| Level | The job… |
|---|---|
supervised | asks before guarded actions; releasing and deploying stay with a person. The default. |
staging | merges into develop, releases, deploys to staging and verifies, alone. Production asks. |
full | goes through every environment, production included, without asking. |
agent:
merge: none
autonomy: staging # the ceiling: the most a job may be given
The ceiling is read from the contract on the default branch: keep it main, so that only a release (not what an
agent merges into develop) can raise it. The checks warn Autonomy read from the develop branch otherwise. Only
project admins and owners may pick staging or full; the select offers nothing above the ceiling, and does not
show at all while supervised is the only choice (details).
11. A Taskgert
A Taskgert is a batch of tasks with a target. In the project's Taskgerts tab, New Taskgert: a name, the target (what must be true when it is done, and how it is checked) and the tasks. Then Run with agent on its page, or ask your own agent: "Run BOIL-G1". It proposes the order and waits for your approval, works each task in turn, proves the target with evidence, and records the verdict (details).
12. Gitflow and releases
mainholds release tags only; work is merged intodevelop.- People work on
feature/<KEY>-slugorfix/<KEY>-slug, agents onagent/<KEY>, all fromdevelop. - Commits are Conventional Commits with a
Refs: <KEY>footer. - A release, from
developwith a clean tree:
tg release --dry-run
tg release
It bumps the version (minor; --patch, --major), writes CHANGELOG.md, merges into main with a vX.Y.Z tag,
merges back into develop and pushes both (details).
Let an agent do it
Steps 4 to 7 can be done by an agent. In Settings → Repository & contract, once the repository is connected
(step 3) and a runner is online (step 8), click Taskgertize with an agent (or Run with agent → Taskgertize on
the Agents page, or start_agent_job with kind: SETUP and the project from your own agent). It does the guide in
seven phases (Inspect, Kit, Contract, Checks, Merge, Release, Sync), and you watch it in the console:
- It writes
taskgert.ymlfrom what the repository really does: the commands CI and the package scripts run (each pointed at its workspace package, with what it needs first, such as generating a client), the real branches and pull request host. Deploying is not its call: the environments you set up on the web (Settings → Environments) are written intoenvironmentsas they are, and their credentials stay on the web. - It brings the whole stack up:
commands.e2eis required, so thattg e2estarts everything fromdocker-compose.yml(the app, built from its Dockerfiles, and the database and services it needs) and runs the end-to-end tests against it. It gives every service a healthcheck and fixes what keeps stacks from running side by side (container_name, fixed host ports, bind mounts). When there are no end-to-end tests, it asks. - It writes what production deploys:
docker-compose.coolify.ymlwith only the app's own services (backend, front), each with a healthcheck andexpose, its settings as variables; the database and other services are Coolify's own resources. Checks requires it. - It brings a repository taskgertized before up to date:
taskgert init --update, then whatever is missing (an e2e, the Coolify compose, healthchecks, the environments set up on the web) is added. Every change to a file the team already had is commented on its task. - It asks when it needs to: which script is the real test, how to add the app to the compose file, whether to
create
develop, which secrets.envneeds. The job waits with the question in the console (and as a decision on its task) and goes on when you answer. It never guesses. - It proves everything before delivering: it runs
tg installonce (the job's worktree has no dependencies yet), thentg --validate, lint, test, build and e2e, each recorded as a quality run. The install belongs to the Checks phase and is listed in the report on its own: it never counts as an attempt of a check. If it fails, the phase fails with that reason and no check runs. A check that keeps failing (three attempts) stops the job and asks you whether to keep trying, deliver it as a follow-up, or stop. - It ships with the gitflow: once the checks pass, the runner pushes the branch
taskgert/kit-v<kit version>(made from the default branch), merges it intodevelopwith a merge commit (creatingdevelopfrom the default branch when there is none; a conflict goes back to the agent) and releases withtg release: the version bumped, the changelog written,maintagged and merged back intodevelop. Sync then checks the project, and the report is commented on the task. - It is safe: the agent never pushes (the runner does the gitflow, never forced) and never writes a secret
(
.envvalues stay placeholders).
What the scan checks
Before anything is pushed, the Deliver phase scans the files the branch would carry and stops if one looks as if it holds a secret: it names the file and why, never the contents, and the agent fixes it. It looks for:
- a
.envfile: a real one is never delivered, and a template (.env.example,.env.sample...) may hold placeholders only; - private keys, and AWS, GitHub, GitLab, Slack, Anthropic or OpenAI and Taskgert tokens;
- a value given to a secret-like name (
password,token,api_key,credential...), unless it is a placeholder or an expression.
The kit's own files are not scanned while unedited: a file that .taskgert/kit.json lists with the hash it was
written with (for example .claude/taskgert/hooks.mjs, which names tokens and keys without holding any) is left
alone. Edit it and its hash no longer matches, so it is scanned like any other file.
The task of the job carries only its own phases (Inspect, Kit, Contract, Checks, Merge, Release, Sync), not the project's generic checklist, and a finished job leaves every one ticked.
At the end the console shows the report: each check passed, failed or skipped (with its reason), the files
written, the decisions taken and what you must still provide (secrets, deploy credentials, a missing healthcheck).
Merge the pull request, then press Sync in Way of working (step 4): Taskgert reads taskgert.yml from the
default branch. More in Run an agent on your machine.
Worked example: Comidas en casa
The reference repository is a small live app, "Comidas en casa" (project BOIL): login, presence over Socket.IO,
PostgreSQL and Redis in one compose file, and a complete taskgert.yml (staging on Coolify at
trylive.taskgert.com, agent.autonomy: staging). Start a new repository from it:
taskgert new comidas --from [email protected]:Taskgert/taskgert-boilerplate.git --project BOIL
cd comidas
tg --validate
tg install && tg test && tg e2e
taskgert new clones it without its history, sets the project key and refreshes the kit's files. Then follow steps
3 to 9 with your own repository URL and Coolify application, and give a task like "the footer shows the app's
version" to an agent with Up to staging: it ends with the change on trylive.