G

goals

by @boshu2v
4.2(117)

维护GOALS.yaml和GOALS.md健身规范,测量并管理健身状况。

goal-oriented-aitask-planningobjective-functionagent-autonomyperformance-metricsGitHub
安装方式
npx skills add boshu2/agentops --skill goals
compare_arrows

Before / After 效果对比

1
使用前

项目目标定义模糊,缺乏明确的衡量标准和追踪机制,导致团队对目标理解不一致,难以评估进展,容易偏离初始方向。

使用后

通过维护`GOALS.yaml`和`GOALS.md`健身规范,系统性地定义、衡量和追踪项目目标,管理指令,监控目标偏离,并提供添加/修剪目标、查看历史等功能,确保项目始终围绕核心目标前进,提高项目成功率。

SKILL.md

/goals — Fitness Goal Maintenance

Maintain GOALS.yaml and GOALS.md fitness specifications. Use ao goals CLI for all operations.

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Quick Start

/goals                    # Measure fitness (default)
/goals init               # Bootstrap GOALS.md interactively
/goals steer              # Manage directives
/goals add                # Add a new goal
/goals drift              # Compare snapshots for regressions
/goals history            # Show measurement history
/goals export             # Export snapshot as JSON for CI
/goals meta               # Run meta-goals only
/goals validate           # Validate structure
/goals prune              # Remove stale gates
/goals migrate            # Migrate YAML to Markdown

Format Support

FormatFileVersionFeatures
YAMLGOALS.yaml1-3Goals with checks, weights, pillars
MarkdownGOALS.md4Goals + mission + north/anti stars + directives

When both files exist, GOALS.md takes precedence.

Mode Selection

Parse the user's input:

InputModeCLI Command
/goals, /goals measure, "goal status"measureao goals measure
/goals init, "bootstrap goals"initao goals init
/goals steer, "manage directives"steerao goals steer
/goals add, "add goal"addao goals add
/goals drift, "goal drift"driftao goals drift
/goals history, "goal history"historyao goals history
/goals export, "export goals"exportao goals export
/goals meta, "meta goals"metaao goals meta
/goals validate, "validate goals"validateao goals validate
/goals prune, "prune goals", "clean goals"pruneao goals prune
/goals migrate, "migrate goals"migrateao goals migrate

Measure Mode (default) — Observe

Step 1: Run Measurement

ao goals measure --json

Parse the JSON output. Extract per-goal pass/fail, overall fitness score.

Step 2: Directive Gap Assessment (GOALS.md only)

If the goals file is GOALS.md format:

ao goals measure --directives

For each directive, assess whether recent work has addressed it:

  • Check git log for commits mentioning the directive title
  • Check beads/issues related to the directive topic
  • Rate each directive: addressed / partially-addressed / gap

Step 3: Report

Present fitness dashboard:

Fitness: 5/7 passing (71%)

Gates:
  [PASS] build-passing (weight 8)
  [FAIL] test-passing (weight 7)
    └─ 3 test failures in pool_test.go

Directives:
  1. Expand Test Coverage — gap (no recent test additions)
  2. Reduce Complexity — partially-addressed (2 refactors this week)

Init Mode

ao goals init

Or with defaults:

ao goals init --non-interactive

Creates a new GOALS.md with mission, north/anti stars, first directive, and auto-detected gates. Error if file already exists.

Steer Mode — Orient/Decide

Step 1: Show Current State

Run measure mode first to show current fitness and directive status.

Step 2: Propose Adjustments

Based on measurement:

  • If a directive is fully addressed → suggest removing or replacing
  • If fitness is declining → suggest new gates
  • If idle rate is high → suggest new directives

Step 3: Execute Changes

Use CLI commands:

ao goals steer add "Title" --description="..." --steer=increase
ao goals steer remove 3
ao goals steer prioritize 2 1

Add Mode

Add a single goal to the goals file. Format-aware — writes to GOALS.yaml or GOALS.md depending on which format is detected.

ao goals add <id> <check-command> --weight=5 --description="..." --type=health
FlagDefaultDescription
--weight5Goal weight (1-10)
--descriptionHuman-readable description
--typeGoal type (health, architecture, quality, meta)

Example:

ao goals add go-coverage-floor "bash scripts/check-coverage.sh" --weight=3 --description="Go test coverage above 60%"

Drift Mode

Compare the latest measurement snapshot against a previous one to detect regressions.

ao goals drift                    # Compare latest vs previous snapshot

Reports which goals improved, regressed, or stayed unchanged.

History Mode

Show measurement history over time for all goals or a specific goal.

ao goals history                        # All goals, all time
ao goals history --goal go-coverage     # Single goal
ao goals history --since 2026-02-01     # Since a specific date
ao goals history --goal go-coverage --since 2026-02-01  # Combined

Useful for spotting trends and identifying oscillating goals.

Export Mode

Export the latest fitness snapshot as JSON for CI consumption or external tooling.

ao goals export

Outputs the snapshot to stdout in the fitness snapshot schema (see references/goals-schema.md).

Meta Mode

Run only meta-goals (goals that validate the validation system itself). Useful for checking allowlist hygiene, skip-list freshness, and other self-referential checks.

ao goals meta --json

See references/goals-schema.md for the meta-goal pattern.

Validate Mode

ao goals validate --json

Reports: goal count, version, format, directive count, any structural errors or warnings.

Prune Mode

ao goals prune --dry-run    # List stale gates
ao goals prune              # Remove stale gates

Identifies gates whose check commands reference nonexistent paths. Removes them and re-renders the file.

Migrate Mode

Convert between goal file formats.

ao goals migrate --to-md      # Convert GOALS.yaml → GOALS.md
ao goals migrate               # Migrate GOALS.yaml to latest YAML version

The --to-md flag creates a GOALS.md with mission, north/anti stars sections, and converts existing goals into the Gates table format. The original YAML file is backed up.

Examples

Checking fitness and directive gaps

User says: /goals

What happens:

  1. Runs ao goals measure --json to get gate results
  2. If GOALS.md format, runs ao goals measure --directives to get directive list
  3. Assesses each directive against recent work
  4. Reports combined fitness + directive gap dashboard

Result: Dashboard showing gate pass rates and directive progress.

Bootstrapping goals for a new project

User says: /goals init

What happens:

  1. Runs ao goals init which prompts for mission, stars, directives, and auto-detects gates
  2. Creates GOALS.md in the project root

Result: New GOALS.md ready for /evolve consumption.

Adding a new goal after a post-mortem

User says: /goals add go-parser-fuzz "cd cli && go test -fuzz=. ./internal/goals/ -fuzztime=10s" --weight=3 --description="Markdown parser survives fuzz testing"

What happens:

  1. Runs ao goals add with the provided arguments
  2. Writes the new goal in the correct format (YAML or Markdown)

Result: New goal added, measurable on next /goals run.

Troubleshooting

ProblemCauseSolution
"goals file already exists"Init called on existing projectUse /goals to measure, or delete file to re-init
"directives require GOALS.md format"Tried steer on YAML fileRun ao goals migrate --to-md first
No directives in measure outputGOALS.yaml doesn't support directivesMigrate to GOALS.md with ao goals migrate --to-md
Gates referencing deleted scriptsScripts were renamed or removedRun /goals prune to clean up
Drift shows no historyNo prior snapshots savedRun ao goals measure at least twice first
Export returns emptyNo snapshot file existsRun ao goals measure to create initial snapshot

See Also

  • /evolve — consumes goals for fitness-scored improvement loops
  • references/goals-schema.md — schema definition for both formats
  • references/generation-heuristics.md — goal quality criteria

Reference Documents

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量605
评分4.2 / 5.0
版本
更新日期2026年5月23日
对比案例1 组

用户评分

4.2(117)
5
50%
4
50%
3
1%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月17日
最后更新2026年5月23日