文档: 同步 OpenClaw 安装与集成说明 (#432)
Syncs OpenClaw install docs and integration paths. Aligns README examples with current script behavior.
This commit is contained in:
21
README.md
21
README.md
@@ -27,10 +27,13 @@ Born from a Reddit thread and months of iteration, **The Agency** is a growing c
|
|||||||
### Option 1: Use with Claude Code (Recommended)
|
### Option 1: Use with Claude Code (Recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Copy agents to your Claude Code directory
|
# Install all agents to your Claude Code directory
|
||||||
cp -r agency-agents/* ~/.claude/agents/
|
./scripts/install.sh --tool claude-code
|
||||||
|
|
||||||
# Now activate any agent in your Claude Code sessions:
|
# Or manually copy a category if you only want one division
|
||||||
|
cp engineering/*.md ~/.claude/agents/
|
||||||
|
|
||||||
|
# Then activate any agent in your Claude Code sessions:
|
||||||
# "Hey Claude, activate Frontend Developer mode and help me build a React component"
|
# "Hey Claude, activate Frontend Developer mode and help me build a React component"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -44,7 +47,7 @@ Each agent file contains:
|
|||||||
|
|
||||||
Browse the agents below and copy/adapt the ones you need!
|
Browse the agents below and copy/adapt the ones you need!
|
||||||
|
|
||||||
### Option 3: Use with Other Tools (Cursor, Aider, Windsurf, Gemini CLI, OpenCode, Kimi Code)
|
### Option 3: Use with Other Tools (GitHub Copilot, Antigravity, Gemini CLI, OpenCode, OpenClaw, Cursor, Aider, Windsurf, Kimi Code)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Step 1 -- generate integration files for all supported tools
|
# Step 1 -- generate integration files for all supported tools
|
||||||
@@ -54,8 +57,12 @@ Browse the agents below and copy/adapt the ones you need!
|
|||||||
./scripts/install.sh
|
./scripts/install.sh
|
||||||
|
|
||||||
# Or target a specific tool directly
|
# Or target a specific tool directly
|
||||||
./scripts/install.sh --tool cursor
|
./scripts/install.sh --tool antigravity
|
||||||
|
./scripts/install.sh --tool gemini-cli
|
||||||
|
./scripts/install.sh --tool opencode
|
||||||
./scripts/install.sh --tool copilot
|
./scripts/install.sh --tool copilot
|
||||||
|
./scripts/install.sh --tool openclaw
|
||||||
|
./scripts/install.sh --tool cursor
|
||||||
./scripts/install.sh --tool aider
|
./scripts/install.sh --tool aider
|
||||||
./scripts/install.sh --tool windsurf
|
./scripts/install.sh --tool windsurf
|
||||||
./scripts/install.sh --tool kimi
|
./scripts/install.sh --tool kimi
|
||||||
@@ -740,10 +747,12 @@ See [integrations/windsurf/README.md](integrations/windsurf/README.md) for detai
|
|||||||
Each agent becomes a workspace with `SOUL.md`, `AGENTS.md`, and `IDENTITY.md` in `~/.openclaw/agency-agents/`.
|
Each agent becomes a workspace with `SOUL.md`, `AGENTS.md`, and `IDENTITY.md` in `~/.openclaw/agency-agents/`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
./scripts/convert.sh --tool openclaw
|
||||||
./scripts/install.sh --tool openclaw
|
./scripts/install.sh --tool openclaw
|
||||||
```
|
```
|
||||||
|
|
||||||
Agents are registered and available by `agentId` in OpenClaw sessions.
|
If the `openclaw` CLI is available, the installer registers each workspace automatically.
|
||||||
|
Run `openclaw gateway restart` after installation so the new agents are activated.
|
||||||
|
|
||||||
See [integrations/openclaw/README.md](integrations/openclaw/README.md) for details.
|
See [integrations/openclaw/README.md](integrations/openclaw/README.md) for details.
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ supported agentic coding tools.
|
|||||||
./scripts/install.sh --tool gemini-cli
|
./scripts/install.sh --tool gemini-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you install OpenClaw and the gateway is already running, restart it after installation:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
openclaw gateway restart
|
||||||
|
```
|
||||||
|
|
||||||
For project-scoped tools such as OpenCode, Cursor, Aider, and Windsurf, run
|
For project-scoped tools such as OpenCode, Cursor, Aider, and Windsurf, run
|
||||||
the installer from your target project root as shown in the tool-specific
|
the installer from your target project root as shown in the tool-specific
|
||||||
sections below.
|
sections below.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Aider Integration
|
# Aider Integration
|
||||||
|
|
||||||
All 61 Agency agents are consolidated into a single `CONVENTIONS.md` file.
|
The full Agency roster is consolidated into a single `CONVENTIONS.md` file.
|
||||||
Aider reads this file automatically when it's present in your project root.
|
Aider reads this file automatically when it's present in your project root.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Antigravity Integration
|
# Antigravity Integration
|
||||||
|
|
||||||
Installs all 61 Agency agents as Antigravity skills. Each agent is prefixed
|
Installs the full Agency roster as Antigravity skills. Each agent is prefixed
|
||||||
with `agency-` to avoid conflicts with existing skills.
|
with `agency-` to avoid conflicts with existing skills.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ Use the Reality Checker agent to verify this feature is production-ready.
|
|||||||
## Agent Directory
|
## Agent Directory
|
||||||
|
|
||||||
Agents are organized into divisions. See the [main README](../../README.md) for
|
Agents are organized into divisions. See the [main README](../../README.md) for
|
||||||
the full current roster.
|
the full Agency roster.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Cursor Integration
|
# Cursor Integration
|
||||||
|
|
||||||
Converts all 61 Agency agents into Cursor `.mdc` rule files. Rules are
|
Converts the full Agency roster into Cursor `.mdc` rule files. Rules are
|
||||||
**project-scoped** — install them from your project root.
|
**project-scoped** — install them from your project root.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Windsurf Integration
|
# Windsurf Integration
|
||||||
|
|
||||||
All 61 Agency agents are consolidated into a single `.windsurfrules` file.
|
The full Agency roster is consolidated into a single `.windsurfrules` file.
|
||||||
Rules are **project-scoped** — install them from your project root.
|
Rules are **project-scoped** — install them from your project root.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
# Tools:
|
# Tools:
|
||||||
# antigravity — Antigravity skill files (~/.gemini/antigravity/skills/)
|
# antigravity — Antigravity skill files (~/.gemini/antigravity/skills/)
|
||||||
# gemini-cli — Gemini CLI extension (skills/ + gemini-extension.json)
|
# gemini-cli — Gemini CLI extension (skills/ + gemini-extension.json)
|
||||||
# opencode — OpenCode agent files (.opencode/agent/*.md)
|
# opencode — OpenCode agent files (.opencode/agents/*.md)
|
||||||
# cursor — Cursor rule files (.cursor/rules/*.mdc)
|
# cursor — Cursor rule files (.cursor/rules/*.mdc)
|
||||||
# aider — Single CONVENTIONS.md for Aider
|
# aider — Single CONVENTIONS.md for Aider
|
||||||
# windsurf — Single .windsurfrules for Windsurf
|
# windsurf — Single .windsurfrules for Windsurf
|
||||||
# openclaw — OpenClaw SOUL.md files (openclaw_workspace/<agent>/SOUL.md)
|
# openclaw — OpenClaw workspaces (integrations/openclaw/<agent>/SOUL.md)
|
||||||
# qwen — Qwen Code SubAgent files (~/.qwen/agents/*.md)
|
# qwen — Qwen Code SubAgent files (~/.qwen/agents/*.md)
|
||||||
# kimi — Kimi Code CLI agent files (~/.config/kimi/agents/)
|
# kimi — Kimi Code CLI agent files (~/.config/kimi/agents/)
|
||||||
# all — All tools (default)
|
# all — All tools (default)
|
||||||
@@ -264,8 +264,8 @@ convert_openclaw() {
|
|||||||
# Split body sections into SOUL.md (persona) vs AGENTS.md (operations)
|
# Split body sections into SOUL.md (persona) vs AGENTS.md (operations)
|
||||||
# by matching ## header keywords. Unmatched sections go to AGENTS.md.
|
# by matching ## header keywords. Unmatched sections go to AGENTS.md.
|
||||||
#
|
#
|
||||||
# SOUL keywords: identity, memory (paired with identity), communication,
|
# SOUL keywords: identity, learning & memory, communication, style,
|
||||||
# style, critical rules, rules you must follow
|
# critical rules, rules you must follow
|
||||||
# AGENTS keywords: everything else (mission, deliverables, workflow, etc.)
|
# AGENTS keywords: everything else (mission, deliverables, workflow, etc.)
|
||||||
|
|
||||||
local current_target="agents" # default bucket
|
local current_target="agents" # default bucket
|
||||||
@@ -289,6 +289,7 @@ convert_openclaw() {
|
|||||||
header_lower="$(echo "$line" | tr '[:upper:]' '[:lower:]')"
|
header_lower="$(echo "$line" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
if [[ "$header_lower" =~ identity ]] ||
|
if [[ "$header_lower" =~ identity ]] ||
|
||||||
|
[[ "$header_lower" =~ learning.*memory ]] ||
|
||||||
[[ "$header_lower" =~ communication ]] ||
|
[[ "$header_lower" =~ communication ]] ||
|
||||||
[[ "$header_lower" =~ style ]] ||
|
[[ "$header_lower" =~ style ]] ||
|
||||||
[[ "$header_lower" =~ critical.rule ]] ||
|
[[ "$header_lower" =~ critical.rule ]] ||
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ tool_label() {
|
|||||||
antigravity) printf "%-14s %s" "Antigravity" "(~/.gemini/antigravity)" ;;
|
antigravity) printf "%-14s %s" "Antigravity" "(~/.gemini/antigravity)" ;;
|
||||||
gemini-cli) printf "%-14s %s" "Gemini CLI" "(gemini extension)" ;;
|
gemini-cli) printf "%-14s %s" "Gemini CLI" "(gemini extension)" ;;
|
||||||
opencode) printf "%-14s %s" "OpenCode" "(opencode.ai)" ;;
|
opencode) printf "%-14s %s" "OpenCode" "(opencode.ai)" ;;
|
||||||
openclaw) printf "%-14s %s" "OpenClaw" "(~/.openclaw)" ;;
|
openclaw) printf "%-14s %s" "OpenClaw" "(~/.openclaw/agency-agents)" ;;
|
||||||
cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;;
|
cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;;
|
||||||
aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;;
|
aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;;
|
||||||
windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;;
|
windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;;
|
||||||
@@ -403,21 +403,31 @@ install_openclaw() {
|
|||||||
local src="$INTEGRATIONS/openclaw"
|
local src="$INTEGRATIONS/openclaw"
|
||||||
local dest="${HOME}/.openclaw/agency-agents"
|
local dest="${HOME}/.openclaw/agency-agents"
|
||||||
local count=0
|
local count=0
|
||||||
|
local existing_agents=""
|
||||||
[[ -d "$src" ]] || { err "integrations/openclaw missing. Run convert.sh first."; return 1; }
|
[[ -d "$src" ]] || { err "integrations/openclaw missing. Run convert.sh first."; return 1; }
|
||||||
mkdir -p "$dest"
|
mkdir -p "$dest"
|
||||||
|
if command -v openclaw >/dev/null 2>&1; then
|
||||||
|
existing_agents=$'\n'"$(openclaw agents list --json 2>/dev/null | sed -n 's/^[[:space:]]*\"id\": \"\\([^\"]*\\)\".*/\\1/p')"$'\n'
|
||||||
|
fi
|
||||||
local d
|
local d
|
||||||
while IFS= read -r -d '' d; do
|
while IFS= read -r -d '' d; do
|
||||||
local name; name="$(basename "$d")"
|
local name; name="$(basename "$d")"
|
||||||
|
[[ -f "$d/SOUL.md" && -f "$d/AGENTS.md" && -f "$d/IDENTITY.md" ]] || continue
|
||||||
mkdir -p "$dest/$name"
|
mkdir -p "$dest/$name"
|
||||||
cp "$d/SOUL.md" "$dest/$name/SOUL.md"
|
cp "$d/SOUL.md" "$dest/$name/SOUL.md"
|
||||||
cp "$d/AGENTS.md" "$dest/$name/AGENTS.md"
|
cp "$d/AGENTS.md" "$dest/$name/AGENTS.md"
|
||||||
cp "$d/IDENTITY.md" "$dest/$name/IDENTITY.md"
|
cp "$d/IDENTITY.md" "$dest/$name/IDENTITY.md"
|
||||||
# Register with OpenClaw so agents are usable by agentId immediately
|
|
||||||
if command -v openclaw >/dev/null 2>&1; then
|
if command -v openclaw >/dev/null 2>&1; then
|
||||||
|
if [[ "$existing_agents" != *$'\n'"$name"$'\n'* ]]; then
|
||||||
openclaw agents add "$name" --workspace "$dest/$name" --non-interactive || true
|
openclaw agents add "$name" --workspace "$dest/$name" --non-interactive || true
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
(( count++ )) || true
|
(( count++ )) || true
|
||||||
done < <(find "$src" -mindepth 1 -maxdepth 1 -type d -print0)
|
done < <(find "$src" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||||
|
if (( count == 0 )); then
|
||||||
|
err "integrations/openclaw contains no generated workspaces. Run ./scripts/convert.sh --tool openclaw first."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
ok "OpenClaw: $count workspaces -> $dest"
|
ok "OpenClaw: $count workspaces -> $dest"
|
||||||
if command -v openclaw >/dev/null 2>&1; then
|
if command -v openclaw >/dev/null 2>&1; then
|
||||||
warn "OpenClaw: run 'openclaw gateway restart' to activate new agents"
|
warn "OpenClaw: run 'openclaw gateway restart' to activate new agents"
|
||||||
|
|||||||
Reference in New Issue
Block a user