self-inject
Skill5 starsChanged 23 days agoApache-2.0View on GitHub
Run one test-gated self-improvement round on the Remedy codebase: draft a change, snapshot the diff, gate it with tests only, apply (restart sidecar / rebuild SPA) on green or roll back on red, record in the ledger, and continue. Use when self-improve, hot-inject, self-dev, fix our own code, "improve yourself", or run the auto-improvement loop.
In this repository9 other files it gives its agents.
- change-safetySkill
- gauntlet-securitySkill
- memory-backupSkill
- project-etiquetteSkill
- refactor-safeSkill
- self-dev-loopSkill
- soak-productSkill
- stress-suiteSkill
- webui-paritySkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 41
Do a change-safety blast-radius pass before drafting.
- Very specific: line 45
Use normal file_edit / file_write tools.
- Distinctive: line 46
Do not touch generated/lock files unless the change requires it.
- Distinctive: line 54
Run the verification for the changed tree(s):
- Very specific: line 61
Use the self_inject.gate() helper (driven by project_fingerprint.suggest_verify) where available instead of typing commands by hand.
- Distinctive: line 71
Do not retry-loop or silently keep a failing diff.
- Distinctive: line 80
If the user asked for the loop, draft the next improvement and repeat.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Self-inject (Remedy improves Remedy)
Goal
Close the loop on Remedy improving this repo. One round = draft a change, audit it with tests only, apply it to the running product on green or roll it back on red, record the result, and keep going. Never commit red; never leave the tree or the running product broken.
When to use
- User says self-improve, hot-inject, improve the codebase, fix our own code, self-dev.
- Triggered on command, or automatically by the sidecar scheduler (starts at boot when enabled). Organism learning ticks every ~60s with no user prompt; ruff self-heal waits for ~5 minutes of user-turn idle on a clean tree.
Round steps (in order)
1. Orient + blast radius
git status -sb
git log -5 --oneline- Name which tree(s) the change touches: Python sidecar (
src/remedy/) and/or desktop SPA (desktop/src/). - Do a
change-safetyblast-radius pass before drafting. Bound the diff.
2. Draft
- Use normal
file_edit/file_writetools. Keep the change minimal and focused. - Do not touch generated/lock files unless the change requires it.
3. Snapshot (rollback point)
- Capture
git diffbefore gating so a red round can be reverted exactly.
4. Gate — tests only
Run the verification for the changed tree(s):
| Tree | Gate |
| Python | uv run pytest -q (ruff/mypy as warnings, not hard fails) |
| Desktop | cd desktop && npm test |
Use the self_inject.gate() helper (driven by project_fingerprint.suggest_verify)
where available instead of typing commands by hand.
5. Apply or roll back
- GREEN → apply:
- Python change → restart the sidecar so live source takes effect.
- Desktop change → rebuild the SPA (
cd desktop && npm run build) + re-resolve WebUI dir + hard-refresh, if the change must reach the WebUI.
- RED → roll back (
git checkout -- <paths>), record the failure, stop the round. Do not retry-loop or silently keep a failing diff.
6. Record
- Append the outcome to the ledger:
~/.remedy/self_inject_ledger.jsonl(diff-id / gate commands + exit codes / outcome / commit or revert ref).
7. Continue
- If the user asked for the loop, draft the next improvement and repeat.
- Otherwise return to idle (next round waits for the idle trigger or another command).
Safety
| Do | Don't |
| Test-gate every round | Commit a red diff |
| Snapshot before editing | Leave a broken working tree |
Respect instance_lock / single serve | Restart mid-messenger-poll |
| Stop on first red | Silent retry loops / thrash |
Related skills
- self-dev-loop — full orchestration (inject → gauntlet → soak → stress → ship)
- change-safety — blast radius before multi-file work
- project-etiquette — ship gates
- gauntlet-security · soak-product · stress-suite
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

