{"skill":{"slug":"operational-framework","displayName":"Operational Framework","summary":"A disciplined, reproducible workflow for AI agents to log decisions, create rollback snapshots, and generate briefings for any change or feature implementation.","description":"---\nname: Operational Framework\nslug: operational-framework\nversion: 1.0.0\ndescription: \"A disciplined, reproducible workflow for AI agents to log decisions, create rollback snapshots, and generate briefings for any change or feature implementation.\"\nchangelog: \"Initial polished release – generic, community‑ready\"\nmetadata: {\"requires\":{\"bins\":[]},\"os\":[\"linux\",\"darwin\",\"win32\"],\"configPaths\":[\"~/.openclaw/workspace/\"]}\n---\n\n# Operational Framework\n\nA disciplined approach to implementing changes with full traceability.\n\n## When to Use\n\n- Implementing improvements or new features\n- Making configuration changes\n- Any work that needs rollback capability\n- Generating case study briefings\n\n## Architecture (generic)\n\n```\n<workspace>/\n├── decisions/          # Decision logs (JSON per day)\n│   └── <date>.json    # Example: 2026‑05‑08.json\n├── rollbacks/         # Snapshot directories\n│   └── <timestamp>/   # Example: 2026‑05‑08_2005/\n├── briefings/         # Case‑study markdown files\n│   └── <date>.md      # Example: 2026‑05‑08.md\n└── TODO.md            # Persistent task list\n```\n\nReplace `<workspace>` with the root of your OpenClaw workspace (usually `~/.openclaw/workspace`).\n\n## Decision Logging (generic)\n\nLog each major decision *before* you start changing anything. Use a simple JSON schema:\n\n```json\n{\n  \"id\": \"dec_<date>_<seq>\",\n  \"timestamp\": \"<ISO‑8601>\",\n  \"title\": \"<short description>\",\n  \"context\": \"<why this decision matters>\",\n  \"options_considered\": [\"<opt1>\", \"<opt2>\", \"<opt3>\"],\n  \"chosen\": \"<selected option>\",\n  \"reasoning\": \"<rationale>\",\n  \"expected_outcome\": \"<what success looks like>\",\n  \"risk_mitigation\": \"<how to handle failure>\",\n  \"status\": \"pending|implemented|reverted\"\n}\n```\n\n**How to log:**\n- Manually edit a file in `decisions/` (e.g., `2026-05-08.json`).\n- Or, if you have a CLI wrapper, run:\n```\n/decide \"<title>\" --context \"<ctx>\" --options \"opt1|opt2|opt3\" --chosen \"opt2\" --reasoning \"<reason>\"\n```\n\nReplace placeholders with your actual values.\n\n\n## Rollback System (generic)\n\nTake a lightweight snapshot *before* you modify anything. The snapshot can be a simple copy of files or a git commit.\n\n**Typical workflow:**\n1. Choose a name (e.g., `2026-05-08_2005`).\n2. Copy the relevant files or the whole workspace into `rollbacks/<name>/`.\n3. Verify the copy.\n4. If needed, restore by copying back.\n\nExample (shell‑style, adapt to your environment):\n```bash\n# Create snapshot directory\nmkdir -p rollbacks/2026-05-08_2005\n# Copy files you care about (or the whole workspace)\ncp -r decisions rollbacks/2026-05-08_2005/\ncp -r briefings rollbacks/2026-05-08_2005/\n# ... add other paths as needed\n```\n\n**Listing snapshots:**\n```bash\nls -1 rollbacks/\n```\n\n**Restoring:**\n```bash\ncp -r rollbacks/2026-05-08_2005/* <workspace>/\n```\n\nThe exact commands can be wrapped in a script for convenience.\n\n## Implementation Workflow\n\n### 1. Decision Phase\n- Log the decision with full context\n- Define success criteria\n- Identify rollback strategy\n\n### 2. Snapshot Phase\n- Capture current state\n- Verify snapshot integrity\n\n### 3. Implementation Phase\n- Execute change\n- Document as you go\n- Test incrementally\n\n### 4. Verification Phase\n- Does it meet success criteria?\n- Any unexpected side effects?\n\n### 5. Briefing Phase\n- Generate case study\n- Note what worked/didn't\n- Update TODO if follow-ups needed\n\n## Briefing Format\n\n```markdown\n# Implementation Briefing: [Title]\n**Date:** YYYY-MM-DD\n**Decision ID:** dec_YYYY-MM-DD_XXX\n\n## Context\n[What triggered this]\n\n## Decision\n[What was decided and why]\n\n## Implementation\n[How it was implemented]\n\n## Outcome\n[Success/failure with evidence]\n\n## Lessons Learned\n- What worked well\n- What would do differently\n- Patterns to propagate\n\n## Rollback Point\n[Reference to snapshot if needed]\n```\n\n## Quick Commands (examples)\n\nBelow are *illustrative* commands you can bind to your own CLI or script. They are not built‑in OpenClaw commands, but they show the typical flow.\n\n| Action | Example Shell / Pseudo‑Command |\n|--------|---------------------------------|\n| Log decision | `echo '{...}' >> decisions/$(date +%F).json` |\n| Create snapshot | `./snapshot.sh <name>` (your wrapper script) |\n| List snapshots | `ls -1 rollbacks/` |\n| Restore snapshot | `./restore.sh <name>` |\n| Generate briefing | `./brief.sh <decision‑id>` |\n| Open TODO | `vim TODO.md` |\n\nFeel free to adapt these to your preferred tooling (bash, Python, etc.).\n\n## TODO Integration\n\nMaintain `TODO.md` in workspace root:\n\n```markdown\n## 2026-05-08 Implementation Session\n\n### Active\n- [ ] Decision: Implement X\n- [ ] Snapshot: AGENTS.md\n\n### Completed\n- [x] Decision: Add memory recall\n- [x] Implemented: 2026-05-08\n- [x] Briefing: briefings/2026-05-08.md\n```\n\n## Key Principles\n\n1. **Log before acting** - Decisions documented before implementation\n2. **Snapshot before change** - Always have a rollback path\n3. **Brief after completion** - Document for future reference\n4. **Never lose context** - Everything survives session restarts\n\n## Integration\n\nThis framework integrates with:\n- **Self-Improving skill** - Lessons feed into corrections.md\n- **HEARTBEAT.md** - Periodic decision review\n- **AGENTS.md** - Framework reference in operational procedures\n\n## Requirements\n\n- No credentials required\n- No extra binaries required\n- Works with existing workspace structure","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":324,"installsAllTime":12,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1778272410281,"updatedAt":1778492880688},"latestVersion":{"version":"1.0.0","createdAt":1778272410281,"changelog":"Initial release – generic, community‑ready","license":"MIT-0"},"metadata":null,"owner":{"handle":"tstokes06","userId":"s171822mda19nndswcwcjs1jfs86ahra","displayName":"Tim","image":"https://avatars.githubusercontent.com/u/141640156?v=4"},"moderation":null}