Authoring guide
Build an AI Developer task from your code
A task is a reusable work sample. Your team supplies starting code, a candidate brief, visible and hidden tests, and a known solution. Task Studio validates the package in a hosted sandbox before publication. This path makes no AI authoring call.
Download complete exampleThe example contains a React storefront, API and database. Replace its code and checks for your role.
Starting code and folder layout
Put the repository candidates should see in repo/. Include a README, lockfile and candidate-visible tests. Keep the bug or missing feature in the starting code. Remove credentials, customer data, installed dependencies and Git history. A candidate should be able to understand the goal from the brief and run the public tests.
my-task/
├── task.json Candidate brief, stages and runtime commands
├── Dockerfile Hosted sandbox image
├── repo/ Starting code and public tests
├── grading.json Private checks, points and traps
├── sealed/ Hidden test files
└── solutions/
├── reference.patch Complete solution
└── naive.patch Plausible incomplete solutionZIP the package folder itself, or put it inside one top-level folder in the ZIP. An optional review/ folder holds patches for code review stages.
task.json: what candidates do and what runs
The manifest defines a stable slug and version, title, summary, domain, languages and levels. Each stage needs a unique ID, kind, title, brief, suggested minutes and points. The brief is candidate-facing. The same stage ID links hidden checks in grading.json.
{
"schema": 1,
"slug": "my-task",
"version": 1,
"title": "Fix duplicate orders",
"summary": "Trace a retry bug and make order creation safe.",
"domain": "commerce",
"languages": ["TypeScript"],
"levels": ["mid", "senior"],
"workdir": "/workspace",
"services": [{
"name": "web", "cwd": ".", "command": "npm run dev",
"port": 3000, "health": { "http": "/" }, "preview": true
}],
"tests": { "public": {
"cwd": ".", "command": "npm run test:public", "timeoutSeconds": 300
}},
"stages": [{
"id": "fix-retry", "kind": "bugfix",
"title": "Fix duplicate orders", "suggestedMinutes": 40,
"points": 100,
"brief": "A customer retry can create two orders. Find the cause, fix it, and add a test."
}]
}Manifest fields that affect delivery
schemais1;slugandversionidentify the task package. Task Studio creates the organisation's published version after validation.levelsacceptsjunior,mid,seniororstaff.tracksacceptsfullstack,backendorfrontend. Each offered track needs at least one stage.stages[].kindacceptsorient,bugfix,feature,review,performance,incident,design, or for ML and research tasks (trackml)ml_debug,implementorinvestigate. A hidden check with"scored": trueawards part of its points: its test reports a fraction from 0 to 1 as the JUnit propertyinquro_score(pytest:record_property("inquro_score", 0.73)) and passes atpassAt(default 0.5). Give every stage a unique ID;suggestedMinutesis 1–120 andpointsis 0–100. Optional questions, review patches and track restrictions belong on the stage.protectedPathsmarks files candidates should not change, such as the public test runner. Such changes are flagged and reverted for grading.limitssets CPU, memory, process and lifetime caps.network.allowis empty by default. Prefer deterministic local sidecars for databases and services. Optional outbound hosts require an explicit allowlist;allowPackageInstallis separately controlled.
The public test command runs in the sandbox from the configured directory. It must write a nonempty JUnit XML report to $INQURO_JUNIT; configure the script in your repository to do that. Add a service and one preview: true only if the task needs a running app. CLI tasks can omit services. Add setup steps or sidecars only when needed, and declare service dependencies so health checks run in order.
Dockerfile: build the hosted environment
Use Inquro’s workspace base image, copy repo/ to /workspace, and install dependencies at image build time. Keep one FROM line using ${BASE}. The candidate image receives the starting code and public tests; sealed/, grading.json and solutions stay private.
ARG BASE=inquro/workspace-base:dev
FROM ${BASE}
COPY --chown=dev:dev repo/ /workspace/
USER dev
RUN cd /workspace && npm ci --no-audit --no-fund
USER root
COPY task.json /etc/inquro/task.jsonUse a committed lockfile and reproducible install. The complete example shows a Postgres sidecar, a migration setup step, API and web services with health checks, and a browser preview.
grading.json and sealed/: measure the work
Put hidden tests under sealed/. The sealed command must also write JUnit XML to $INQURO_JUNIT. Each check names a stage ID, a JUnit test-name match, points and a reviewer-readable description. At least one check must be a trap: a plausible shortcut passes the public tests yet fails that hidden case.
{
"schema": 1,
"sealed": {
"cwd": ".", "command": "npm run test:sealed",
"timeoutSeconds": 300, "copyTo": "."
},
"checks": [{
"id": "concurrent-retry", "stage": "fix-retry",
"match": "[concurrent-retry]", "points": 100,
"trap": true,
"description": "Concurrent retries create one order."
}]
}Private grading fields
sealed.copyTois the destination for hidden test files inside a grading copy of the repository. Keep it compatible with your test runner's file discovery rules; the default is.inquro-sealed.- Each
checks[]entry has a unique ID, astagematchingtask.json, a JUnit test-namematch,pointsand a description. Useareawhen a check belongs only to the backend or frontend track. - Optional
citations,defects,stakeholderFacts,designChecksandbuildcommands support the corresponding stage types. Start with one coding stage and its checks before adding these.
The full example also shows optional citation targets, code review defects and design checks. Start with one focused coding stage when learning the format. Test names and check matches should be stable across runs.
Solution patches: prove the task works
Make two standard unified Git patches against the unchanged repo/ tree. solutions/reference.patch is the complete solution. solutions/naive.patch is a believable incomplete fix. Both must apply cleanly to the same starting code.
- Original code fails a public check.
- Naive patch passes public checks and fails a hidden trap.
- Reference patch passes public and hidden checks.
- A second reference run produces the same check outcomes.
Task Studio also builds the image, boots the sandbox and checks service health. A failed draft can be replaced and checked again. Review the validation report and preview the starting workspace before publication. Use the validation troubleshooting guide when a run fails.
Upload privately, then attach to an assessment
In Task Studio, choose Build manually · no AI and upload a private ZIP. A public Git repository exposes the hidden checks and known solutions to anyone with access, so use a private ZIP for real organisation tasks. After validation, publish a version to your organisation’s task library. An AI Developer assessment then chooses that exact task version and sets candidate time, stages and AI rules. See how it reaches a candidate link. Future API and MCP clients should use the same versioned authoring and validation model.