feat: bash setup script, planner agent with disallowedTools, simplified skills
This commit is contained in:
@@ -1,102 +1,35 @@
|
||||
---
|
||||
name: init
|
||||
description: "Infrastructure setup: scaffold .loop/ directory with harness files and generate config.json. Does NOT plan or write code."
|
||||
description: "Run the setup script to scaffold .loop/ directory. Does not plan features or write code."
|
||||
---
|
||||
|
||||
# /init — Scaffold the Agent Loop
|
||||
|
||||
Create the `.loop/` directory and generate `config.json`. That's it. This skill does NOT plan features, generate stories, or write any project source code.
|
||||
Run the setup script to create `.loop/` with harness files and config. This skill does ONE thing: run a bash command.
|
||||
|
||||
## STOP: What This Skill Does NOT Do
|
||||
## Instructions
|
||||
|
||||
- Does NOT read or use any spec files
|
||||
- Does NOT generate prd.json or stories
|
||||
- Does NOT write any source code
|
||||
- Does NOT invoke /agent-loop:plan
|
||||
- Does NOT start the loop
|
||||
1. Ask the user: **Mode?** (a) Implement (b) Explore (c) Fix — default is Implement.
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Check if .loop/ already exists
|
||||
|
||||
If yes, ask: "`.loop/` already exists. Re-initialize? (This resets config but keeps prd.json and progress.md)"
|
||||
|
||||
If they say no, stop.
|
||||
|
||||
### 2. Copy harness files
|
||||
|
||||
Run these commands:
|
||||
2. Run the setup script:
|
||||
|
||||
```bash
|
||||
mkdir -p .loop
|
||||
|
||||
# Find plugin harness source
|
||||
HARNESS_SRC=$(ls -d ~/.claude/plugins/cache/agent-loop/agent-loop/*/prompts/.. 2>/dev/null | head -1)
|
||||
|
||||
if [ -n "$HARNESS_SRC" ]; then
|
||||
cp -r "$HARNESS_SRC/prompts" .loop/
|
||||
cp -r "$HARNESS_SRC/templates" .loop/
|
||||
cp -r "$HARNESS_SRC/lib" .loop/
|
||||
cp "$HARNESS_SRC/loop.sh" .loop/
|
||||
chmod +x .loop/loop.sh
|
||||
else
|
||||
echo "ERROR: Could not find agent-loop plugin files"
|
||||
fi
|
||||
bash ~/.claude/plugins/cache/agent-loop/agent-loop/*/setup.sh <mode>
|
||||
```
|
||||
|
||||
Verify `.loop/prompts/generator/_base.md` exists. If not, report the error and stop.
|
||||
If that path doesn't work, try:
|
||||
|
||||
### 3. Create .loop/.gitignore
|
||||
|
||||
```
|
||||
prd.json
|
||||
progress.md
|
||||
progress-archive.md
|
||||
config.json
|
||||
init.sh
|
||||
contracts/
|
||||
triage/
|
||||
archive/
|
||||
.archive-staging/
|
||||
.last-branch
|
||||
.loop.lock
|
||||
```bash
|
||||
bash "$(ls -d ~/.claude/plugins/cache/agent-loop/agent-loop/*/setup.sh 2>/dev/null | head -1)" <mode>
|
||||
```
|
||||
|
||||
### 4. Detect project and generate config
|
||||
3. Show the script output to the user.
|
||||
|
||||
Read the project root to detect tech stack (package.json, go.mod, Cargo.toml, etc.).
|
||||
4. Tell the user:
|
||||
|
||||
Ask the user:
|
||||
> **Mode?** (a) Explore (b) Implement (c) Fix
|
||||
|
||||
Write `.loop/config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"tool": "claude",
|
||||
"mode": "<implement|explore|fix>",
|
||||
"maxIterations": 20,
|
||||
"skipEval": false,
|
||||
"evalRetries": 2,
|
||||
"autoHooks": true,
|
||||
"branchPrefix": "loop/",
|
||||
"scopeBudgets": {
|
||||
"explore": { "maxFilesToRead": 15, "maxLinesToWrite": 0, "maxFilesToModify": 0 },
|
||||
"implement": { "maxFilesToRead": 50, "maxLinesToWrite": 500, "maxFilesToModify": 10 },
|
||||
"fix": { "maxFilesToRead": 30, "maxLinesToWrite": 200, "maxFilesToModify": 5 }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5. Generate init.sh
|
||||
|
||||
Write `.loop/init.sh` with project-specific setup (dependency install, dev server, test runner). Make it executable.
|
||||
|
||||
### 6. Done
|
||||
|
||||
Tell the user:
|
||||
|
||||
> `.loop/` is ready. Next steps:
|
||||
> `.loop/` is ready. Next:
|
||||
> ```
|
||||
> /agent-loop:plan # Generate stories from your spec or feature description
|
||||
> /agent-loop:plan
|
||||
> ```
|
||||
|
||||
**That's it. Do not do anything else. Do not read specs. Do not plan. Do not write code.**
|
||||
|
||||
Reference in New Issue
Block a user