Skip to content
cccskills
FreePublished on GitHub

self-rewriter

Use for Self-Rewriting Core: AST analyze, patch, commit.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md3.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Self-Rewriting Core Skill

Der Self-Rewriter ist ein autonomes Core-Evolution-Tool, das das openamer_cli/ Verzeichnis auf Ineffizienzen scannt, Patches generiert, validiert und automatisch committed.

Standort

  • Script: C:\Users\damir\openamer-repo\scripts\self-rewriter.py
  • Cron-Kopie: $OPENAMER_HOME\scripts\self-rewriter.py
  • Arbeitsverzeichnis: .rewriter/ im Repository-Root
    • pending/ — generierte Patches (unified diff)
    • applied/ — angewandte Patches (Archiv)
    • reports/latest.json — letzter Scan-Report

CLI-Usage

python scripts/self-rewriter.py --scan              # Core analysieren
python scripts/self-rewriter.py --suggest           # Verbesserungen anzeigen
python scripts/self-rewriter.py --patch             # Patches generieren (max 3)
python scripts/self-rewriter.py --apply             # Patches validieren + commiten + mergen
python scripts/self-rewriter.py --all               # Full Cycle (scan -> patch -> apply)
python scripts/self-rewriter.py --all --dry-run     # Full Cycle nur anzeigen
python scripts/self-rewriter.py --scan --max-patches 5
python scripts/self-rewriter.py --apply --yes       # Non-interactive apply
python scripts/self-rewriter.py --repo /pfad/zum/repo --scan

Exit-Codes

CodeBedeutung
0Nichts zu tun — alles sauber
1Patches verfuegbar (issues gefunden)
2Patches angewandt und committed

Was wird analysiert (AST-basiert)

  1. Doppelte Imports — selbes Modul mehrfach importiert
  2. Zu lange Funktionen — > 100 Zeilen
  3. Fehlende Type Hints — Parameter/Rueckgabewert ohne Type Annotation
  4. Leere except-Bloecke — except: pass (sicherheitsrelevant)
  5. TODO/FIXME-Kommentare — markierte Stellen im Code

Patches & Git-Workflow

  1. Branch rewriter-tmp wird von main erstellt
  2. Patches werden via patch -p0 / patch -p1 angewandt
  3. py_compile validiert die Syntax
  4. Bei Erfolg: Commit + Merge zurueck zu main (--no-ff)
  5. Branch wird geloescht
  6. Angewandte Patches wandern von pending/ -> applied/

Cron-Job (alle 6h)

Der Cron-Job self-rewriter-scan laeuft alle 360 Minuten (6h) und fuehrt self-rewriter.py --scan aus. Er prueft ob neue Issues aufgetaucht sind und postet nur bei Aenderungen einen Report.

Troubleshooting

  • "Core-Verzeichnis nicht gefunden": Script sucht in ~/openamer-repo/ und Umgebung. Mit --repo /absoluter/pfad explizit angeben.
  • Patch-Apply schlaegt fehl: Patches arbeiten gegen den aktuellen main-Branch. Bei Konflikten sind manuelle Eingriffe noetig — der rewriter-tmp Branch bleibt dann bestehen.
  • Report nicht gefunden: --suggest und --patch brauchen einen vorherigen --scan-Report.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Build integrated IS/BS/CF financial workbooks in Excel.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 20, 2026

Run and grow the OpenAmer Agent-to-Agent swarm: identity, trust, node-to-node ask, signed skill/insight sharing, and the autonomous self-learning loop.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 20, 2026

Use for A/B experiments on OpenAmer configs and skills.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 20, 2026

Roleplay a hostile user to find and triage UX pain points.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 20, 2026

Agent mesh: master/worker nodes, HTTP delegation, heartbeat.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 20, 2026

Use for agentic commerce payments tasks. Candidate synthesized from trend radar; awaiting trial promotion.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 20, 2026

See all skills by openamer

Report a problem with this skill