goals
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/goals — Fitness Goal Maintenance
/goals — 健康度目标维护
Maintain the GOALS.yaml thatconsumes. Run checks, generate new goals from repo state, prune stale ones./evolve
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
维护供使用的GOALS.yaml文件。执行检查、根据代码仓库状态生成新目标、清理过期目标。/evolve
你必须执行此工作流,不能仅进行描述。
Quick Start
快速开始
bash
/goals # Status dashboard (default)
/goals generate # Scan repo, propose new goals
/goals prune # Find stale/broken goals, propose fixesbash
/goals # 状态仪表盘(默认)
/goals generate # 扫描代码仓库,提议新目标
/goals prune # 查找过期/失效目标,提议修复方案Mode Selection
模式选择
Parse the user's input to determine the mode:
| Input | Mode |
|---|---|
| status |
| generate |
| prune |
解析用户输入以确定模式:
| 输入内容 | 模式 |
|---|---|
| 状态查看 |
| 生成目标 |
| 清理目标 |
Status Mode (default)
状态查看模式(默认)
Step 1: Parse GOALS.yaml
步骤1:解析GOALS.yaml
Read from the repo root. Extract:
GOALS.yaml- ,
version,missionpillars - All goals with ,
id,description,check,weight(optional)pillar
从代码仓库根目录读取文件,提取以下内容:
GOALS.yaml- 、
version、missionpillars - 所有目标的、
id、description、check、weight(可选)pillar
Step 2: Run All Checks
步骤2:执行所有检查
For each goal, execute the command using Bash:
check- 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:
- Pillar goals — grouped by pillar, sorted by weight (highest first)
- Infrastructure goals — sorted by weight
- 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>按类别分组结果:
- 支柱目标 — 按支柱分组,按权重从高到低排序
- 基础设施目标 — 按权重排序
- 跨运行时目标 — 按权重排序
每个目标的展示格式:
[通过] 标识(权重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 references paths that don't exist:
check- 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):
- — existing goal IDs
GOALS.yaml - — design principles, value props, pillars
PRODUCT.md - — claims, badges, features
README.md - — full skill list
skills/SKILL-TIERS.md
并行读取以下文件:
- — 现有目标标识
GOALS.yaml - — 设计原则、价值主张、核心支柱
PRODUCT.md - — 声明、徽章、功能
README.md - — 完整技能列表
skills/SKILL-TIERS.md
Step 2: Identify Coverage Gaps
步骤2:识别覆盖缺口
Uncovered skills: For each skill in , check if any existing goal's field references that skill directory. List skills with no goal.
skills/*/SKILL.mdcheckUncovered infrastructure: Scan , , for scripts not referenced by any goal's .
tests/hooks/scripts/checkPillar coverage: Check each of the 4 pillars has adequate goals. Reference the theoretical pillar mapping in .
references/generation-heuristics.mdClaim verification: Scan README.md for quantitative claims (numbers, "all", "every") that have no corresponding goal verifying them.
未覆盖的技能: 对中的每个技能,检查是否有现有目标的字段引用该技能目录。列出没有对应目标的技能。
skills/*/SKILL.mdcheck未覆盖的基础设施: 扫描、、目录,查找未被任何目标的引用的脚本。
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 infrastructureApply 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 . Group by category:
AskUserQuestion- "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 in the appropriate section (pillar or infrastructure).
GOALS.yamlUpdate the header comment counts:
yaml
undefined将已接受的目标追加到GOALS.yaml的对应章节(支柱或基础设施)。
更新头部注释的计数:
yaml
undefinedTotal: 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 () that don't exist
skills/<name>/ - Check references files that don't exist
- Check references CLI commands that aren't installed
Count drift:
- Header comment says but actual count differs
N goals - Pillar sub-counts don't match actual
Trivially true (heuristic):
- Check is for a file that's been in git for 6+ months unchanged
test -f <path> - Check is for content that hasn't changed in 6+ months
grep -q <literal>
对每个目标,检查以下问题:
失效检查(错误状态):
- 命令未找到
- 检查命令语法错误
- 引用已删除的文件/目录
孤立引用:
- 检查命令引用不存在的技能()
skills/<name>/ - 检查命令引用不存在的文件
- 检查命令引用未安装的CLI命令
计数偏差:
- 头部注释显示但实际计数不同
N个目标 - 支柱子计数与实际不符
显然成立(启发式判断):
- 检查命令为,且该文件在Git中已6个月以上未修改
test -f <path> - 检查命令为,且对应内容已6个月以上未修改
grep -q <literal>
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 with multi-select.
AskUserQuestion针对每个问题,提议以下操作之一:
- 移除 — 目标已过时或重复
- 更新检查命令 — 修复命令以引用正确的路径/模式
- 保留 — 确认问题但说明保留目标的理由
通过呈现,允许多选。
AskUserQuestionStep 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
另请参阅
- — consumes GOALS.yaml for fitness-scored improvement loops
/evolve - — GOALS.yaml schema definition
skills/evolve/references/goals-schema.md - — goal quality criteria and scan sources
references/generation-heuristics.md
- — 消耗GOALS.yaml进行健康度评分的改进循环
/evolve - — GOALS.yaml schema定义
skills/evolve/references/goals-schema.md - — 目标质量标准和扫描来源
references/generation-heuristics.md