/devflow:tt-create-build-loop [tasktracker-project-name-or-id]from DevFlow Skills Collection
Writes prompts/autonomous-build-loop.md for a project, enabling unattended /loop iterations that plan, implement, and verify TaskTracker phases under a zero-error gate with a human-only queue and cost ledger. Detects repo, stack, CI commands, docs, and phases; asks for owner, precedence, and production details.
Ships in DevFlow Skills Collection. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reference files (open one when a step points to it):
references/lessons-catalogue.md: Lessons cataloguereferences/loop-template.md: Autonomous build loop — plan, implement, verify (TaskTracker-driven)references/placeholders.md: Placeholders and optional blocksreferences/token-tooling.md: The bundled token-usage toolingWrites prompts/autonomous-build-loop.md for a project: the prompt that /loop runs, one iteration at a time, while the owner is away. Each iteration orients in TaskTracker, decides the next piece of work, plans or implements it through subagents, closes phases only through a zero-error gate, records cost, and schedules the next iteration — stopping only when the project is done or everything left needs the owner.
The template was generalised from a loop that built a real product across dozens of phases. Its rules are kept as general rules, each with a one-line "Why"; the full incidents are in references/lessons-catalogue.md. This skill is interactive: it runs in the main conversation and asks the user questions.
/tt-create-plan), and the owner wants it built unattended over many iterations.Not for: running one phase (/tt-implement-phase), a measured workflow run with projections (/tt-workflow-run), or a project without TaskTracker.
Skill names in this file are bare; when the skills come from the devflow plugin, invoke them with the devflow: prefix (/devflow:tt-create-plan).
| Path | What |
|---|---|
references/loop-template.md | The loop, with {{PLACEHOLDERS}} and optional blocks (<!-- if:flag -->…<!-- end:flag -->, also inline) |
references/placeholders.md | Every placeholder and flag: meaning, source (detect / ask / derive / bootstrap), how to find it, default |
references/lessons-catalogue.md | Each rule with the incident behind it |
references/token-tooling.md | The bundled tooling: what it installs, how it counts, its tests |
references/example-values.json | A fictional project's values file, in the shape the renderer reads |
scripts/render-template.mjs | Fills a template from a values file; fails closed on undecided flags, typos and leftovers |
scripts/install-token-tooling.mjs | Installs the tooling; plans first, writes nothing on any conflict |
assets/run-orch-gate.sh | Template of the gate runner the loop uses (scripts/run-orch-gate.sh <sha> <log>) |
assets/token-usage/ | The tooling itself, with its tests (node --test tooling/token-usage/test/*.test.mjs) |
Below, $SKILL is this skill's directory and $SP a scratch directory (the session scratchpad when there is one).
git rev-parse --show-toplevel). If it isn't, offer git init and stop until the user decides.node --version is 22 or later; the scripts need it.bash --version and git --version both work, since the runner is a bash script that gates in a git worktree (on Windows, Git Bash or similar on PATH). If either fails, stop and say so. The runner checks its remaining prerequisites itself (pgrep or its fallback, timeout) and reports a missing one as run-orch-gate: refused: … with exit 2; step 6's pre-flight gate run on HEAD surfaces that, and it gets fixed before the loop starts. Why: otherwise the first sign of a missing tool is a failed gate at the first phase close, hours into an unattended run.Gather everything below before asking anything. Start $SP/build-loop.values.json in the shape of references/example-values.json and fill in each value as you find it. references/placeholders.md says where every placeholder comes from.
Repo
git rev-parse --show-toplevel. Remote: git remote -v. With a remote: gh repo view --json nameWithOwner,visibility,defaultBranchRef. Without one: the current branch.remote = a remote exists; billed-ci = ci and the visibility is PRIVATE or INTERNAL.Stack and gate
package.json scripts, pyproject.toml, Makefile, Cargo.toml, go.mod, and the commands section of any CLAUDE.md.scripts/gate.sh, make gate, npm run gate. When there is one, take {{GATE_CHECKS}} from its own step labels: a commands list in CLAUDE.md often leaves out the heavy suites. When there is none, {{GATE_COMMAND}} is the per-app commands joined with &&. Say so in the report: a single gate script is worth adding early..nvmrc, .python-version, .venv) and lockfiles, for the gate runner.browser-e2e: a playwright.config.* or cypress.config.*; take {{BROWSER_MATRIX}} from its projects.offline-client: ngsw-config.json, a serviceWorker build option, workbox, manifest.webmanifest, a mobile app.database: migrations, an ORM dependency (TypeORM, Prisma, SQLAlchemy, Django), a database service in a compose file.CI
.github/workflows/*.yml: ci = a workflow triggered by push; deployed = a deploy job on the default branch; ci-sharding = a matrix passing --shard; {{CI_RUNNER}} from runs-on.gh run list --branch <default> --limit 20 --json databaseId,createdAt,updatedAt,workflowName. Estimate the billed minutes per push from those runs' durations; that gives {{CI_MINUTES_PER_PUSH}}.Docs, decisions, memory, lessons
docs/**, PRD.md, README.md, a reference/ folder. ADRs: docs/decisions, docs/adr, adr. Brainstorm files: docs/brainstorms/*.md.~/.claude/projects/<slug>/memory/MEMORY.md, where slug = the repo path with every non-alphanumeric character replaced by -. Read its index; decisions recorded there belong in {{DECISIONS}}.tasks/lessons.md in the repo or a parent directory.TaskTracker (reads only in this step)
tasktracker_listProjects matched against the repo name and path. If more than one could match, it is the first question in step 2.tasktracker_listTasks {projectId, type: "phase"}. Match the existing phases by title or role, never by an id from elsewhere:
/awaiting|human[- ]only|human queue/i;/cost ledger/i, and its child /ledger table/i.listTasks {parentId}) become {{ALREADY_QUEUED}}: their count and up to five examples.tasktracker_listBrainstorms {projectId, status: "frozen"} for {{DECISIONS}} (older projects may have one); tasktracker_getProjectReadiness for the report.Skills, scopes and tools
{{SKILL_PREFIX}}: how this session lists the devflow skills. devflow:tt-implement-phase gives devflow:; a bare tt-implement-phase (user skills in ~/.claude/skills/) gives an empty prefix.gh auth status: scopes the project needs and the token lacks (read:packages for GitHub Packages, say). Each becomes a {{PREFLIGHT}} step, or a {{PREFLIGHT_GAPS}} item with its workaround.Token tooling and existing files
scripts/token-usage.mjs exists and .claude/settings.json has its hook. If so, token-tooling is on. Step 4 then only offers an update (see there).claude mcp get tasktracker. The directory of the Args path, which holds lib/mcp-client.js, is --mcp-dir.prompts/autonomous-build-loop.md, prompts/autonomous-build-loop.values.json and scripts/run-orch-gate.sh. A values file from an earlier run supplies the answers to step 2; ask only about what has changed.Use AskUserQuestion. Put the detected or proposed answer first, marked "(Recommended)". The user types free text (names, URLs) through "Other". Skip any question whose answer was detected or is irrelevant (no production questions without deployed). That makes at most three rounds:
git config user.name).deployed: the production URLs, the host in words (no IP addresses), how to confirm health read-only, and whether other apps share the host (shared-host).parallel-agents (default: yes when the repo has two or more apps).If AskUserQuestion is not available, ask the same groups as one plain-text message and wait for the answer.
Create nothing that step 1 found, and nothing the user declined in step 2. Reuse every existing phase and record its id. For each missing piece:
tasktracker_createTask {type: "phase", title: "Phase 00 — Awaiting <owner> (human-only verification queue)"}. Its description says that it holds work only the owner can do, that the loop never completes anything in it, and that the loop re-reads it every iteration. Leave it pending.completed.task under the ledger, titled "Ledger table (latest) — tokens and API-equivalent cost per phase, auto-updated by the build loop", with a placeholder table as its description.setActiveTask), and mark it completed with a note. If TaskTracker refuses because the table task is open, use tasktracker_completeWithCaveat and name the table task.Put the ids into the values file. Report each phase as found (with its title) or created.
Skip this step if the user declined the tooling. Otherwise:
node "$SKILL/scripts/install-token-tooling.mjs" --target <repo> --project-id <uuid> --mcp-dir <mcp-server> --dry-run
node "$SKILL/scripts/install-token-tooling.mjs" --target <repo> --project-id <uuid> --mcp-dir <mcp-server>
(cd <repo> && node --test tooling/token-usage/test/*.test.mjs)
.claude/usage/tasktracker.json (committed) and the machine-specific mcp-server path to .claude/usage/tasktracker.local.json (gitignored).diff -ru between the project's files and assets/token-usage/, and update only the files they agree to.token-tooling is turned on. If the user wants the usage log out of git (a public repo, say), append .claude/usage/token-usage.jsonl to .gitignore.Save the values file in the repo: prompts/autonomous-build-loop.values.json. It holds no secrets, only names and sources, and lets a later run reuse the answers.
Render both files into $SP first:
node "$SKILL/scripts/render-template.mjs" --template "$SKILL/assets/run-orch-gate.sh" \
--values prompts/autonomous-build-loop.values.json --out "$SP/run-orch-gate.sh"
node "$SKILL/scripts/render-template.mjs" --template "$SKILL/references/loop-template.md" \
--values prompts/autonomous-build-loop.values.json --out "$SP/autonomous-build-loop.md"
The renderer refuses:
references/placeholders.md does not document;Fix the values; never edit the rendered file to get past a refusal. The shell template gets its values verbatim, and only markdown is tidied.
bash -n "$SP/run-orch-gate.sh". Then read the rendered loop once from top to bottom: every sentence must make sense for this project (no browser rules for a backend-only project, no billed-CI rules for a public repo).
Move both into place. Install the runner as scripts/run-orch-gate.sh with mode 755. If either file already exists and differs, show diff -u and ask: replace it, keep it, or write the new one beside it as *.new. Never overwrite without that answer.
Tell the user:
/loop Read prompts/autonomous-build-loop.md and run exactly one iteration as it specifies.
gh auth status has every scope the loop needs. The loop file's pre-flight line lists the extras.tasktracker_getProjectReadiness.scripts/run-orch-gate.sh "$(git rev-parse HEAD)" "$SP/gate.log". A refused: … line in the log (exit 2) names a missing prerequisite or a bad gate pattern; fix it and re-run before starting the loop.chore(loop): add the autonomous build loop and commit only if the user asks.{{FORBIDDEN_EXTRA}}, {{MACHINE_QUIRKS}} …), never into references/loop-template.md. A new general rule goes into the template, with its "Why" there and its incident in the lessons catalogue. tests/test-build-loop-skill.sh guards the template.assets/run-orch-gate.sh (opens in a new tab)assets/token-usage/gitignore.snippet (opens in a new tab)assets/token-usage/scripts/pricing.json (opens in a new tab)assets/token-usage/scripts/token-usage.mjs (opens in a new tab)assets/token-usage/settings-hooks.json (opens in a new tab)assets/token-usage/tooling/token-usage/README.md (opens in a new tab)assets/token-usage/tooling/token-usage/src/agents.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/aggregate.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/cli.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/collect.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/dedupe.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/discover.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/format.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/ingest.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/lock.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/log.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/parse.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/pricing.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/summary.mjs (opens in a new tab)assets/token-usage/tooling/token-usage/src/tasktracker-events.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mhylle/claude-skills-collection --plugin devflow35 skills in this plugin
/adrDocument architectural decisions in standardized ADR format. This skill should be used when making significant technical decisions, choosing between approaches, establishing patterns, or when other skills (create-plan, implement-plan, brainstorm) identify decisions that need documentation. Triggers on "document decision", "create ADR", "architectural decision", or automatically when invoked by other skills during planning and implementation./adversarial-reviewerAdversarial code review by three independent subagent personas (Saboteur, New Hire, Security Auditor) running in parallel, isolated contexts that know nothing of the author's intent or Claude's earlier conclusions. Reviews a diff by default (staged/unstaged, a ref or a file); --codebase reviews a whole repo or subtree for tech debt, attack surface and knowledge silos. Use before merging a PR; when the user asks for a hostile, harsh, critical, skeptical or second-opinion review; when a /devflow:code-review came back suspiciously clean; when the user is tired after a long session or has a gut feeling something is off; or for a quick audit of an inherited repo ("what am I inheriting"). Differs from /devflow:code-review (routine per-phase review, no isolation) and /devflow:security-review (single-lens OWASP depth).Other plugins' skills for the same job