agent-loop
Start or resume implementation in one PlatformRelay repo.
Skill by PlatformRelay
Chalk Labs
Need help deploying agent-loop?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/platformrelay-agent-loop
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-loop
What's inside
- Skill name
agent-loop- Description
- Start or resume implementation in one PlatformRelay repo. A THIN coordinator picks lanes and delegates to implementer subagents — in PARALLEL when there are multiple independent (non-overlapping) lanes — each isolated in its own worktree, running TDD → gate-matrix → PR. Every lane is then gated by an INDEPENDENT reviewer the coordinator dispatches (the author never reviews its own code). Stops at PR for the operator to merge. The spine of the harness; use to start/resume any coding session.
- License
- MIT
- Instructions
- 126 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# agent-loop — the session driver (thin coordinator + delegated roles)
A **thin coordinator** orchestrates three delegated subagent roles; it does not do their work itself.
Its whole job is **orient → pick lanes → delegate → route structured verdicts → refill**. It acts on
the **structured return** of each subagent (below) and does **not** re-read diffs or logs to decide —
that is what keeps the parent session lean.
| Role | Who | Does | Returns (schema) |
| --- | --- | --- | --- |
| **Implementer** | implementer subagent, own worktree, parallel | TDD → gates (for iteration) → commit → push → open PR. **Never reviews its own lane.** | `{ lane, branch, prUrl, headSha, gateResults, selfCheck, blocker? }` |
| **Independent reviewer** | fresh subagent the **coordinator** spawns on the pushed branch | adversarial, **diff-only** review (`/tech-review`); the author's reasoning is never in its context | `{ verdict: APPROVE\|REQUEST_CHANGES\|BLOCK, findings: [{sev: P0..P3, note}], summary }` |
| **Integrator** | (auto/local variants only) | rebase → re-run gates on rebased head → merge → push | `{ merged, mainSha, ciRunId?, error? }` |
When several independent lanes exist, implementers run **concurrently, each in its own git worktree**.
Parameterized by the target repo (reads its `AGENTS.md` + `GUIDELINES.md` for gates). **Repos are
independent — one loop targets one repo**; run separate loops for separate repos, never coordinate
across them.
## Repo config (resolve TARGET first)
| Target | Layer | Gate commands | Merge model |
| --- | --- | --- | --- |
| `mkurator` / `kollect` | Go (GUIDELINES §B) | `task verify` · `task lint` · `task test` · `task coverage` · `task scrub` | PR into `main`; operator merges (or `/merge-open-prs`) |
| `kubernetes-workshop` / `opentofu-workshop` | Content (§C) | `pnpm build` · `pnpm export` · `kubectl`/`tofu` dry-run | PR into `main`; operator merges |
If you cannot state in one sentence which repo and what each lane is *for*, **stop and ask**.
## Step 1 — orient (the TARGET repo's own agent-context — never other repos)
```
<TARGET>/agent-context/INBOX.md # what needs the operator here — check first
<TARGET>/agent-context/coordination/OPERATOR-BOARD.md # this repo's lanes + locks
<TARGET>/agent-context/coordination/SESSION-HANDOFF.md # this repo's state, in-flight, next
<TARGET>/agent-context/ (BACKLOG / daily-backlog / roadmap)
```
Confirm `main` is green: `cd <TARGET> && gh run list --limit 5`. **If main CI is red, don't start new
lanes — fix it first.** If a blocking question arises, file a **DECISION** in the repo's INBOX (with
options) rather than guessing silently.
## Step 2 — pick lanes (one, or several non-overlapping for parallel)
Use `/pick-next-story` or the backlog. For **parallel** work, select up to **N lanes (default 3, cap
~4)** that own **disjoint file paths** — no two lanes may touch the same package/file. If picks would
overlap, serialize them instead. Never pick a lane already `🔶 In flight`.
**Pressure-test the picks first** (`AGENTS.md` → Adversarial collaboration): if a pick, its approach,
or the parallelization carries a real risk, a hidden dependency, or a clearly better sequencing, say so
before dispatching. Record any dissent in the repo's `decisions.md`.
## Step 3 — dispatch implementers (parallel when >1 lane)
The coordinator **neither writes product code nor reviews its lanes** — implementers write, an
independent reviewer gates. For each lane:
1. **Claim it** on the repo's `OPERATOR-BOARD.md` **In flight** (before dispatch) so lanes can't collide.
2. **Spawn a background implementer subagent** (`Agent`, `run_in_background: true`,
`isolation: "worktree"`) with the lane spec + the implementer procedure below. Each gets its **own
worktree**.
Cap concurrency at N. **Machine-locked suites** (Go `e2e`/`integration`, workshop live-cluster labs)
run one-at-a-time per host — lanes needing them must serialize; parallelize only unit/envtest/build lanes.
### Implementer procedure (each subagent, in its own worktree)
- **TDD** (`GUIDELINES §A3`/§B4): red → green → refactor per unit of behaviour. No code before a red test.
- **Bounded test-replay:** track failing tests in a scratch `.agent-loop-status.json` (not committed);
cap **3 fix-attempts per test**, then mark it blocked with a one-line hypothesis — don't hammer it.
- **Gate matrix** (per repo config): iterate on the fast gate, then run the full set before each commit
(Go: `task verify && task lint && task scrub`; content: `pnpm build && pnpm export` + dry-run).
Regenerate codegen (`task manifests && task generate && task verify`) after CRD/webhook/RBAC changes.
- **Lab/tutorial lanes — run the content end-to-end against the real tool before review.** For any lane
authoring runnable learner content (a lab, tutorial, or step-by-step doc), the gate matrix is
necessary but **not sufficient**: a config that is invalid but *commented out* — or a fabricated tool
output — passes `validate`/build/lint yet detonates only when a learner runs the step. Execute the
whole flow against the real tool (`tofu`/`kubectl`/etc.) and capture every documented output verbatim.
The real run is the gate.
- **Commits:** `:gitmoji: <type>(<scope>): <summary>`, one logical change each, tree green; no AI trailers.
- **Push + PR:** `git push -u origin <branch>`; `gh pr create --base main …`. **Do not review your own
lane and do not merge** — review is a separate, coordinator-dispatched step (3b).
- **Return the structured result** (the coordinator acts on this — do not narrate the diff):
`{ lane, branch, prUrl, headSha, gateResults, selfCheck, blocker? }`. Set `blocker` if you couldn't
reach green (e.g. a test hit its 3-attempt cap); leave the worktree open for the fix loop.
## Step 3b — independent review (coordinator-dispatched, NOT the implementer)
The gate is a review the **author did not run**. When an implementer returns green, the coordinator
spawns a **fresh** review subagent (`/tech-review`, or `/mkurator-review` · `/kollect-mr-review`)
pointed at the pushed branch / PR **diff only** — never `SendMessage` back to the implementer, so the
author's reasoning is never in the reviewer's context. The reviewer trusts the implementer's
`gateResults` (it does not re-run the multi-minute gate matrix) but **does** run any lab/tutorial lane
end-to-end against the real tool. Optionally give the reviewer a different `model` for a genuinely
independent lens. It returns the reviewer schema; the coordinator then routes on `verdict`:
- **APPROVE** → post the review as a **PR comment** (`gh pr comment` — never `--approve`); lane is
ready for the operator to merge (Step 5).
- **REQUEST_CHANGES** → **resume the original implementer** (its worktree + context intact) with the
findings to fix, then **re-dispatch a fresh reviewer** (never reuse the prior review). Independence
holds because each review is fresh even though the author fixes.
- **BLOCK** → park the lane, post the findings, report — no merge.
The coordinator decides purely from `{verdict, findings}`; it does not read the diff to adjudicate.
## Step 4 — collect + report
As implementers finish and pass Step 3b, set each lane's board row to `🟢 PR open: <url>`. Report per
lane from the structured returns: ready-to-merge (APPROVE + green) · needs-changes · blocked. Keep
worktrees open until their PRs land.
**If an implementer dies mid-run** (API stream idle-timeout, crash — no final return but on-disk work
intact and gate-green): the coordinator may **salvage-commit** the on-disk work so it isn't lost, but
must then send it through the **same independent review (Step 3b)** exactly as if the implementer had
finished — **never** self-approve a salvage. A salvaged lane is not more trusted for having been
rescued; if it's a lab/tutorial, the reviewer runs it end-to-end. This session's P1 (a commented-out
but invalid config that every gate passed) was caught only because the salvage still went through review.
## Step 5 — merge (operator)
Leave PRs for the operator — merge via GitHub or `/merge-open-prs`. (For hands-off auto-merge, use the
**`/agent-loop-auto`** variant, which the operator invokes to authorize autonomous merging.)
## Step 6 — end of session
Run **`/retrospective`** to capture learnings. For any lane still in flight: leave its task
`in_progress` + worktree open, note the stop point on the board. Never merge partial work.
## Do not
- Dispatch two lanes that touch the same files — they must own disjoint paths.
- Exceed the concurrency cap, or parallelize machine-locked suites (e2e/integration).
- Start a lane already `🔶 In flight`, or before orienting (Step 1).
- Write code before a failing test; hammer a red test past 3 attempts.
- Let an **implementer review its own lane**, or reuse a prior review after a fix — the gate is alwaysFrom PlatformRelay/Kaddy, MIT.
More from PlatformRelay/Kaddy
- 0.497score
write-story
PlatformRelay
Turn an epic, feature idea, or vague ask into INVEST-compliant vertical-slice stories with Given-When-Then acceptance criteria, mapped onto the target repo's…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
agent-loop-local
PlatformRelay
Maximum-autonomy variant of /agent-loop-auto for ONE repo: no PRs — each lane is gated by a coordinator-dispatched INDEPENDENT reviewer, then a serialized…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
brainstorm
PlatformRelay
Structured diverge → cluster → converge ideation that prevents premature fixation on the first idea.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
changelog
PlatformRelay
Turn gitmoji-conventional commit history into categorized, user-facing release notes for a PlatformRelay repo.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
design-architecture
PlatformRelay
Design a change and record the decision: ADR/AgDR, C4 sketch, weighted trade-off matrix, or a spec-first contract.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
roast
PlatformRelay
Roast me — adversarial critique of a plan, design, or diff to find where it breaks, via pre-mortem, red-team, and steelman-then-destroy.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
security-review
PlatformRelay
Dedicated data-flow security pass over a diff or a repo — deeper than the security dimension of /tech-review.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
tech-review
PlatformRelay
Review a lane/branch before opening (or while awaiting) a PR in any PlatformRelay repo.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
agent-loop-auto
PlatformRelay
Autonomous variant of /agent-loop for ONE repo: thin coordinator + parallel implementer subagents + a coordinator-dispatched INDEPENDENT reviewer, plus an…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
handover
PlatformRelay
Wrap up a session cleanly and produce a copy-pasteable prompt to start the NEXT one.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
merge-open-prs
PlatformRelay
Review and merge all open PRs/MRs in ONE repo after checking CI.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
operator-inbox
PlatformRelay
Scan each PlatformRelay repo's INBOX independently and give the operator a per-repo digest of what needs them — decisions (with options), operator tasks…
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 20, 2026 (3 months ago)
- Last release
- Jul 21, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/PlatformRelay/Kaddy
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from PlatformRelay
- 0.497score
agent-loop-auto
PlatformRelay
Autonomous variant of /agent-loop for ONE repo: thin coordinator + parallel implementer subagents + a coordinator-dispatched INDEPENDENT reviewer, plus an…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
agent-loop-local
PlatformRelay
Maximum-autonomy variant of /agent-loop-auto for ONE repo: no PRs — each lane is gated by a coordinator-dispatched INDEPENDENT reviewer, then a serialized…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
brainstorm
PlatformRelay
Structured diverge → cluster → converge ideation that prevents premature fixation on the first idea.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
changelog
PlatformRelay
Turn gitmoji-conventional commit history into categorized, user-facing release notes for a PlatformRelay repo.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
design-architecture
PlatformRelay
Design a change and record the decision: ADR/AgDR, C4 sketch, weighted trade-off matrix, or a spec-first contract.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
handover
PlatformRelay
Wrap up a session cleanly and produce a copy-pasteable prompt to start the NEXT one.
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get agent-loop running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
agent-loop skill. Agent Mart. https://agentmart.dev/skills/platformrelay-agent-loop (last updated 2026-10-24)