选项

检查 Compound Engineering 的运行状态以及 repo-local 配置。

...展开全部
10
更新时间 2026-08-26

关于ce-setup

这是一个用于 Compound Engineering 插件的轻量级健康检查和仓库本地配置辅助工具。它用于验证环境和仓库是否已正确配置,报告哪些可选工具功能可用,并清理或刷新仓库本地配置文件。 重要的是,它不会批量安装依赖项:缺失的工具会被列为可选功能,以便用户仅安装其实际使用的流程。该工具旨在用于验证环境配置、排查缺失的可选工具问题,或协助代码仓库的初始化。

该工作流分为三个阶段。在诊断阶段,当平台暴露插件版本时,它会确定已安装的插件版本,然后运行捆绑的检查健康状况脚本(或内联等效脚本)。 内联检查会使用 -v 命令检测可选工具(agent-browser、gh、jq、ast-grep、ffmpeg),通过 git rev-parse --show-toplevel 解析仓库根目录,查找过时的 compound-engineering.local.md 文件,检查 .compound-engineering/config.local.yaml 是否存在且已被添加到 gitignore 中,并将示例配置与捆绑的 references/config-template.yaml 进行对比。缺失的可选工具明确不被视为设置失败。

第二阶段仅在存在仓库本地问题时运行:过时的本地 Markdown 配置、未被安全地加入 `gitignore` 的 `config.local.yaml`,或示例配置缺失/过时。 该阶段可删除过时的文件,从模板更新 .compound-engineering/config.local.example.yaml,可选地创建一个全新的 config.local.yaml(所有内容初始均为注释状态),并提示将 .compound-engineering/*.local.yaml 添加到 .gitignore 中。 每个修改步骤都会通过平台的提问工具(在 Claude Code 中为 AskUserQuestion,并为 Codex、Antigravity 和 Pi 提供了有文档记录的备用方案)进行阻塞式确认,该技能绝不会在用户不知情的情况下自动配置。最终摘要会列出已应用的修复、跳过的修复以及任何缺失的可选工具。

常见问题

该技能会为我安装所有可选依赖项吗?

不会。这只是一个健康检查工具,而非安装程序,且刻意避免批量安装依赖项。缺失的工具会被报告为可选功能,以便您仅安装自己使用的流程。

内联健康检查会检测哪些可选工具?

它会使用 `command -v` 命令检查 agent-browser、gh、jq、ast-grep 和 ffmpeg。任何缺失的工具都会被报告,但不会被视为配置失败。

何时会进入实际修复阶段?

仅当存在仓库本地问题时才会进行修复:例如 `compound-engineering.local.md` 文件已过时、`config.local.yaml` 文件未被 `gitignore` 排除,或 `config.local.example.yaml` 文件缺失/过时。如果均不存在上述情况,则会报告设置已完成。

它会在未经询问的情况下修改我的文件吗?

不会。每次修复操作——无论是删除过时的配置文件、创建本地配置文件,还是编辑 .gitignore 文件——都会触发一个阻塞式确认提示,只有在您批准后才会继续。它绝不会在您不知情的情况下自动配置。

它如何将本地配置文件排除在版本控制之外?

如果存在 .compound-engineering/config.local.yaml 文件但未被 .gitignore 覆盖,它会建议将 .compound-engineering/*.local.yaml 追加到仓库根目录的 .gitignore 中,同时不会覆盖无关的内容。

所有文件

3个文件references/config-template.yaml3.3KB查看scripts/check-health5.7KB查看SKILL.md5.5 KB查看
在 GitHub 上查看

Interaction Method

Ask each question below using the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex, ask_question in Antigravity CLI (agy), ask_user in Pi (requires the pi-ask-user extension). Fall back to a numbered list on the host's user-visible chat surface only when no blocking tool exists in the harness or the call errors. Never silently skip or auto-configure.

ce-setup is a lightweight health check and repo-local config helper. It does not bulk-install every optional dependency. Missing tools are reported as optional capabilities so the user can install only the workflows they use.

Artifact Root Resolution

Every Compound Engineering skill that writes or reads an artifact directory (solutions, plans, ideation, and the other CE-owned trees) resolves its root through the rule below. ce-setup carries the canonical statement and reports the resolved root so an operator can confirm where artifacts land before running other skills.

Resolve the CE artifact root <root> before composing any artifact path.

  • Read docs_root from <repo-root>/.compound-engineering/config.yaml only (<repo-root> = git rev-parse --show-toplevel). Do not read it from config.local.yaml. Unset -> <root> is docs, exactly as before.
  • Validate a set value: a repo-relative directory whose real, symlink-resolved path stays inside the repo and is neither the repo root nor under .git/. Otherwise stop with an error naming docs_root and the value -- never fall back to docs.
  • Use <root> as the sole artifact location: create it if absent, compose each path as <root>/<subdir> with this skill's own subdirectory, and never also read docs.

Phase 1: Diagnose

Step 1: Determine Plugin Version

Detect the installed compound-engineering plugin version by reading the plugin metadata or manifest when the platform exposes it. If the version cannot be determined, skip this step.

If a version is found, pass it to the check script via --version. Otherwise omit the flag.

Step 2: Run the Health Check

Before running the script, display:

Compound Engineering -- checking your environment...

Run the bundled check script. Set SKILL_DIR to the absolute directory you loaded this ce-setup SKILL.md from — the Bash tool's CWD is the user's project, not the skill dir, so a bare scripts/ path will not resolve:

SKILL_DIR="<absolute path of the directory containing this SKILL.md>";if [ -f "$SKILL_DIR/scripts/check-health" ]; then bash "$SKILL_DIR/scripts/check-health" --version VERSION; else echo "Bundled health script not found at $SKILL_DIR/scripts/check-health; run the inline checks from ce-setup instead."; fi

Use the same command without --version VERSION if Step 1 could not determine a version.

If the script is unavailable, run the inline equivalent listed in references/repo-fixes.md.

Display the diagnostic output to the user. Missing optional tools are not setup failures. The health report includes the resolved artifact root and which config layer supplied it (per Artifact Root Resolution above); surface that line so the operator can confirm where CE artifacts will be written. Missing config.yaml is a reported absence, not a project issue.

Step 3: Decide Whether Fixes Are Needed

Report-gated repo-local remediations apply only to the checkout the health report diagnosed; if Phase 2 will write a different writable checkout, diagnose that checkout first, while session-level findings such as plugin version and optional tools remain from this session's Phase 1.

After the health report, decide Phase 2 from writable-checkout availability:

  • If this session has a writable git checkout, run Phase 2 locally, including when project_issues is 0. Phase 2 always refreshes the example and always offers to create config.yaml when that file is missing.
  • If this session has no writable checkout, but the user named a repository and the harness exposes a remote repo-work surface with a writable checkout, run Phase 2 on that surface instead and report the remote repo-local fixes in Phase 3.
  • Otherwise skip Phase 2 and go to Phase 3, saying repo-local writes were skipped because no writable checkout is available.

Also remediate these project issues when the report names them:

  • obsolete compound-engineering.local.md
  • .compound-engineering/config.local.yaml exists but is not safely gitignored
  • .compound-engineering/config.example.yaml is missing or outdated
  • the health report marks the ce-work skill implementation engine unavailable or invalid, detects retired scalar routing keys, or reports malformed dormant work_engine_preferences
  • the health report marks docs_root invalid (Invalid docs_root ...) — CE artifacts will not be written until it is fixed

If optional tools are missing, do not offer a bulk install. The diagnostic already printed the relevant install command or project URL. Say: "Install optional tools only for the workflows you use."

Phase 2: Fix Repo-Local Issues

Read references/repo-fixes.md from this skill's directory before making any repo-local change. It carries Steps 4-8: removing the obsolete compound-engineering.local.md, refreshing the example config, offering to create config.yaml, repairing invalid work_engine_preferences and docs_root, and the two .gitignore offers.

All paths there resolve from the repository root (git rev-parse --show-toplevel), not the current working directory. Maintaining the generated example files is the work Phase 2 does on its own — refreshing config.example.yaml and removing the superseded config.local.example.yaml. Every change to a user-owned file is offered and applied only if the user approves.

Phase 3: Summary

User-runnable invocation rendering. In setup summaries, default to /ce-setup; use $ce-setup only when the active host is Codex or explicitly documents dollar-prefixed skill invocation. On oh-my-pi (omp), use /skill:ce-setup. Render only the invocation as inline code and output one form only.

Display a brief summary:

✅ Compound Engineering setup completeFixed:     <repo-local fixes applied, or none>Skipped:   <repo-local fixes declined, or none>Optional:  <missing optional tools, or all available>Run `<rendered invocation>` anytime to re-check.

所有文件

0 个文件

安装 ce-setup

下载技能文件并将其解压到 .claude/skills/ 目录中。

下载ZIP

克隆仓库并复制技能文件到您的项目中。

git clone https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-setup/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

复制 复制
快速设置: 将技能文件夹复制到 .claude/skills/ 目录下,Claude 会自动检测并使用该技能

相关技能

github-project-management
更新时间 2026-06-29
readme-blueprint-generator
更新时间 2026-07-05
using-git-worktrees
更新时间 2026-06-29
finishing-a-development-branch
更新时间 2026-06-29
OR