Skill434 repo starsupdated 3d ago
craft-goal
Compile or lint a persistent Mayor-style Triggers: "craft a goal prompt", "mayor goal", "goal-runner prompt", "lint this goal", "is this goal safe". (Shaping one experiment''s intent routes to plan.)
Install in Claude Code
Copygit clone --depth 1 https://github.com/boshu2/agentops /tmp/craft-goal && cp -r /tmp/craft-goal/skills-codex/craft-goal ~/.claude/skills/craft-goalThen start a new Claude Code session; the skill loads automatically.
Definition
SKILL.md
# Craft Goal
Craft the autonomy contract above AgentOps RPI. A goal is a persistent
Mayor over a bead-shaped experiment graph. Each RPI is one scientific trial;
the goal selects the next useful trial, preserves what was learned, and
ratchets toward a larger outcome.
```text
Goal / Mayor: observe graph → choose bounded wave → consume verdicts → ratchet
└─ Bead: durable experiment intent, context, scratch, evidence, and links
└─ RPI: plan → implement → fresh validate → verdict → report and stop
└─ Implementation: one RED → GREEN → refactor experiment
```
The number of RPIs need not be known in advance. The goal is safe when success
is decidable, every experiment is bounded, knowledge is monotonic, and the
authorization envelope cannot silently renew itself.
**Insight:** bounded waves shorten the feedback loop; one hard, non-renewing
campaign envelope prevents those waves from becoming infinite continuation.
**Authority boundary.** The emitted goal prompt and safety report are inert
caller-owned text. Crafting one creates no goal, starts no runtime, and mutates
no bead; it confers no standing authorization. The prompt drives RPI dispatch
only when a caller pastes it into their own goal runtime under their own
authority, and only within the non-renewing envelope the caller then sets.
Named failure mode — **completion treadmill**: discoveries recursively become
requirements and activity continues without new information. Its opposite is
**first-red abandonment**: one falsified hypothesis ends a viable campaign.
Anti-pattern: choose endless retries or stop on the first red. Corrective:
continue while experiments produce a defined ratchet and remain
inside the envelope; invoke an andon on churn, judgment, or exhaustion.
Stop when the goal reports `ACHIEVED`, `NOT_ACHIEVED`, or `NEEDS_OPERATOR`.
## Modes
| Caller wording | Mode | Result |
|---|---|---|
| "craft a goal", "turn this into a goal" | craft | Compile a Mayor-style goal prompt and settings. |
| "lint/review this goal", "is this safe" | lint | Return findings and a rewrite when supplied facts permit one. |
Stop after 1 compilation pass. Never create a goal or mutate beads.
## Admission and sizing
**Fuzzy route is acceptable; fuzzy success is not.** Before goal creation, the
caller must know the outcome, what evidence would prove it, non-goals, and
authority. The exact experiment graph may still be unknown.
- Return `USE_RPI` for one shaped experiment with no verdict-driven follow-on.
- Use a goal for a terminal outcome that may need several related experiments.
- A shaped goal with no beads may begin with 1 bounded discovery wave that
creates the root and initial experiment beads.
- Return `UNSAFE_GOAL` when no falsifiable first question or terminal evidence
can be named. Route that intent to idea/plan work.
- Return `UNSAFE_GOAL` for indefinite monitoring or event reaction; that is an
automation, not a terminal goal.
Goals may be different sizes. Size the wave and hard campaign envelopes to the
outcome; do not invent one universal budget.
## Critical constraints
- **Closed outcome, adaptive route:** Freeze terminal acceptance. New facts may
change hypotheses and dependencies, never silently enlarge success.
**Why:** discovery should steer the route, not redefine the finish line.
- **Bead knowledge graph:** Use the tracker as durable memory, not a parallel
goal ledger. Root epic = outer intent; child bead = one experiment/RPI.
**Why:** compaction must not erase the scientific record.
- **RPI membrane:** One candidate gets one bounded RPI and an author-distinct
fresh validation result. The goal may request durable verdict evidence but
never rewrites it.
**Why:** orchestration cannot author its own proof.
- **Brownian ratchet:** Continue only when a result adds non-duplicative,
decision-relevant knowledge or advances acceptance. **Why:** activity without
information is churn.
- **Two-level bounds:** Every RPI is bounded; every dispatch wave is bounded;
the full goal also has monotonic hard ceilings. **Why:** a new wave must not
mint a new campaign.
- **Earned andon:** Ordinary red may change the route. Repeated no-information
failure, oscillation, scope pressure, or exhaustion enters HOLD and gets
exactly 1 bounded fresh helper before `UNSTUCK` or `ESCALATE`.
- **Operator legibility:** At each wave boundary, report the acceptance matrix,
graph frontier, verdicts, ratchets, churn, remaining budget, and next thesis.
- **Exterior self-repair:** Repair an unstable factory from an ordinary
shell/worktree and use the factory only for a declared bounded canary.
Stop when the goal reports `ACHIEVED`, `NOT_ACHIEVED`, or `NEEDS_OPERATOR`.
## Bead graph contract
Record each experiment in a bead with:
- question or hypothesis and the acceptance gap it addresses;
- method, expected observation, falsifier, scope, and non-goals;
- notes/scratch sufficient to resume after compaction;
- exact RPI verdict/evidence references and observed learning.
Use graph semantics deliberately:
- `parent-child` for goal → experiment membership;
- `blocks` only for real execution ordering;
- `related` for alternatives or correlated observations;
- `discovered-from` for provenance of newly exposed work.
Use live `bd`/`br` state as authority and `bv --robot-*` output for
prioritization, parallel tracks, bottlenecks, and graph insight. Never treat a
static plan as fresher than the graph. The `bd`/`br`/`bv` tracker is an external,
caller-owned runtime the emitted goal will drive; craft-goal reads live tracker
state when present but starts nothing and requires no tracker to be installed to
compile a prompt.
## What counts as a ratchet
An RPI makes progress when its durable result does at least one:
1. proves part of terminal acceptance;
2. falsifies a live hypothesis with discriminating evidence and prunes it;
3. resolves an uncertainty or owner so the next experiment is materially
different.More from this repository
agent-mailSkill
Use Agent Mail as an optional messaging and Triggers: "coordinate writers", "reserve files".
beads-brSkill
>-
beads-bvSkill
>-
beads-workflowSkill
Use when converting markdown plans into br beads with dependencies for implementation or swarm execution.
caamSkill
Use when switching AI coding CLI accounts quickly to recover from subscription rate limits or OAuth friction.
casrSkill
>-
cass-memorySkill
Use when starting non-trivial work, mining lessons, or preventing repeated mistakes with cm procedural memory.
cassSkill
Mine past agent sessions for working Triggers: "cass", "mine past agent sessions for", "cass skill".