Skip to content

Commit 57046a7

Browse files
committed
dogfood: install workspace + openclaw profile on solo-mise itself
Adds the full bootstrap set (AGENTS, CLAUDE, SOUL, USER, MEMORY, IDENTITY, HEARTBEAT, SAFETY_RULES, INSTALL_FOR_AGENTS, DREAMS, TOOLS), three starter memory cards, the openclaw config fragments under .solo-mise/openclaw/, and a custom dev-focused TOOLS.md. AGENTS.md gets a solo-mise-specific section pinning the safety invariants earned from the Codex review (opt-in ingester defaults, home-dir guard, dry-run mkdir-skip, verbatim inbox). Pre-push hook activated via core.hooksPath.
1 parent 955d456 commit 57046a7

21 files changed

Lines changed: 745 additions & 0 deletions

.solo-mise/openclaw/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# OpenClaw Fragments
2+
3+
These are JSON fragments meant to be inspected and merged by hand into your `~/.openclaw/openclaw.json`. `solo-mise` does not mutate your live OpenClaw config; it generates fragments and lets you review them first.
4+
5+
## Files
6+
7+
| Fragment | Purpose |
8+
|----------|---------|
9+
| `model-aliases.openclaw.json` | Suggested alias map under `agents.defaults.models`. |
10+
| `ollama-memory-search.openclaw.json` | Local Ollama embeddings for memory search. |
11+
| `acp-escalation.openclaw.json` | ACP escalation lane via the `acpx` plugin. |
12+
13+
## Merge
14+
15+
`jq` is the safest way to merge a fragment into a live config without losing surrounding keys:
16+
17+
```bash
18+
# Inspect first
19+
jq . solo-mise-fragments/model-aliases.openclaw.json
20+
21+
# Merge (replace MERGE_PATH and re-check before saving)
22+
jq -s '.[0] * .[1]' ~/.openclaw/openclaw.json solo-mise-fragments/model-aliases.openclaw.json \
23+
> /tmp/openclaw.json.merged
24+
diff ~/.openclaw/openclaw.json /tmp/openclaw.json.merged
25+
mv /tmp/openclaw.json.merged ~/.openclaw/openclaw.json
26+
```
27+
28+
## Verification
29+
30+
```bash
31+
solo-mise doctor --target ~/.openclaw/workspace --harness openclaw
32+
```
33+
34+
The doctor reports which fragments your live config has picked up and which checks still need manual work.
35+
36+
## Gotchas
37+
38+
- Aliases referencing `<provider/...>` placeholders must be replaced with real ids before merging.
39+
- The ACP fragment assumes you have already installed `acpx` (see [solos-cookbook/ai-stack/acp-claude-code.md](https://github.com/solomonneas/solos-cookbook) for the install path).
40+
- `openclaw doctor` (the OpenClaw tool, not `solo-mise doctor`) has historically rewritten `openai-codex/*` prefixes on certain versions. If you use OAuth-only auth, audit `agents.defaults.model.primary` after any OpenClaw upgrade.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"_comment": [
3+
"FRAGMENT - inspect before merging into your openclaw.json.",
4+
"",
5+
"ACP escalation wrapper: route harder reasoning tasks to Claude Code via ACP",
6+
"while keeping the main agent on a cheaper coder model.",
7+
"",
8+
"Requires acpx plugin: https://github.com/agentclientprotocol/claude-agent-acp",
9+
"",
10+
"Replace placeholders before merging:",
11+
" <provider/main-model-id> - your main coder model alias or full id",
12+
" <provider/escalation-model> - the model id that routes through ACP"
13+
],
14+
"plugins": {
15+
"entries": {
16+
"acpx": {
17+
"command": "${HOME}/.openclaw/vendor/acpx/node_modules/.bin/acpx"
18+
}
19+
}
20+
},
21+
"agents": {
22+
"list": {
23+
"escalation": {
24+
"model": "<provider/escalation-model>",
25+
"description": "ACP-routed reasoning lane. Use for refactors, architecture review, academic work.",
26+
"tools": {
27+
"allow": ["group:fs", "group:runtime", "sessions_*"]
28+
},
29+
"thinkingDefault": "xhigh"
30+
}
31+
}
32+
}
33+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"_comment": [
3+
"FRAGMENT - inspect before merging into your openclaw.json.",
4+
"Generated by `solo-mise openclaw-fragments`. solo-mise never mutates your live config.",
5+
"",
6+
"Suggested merge target: agents.defaults.models",
7+
"Replace <provider/model-id> with the actual provider-prefixed model id you want this alias to resolve to.",
8+
"Aliases below are conventions used by the solo-mise reference setup; adapt freely."
9+
],
10+
"agents": {
11+
"defaults": {
12+
"models": {
13+
"main": "<provider/main-model-id>",
14+
"coder": "<provider/coder-model-id>",
15+
"cron": "<provider/cron-model-id>",
16+
"fast": "<provider/fast-model-id>",
17+
"escalation": "<provider/escalation-model-id>"
18+
}
19+
}
20+
}
21+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"_comment": [
3+
"FRAGMENT - inspect before merging into your openclaw.json.",
4+
"",
5+
"Wires a local Ollama embedding model into OpenClaw's memory search.",
6+
"Assumes Ollama is running on http://localhost:11434 with an embedding model pulled.",
7+
"Replace <embedding-model> with the actual model name (e.g. nomic-embed-text)."
8+
],
9+
"memory": {
10+
"search": {
11+
"embeddings": {
12+
"provider": "ollama",
13+
"baseUrl": "http://localhost:11434",
14+
"model": "<embedding-model>",
15+
"dimensions": 768
16+
},
17+
"index": {
18+
"path": "memory/cards",
19+
"include": ["*.md"],
20+
"exclude": ["handoff-inbox/**", "processed/**"]
21+
}
22+
}
23+
}
24+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"_comment": [
3+
"Public-content policy: stricter than public-repo. Applied to blog posts,",
4+
"social drafts, and docs that will be published, not just pushed.",
5+
"Use via: solo-mise scrub --policy public-content"
6+
],
7+
"_solo_mise_version": "0.1.0",
8+
"categories": {
9+
"secret": "block",
10+
"private-network": "block",
11+
"private-identity": "block",
12+
"attribution": "block",
13+
"tooling": "block"
14+
},
15+
"rules": {
16+
"loopback-ipv4": "block",
17+
"localhost-port": "block",
18+
"private-ipv4": "block",
19+
"api-key": "block",
20+
"oauth-token": "block",
21+
"ssh-private-key": "block",
22+
"claude-coauthor": "block",
23+
"ai-attribution-trailer": "block",
24+
"private-hostname": "block",
25+
"personal-email": "block",
26+
"internal-username": "block"
27+
}
28+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"_comment": [
3+
"Public-repo policy: blocks leaks in any file pushed to a public repo.",
4+
"Used by solo-mise pre-push hook and `solo-mise scrub`.",
5+
"Override by pointing CONTENT_GUARD_POLICY at your own copy of this file."
6+
],
7+
"_solo_mise_version": "0.1.0",
8+
"categories": {
9+
"secret": "block",
10+
"private-network": "block",
11+
"private-identity": "block",
12+
"attribution": "block",
13+
"tooling": "warn"
14+
},
15+
"rules": {
16+
"loopback-ipv4": "warn",
17+
"localhost-port": "warn",
18+
"private-ipv4": "block",
19+
"api-key": "block",
20+
"oauth-token": "block",
21+
"ssh-private-key": "block",
22+
"claude-coauthor": "block",
23+
"ai-attribution-trailer": "block",
24+
"private-hostname": "block",
25+
"personal-email": "warn"
26+
}
27+
}

AGENTS.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# AGENTS.md - Workspace Rules
2+
3+
## Memory Owner
4+
5+
The configured memory owner is **OpenClaw**. Side harnesses may keep local session context, but durable knowledge must be written as a Memory Handoff in `.claude/memory-handoffs/`. The memory owner ingests those handoffs into canonical durable memory.
6+
7+
Do not create a second canonical memory system. If a session produced durable knowledge, write the handoff and let the owner route it.
8+
9+
## Every Session
10+
11+
- Read the repo-local instructions before editing.
12+
- Prefer root-cause fixes over surface patches.
13+
- Run the smallest meaningful verification before claiming success.
14+
- Ask before destructive, production-impacting, or dependency-adding work.
15+
16+
## Memory Handoff
17+
18+
If a session discovers durable knowledge - architecture decisions, workflow changes, non-obvious fixes, setup gotchas, security findings, reusable commands, durable research, or user preferences - create a handoff at the end of the task.
19+
20+
Write the handoff to `.claude/memory-handoffs/<YYYY-MM-DD-HHMM>-<slug>.md` using the format in `.claude/memory-handoffs/TEMPLATE.md`.
21+
22+
Do not wait to be reminded. Do not edit canonical memory directly unless this is the memory owner.
23+
24+
## Safety
25+
26+
- Never expose secrets, private hostnames, account IDs, or internal endpoints in public output.
27+
- Use deterministic scrubbers before publishing generated content.
28+
- Do not bypass security checks unless the user explicitly accepts the risk.
29+
- Read `SAFETY_RULES.md` for hard boundaries.
30+
31+
## Multi-Agent Workflow
32+
33+
- Delegate bounded tasks with clear ownership.
34+
- Keep write scopes separate when multiple agents work in parallel.
35+
- Integrate results before reporting completion.
36+
37+
## Solo-mise repo-specific rules
38+
39+
This is the source repo for `solo-mise` itself. The files here are templates that get installed into *other* directories, so the bar for safety is higher than usual.
40+
41+
### Before committing
42+
43+
- `python -m pytest -q` must pass (currently 40 tests).
44+
- `PYTHONPATH=$HOME/repos/content-guard/src python -m content_guard scan . --policy $HOME/repos/content-guard/policies/public-repo.json` must report `Clean.` or warn-only.
45+
- New profile JSON entries must use relative paths only - no absolute paths, no `..` segments. The path validator in `src/solo_mise/init.py:_ensure_safe_rel` enforces this at runtime; tests cover it in `tests/test_init.py::test_init_rejects_unsafe_profile_paths`.
46+
47+
### Invariants worth not breaking
48+
49+
- **Ingester `promote_cards` and `route_documents` default to `False`.** They are opt-in. Codex flagged the original "default on" as a BLOCKER for a public-safety installer. If you find yourself flipping these, write a memory handoff explaining why first.
50+
- **`init` refuses `$HOME` as target unless `--allow-home`.** Don't relax this without an alternative guard.
51+
- **`init --dry-run` does not mkdir.** Verified by `test_dry_run_creates_no_files_or_dirs`.
52+
- **Inboxed handoffs are copied verbatim, not reconstructed.** Reviewers need to see what the harness actually wrote.
53+
54+
### Template hygiene
55+
56+
- Every text template under `src/solo_mise/templates/` gets `{{placeholder}}` substitution. Keep placeholders bounded to: `memory_owner`, `memory_owner_name`, `profile`, `harness`. New placeholders require a corresponding entry in `init.py::context`.
57+
- Templates must pass content-guard's `public-repo` policy. The repo's own pre-push hook scans them. Inline allow tags (`<!-- content-guard: allow <rule-id> -->`) are okay for documented examples; bulk-disabling rules is not.
58+
59+
### Releases
60+
61+
See `RELEASE.md` for the checklist. Tag, push, verify pipx install from tag.
62+
63+
### OpenClaw integration
64+
65+
This repo is dogfooded with `--profile openclaw`. The fragments under `.solo-mise/openclaw/` are placeholders - if you actually wire this repo into a live OpenClaw workspace, edit them with real provider/model ids before merging into `~/.openclaw/openclaw.json`. The fragments use `<provider/main-model-id>` style sentinels that will fail the gateway if merged unedited.

CLAUDE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CLAUDE.md - Claude Code Rules
2+
3+
## Project Rules
4+
5+
- Follow repo-local `AGENTS.md` when present.
6+
- Use this file only for Claude Code-specific behavior.
7+
8+
## Memory Handoff
9+
10+
The canonical memory owner on this workspace is **OpenClaw**. Claude Code may keep local session context, but durable knowledge must be written as a Memory Handoff in `.claude/memory-handoffs/`. See `AGENTS.md` for the full rule.
11+
12+
At the end of any substantial task, check whether the session produced durable knowledge. If yes, create a Memory Handoff using the standard format in `.claude/memory-handoffs/TEMPLATE.md`. Do this without waiting to be reminded.
13+
14+
## Closeout
15+
16+
- Report the verification command that was run.
17+
- If verification could not run, state the blocker.
18+
- If a Memory Handoff was warranted, confirm it was written.
19+
20+
## Git
21+
22+
- Do not add `Co-Authored-By` or AI-attribution trailers to commits.
23+
- Use conventional commit messages.
24+
- Never bypass pre-push hooks unless the user has explicitly accepted the risk.

DREAMS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# DREAMS.md
2+
3+
Reflection and dreaming output lands here when enabled.
4+
5+
## Rules
6+
7+
- Treat entries as suggestions until reviewed.
8+
- Promote only durable, verified findings.
9+
- Do not treat generated reflections as canonical facts.
10+
11+
## Entries
12+
13+
Add reviewed entries below or link to generated files.

HEARTBEAT.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# HEARTBEAT.md
2+
3+
## Cadence
4+
5+
- Check in on the configured schedule.
6+
- Keep heartbeat messages short and operational.
7+
8+
## Include
9+
10+
- Current focus
11+
- Blockers
12+
- Important failed checks
13+
- Next useful action
14+
15+
## Exclude
16+
17+
- Private identifiers in public destinations
18+
- Raw logs unless requested
19+
- Speculative status (only report what you verified)

0 commit comments

Comments
 (0)