Skip to content
Back to skills

Kernel Goal Loop

ASecurity

Durable, resumable reference L2 goal-loop for deterministic or adversarial text evaluation, persisting every turn as a durable Workflow step. Objective Work Item evaluation belongs to the first-class kernel goal-loop Workflow.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 9, 2026
ai-agentsgo

Works with

  • terminal
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 9, 2026

npx -y skills add tedix-hq/tedix --skill kernel-goal-loop --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kernel Goal Loop?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kernel Goal Loop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tedix-hq-kernel-goal-loop/badge)](https://www.skillsdirectory.com/skills/tedix-hq-kernel-goal-loop)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kernel-goal-loop
description: Durable, resumable reference L2 goal-loop for deterministic or adversarial text evaluation, persisting every turn as a durable Workflow step. Objective Work Item evaluation belongs to the first-class kernel goal-loop Workflow.
capabilities:
  network: false
  mcp:
    home:
      - ask
      - read_home_run
  rationale:
    mode: important
  expectedAnnotations:
    destructive: false
    readOnly: false
audience:
  - tedi
---

# kernel-goal-loop

The durable form of the **L2 goal-loop** primitive: a maker turn repeats until a
separate evaluator says the goal is met or a bound is hit. Where the `kernel_goal_loop` Code Mode
muscle polls inside a single ~30s isolate, this skill runs the same governed
loop as a **Cloudflare Workflow**: each kernel turn, poll, and inter-turn wait is
a durable `step.do` / `step.sleep`, so the loop survives DO hibernation, retries
per step, and is observable through the run timeline + artifacts.

## What it does

Each iteration (up to `maxTurns`):

1. `step.do` — submit a kernel turn via `home.ask({ content })` (the
   maker — makes progress on the goal every turn, regardless of evaluator).
2. `step.do` + `step.sleep` — poll `home.read_home_run` until the run is
   terminal, extracting only the small route/cost fields (the large run-set
   payload never lands in a persisted step value).
3. **Separate-evaluator stop-check** (checker ≠ maker):
   - `deterministic` — a regex the maker prompt never sees, tested against
     the maker's answer.
   - `adversarial` — a second `ask` judge turn that may only rule
     DONE/CONTINUE and is forbidden from answering the task.
4. Enforced ceilings — stop on `condition_met`, `budget_exceeded`
   (summed `bodyExecutionResult` cost > `budgetUsd`), `stall` (>2), or
   `max_turns`.

`work_items` is deliberately rejected here. Use the first-class kernel
goal-loop Workflow (`tedix goal --evaluator work_items --objective-id ...`),
which owns the single-statement D1 completion oracle. A paginated skill-side
copy cannot provide the same snapshot or historical-checkout guarantees.

## Usage

```
// deterministic / adversarial (unchanged)
run_skill_workflow({ slug: "kernel-goal-loop", params: {
  content: "In one sentence, define loop engineering.",
  condition: "loop",
  maxTurns: 3,
  budgetUsd: 0.10,
  evaluator: "deterministic"      // or "adversarial"
} })
```

Params: `content` (required), `condition` (required), `maxTurns` (default 3),
`budgetUsd` (default 0.10), `evaluator` (`deterministic` | `adversarial`),
`pollAttempts` (default 18), `sleepSeconds` (default 3).

## Output

`{ met, stop, turns, totalCostUsd, evidence[] }` where each evidence row carries
`runId`, `status`, `routeKind`, `routerVersion`, `harnessVersionId`,
`traceBundleId`, `costUsd`, `verdict`, and the answer preview for that turn. The
durable step timeline (`get_skill_workflow_status` →
`engine`, `list_skill_run_artifacts`) proves the per-turn `step.do` /
`step.sleep` checkpoints.

Files in this skill

  • SKILL.md2.9 KB
  • scripts/workflow.ts7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.