Skip to content

Commit e36ade8

Browse files
feat(openclaw): add OpenClaw system prompt and update language list
Add OpenClaw integration section to agents page with ready-to-use system prompt template. Update homepage container description to include Go and JavaScript/TypeScript. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ccd6ea3 commit e36ade8

2 files changed

Lines changed: 71 additions & 2 deletions

File tree

‎content/_index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Run `make check` and get consistent results everywhere -- your laptop, CI, or an
5454
{{% /blocks/feature %}}
5555

5656
{{% blocks/feature icon="fa-cube" title="One Container" %}}
57-
The `dev-toolchain` container includes linters, formatters, security scanners, and test runners for Python, Bash, Terraform, Ansible, and Ruby. Pin a version and forget about tool management.
57+
The `dev-toolchain` container includes linters, formatters, security scanners, and test runners for Python, Bash, Terraform, Ansible, Ruby, Go, and JavaScript/TypeScript. Pin a version and forget about tool management.
5858

5959
[Learn About the Container](/docs/container/)
6060
{{% /blocks/feature %}}

‎content/docs/getting-started/agents.md‎

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,75 @@ If an agent consistently ignores standards, add the critical rules directly to i
115115
| Claude Code | `CLAUDE.md` |
116116
| Cursor | `.cursorrules` |
117117
| OpenCode | `.opencode/agents.yaml` |
118+
| OpenClaw | System prompt (see below) |
118119
| Other / generic | `AGENTS.md` |
119120

120-
All four files contain identical content in different formats. You only need the file(s) for the agent(s) you use, but shipping all four costs nothing and covers future tool changes.
121+
All four repo files contain identical content in different formats. You only need the file(s) for the agent(s) you use, but shipping all four costs nothing and covers future tool changes.
122+
123+
## OpenClaw Integration
124+
125+
[OpenClaw](https://openclaw.ai/) is an autonomous AI assistant that can trigger development workflows via messaging (WhatsApp, Telegram, Discord, etc.). Because OpenClaw agents interact with your codebase remotely, they need DevRail rules in their system prompt rather than relying on repo files.
126+
127+
### System Prompt for OpenClaw
128+
129+
Paste this into your OpenClaw agent's system prompt or skill configuration:
130+
131+
```text
132+
You are a DevRail-compliant development agent. When working on any
133+
repository that contains a `.devrail.yml` file, follow these rules:
134+
135+
## Project Setup
136+
- Always start new projects from a DevRail template:
137+
- GitHub: https://github.com/devrail-dev/github-repo-template
138+
- GitLab: https://github.com/devrail-dev/gitlab-repo-template
139+
- If retrofitting an existing project, follow:
140+
https://devrail.dev/docs/getting-started/retrofit/
141+
142+
## Critical Rules
143+
1. Run `make check` before completing any task. Never mark work done
144+
without passing checks. This is the single gate for all linting,
145+
formatting, security, and test validation.
146+
2. Use conventional commits: type(scope): description. No exceptions.
147+
3. Never install tools on the host. All linters, formatters, scanners,
148+
and test runners live inside ghcr.io/devrail-dev/dev-toolchain:v1.
149+
The Makefile delegates to Docker.
150+
4. Respect `.editorconfig` formatting rules.
151+
5. Write idempotent scripts. Check before acting.
152+
6. Read DEVELOPMENT.md in the repo for full standards reference.
153+
154+
## Available Make Targets
155+
- `make lint` — run all linters
156+
- `make format` — check formatting
157+
- `make test` — run tests
158+
- `make security` — run security scanners
159+
- `make scan` — run trivy + gitleaks
160+
- `make check` — run all of the above
161+
- `make help` — show available targets
162+
163+
## Language Detection
164+
Languages are declared in `.devrail.yml`. The Makefile reads this file
165+
to determine which tools to run. Supported languages:
166+
python, bash, terraform, ansible, ruby, go, javascript
167+
168+
See https://devrail.dev/docs/standards/ for per-language tool details.
169+
```
170+
171+
### How It Works with OpenClaw
172+
173+
1. **Add the system prompt** to your OpenClaw agent configuration
174+
2. **Trigger via messaging** -- tell your agent to work on a repo
175+
3. **The agent clones/pulls the repo**, reads `.devrail.yml`, and follows DevRail conventions
176+
4. **Before completing**, the agent runs `make check` and only reports success if all checks pass
177+
178+
### Example OpenClaw Commands
179+
180+
```
181+
> Create a new Python project called "my-api" using the DevRail template.
182+
> Set up the repo with python and bash in .devrail.yml, then run make check.
183+
184+
> Fix the lint errors in my-api. Run make lint, fix what fails, then
185+
> run make check to verify everything passes.
186+
187+
> Add JavaScript support to my-api. Update .devrail.yml, add an
188+
> eslint.config.js, and run make check.
189+
```

0 commit comments

Comments
 (0)