選項

檢查 Compound Engineering 的運作狀態以及 repo-local 的設定。

...展開全部
10
更新時間 2026-08-26

關於ce-setup

這是一個專為 Compound Engineering 外掛程式設計的輕量級狀態檢查與儲存庫本機設定輔助工具。它會驗證環境與儲存庫是否設定正確,報告哪些可選工具功能可用,並清理或更新儲存庫本機設定檔。 重要的是,它不會批量安裝依賴項:缺失的工具會以可選功能的形式呈現,讓使用者僅需安裝實際使用的流程。其設計目的是用於驗證設定、排除可選工具缺失的問題,或協助儲存庫完成入門設定。

此工作流程分為三個階段執行。在「診斷」階段,當平台提供相關資訊時,它會先確定已安裝的插件版本,接著執行內建的 health 檢查腳本(或等效的內嵌指令)。 內嵌檢查會透過 `command -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 設定、未被安全地納入 Git 忽略清單的 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