# Self Improve

> ChaosEngine Learning Session self-improve skill. Dual-track harness + product lessons via learning.py. Trigger on self-improve or learning session.

- Skill: `shafthq/self-improve` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add shafthq/self-improve`
- Raw SKILL.md: https://api.skillmd.com/api/skills/shafthq/self-improve/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: shafthq (https://skillmd.com/u/shafthq)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/shafthq/self-improve

---


# self-improve — ChaosEngine learning & adapting

Lean CE-native skill informed by Task Observer methodology
(Eoghan Henn / rebelytics, **CC BY 4.0** — see [LICENSE](LICENSE) and
[UPSTREAM.md](UPSTREAM.md)). Not a blind clone.

## When

- **Primary:** root-owned Learning Session after confirmed delivery.
- **Secondary:** explicit operator request mid-session.
- **Not:** every casual turn — keep always-on cost low.

## Dual track

1. **Harness** — skills, hooks, MemPalace, Graphify, installer/doctor.
2. **Product** — enhancements for the product under development (queued issues).

Details: [references/observation-taxonomy.md](references/observation-taxonomy.md).
Product track: [references/product-track.md](references/product-track.md)
(product issues/evals + ChaosGauge link; CLI/doctor/silent-verify over essay tickets).
Activation: [references/activation.md](references/activation.md).
Adopt/reject research: [references/research-adopt-reject.md](references/research-adopt-reject.md).
Roadmap: [../../references/self-improve-master-plan.md](../../references/self-improve-master-plan.md).
Research/explore isolation (harness): [../../references/context-firewall.md](../../references/context-firewall.md).

## How (wraps learning.py)

1. Classify each finding (harness vs product; category allow-list).
2. Write minimal fields only: `category`, `title`, `lesson`, `proposedChange`,
   `benefit`, `estimatedTokens`.
3. Queue through `learning.py` so privacy gates + GitHub filing invariants hold.
4. Never auto-install skill patches; stage proposals for human/CI review.
5. "Nothing durable" is a valid outcome.

Example:

```bash
cat > /tmp/learning-candidate.json <<'EOF'
{
  "category": "tooling",
  "title": "Doctor fix-next missing for Graphify",
  "lesson": "Operators lacked a single repair command after a store probe failed",
  "proposedChange": "Surface repair --component graphify in doctor fix-next",
  "benefit": "Faster store repair on adopter hosts",
  "estimatedTokens": 120
}
EOF
python3 .chaos-engine/learning.py queue \
  --state .chaos-engine-state/learning \
  --upstream Owner/ExampleRepo \
  --candidate /tmp/learning-candidate.json
```

## Metrics / verify (zero-LLM)

```bash
python3 .chaos-engine/learning.py metrics
python3 .chaos-engine/silent_verify.py session-start-budget
python3 .chaos-engine/retrieve.py heuristics --top 3
python3 .chaos-engine/significance.py list
python3 .chaos-engine/skill_compress_audit.py audit --skill self-improve
python3 .chaos-engine/meta_optimize.py review
python3 .chaos-engine/draft_skill_pr.py status
```

SessionStart stays locator-only; prefer CLI over MCP for the same job.
Mid-session: mark **significant** friction only via `significance.py` (soft
fail/deny hooks already write tiny state notes) — never Task Observer.
Skill bodies: `skill_compress_audit.py` proposes compress diffs only; never auto-apply.
Periodic: `meta_optimize.py review` (offline cadence — not continuous).
Draft skill PRs: `draft_skill_pr.py` opt-in only (default OFF; never auto-merge).
See [meta-optimize](../../references/meta-optimize.md) and
[draft-skill-pr](../../references/draft-skill-pr.md).

## Local smoke

```bash
# From a temp project with ChaosEngine installed, or the source tree:
python3 -c "from pathlib import Path; assert Path('chaos-engine/skills/self-improve/SKILL.md').is_file()"
# Queue one harness + one product candidate (privacy-safe fixtures) via learning.py
# then confirm queue.json grew by two items without secrets/paths.
```

