goal-loop
Execute the spec-tests-implement-verify cycle for one atomic task at a time.
Skill by MILTONADINA
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/miltonadina-goal-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: productivity, finance, 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/goal-loop
What's inside
- Skill name
goal-loop- Description
- Execute the spec-tests-implement-verify cycle for one atomic task at a time. Use after plan-decomposition has produced a task list. This is the workhorse loop - the agent implements, runs tests, reflects on failure, retries with bounded iteration. Halts at the iteration ceiling, and when a budget, loop-detection or scratchpad-stasis hook fires where the host wires one. See constitution/LOOP.md for full protocol.
- License
- MIT
- Instructions
- 109 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- SKILL.md.bundle
- SKILL.md.sig
SKILL.md (first lines)
# Goal Loop
> The execution engine for spec-anchored work. Implements the loop in
> `constitution/LOOP.md`.
**Tradeoff:** Single-task focus is slower than batch implementation. Worth it:
each iteration is verifiable, failures are bounded, and partial progress is
durable.
---
## When to invoke
After:
- Spec is approved
- Plan exists at `.workflow/state/plans/<spec-id>.md`
- A specific task `T-NNN` is the current focus
Per task. Not per session. One task ≠ one session necessarily.
---
## Protocol (see constitution/LOOP.md for full diagram)
```
1. Load task T-NNN. Read AC mapping. Read related code directly (or via Claude Code's native Explore agent for wide searches).
2. Write failing test(s). Confirm they fail.
3. Implement minimum change to make test pass.
4. Run verification command.
- PASS: emit proof-of-work, mark task complete, move to next.
- FAIL: write reflection (specific test names + error messages),
retry with different approach, increment iteration count.
5. If iteration count >= N (default 5): write blocker, halt.
6. If budget cap hit: halt (budget-brake hook fires).
7. If loop-detection fires: halt.
8. If scratchpad-stasis fires: halt.
```
---
## Reflection requirements
The reflection step is not optional. Before retrying, write to
`.workflow/state/loop-<task-id>.jsonl`:
```json
{
"iteration": 3,
"timestamp": "2026-05-22T10:42:13Z",
"action_taken": "<what was just done>",
"verification_command": "<command>",
"exit_code": <code>,
"failing_tests": ["test name 1", "test name 2"],
"error_messages": ["actual error from output"],
"reflection": "<specific hypothesis about why it failed>",
"next_action": "<concrete next change>"
}
```
A reflection that says "try again with different approach" without specifics
is a constitution violation.
---
## Exit conditions
### Success
- All tests for the task pass
- No regression in other tests
- Lint, type check, format all clean
- Emit proof-of-work artifact
- Move to next task or write baton
### Bounded failure (blocker)
- Iteration count exceeded → write blocker, halt
- Budget cap hit → write blocker, halt
- Loop detected → write blocker, halt
- User intervention required → write open question, halt
NEVER:
- Skip the test
- Mark task complete without proof
- Modify acceptance tests during the loop
- Lower the spec to match the code
---
## Anti-patterns
**Test deletion**: if a test is "wrong," update the spec first, then regenerate
the test. Never edit tests mid-loop.
**Spec mutation**: if the spec is unclear, halt with a blocker. Don't reinterpret
mid-implementation.
**Success masking**: a non-zero exit code means the test did not pass, however
close the output looks. Record the real exit code and treat the iteration as a
FAIL.
**Hidden context**: every iteration must reference specific failing tests and
error messages. No vague reflections.
---
**This skill is working when:** sessions reach `done` state through verification
rather than assertion. Target: verified_done / claimed_done > 0.95. The
intended record is `governance/telemetry/done-ratio.jsonl`. Nothing writes it yet, so check by hand.From MILTONADINA/DevOPs, MIT.
More from MILTONADINA/DevOPs
- 0.565score
ears-spec-writing
MILTONADINA
Write requirement specifications in EARS (Easy Approach to Requirements Syntax) notation.
SkillAFreshness: AClaude Code +9 - 0.565score
proof-of-work
MILTONADINA
Produce structured proof artifacts for every completed claim.
SkillAFreshness: AClaude Code +9 - 0.565score
plan-decomposition
MILTONADINA
Break an approved spec into atomic, ordered, verifiable tasks before any code is written.
SkillAFreshness: AClaude Code +9 - 0.565score
multi-tool-failover
MILTONADINA
Manage session continuity when switching between Claude Code, Codex CLI, Cursor, Antigravity, Kiro, or local LLMs (OpenCode, Aider).
SkillAFreshness: AClaude Code +9 - 0.565score
baton-handoff
MILTONADINA
Write a complete handoff document at session end so the next agent (Claude Code, Codex, Cursor, Antigravity, Kiro, or local LLM) resumes exactly where this…
SkillAFreshness: AClaude Code +9 - 0.565score
observability-instrument
MILTONADINA
Add OpenTelemetry spans with user_id and tenant_id in baggage to any new code path that handles requests, runs agents, or performs billable operations.
SkillAFreshness: AClaude Code +9 - 0.565score
cost-attribution
MILTONADINA
Track per-client and per-feature LLM and cloud spend with cryptographic audit trail.
SkillAFreshness: AClaude Code +9 - 0.565score
openapi-first
MILTONADINA
Generate API code, types, validators, mock servers, and client SDKs from a single OpenAPI 3.1 specification.
SkillAFreshness: AClaude Code +9 - 0.561score
session-summary
MILTONADINA
Generate the end-of-session human-reviewable report.
SkillAFreshness: AClaude Code +9 - 0.561score
coppa-audit
MILTONADINA
Audit code, data flows, and UI for COPPA (Children's Online Privacy Protection Act) compliance.
SkillAFreshness: AClaude Code +9 - 0.560score
supabase-rpc-functions
MILTONADINA
Supabase RPC function security patterns -- SECURITY DEFINER with `SET search_path` discipline, `REVOKE EXECUTE FROM public` for least-privilege exposure…
SkillAFreshness: AClaude Code +9 - 0.560score
rust-error-handling
MILTONADINA
Rust error-handling patterns and anti-patterns -- `unwrap()` in request hot paths, `panic!` instead of returning a `Result`, leaking error internals via…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 12
- Last commit (this folder)
- Oct 12, 2026 (17 days ago)
- Last release
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/MILTONADINA/DevOPs
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from MILTONADINA
- 0.565score
baton-handoff
MILTONADINA
Write a complete handoff document at session end so the next agent (Claude Code, Codex, Cursor, Antigravity, Kiro, or local LLM) resumes exactly where this…
SkillAFreshness: AClaude Code +9 - 0.565score
observability-instrument
MILTONADINA
Add OpenTelemetry spans with user_id and tenant_id in baggage to any new code path that handles requests, runs agents, or performs billable operations.
SkillAFreshness: AClaude Code +9 - 0.565score
openapi-first
MILTONADINA
Generate API code, types, validators, mock servers, and client SDKs from a single OpenAPI 3.1 specification.
SkillAFreshness: AClaude Code +9 - 0.565score
ears-spec-writing
MILTONADINA
Write requirement specifications in EARS (Easy Approach to Requirements Syntax) notation.
SkillAFreshness: AClaude Code +9 - 0.565score
cost-attribution
MILTONADINA
Track per-client and per-feature LLM and cloud spend with cryptographic audit trail.
SkillAFreshness: AClaude Code +9 - 0.565score
multi-tool-failover
MILTONADINA
Manage session continuity when switching between Claude Code, Codex CLI, Cursor, Antigravity, Kiro, or local LLMs (OpenCode, Aider).
SkillAFreshness: AClaude Code +9
Cite this page
goal-loop skill. Agent Mart. https://agentmart.dev/skills/miltonadina-goal-loop (last updated 2026-10-24)