Log robotics-specific learnings, incidents, and feature requests to markdown files for continuous improvement. This skill captures localization drift, planning failures, control instability, sensor fusion issues, hardware interface faults, safety boundary violations, sim-to-real gaps, and power/thermal constraints.
Important learnings get promoted to durable operational artifacts:
SOUL.md, AGENTS.md, and TOOLS.mdBefore logging anything, ensure the .learnings/ directory and files exist in the project or workspace root. If any are missing, create them:
bash
mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Robotics Learnings\n\nLocalization drift events, planning failures, control instabilities, sensor fusion errors, hardware interface issues, safety boundary violations, sim-to-real gaps, and power/thermal constraints captured during robotics engineering work.\n\n**Categories**: localization_drift | planning_failure | control_instability | sensor_fusion_error | hardware_interface_issue | safety_boundary_violation | sim_to_real_gap | power_thermal_constraint\n**Areas**: perception | localization | mapping | planning | control | manipulation | navigation | safety | simulation | hardware_integration\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/ROBOTICS_ISSUES.md ] || printf "# Robotics Issues Log\n\nRecurring robotics failures, autonomy incidents, and subsystem-level defects.\n\n---\n" > .learnings/ROBOTICS_ISSUES.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nRobotics tooling, automation, and autonomy capability requests.\n\n---\n" > .learnings/FEATURE_REQUESTS.md
Never overwrite existing files. This is a no-op if .learnings/ is already initialised.
Do not log secrets, private keys, or sensitive infrastructure endpoints. Prefer redacted excerpts for logs, telemetry, and stack traces.
If you want automatic reminders, use the opt-in hook workflow described in Hook Integration.
SituationActionRobot fails to localize in dynamic environmentLog issue to .learnings/ROBOTICS_ISSUES.md and learning to .learnings/LEARNINGS.md with localization_driftPlanner fails in narrow passage / obstacle-rich sceneLog to .learnings/ROBOTICS_ISSUES.md with reproducible scene metadataOscillatory control behavior / unstable PID tuningLog to .learnings/ROBOTICS_ISSUES.md with control loop telemetry and frequencySensor desync (camera-lidar-imu timestamp mismatch)Log to .learnings/ROBOTICS_ISSUES.md and tag sensor_fusion_errorDriver drops packets / CAN timeout / serial disconnectLog to .learnings/ROBOTICS_ISSUES.md with bus and firmware detailsSafety stop or emergency brake unexpectedly triggeredLog to .learnings/ROBOTICS_ISSUES.md with safety state transitionsSimulation success but real robot failureLog to .learnings/LEARNINGS.md with category sim_to_real_gapThermal throttling / battery sag / brownoutLog to .learnings/LEARNINGS.md with category power_thermal_constraintNew capability needed for robotics workflowLog to .learnings/FEATURE_REQUESTS.mdRecurring issue (3+ occurrences)Link entries, increase priority, and promote to runbook/checklistBroadly applicable autonomy patternPromote to safety checklist, calibration playbook, tuning runbook, or core prompt docs
OpenClaw is the primary platform for this skill. It uses workspace-based prompt injection with automatic skill loading.
Via ClawdHub (recommended):
bash
clawdhub install self-improving-robotics
Manual clone:
bash
git clone https://github.com/jose-compu/self-improving-robotics.git ~/.openclaw/skills/self-improving-robotics
Manual clone is optional. Check out a reviewed tag or commit before use. Do not install an unpinned default branch into a shared environment.
OpenClaw injects these files into every session:
text
~/.openclaw/workspace/
├── AGENTS.md # Multi-agent workflows and delegation
├── SOUL.md # Behavioral and safety guardrails
├── TOOLS.md # Tooling usage and integration notes
├── MEMORY.md # Long-term memory (main session only)
├── memory/ # Daily memory files
│ └── YYYY-MM-DD.md
└── .learnings/ # This skill's log files
├── LEARNINGS.md
├── ROBOTICS_ISSUES.md
└── FEATURE_REQUESTS.md
bash
mkdir -p ~/.openclaw/workspace/.learnings
Then create the log files (or copy from assets/):
LEARNINGS.md - category-based learningsROBOTICS_ISSUES.md - concrete incidents and failuresFEATURE_REQUESTS.md - tooling and capability requestsWhen robotics learnings prove broadly applicable, promote them:
Learning TypePromote ToExampleSafety-critical incident patternsSafety checklist"Require sensor freshness checks before enabling autonomous motion"Calibration/sync workflowsCalibration playbook"Camera-lidar-imu time sync verification sequence"Stable tuning methodsTuning runbook"PID retune order under payload changes"Robotics behavior principlesSOUL.md"Never bypass safety interlocks for speed"Multi-agent robotics workflowAGENTS.md"Separate sim, HIL, and field validation owners"Tooling integration standardsTOOLS.md"Always record synchronized telemetry bundles"Reusable failure mitigationsNew reusable skill"narrow-passage-planning-resilience"
Opt-in and workspace-local. Do not copy this hook to ~/.openclaw/hooks/ (that path is user-global). Skip it unless you want reminders in this workspace:
bash
mkdir -p .openclaw/hooks
cp -r hooks/openclaw .openclaw/hooks/self-improving-robotics
See references/openclaw-integration.md for complete details.
For Claude Code, Codex, Copilot, or other agents, create .learnings/ in project or workspace root:
bash
mkdir -p .learnings
Create files using the headers shown in this skill.
Use entry types:
LRN = learningROB = robotics issueFEAT = feature requestAppend to .learnings/LEARNINGS.md:
markdown
## [LRN-YYYYMMDD-XXX] category
**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending
**Area**: perception | localization | mapping | planning | control | manipulation | navigation | safety | simulation | hardware_integration
### Summary
One-line description of the learning
### Details
Full context: what was observed, why it happened, what constraints mattered,
and how the mitigation should be applied. Include specific telemetry indicators.
### Suggested Action
Concrete process or config update to apply
### Metadata
- Source: telemetry_alert | simulation_failure | hil_test | field_test | safety_event | hardware_diagnostics | code_review | postmortem
- Platform: robot_model_or_stack (optional)
- Related Files: path/to/config_or_code
- Tags: tag1, tag2
- See Also: LRN-20250110-001 (if related)
- Pattern-Key: localization_drift.dynamic_scene (optional)
- Recurrence-Count: 1 (optional)
- First-Seen: 2025-01-15 (optional)
- Last-Seen: 2025-01-15 (optional)
---
Categories for learnings:
CategoryUse Whenlocalization_driftPose confidence degrades over time or in dynamic scenesplanning_failurePlanner repeatedly cannot find safe/feasible pathcontrol_instabilityOscillation, overshoot, divergence, or instability appearssensor_fusion_errorMulti-sensor alignment/timing inconsistency corrupts estimatehardware_interface_issueDriver, bus, transport, or actuator interface defectssafety_boundary_violationSafety envelope trigger or near-violation occurssim_to_real_gapSimulation passes but field behavior failspower_thermal_constraintThermal, voltage, or energy limits degrade behavior
Append to .learnings/ROBOTICS_ISSUES.md:
markdown
## [ROB-YYYYMMDD-XXX] issue_name
**Logged**: ISO-8601 timestamp
**Priority**: high
**Status**: pending
**Area**: perception | localization | mapping | planning | control | manipulation | navigation | safety | simulation | hardware_integration
### Summary
Brief description of the robotics issue
### Error Output
Command output, safety alerts, diagnostics, or stack traces (redacted/summarized)
text
### Root Cause
What subsystem or integration issue caused the failure.
### Fix
Specific mitigations, parameter adjustments, code updates, or operational changes.
### Prevention
How to avoid recurrence (checklist guardrail, test, monitor, fallback behavior).
### Context
- Trigger: telemetry_alert | simulation_failure | hil_test | field_test | safety_event | hardware_diagnostics
- Environment: sim | lab | warehouse | outdoors | unknown
- Run ID or mission segment
### Metadata
- Reproducible: yes | no | unknown
- Related Files: path/to/config_or_code
- See Also: ROB-20250110-001 (if recurring)
---
Append to .learnings/FEATURE_REQUESTS.md:
markdown
## [FEAT-YYYYMMDD-XXX] capability_name
**Logged**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending
**Area**: perception | localization | mapping | planning | control | manipulation | navigation | safety | simulation | hardware_integration
### Requested Capability
What robotics capability, tool, or automation is needed
### User Context
Why it is needed and what workflow it improves
### Complexity Estimate
simple | medium | complex
### Suggested Implementation
How this could be built (tooling, pipeline, monitor, playbook, simulation harness)
### Metadata
- Frequency: first_time | recurring
- Related Features: existing_tool_or_feature
---
Format: TYPE-YYYYMMDD-XXX
LRN (learning), ROB (robotics issue), FEAT (feature request)001, A7B)Examples: LRN-20250415-001, ROB-20250415-A3F, FEAT-20250415-002
When an issue is fixed, update the entry:
**Status**: pending to **Status**: resolvedmarkdown
### Resolution
- **Resolved**: 2025-01-16T09:00:00Z
- **Commit/PR**: abc123 or #42
- **Validation**: simulation + HIL + controlled field test
- **Notes**: Parameter retuned, watchdog threshold adjusted, and safety test added
Other status values:
in_progress - actively being diagnosed or fixedwont_fix - intentionally not addressed (add reason in Resolution notes)promoted - elevated to checklist, playbook, runbook, or core docspromoted_to_skill - extracted as reusable skillAutomatically log when you encounter:
Localization degradation (issue + learning):
Planning failures (issue + learning):
Control instability (issue + learning):
Sensor fusion anomalies (issue + learning):
Hardware interface faults (issue + learning):
Safety incidents (issue + learning):
Sim-to-real mismatches (learning):
Power and thermal limits (learning):
PriorityWhen to UseRobotics ExamplescriticalSafety risk, collision potential, emergency stop instability, hardware damage riskEmergency stop false negatives, repeated collision near-miss, motor overcurrent damage riskhighRecurring failure that blocks autonomy missionsPlanner fails in narrow corridor, localization drift in common dynamic scenesmediumSignificant but recoverable issue with available fallbackSensor desync occasional spikes, moderate control oscillation with fallback enabledlowMinor tuning or observability improvementDashboard labeling mismatch, non-critical telemetry naming cleanup
Use area tags to filter and route issues:
AreaScopeperceptionObject detection, feature extraction, sensor preprocessinglocalizationPose estimation, drift correction, relocalization strategiesmappingMap quality, occupancy updates, semantic map consistencyplanningGlobal/local planning, feasibility, obstacle avoidancecontrolPID/MPC/controller behavior, stability, actuator command trackingmanipulationGrasp planning, arm trajectories, end-effector behaviornavigationEnd-to-end mission routing and navigation state transitionssafetySafety monitors, interlocks, emergency stop logic, boundariessimulationSimulator fidelity, scenario generation, domain randomizationhardware_integrationDrivers, buses, firmware, power systems, interfaces
When a learning is broadly applicable (not a one-off fix), promote it to permanent project standards.
TargetWhat Belongs ThereSafety checklistMandatory pre-run and post-incident safety checksCalibration playbookRepeatable calibration/time-sync proceduresTuning runbookStable controller/planner tuning workflow and limitsSOUL.mdRobotics behavior principles and non-negotiable guardrailsAGENTS.mdMulti-agent validation workflows and decision stepsTOOLS.mdTelemetry, replay, simulation, and diagnostics tooling guidanceSimulation test suite docsScenario matrices and acceptance thresholds
Distill the learning into concise operational rule or checklist item
Place it in the right target document
Show a reviewed diff and apply only after explicit user approval
Update original entry:
**Status**: pending to **Status**: promoted**Promoted**: safety checklist (or calibration playbook, tuning runbook, SOUL.md, AGENTS.md, TOOLS.md)If logging something similar to an existing entry:
rg "keyword" .learnings/**See Also**: ROB-20250110-001 in MetadataUse Pattern-Key for dedupe, such as:
localization_drift.dynamic_aisleplanning_failure.narrow_passage_clearancecontrol_instability.low_speed_headingsensor_fusion_error.timestamp_skewWhen recurrence is tracked:
Recurrence-CountLast-SeenSee Also links between related LRN and ROB entriesReview .learnings/ at natural robotics development milestones:
bash
# Count pending robotics entries
rg "Status\\*\\*: pending" .learnings/*.md | wc -l
# List high-priority unresolved robotics issues
rg -n "Priority\\*\\*: high|Priority\\*\\*: critical" .learnings/ROBOTICS_ISSUES.md
# Find all localization learnings
rg -n "localization_drift|Area\\*\\*: localization" .learnings/*.md
# Find unresolved safety incidents
rg -n "Area\\*\\*: safety" .learnings/ROBOTICS_ISSUES.md
wont_fixFollow this workflow for each ROB or LRN item:
Enable automatic reminders through agent hooks. This is opt-in.
Hooks persist across sessions once installed. Keep them project-scoped. Do not install user-level or global hooks. Never use an empty matcher. PostToolUse inspects command output in-process; do not log raw output, secrets, or transcripts.
Create .claude/settings.json in your project:
json
{
"hooks": {
"UserPromptSubmit": [{
"matcher": "robot|localization|planner|control|safety|sensor|lidar|imu|thermal",
"hooks": [{
"type": "command",
"command": "./skills/self-improving-robotics/scripts/activator.sh"
}]
}]
}
}
This injects a robotics-focused reminder after matching prompts (~50-100 tokens overhead).
json
{
"hooks": {
"UserPromptSubmit": [{
"matcher": "robot|localization|planner|control|safety|sensor|lidar|imu|thermal",
"hooks": [{
"type": "command",
"command": "./skills/self-improving-robotics/scripts/activator.sh"
}]
}]
}
}
Leave PostToolUse disabled. Do not attach error-detector.sh to every Bash call.
ScriptHook TypePurposescripts/activator.shUserPromptSubmitReminds to evaluate robotics learningsscripts/error-detector.shPostToolUse (Bash)Detects common robotics/autonomy error terms in output
See references/hooks-setup.md for complete setup and troubleshooting.
Extracted skills are untrusted until a human reviews the generated SKILL.md. Do not keep or publish an extracted skill without explicit user approval.
When a robotics learning is valuable enough to become reusable, extract it.
CriterionDescriptionRecurringSame failure mode appears in 2+ subsystems, robots, or deploymentsVerifiedStatus is resolved with validated mitigationNon-obviousRequired meaningful diagnosis beyond trivial config typoBroadly applicableUseful across projects or autonomy stacksSafety/ops valuePrevents incidents or reduces operational riskUser-flaggedUser says "save this as a skill" or equivalent
Identify candidate: learning meets extraction criteria
Run helper (or create manually): bash
./skills/self-improving-robotics/scripts/extract-skill.sh skill-name --dry-run
./skills/self-improving-robotics/scripts/extract-skill.sh skill-name
Customize SKILL.md: fill template with telemetry-backed robotics content
Update learning: set status to promoted_to_skill, add Skill-Path
Verify: ensure extracted skill is clear and safe to apply
In conversation:
In entries:
See Also linksPattern-Key across environmentsROB and LRN entries over multiple datesAgentActivationDetectionClaude CodeHooks (UserPromptSubmit, PostToolUse)Automatic via error-detector.shCodex CLIHooks (same pattern)Automatic via hook scriptsGitHub CopilotManual ( .github/copilot-instructions.md)Manual reviewOpenClawWorkspace injection + inter-agent messagingVia sessions and shared .learnings/
This skill is standalone-compatible and stackable with other self-improving skills.
.learnings/robotics/.learnings/INDEX.mdEvery new entry must include:
markdown
**Skill**: robotics
event + matcher + file + 5m_window; max 1 reminder per skill every 5 minutes.Only trigger this skill automatically for robotics signals such as:
planner|localization|slam|trajectory|control loopsensor fusion|actuator fault|sim2real|safety stopWhen guidance conflicts, apply:
securityengineeringcodingaimeta as tie-breaker.learnings/robotics/ in stackable mode..learnings/*.md log files only.AGENTS.md, SOUL.md, TOOLS.md, MEMORY.md, rules, hooks, or generated skills is not a logging write. Show a reviewed diff and apply only after explicit user approval.