goals

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/goals — Fitness Goal Maintenance

/goals — 健康度目标维护

Maintain the GOALS.yaml that
/evolve
consumes. Run checks, generate new goals from repo state, prune stale ones.
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
维护供
/evolve
使用的GOALS.yaml文件。执行检查、根据代码仓库状态生成新目标、清理过期目标。
你必须执行此工作流,不能仅进行描述。

Quick Start

快速开始

bash
/goals                    # Status dashboard (default)
/goals generate           # Scan repo, propose new goals
/goals prune              # Find stale/broken goals, propose fixes

bash
/goals                    # 状态仪表盘(默认)
/goals generate           # 扫描代码仓库,提议新目标
/goals prune              # 查找过期/失效目标,提议修复方案

Mode Selection

模式选择

Parse the user's input to determine the mode:
InputMode
/goals
,
/goals status
, "goal status", "show goals"
status
/goals generate
, "generate goals", "add goals"
generate
/goals prune
, "prune goals", "update goals", "clean goals"
prune

解析用户输入以确定模式:
输入内容模式
/goals
,
/goals status
, "goal status", "show goals"
状态查看
/goals generate
, "generate goals", "add goals"
生成目标
/goals prune
, "prune goals", "update goals", "clean goals"
清理目标

Status Mode (default)

状态查看模式(默认)

Step 1: Parse GOALS.yaml

步骤1:解析GOALS.yaml

Read
GOALS.yaml
from the repo root. Extract:
  • version
    ,
    mission
    ,
    pillars
  • All goals with
    id
    ,
    description
    ,
    check
    ,
    weight
    ,
    pillar
    (optional)
从代码仓库根目录读取
GOALS.yaml
文件,提取以下内容:
  • version
    mission
    pillars
  • 所有目标的
    id
    description
    check
    weight
    pillar
    (可选)

Step 2: Run All Checks

步骤2:执行所有检查

For each goal, execute the
check
command using Bash:
  • Exit 0 = PASS
  • Non-zero exit = FAIL
  • Command error (command not found, syntax error) = ERROR
Capture exit code and stderr for each. Run in parallel where possible (independent checks).
对每个目标,使用Bash执行
check
命令:
  • 退出码0 = 通过
  • 非零退出码 = 失败
  • 命令错误(命令未找到、语法错误)= 错误
捕获每个目标的退出码和标准错误输出。尽可能并行执行(独立检查项)。

Step 3: Group and Report

步骤3:分组并报告结果

Group results by category:
  1. Pillar goals — grouped by pillar, sorted by weight (highest first)
  2. Infrastructure goals — sorted by weight
  3. Cross-runtime goals — sorted by weight
For each goal, show:
[PASS] id (weight N) — description
[FAIL] id (weight N) — description
  └─ stderr: <first line of error output>
[ERROR] id (weight N) — description
  └─ error: <command error>
按类别分组结果:
  1. 支柱目标 — 按支柱分组,按权重从高到低排序
  2. 基础设施目标 — 按权重排序
  3. 跨运行时目标 — 按权重排序
每个目标的展示格式:
[通过] 标识(权重N)—— 描述
[失败] 标识(权重N)—— 描述
  └─ 错误输出:<错误输出的第一行>
[错误] 标识(权重N)—— 描述
  └─ 错误信息:<命令错误内容>

Step 4: Summary

步骤4:汇总信息

Fitness: 52/65 passing (80%)

By pillar:
  knowledge-compounding:   9/11 (82%)  weight: 45/51
  validated-acceleration:  4/5  (80%)  weight: 13/17
  goal-driven-automation:  5/5  (100%) weight: 17/17
  zero-friction-workflow:  8/10 (80%)  weight: 25/34

Infrastructure: 20/25 (80%)
Cross-runtime: 6/9 (67%)
健康度:52/65 通过(80%)

按支柱分类:
  knowledge-compounding:   9/11 (82%)  权重:45/51
  validated-acceleration:  4/5  (80%)  权重:13/17
  goal-driven-automation:  5/5  (100%) 权重:17/17
  zero-friction-workflow:  8/10 (80%)  权重:25/34

基础设施:20/25(80%)
跨运行时:6/9(67%)

Step 5: Staleness Check

步骤5:过期引用检查

Flag goals whose
check
references paths that don't exist:
  • Extract file paths from check commands (patterns:
    test -f <path>
    ,
    grep ... <path>
    ,
    cat <path>
    )
  • Check each path with
    test -e
  • Report stale references

标记
check
命令引用不存在路径的目标:
  • 从检查命令中提取文件路径(匹配模式:
    test -f <path>
    grep ... <path>
    cat <path>
  • 使用
    test -e
    检查每个路径是否存在
  • 报告过期引用

Generate Mode

生成目标模式

Step 1: Read Context

步骤1:读取上下文信息

Read these files (in parallel):
  • GOALS.yaml
    — existing goal IDs
  • PRODUCT.md
    — design principles, value props, pillars
  • README.md
    — claims, badges, features
  • skills/SKILL-TIERS.md
    — full skill list
并行读取以下文件:
  • GOALS.yaml
    — 现有目标标识
  • PRODUCT.md
    — 设计原则、价值主张、核心支柱
  • README.md
    — 声明、徽章、功能
  • skills/SKILL-TIERS.md
    — 完整技能列表

Step 2: Identify Coverage Gaps

步骤2:识别覆盖缺口

Uncovered skills: For each skill in
skills/*/SKILL.md
, check if any existing goal's
check
field references that skill directory. List skills with no goal.
Uncovered infrastructure: Scan
tests/
,
hooks/
,
scripts/
for scripts not referenced by any goal's
check
.
Pillar coverage: Check each of the 4 pillars has adequate goals. Reference the theoretical pillar mapping in
references/generation-heuristics.md
.
Claim verification: Scan README.md for quantitative claims (numbers, "all", "every") that have no corresponding goal verifying them.
未覆盖的技能:
skills/*/SKILL.md
中的每个技能,检查是否有现有目标的
check
字段引用该技能目录。列出没有对应目标的技能。
未覆盖的基础设施: 扫描
tests/
hooks/
scripts/
目录,查找未被任何目标的
check
引用的脚本。
支柱覆盖情况: 检查4个核心支柱是否有足够的目标。参考
references/generation-heuristics.md
中的理论支柱映射。
声明验证: 扫描README.md中的量化声明(数字、“全部”、“每个”),检查是否有对应的目标验证这些声明。

Step 3: Propose Goals

步骤3:提议新目标

For each gap, draft a goal:
yaml
- id: <kebab-case-id>
  description: "<what it measures>"
  check: "<shell command, exit 0 = pass>"
  weight: <1-5>
  pillar: <pillar-name>  # omit for infrastructure
Apply quality criteria from
references/generation-heuristics.md
:
  • Mechanically verifiable (shell command)
  • Not trivially true
  • Not duplicative of existing goals
  • Weighted by impact
针对每个缺口,草拟目标:
yaml
- id: <短横线命名标识>
  description: "<测量内容>"
  check: "<Shell命令,退出码0表示通过>"
  weight: <1-5>
  pillar: <支柱名称>  # 基础设施目标可省略
应用
references/generation-heuristics.md
中的质量标准:
  • 可机械验证(通过Shell命令)
  • 非显然成立
  • 不与现有目标重复
  • 根据影响设置权重

Step 4: User Selection

步骤4:用户选择

Present proposals via
AskUserQuestion
. Group by category:
  • "Which pillar goals should be added?"
  • "Which infrastructure goals should be added?"
Allow multi-select. User can also provide custom edits.
通过
AskUserQuestion
呈现提议,按类别分组:
  • “应添加哪些支柱目标?”
  • “应添加哪些基础设施目标?”
允许多选。用户也可提供自定义编辑。

Step 5: Write Accepted Goals

步骤5:写入已接受的目标

Append accepted goals to
GOALS.yaml
in the appropriate section (pillar or infrastructure).
Update the header comment counts:
yaml
undefined
将已接受的目标追加到GOALS.yaml的对应章节(支柱或基础设施)。
更新头部注释的计数:
yaml
undefined

Total: N goals (X pillar + Y infrastructure + Z cross-runtime)

总计:N个目标(X个支柱 + Y个基础设施 + Z个跨运行时)


Count mechanically — `grep -c '^ *- id:' GOALS.yaml` — don't estimate.

---

通过机械方式计数 — 使用`grep -c '^ *- id:' GOALS.yaml` — 不要估算。

---

Prune Mode

清理目标模式

Step 1: Run All Checks

步骤1:执行所有检查

Same as Status Mode Step 2. Collect exit codes, stderr, and timing.
与状态查看模式的步骤2相同。收集退出码、标准错误输出和执行时间。

Step 2: Classify Issues

步骤2:分类问题

For each goal, check for:
Broken checks (ERROR status):
  • Command not found
  • Syntax error in check
  • References deleted files/directories
Orphaned references:
  • Check references skills (
    skills/<name>/
    ) that don't exist
  • Check references files that don't exist
  • Check references CLI commands that aren't installed
Count drift:
  • Header comment says
    N goals
    but actual count differs
  • Pillar sub-counts don't match actual
Trivially true (heuristic):
  • Check is
    test -f <path>
    for a file that's been in git for 6+ months unchanged
  • Check is
    grep -q <literal>
    for content that hasn't changed in 6+ months
对每个目标,检查以下问题:
失效检查(错误状态):
  • 命令未找到
  • 检查命令语法错误
  • 引用已删除的文件/目录
孤立引用:
  • 检查命令引用不存在的技能(
    skills/<name>/
  • 检查命令引用不存在的文件
  • 检查命令引用未安装的CLI命令
计数偏差:
  • 头部注释显示
    N个目标
    但实际计数不同
  • 支柱子计数与实际不符
显然成立(启发式判断):
  • 检查命令为
    test -f <path>
    ,且该文件在Git中已6个月以上未修改
  • 检查命令为
    grep -q <literal>
    ,且对应内容已6个月以上未修改

Step 3: Propose Actions

步骤3:提议操作

For each issue, propose one of:
  • Remove — goal is obsolete or duplicative
  • Update check — fix the command to reference correct paths/patterns
  • Keep — acknowledge the issue but justify keeping the goal
Present via
AskUserQuestion
with multi-select.
针对每个问题,提议以下操作之一:
  • 移除 — 目标已过时或重复
  • 更新检查命令 — 修复命令以引用正确的路径/模式
  • 保留 — 确认问题但说明保留目标的理由
通过
AskUserQuestion
呈现,允许多选。

Step 4: Apply Changes

步骤4:应用变更

For accepted removals: delete the goal entry from GOALS.yaml. For accepted updates: replace the check command.
对已接受的移除操作:从GOALS.yaml中删除目标条目。 对已接受的更新操作:替换检查命令。

Step 5: Update Counts

步骤5:更新计数

Recount all goals mechanically and update the header comment.

通过机械方式重新统计所有目标,并更新头部注释。

See Also

另请参阅

  • /evolve
    — consumes GOALS.yaml for fitness-scored improvement loops
  • skills/evolve/references/goals-schema.md
    — GOALS.yaml schema definition
  • references/generation-heuristics.md
    — goal quality criteria and scan sources
  • /evolve
    — 消耗GOALS.yaml进行健康度评分的改进循环
  • skills/evolve/references/goals-schema.md
    — GOALS.yaml schema定义
  • references/generation-heuristics.md
    — 目标质量标准和扫描来源