{
 "schema": "aiblocks-page/1",
 "id": "issues-how-agents-track-work-implementation-planner",
 "type": "skill",
 "name": "Agent task ownership workflow builder",
 "summary": "Plan a task table where one AI agent claims a task at a time, with expiring claims, blocked tasks and tests. Draft code only.",
 "headline": "Agent task ownership workflow builder",
 "subhead": "Tell it your database, your agents and how long a task can run. It reviews the starter files and plans a task table where one agent holds a task at a time. You get the gaps, a draft schema, claim and release functions, and tests. Nothing is run.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "codebase",
   "required": false,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  },
  {
   "type": "plan",
   "required": false,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "code_change",
   "required": false,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "Your database and how your code talks to it, such as Postgres with Supabase",
  "The agents that will claim tasks, and whether tasks belong to one client or many",
  "The longest a normal task runs, so the claim time limit can be set",
  "Your current task table and its columns (optional)",
  "Rules for sub-tasks and blocked tasks (optional)"
 ],
 "you_get": [
  "A list of gaps in the starter files, each with a fix",
  "A draft task table, comment log and indexes",
  "Claim, renew, release and recover functions",
  "Changes to the TypeScript helper",
  "Tests to run on a copy, starting with two claims at once"
 ],
 "use_when": [
  "Two agent runs picked up the same task and did the work twice.",
  "An agent crashed and a task stayed stuck as \"in progress\".",
  "You want sub-tasks, blockers and a comment trail for what each agent did.",
  "You have a starter task table and need to know what it is missing before you rely on it."
 ],
 "skip_when": [
  "Your agents never share a task list, or you run one agent by hand. A simple task tracker is enough.",
  "You need to set up the whole agent database first. Use the Agent database setup planner, then come back.",
  "You want a loader for agent role files. Use the Agent role loader builder.",
  "You want it to apply the SQL for you. It drafts the SQL. You run it on a copy first."
 ],
 "output_sample": {
  "input": [
   "Your database and how your code connects to it",
   "The agents that will claim tasks, and whether tasks belong to one client or many",
   "The longest a normal task runs",
   "Your current task table (optional)"
  ],
  "prerequisites": [
   "A Postgres database you can test on a copy",
   "An AI that can read your code, or code pasted into the chat"
  ],
  "output": [
   {
    "name": "Status",
    "contains": "A plain note that this is a plan and draft code, nothing was run, and what was read."
   },
   {
    "name": "Gaps in the references",
    "contains": "A table of what the starter files leave out, why it matters and the fix."
   },
   {
    "name": "Draft schema",
    "contains": "The issue table, blocker links, an append-only comment log and indexes, marked untested."
   },
   {
    "name": "Claim functions",
    "contains": "Database functions to claim, renew, release and recover a task, marked untested."
   },
   {
    "name": "Code changes",
    "contains": "Changes to the TypeScript helper, and the shape of one agent run with renewal and a finally step."
   },
   {
    "name": "Tests to run",
    "contains": "Cases such as two claims at once, a blocked task, an expired claim and a release by the wrong run."
   },
   {
    "name": "Assumptions, missing and next step",
    "contains": "Starting values to check, inputs still missing, and the one smallest step to take first."
   }
  ]
 },
 "output_shape": "STATUS\n<plan and draft code only; nothing run or applied; what was read>\n\nGAPS IN THE REFERENCES\n<#> | <what the starter does> | <why it is a problem> | <proposed fix>\n\nDRAFT SCHEMA (untested)\n<issue table, relations table, comments table, indexes>\n\nCLAIM FUNCTIONS (untested)\n<checkout, renew, release, recover>\n\nCODE CHANGES (draft)\n<changes to the TypeScript helper and one agent run with renewal>\n\nTESTS TO RUN\n<number> | <case> | <expected result>\n\nASSUMPTIONS\n<starting values and what to check them against>\n\nMISSING\n<each missing input and what it stops>\n\nNEXT STEP\n<the smallest useful step>",
 "how_to_use": [
  "Open the skill in your AI. A chat AI works if you paste the code in. Claude Code or Codex can read your files.",
  "Say which database you use and how your code connects. If you have a task table, paste its columns.",
  "Give the agent names and the longest a task can run. Mark any time you are guessing.",
  "Read the gaps table first. Check that each problem is real in your project.",
  "Run the draft SQL on a copy of your database, never on live data. Then run the tests listed, two claims at once first.",
  "Before you turn it on, fill each item under MISSING."
 ],
 "checks": [],
 "next": [
  {
   "name": "Stripe payments builder",
   "url": "https://useaiblocks.com/skills/stripe-payments-builder",
   "why": "Build it"
  }
 ],
 "source": null,
 "credits": [],
 "files": [
  "references/issue-management-starter.ts",
  "references/issues-table-schema.sql",
  "references/method-notes.md"
 ],
 "links": {
  "page": "https://useaiblocks.com/skills/issues-how-agents-track-work-implementation-planner",
  "markdown": "https://useaiblocks.com/skills/issues-how-agents-track-work-implementation-planner.md",
  "json": "https://useaiblocks.com/skills/issues-how-agents-track-work-implementation-planner.json",
  "instructions": "https://useaiblocks.com/skills/issues-how-agents-track-work-implementation-planner/SKILL.md",
  "download": "https://useaiblocks.com/skills/issues-how-agents-track-work-implementation-planner.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/issues-how-agents-track-work-implementation-planner",
  "api_document": "https://useaiblocks.com/api/v1/documents/skill/issues-how-agents-track-work-implementation-planner",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
