feat(ce-setup): check for ast-grep CLI and agent skill (#653)
This commit is contained in:
@@ -24,7 +24,7 @@ If a version is found, pass it to the check script via `--version`. Otherwise om
|
||||
|
||||
Before running the script, display: "Compound Engineering -- checking your environment..."
|
||||
|
||||
Run the bundled check script. Do not perform manual dependency checks -- the script handles all CLI tools, repo-local CE file checks, and `.gitignore` guidance in one pass.
|
||||
Run the bundled check script. Do not perform manual dependency checks -- the script handles all CLI tools, agent skills, repo-local CE file checks, and `.gitignore` guidance in one pass.
|
||||
|
||||
```bash
|
||||
bash scripts/check-health --version VERSION
|
||||
@@ -48,17 +48,19 @@ If the line above resolved to `CLAUDE_CODE`, this is a Claude Code session and `
|
||||
|
||||
After the diagnostic report, check whether:
|
||||
|
||||
- any dependencies are missing (reported as yellow in the script output)
|
||||
- any CLI tools are missing (reported as yellow in the Tools section)
|
||||
- any agent skills are missing (reported as yellow in the Skills section)
|
||||
- `compound-engineering.local.md` is present and needs cleanup
|
||||
- `.compound-engineering/config.local.yaml` does not exist or is not safely gitignored
|
||||
- `.compound-engineering/config.local.example.yaml` is missing or outdated
|
||||
|
||||
If everything is installed, no repo-local cleanup is needed, and `.compound-engineering/config.local.yaml` already exists and is gitignored, display the tool list and completion message. Parse the tool names from the script output and list each with a green circle:
|
||||
If everything is installed, no repo-local cleanup is needed, and `.compound-engineering/config.local.yaml` already exists and is gitignored, display the tool and skill list and completion message. Parse the tool and skill names from the script output and list each with a green circle. Omit the Skills line if the Skills section is absent from the script output:
|
||||
|
||||
```
|
||||
✅ Compound Engineering setup complete
|
||||
|
||||
Tools: 🟢 agent-browser 🟢 gh 🟢 jq 🟢 vhs 🟢 silicon 🟢 ffmpeg
|
||||
Tools: 🟢 agent-browser 🟢 gh 🟢 jq 🟢 vhs 🟢 silicon 🟢 ffmpeg 🟢 ast-grep
|
||||
Skills: 🟢 ast-grep
|
||||
Config: ✅
|
||||
|
||||
Run /ce-setup anytime to re-check.
|
||||
@@ -103,22 +105,26 @@ If the local config already exists, check whether it is safely gitignored. If no
|
||||
|
||||
### Step 6: Offer Installation
|
||||
|
||||
Present the missing dependencies using a multiSelect question with all items pre-selected. Use the install commands and URLs from the script's diagnostic output.
|
||||
Present the missing tools and skills using a multiSelect question with all items pre-selected. Use the install commands and URLs from the script's diagnostic output. Group items under `Tools:` and `Skills:` so the user can see which runtime each item targets; omit a group whose items are all installed.
|
||||
|
||||
```
|
||||
The following tools are missing. Select which to install:
|
||||
The following items are missing. Select which to install:
|
||||
(All items are pre-selected)
|
||||
|
||||
Recommended:
|
||||
Tools:
|
||||
[x] agent-browser - Browser automation for testing and screenshots
|
||||
[x] gh - GitHub CLI for issues and PRs
|
||||
[x] jq - JSON processor
|
||||
[x] vhs (charmbracelet/vhs) - Create GIFs from CLI output
|
||||
[x] silicon (Aloxaf/silicon) - Generate code screenshots
|
||||
[x] ffmpeg - Video processing for feature demos
|
||||
[x] ast-grep - Structural code search using AST patterns
|
||||
|
||||
Skills:
|
||||
[x] ast-grep - Agent skill for structural code search with ast-grep
|
||||
```
|
||||
|
||||
Only show dependencies that are actually missing. Omit installed ones.
|
||||
Only show items that are actually missing. Omit installed ones.
|
||||
|
||||
### Step 7: Install Selected Dependencies
|
||||
|
||||
@@ -134,7 +140,9 @@ For each selected dependency, in order:
|
||||
2. Skip - I'll install it manually
|
||||
```
|
||||
|
||||
2. **If approved:** Run the install command using a shell execution tool. After the command completes, verify installation by running the dependency's check command (e.g., `command -v agent-browser`).
|
||||
2. **If approved:** Run the install command using a shell execution tool. After the command completes, verify installation:
|
||||
- For a CLI tool, run the dependency's check command (e.g., `command -v agent-browser`).
|
||||
- For an agent skill, prefer `npx --yes skills list --global --json | jq -r '.[].name' | grep -qx <skill-name>` when `npx` is available; otherwise fall back to checking that `~/.claude/skills/<skill-name>` exists (file, directory, or symlink).
|
||||
|
||||
3. **If verification succeeds:** Report success.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user