daniel-ospina

goal-setting

Formalize loop goals with O/I/T structure, loop type selection, and verification criteria. Use before /loop start, or when asked to "set a goal", "define loop criteria", or "prepare a loop".

daniel-ospina 0 2 Actualitzat fa 1 mes
GitHub

Instal·la

npx skillscat add daniel-ospina/agent-infra/goal-setting

Instal·la des del registre de SkillsCat.

SKILL.md

⛔ This skill MUST be read in full — not skimmed. Formal review gates depend on its workflow.
Skipping steps silently bypasses quality checks. Missing gates = undetected breakages.

Goal-Setting Skill

Ontology: tortoise/docs/ONTOLOGY.md (v3.1, canonical) — fetch: gh api repos/daniel-ospina/tortoise/contents/docs/ONTOLOGY.md --jq .content | base64 -d (§5 = controlled vocabulary).

Overview

Goal-setting prepares a well-structured goal before starting a loop enforcer cycle. It validates that objectives, indicators, targets, and loop type are coherent — preventing Goodhart's Law gaming and ill-formed loops before execution begins.

When to use: Before /loop start, when asked to "set a goal," or when decomposing a parent loop into sub-loops.

Goal Structure (O/I/T)

Every loop goal has three components structured per OECD RBM (Results-Based Management, 30+ year track record):

Component Description Example
Objective What outcome are we trying to achieve? "Users can authenticate via Google OAuth"
Indicator How will we know it's done? (measurable, verifiable) "Login flow passes 3 test scenarios", "TypeScript compiles clean"
Target What's the bar for success? "0 type errors", "All 3 scenarios pass"

Multiple indicators are required — single-indicator goals invite Goodhart's Law gaming (optimizing for the metric at the expense of the outcome).

Loop Types

Type Behavior Use When
completion Work until exit criteria met, then stop Default — tasks with a defined endpoint
cron Recurring on schedule. No auto-continue — scheduler re-triggers Daily reports, weekly audits
trigger Event-driven. Sleeps until trigger fires Webhook handlers, file watchers
continuous Always-on. Never self-terminates Monitoring, drift detection, always-running agents

Selection rule: Default to completion. Only use cron/trigger/continuous when the task genuinely has no natural endpoint.

Goal Verification Protocol

Before creating a loop, run this verification:

  1. Who is this for? — select team and optionally role:
    • Use --for <role-slug> flag (e.g., --for content-strategist)
    • Team is resolved from the role via swarm's Supabase SOR (roles/teams tables — see node scripts/swarm-org.mjs resolve-role <slug>; requires SUPABASE_URL_ORG_DATA + SUPABASE_SERVICE_ROLE_KEY_ORG_DATA from the swarm repo README)
    • Role inherits escalation chain: role → reports_to → team.escalation → parent team
    • If no role specified: attribute to team directly
    • If unattributed or SOR unreachable: flag goals_unverified — ad-hoc work with no owner
  2. Restate the objective — agent restates what it understood
  3. Challenge the indicators — agent asks: "What could go wrong? Is there a way to satisfy every indicator without achieving the objective?"
  4. Confirm loop type — is completion appropriate? Would cron/trigger/continuous fit better?
  5. Set target ambition — baseline (minimum viable), 1.5x (stretch), 10x (redesign), 100x (moonshot)
  6. Principal confirms — human reviews and confirms the goal structure
  7. GOALS CONFIRMED — manifest written, execution begins

Usage

Via /loop start

/loop start "Implement Google OAuth login" --for content-strategist

The loop enforcer runs goal verification automatically — you'll see the O/I/T confirmation dialog.

Via loop_enforcer tool

loop_enforcer action=start goal="Research competitor pricing for Riviera Maya restaurants"

Explicit type and ambition

/loop start "Daily SEO performance report" --type cron --for growth-hacker
/loop start "Redesign onboarding flow" --ambition 10x --for product-strategist

Deterministic checks

Add machine-verifiable checks that run before LLM evaluation:

/loop start "Fix type errors" --check "exec:npx tsc --noEmit"
/loop start "Write article" --check "file:docs/05_growth/wiki/article.md"
Syntax Meaning Pass condition
--check "exec:<command>" Run shell command exit 0
--check "file:<path>" Check file exists file at path exists

Output target

Specify what artifact the loop should produce:

/loop start "Write article" --output "docs/05_growth/wiki/article.md"

Constraints

Set hard boundaries:

/loop start "Refactor auth" --constraint "don't modify /config"

Checks run before every cycle. Fail → immediate NEEDS_FIX without LLM dispatch. Pass → LLM evaluates quality.

Mid-loop refinement (subgoal)

/loop subgoal "Also verify mobile responsiveness"
/loop subgoal-list                     # See all current indicators

Decomposition

After goal confirmed, the loop enforcer prompts: "Decompose into sub-tasks?" Child loops inherit the parent's loop_type.

Integration Surface

The manifest (~/.pi/agent/loops/<slug>.yaml) is the integration surface between goal-setting and the loop enforcer. Goal-setting writes:

  • objective — the O in O/I/T
  • indicators — list of I's with type and target
  • target_ambition — baseline, 1.5x, 10x, or 100x
  • loop_type — completion, cron, trigger, or continuous
  • completion_contract — free-text complement (optional, Hermes-compatible)

The verifier reads all fields and checks output against them.

When NOT to Use Goal-Setting

  • Micro-tasks that don't need structured verification (single-line changes, trivial fixes)
  • Tasks where the outcome is obvious and unambiguous
  • When the loop enforcer's default O/I/T generation is sufficient

See Also

  • Org data SOR: swarm's Supabase SOR (teams/products/roles tables, migrations 00003-00005) — node scripts/swarm-org.mjs resolve-role <slug>; derived YAML mirror in the swarm repo (operations/subjects/*.yaml)
  • Loop-enforcer architecture docs (eldato repo): docs/teams/organisation-design-team/domains (S1)/capability/2026-06-28-loop-enforcer.md + ...-loop-enforcer-research.md — fetch: gh api repos/daniel-ospina/eldato/contents/<path>
  • extensions/loop-enforcer/ — extension code (this repo)
  • Hermes /goal command (goals.py:79-97) — cross-reference for harmonization

Continue following the workflow as mandated by this skill. Do not skip steps.