agentleFS
npownpow/claude-skills/goal-manager/SKILL.md

goal-manager

Skill4 starsChanged 6 months agoApache-2.0View on GitHub

Use when the user asks to set a goal, track progress across sessions, check goal drift, review long-term objectives, or says "remember this goal", "what are my goals", "how is X progressing". Tracks multi-session goals and detects drift.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When completing, abandoning, or pausing long-running work

    line 24
  2. Distinctive:

    All commands output JSON to stdout.

    line 43
  3. Very specific:

    Call context-block to get a compact goal summary (≤2,000 tokens) for injection into the session prompt.

    line 139
  4. Very specific:

    Call update-progress with what was accomplished, what remains, and any decisions made.

    line 142
  5. Very specific:

    Call drift-check --scope all to surface stale goals or accumulated drift.

    line 145
  6. Very specific:

    Call complete when done. The command enforces that all child goals must be completed first.

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Goal Manager — Long-Horizon Coherence

Track multi-session objectives, detect goal drift, and inject compact goal summaries into session prompts. Prevents goal amnesia, objective substitution, and silent scope drift across session boundaries.

When to Use

  • A user establishes an objective that will span multiple sessions (e.g., "spec out the 5 Tier 1 items", "build the scenario reliability framework")
  • At session start, to inject active goal context into the prompt
  • Periodically, to check for drift (stale goals, unmapped work, decision accumulation)
  • When completing, abandoning, or pausing long-running work

Architecture

~/.aimee/workspace/
├── GOALS.md                  # Human-readable index (sentinel-managed section)
├── goals/
│   ├── g-<id>.json           # One file per goal (atomic writes)
│   ├── thread_map.json       # Slack thread → goal ID mapping
│   └── .lhc_meta.json        # Schema version, last drift check, alert log

Override workspace with LHC_WORKSPACE env var.

CLI Reference

Script: ${SKILLS_ROOT}/goal-manager/scripts/goal_manager.py

All commands output JSON to stdout.

Goal Lifecycle

# Register a new goal
goal_manager.py register \
  --title "Build scenario reliability framework" \
  --intent "Adversarial test coverage for all 10 skills" \
  --criteria "68 scenarios passing" "CI gate wired" \
  --effort weeks \
  --tags reliability testing \
  --thread-id "C04JU1P5ELV/1777303899.777999" \
  --parent g-<parent-id> \
  --triggered-by "antanomy paper review item 1"

# Update progress on a goal
goal_manager.py update-progress \
  --goal-id g-<id> \
  --accomplished "Wrote 12 failure injection primitives" "CLI wrapper done" \
  --remaining "Wire CI gate" "Backfill 56 skills" \
  --decisions "desc|rationale|scope_impact" \
  --confidence 0.7 \
  --session-id <session-id> \
  --run-id <sagaflow-run-id>

# Complete a goal (blocks if active children exist)
goal_manager.py complete \
  --goal-id g-<id> \
  --summary "All 68 scenarios passing, CI gate live" \
  --artifacts spec.md report.html

# Abandon a goal (cascades to children, unlinks threads)
goal_manager.py abandon --goal-id g-<id> --reason "Deprioritized"

# Pause / resume
goal_manager.py pause --goal-id g-<id> --reason "Blocked on dependency"
goal_manager.py resume --goal-id g-<id>

Queries

# List goals (default: active only)
goal_manager.py list --filter active|paused|completed|abandoned|all

# Show full goal record
goal_manager.py show --goal-id g-<id>

# Generate context block for session prompt (≤2000 tokens)
goal_manager.py context-block --thread-id "C04JU1P5ELV/1234567890.123456"

Drift Detection

# Run all drift rules against active goals
goal_manager.py drift-check --scope all

# Run drift check for a specific goal
goal_manager.py drift-check --scope g-<id>

Drift rules implemented:

RuleTriggerSeverity
D-01No progress for 3+ daysMEDIUM (3d) / HIGH (7d)
D-023+ decisions accumulatedMEDIUM
D-03Confidence dropped below 0.6HIGH
D-06Active children blocking parentMEDIUM
D-08Unmapped work flag setLOW

D-05 (scope change via criteria diff) is stubbed. D-07 (priority confusion) surfaces via the unmapped-work flag.

Anti-noise: HIGH alerts have a 24-hour cooldown per goal. Max 3 HIGH alerts surfaced per session.

Thread Mapping

# Link a Slack thread to a goal
goal_manager.py link-thread --goal-id g-<id> --thread-id "C04JU1P5ELV/1234567890.123456"

# Flag unmapped work on a goal
goal_manager.py set-unmapped-work --goal-id g-<id> --value true

Maintenance

# Check internal consistency (orphans, broken parent refs, stale thread mappings)
goal_manager.py consistency-check

Integration Points

Session Start

Call context-block to get a compact goal summary (≤2,000 tokens) for injection into the session prompt. Pass --thread-id to prioritize thread-relevant goals.

After Meaningful Work

Call update-progress with what was accomplished, what remains, and any decisions made. Include --confidence if the goal feels at risk.

Session End / Idle

Call drift-check --scope all to surface stale goals or accumulated drift.

Goal Completion

Call complete when done. The command enforces that all child goals must be completed first.

GOALS.md Format

The script manages a sentinel block in GOALS.md:

<!-- LHC:BEGIN -->
| ID | Title | Status | Progress | Updated |
|----|-------|--------|----------|---------|
| g-xxx | Build reliability framework | active | 3/5 items done | 2026-04-28 |
<!-- LHC:END -->

Content outside the sentinel block is preserved. The block is rewritten on every mutation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.