Prepare your tools
Install Node 24 and Git. Get a checkout of the Artyfact source and run this from its root. pnpm links the local CLI into the workspace.
Get the sourcepnpm install --frozen-lockfile
export PATH="$PWD/node_modules/.bin:$PATH"
artyfact --help
The PATH line keeps the checkout's CLI available in this terminal, even after you enter the fork.
Once the artyfact package is published, npm i -g artyfact or npx artyfact@latest --help works without a clone.
Start a plan
Agree the change to the model
Start a System in the platform. Import a native ontology package, or have your agent convert existing material into one for review. For an existing System, describe your change in words, in the platform or from the CLI. Artyfact finds the parts of the model it touches and proposes edits to them. The edits you keep become an Evolution: a proposed change to the model. Replace each <placeholder> with your own id.
echo '{"message": "Let shoppers save a card at checkout"}' > intent.json
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact evolution propose \
--system <system-id> --file ./intent.json
Review the edits from the purpose down to each node. Approving it commits the change on a fork of the model repo, and that fork becomes the model’s new version. No code changes yet.
Draft the plan
Plan the build as a Realization: a build plan pinned to the accepted model version. Each Task names the app it changes, the parts of the model it reads and writes, the files that covers, its dependencies, steps and checks. The draft saves nothing until you add --create. If you already have a plan file, plan create --file saves it directly.
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact plan draft \
--system <system-id> --evolution <evolution-id>
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact plan draft \
--system <system-id> --evolution <evolution-id> --create
npx artyfact plan tasks <plan-id> --system <system-id>
plan tasks lists each Task with its wave, dependencies and footprint, then prints the next claim command. Tasks that touch the same part of the model go to later waves.
About the admin token
The coordinator is whoever plans the work and hands out Tasks. If you work alone, that is you. Coordinator commands need the platform’s admin token: the ADMIN_TOKEN secret set on the platform Worker when it was deployed, with wrangler secret put ADMIN_TOKEN or in .dev.vars for local runs. If you run the platform, you set it. If someone else does, ask them for it.
Keep it in ADMIN_TOKEN, a plain shell variable you never export. Pass it to each admin command as ARTYFACT_ADMIN_TOKEN, as shown. Agents never get it; they receive only their Task credentials.
Claim a Task
Claim one Task from the plan:
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact task claim <plan-id> <task-id> \
--system <system-id> --dir ./work/<task-id>
The claim forks the app’s repo for this Task in Cloudflare Artifacts, at the Task’s starting commit, and clones the fork into that directory. It writes the Task’s brief beside the code and stores the fork token and the scoped attempt secret in .git/artyfact-task.json: an owner-only file that is never staged and never printed. A Task whose dependencies are not yet selected is refused with blocked by … (not yet selected).
Start the agent
Start the agent without the admin token, then submit from the same directory:
cd ./work/<task-id>
env -u ARTYFACT_ADMIN_TOKEN claude -p \
"Follow AGENTS.md and TASK_PACKET.md, then run npx artyfact task submit"
Use any compatible agent command in place of claude -p, and never export the admin token or set it in a shell profile. Nothing started under env -u inherits it; the risk is a profile that exports it, which a tool shell reading that profile picks up again. Resuming a Task with artyfact task resume issues a new token and shuts out the previous agent. The new token replaces the stored one.
Set ARTYFACT_PLATFORM to the platform origin supplied by the operator. The CLI uses --platform, then ARTYFACT_PLATFORM, then ARTYFACT_URL. With none set, it looks for an Artyfact platform on localhost:1337 through localhost:1346; if none identifies itself, it stops.
What your agent works from
The fork holds the code and the whole model, at the version the plan was made against, under system/. The claim also writes a brief beside the code as two files that Git ignores:
TASK_PACKET.md- The model version, where each part this Task reads or writes lives under
system/, the files it may write, the steps, the checks grouped by layer, and which other Tasks run alongside or come first. AGENTS.md- How to work: stay in scope, leave
system/ alone unless the model can’t be built as written, checkpoint, submit. If the repo already has one, the claim adds its own block.
Read TASK_PACKET.md fully. Implement the scoped Task, preserve its commitments, run its checks, and return the review link with remaining work and evidence.
Because the agent has the whole model and an exact brief, the hard thinking is already written down: where and what to change. The code is mostly translation. Simple Tasks can go to a cheaper model, or one running on your own machine; the result is still checked against the whole model.
When the model is wrong
The model in the fork is read-only by default. If building shows it can’t be realized as written, the agent may change system/, and says why in a checkpoint. At submit, the difference against the pinned model becomes a model delta: a proposed change to the model, carried with the candidate. System One judges the delta against the whole model, whether it still fits and makes sense, and the coordinator reviews it beside the code. The delta’s nodes are listed next to what the Task was meant to write, so drift shows at once.
Your coordinator can run independent Tasks in parallel. A dependent Task waits until its predecessors’ results are selected. Keep each Task in its own fork, with one writer at a time.
Run the commands below in the terminal you prepared. In a new terminal, repeat the PATH line from the source root before entering the fork.
Author reusable Parts
Optional. You can submit Tasks without it.
A Thing, one app or service you deploy, can start with its Genome alone. When reuse helps, create a package from a directory containing genome/ and optional app/, or extract selected content from a Thing revision. Recipes pin exact package versions, name each contribution, and declare replacements for overlapping files.
artyfact parts create --id part.my-app --version 1.0.0 \
--name "My app" --source ./thing --out ./part.json --apply
artyfact parts validate ./part.json
artyfact parts extract ./extraction.json --out ./extracted-part.json
artyfact parts compose ./recipe.json --out ./composed-thing
artyfact parts upgrade ./next-recipe.json --from ./composed-thing
These authoring commands preview by default. Add --apply to save files; validate reads an existing package. Composition saves genome/, app/ and a provenance baseline in .artyfact/. Upgrades preserve customizations or report conflicts without writing.
Inspect package and recipe commands before execution. Run them locally only with both --apply --run-commands; Genome loading never executes them. To publish a validated package to the configured catalog, preview artyfact parts publish ./part.json, then add --apply when ready. System-private recipes use --system <system-id> with an authorized operator.
Accept the Genome through review before starting the application Realization. Composition and publication do not deploy an application; deployment remains a separate authorized action.
Checkpoint and submit
From the Task workspace, record progress and check status:
artyfact task checkpoint "Implemented the scoped change; remaining checks noted"
artyfact task status
When the work is ready, submit it. The CLI uses the token stored in the workspace unless ARTYFACT_TOKEN is set:
Submit commits pending changes, pushes to the Task fork and submits that exact commit as a candidate: one submitted version of the Task’s work, much like a pull request. Artyfact maps each changed file to the part of the model it belongs to, then runs the Task’s checks. Each check comes from a rule in the model, such as an acceptance criterion, and sits on one of three layers: the model holds together, the code realizes the pinned parts, the running thing behaves. The brief groups the checks by layer. If the candidate changed system/, the model delta is judged on the model layer, and its verdicts show in the submit output and the review. The platform builds the candidate itself; the build output is the realized artifact, and it is normal that it isn’t in the fork. A checkpoint, or the agent’s own report, is not a passing check. Return the review link to the coordinator.
Review and promote
Select and review
The coordinator selects one candidate for each Task. Integrating replays the selected results onto a fresh fork of each app they change, makes one combined candidate per app and runs the checks again. Then it opens one review. The evidence is grouped by layer: model, realization and running behaviour. A candidate with a model delta shows its changed model files beside the code, the parts it adds, changes or removes, and System One’s verdicts on each. Resolve conflicts and check the evidence against the pinned model version.
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact task select <plan-id> <task-id> \
--system <system-id> --candidate <candidate-id>
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact plan integrate <plan-id> --system <system-id>
artyfact plan review <plan-id> --system <system-id>
Only a pass is green. A check that did not run stays unknown and blocks promotion. A labelled fake provider does not prove real model performance.
Promote
To promote is to make the reviewed result the System’s current state, much like merging into main. Write the reviewed head, a rationale and the exact candidate IDs to a file, then run:
ARTYFACT_ADMIN_TOKEN="$ADMIN_TOKEN" npx artyfact plan promote <plan-id> \
--system <system-id> --file ./promotion.json
The file holds expectedHead, rationale and candidateIds. Promotion is a compare-and-swap: it goes through only if nothing changed since the review. Otherwise it is refused. The System then points at the reviewed commit and records which model version it builds. If the review carries a model delta, promote asks you to accept it, and the model moves to the new version in the same step. Otherwise the model itself doesn’t change. Nothing deploys.
Continuing an older Realization
Historical agent-level Realizations remain readable. Their existing workspaces continue to use artyfact checkpoint, artyfact status and artyfact submit. New implementation work uses Realizations containing Tasks.
See the theory behind this workflowSee every phase of the workflow