Przejdź do treści
Biblioteka skilli
AI i agenci · Budowanie i kod

rule-editor

/rule-editor

Dodaje, zmienia, usuwa lub łagodzi jedną regułę w skryptach reguł, regenerując tylko jej skrypty i mapę.

Repozytorium
paqad-ai ↗
Licencja
MIT
Ostatnia zmiana repozytorium
12.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
5
Skrypty
1
Komentarze HTML
1
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

Skrypty: scripts/edit-rule.mjs

Co robi i kiedy

Dodaje, zmienia, usuwa lub łagodzi jedną regułę w skryptach reguł, regenerując tylko jej skrypty i mapę.

Oryginalny opis (EN)

Adds, edits, removes or downgrades one rule in rules-as-scripts with a per-rule cascade and no global rebuild: mints or keeps the stable RL-hash id, regenerates only that rule's scripts, and writes the map through src/rule-scripts/apply.ts. Use when the user asks to add, edit or remove a rule, or to mark one unverifiable.

Jak działa

  1. What It Does
  2. Use This When
  3. Inputs
  4. Procedure
  5. Output Contract
  6. Escalate / Stop Conditions
  7. Resources
Sekcje z nagłówków SKILL.md, w oryginale · 56 linii, 443 słów
Podgląd SKILL.md
---
name: rule-editor
description: "Adds, edits, removes or downgrades one rule in rules-as-scripts with a per-rule cascade and no global rebuild: mints or keeps the stable RL-hash id, regenerates only that rule's scripts, and writes the map through src/rule-scripts/apply.ts. Use when the user asks to add, edit or remove a rule, or to mark one unverifiable."
metadata:
  model_tier: medium
  cacheable: 'false'
  output_format: markdown
  paqad-meta: skill.meta.yaml
---

## What It Does

Owns the mutation cascade so adding, editing, or removing a rule recomputes only what changed: never a full regeneration:

| Mode      | Effect                                                                                                                                                    |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| add       | Inserts the bullet into the target rule file, mints a stable `RL-<hash>` id, then classifies + generates scripts for **only the new rule**.               |
| edit      | Updates the bullet text, **preserves the id**, regenerates only that rule's scripts, and surfaces a behavior diff via Decision Pause when scripts change. |
| remove    | Removes the bullet, moves the map entry to `archived:` (delayed delete); scripts pruned on the next regen pass.                                           |
| downgrade | Keeps the rule, deletes its scripts, flips the map entry to `verifiability.kind: unverifiable` with a recorded reason.                                    |

## Use This When

- A user prompt matches the priority-225 router rules `add rule`, `edit rule`, `remove rule`, or `mark rule as unverifiable`.

## Inputs

- The target rule file (for `add`) or the `RL-<id>` (for edit/remove/downgrade).
- The new rule text (`add`, `edit`) or downgrade reason (`downgrade`).
- `docs/instructions/rules/rule-script-map.yml` (written only via the bundled wrapper → `src/rule-scripts/apply.ts`).

## Procedure

1. Apply the deterministic mechanics:
   ```
   node scripts/edit-rule.mjs add       <project-root> <source-rel> "<text>"
   node scripts/edit-rule.mjs edit      <project-root> RL-<id> "<text>"
   node scripts/edit-rule.mjs remove    <project-root> RL-<id>
   node scripts/edit-rule.mjs downgrade <project-root> RL-<id> "<reason>"
   ```
2. For `add` and `edit`: re-run `analyze rules` (idempotent, touches only the changed rule) then `generate rule scripts` with `only_rule_id` set to the affected id, so only that rule's scripts are regenerated.
3. For `edit`, diff the regenerated scripts against the prior ones; if behavior changed, surface a Decision Pause packet before accepting.
4. Present a `## Rule Change Summary` naming the id, the mode, and any scripts added/removed.

## Output Contract

- The rule markdown updated with a preserved/minted `<!-- @rule RL-<hash> -->` marker.
- `rule-script-map.yml` updated via `src/rule-scripts/apply.ts` (archive on remove, unverifiable on downgrade, script set on add/edit).
- A `## Rule Change Summary` markdown block.

## Escalate / Stop Conditions

- `edit` / `remove` / `downgrade` on an id not found on disk stops with a clear error: never guesses which rule was meant.
- Behavior-changing `edit` regenerations surface a Decision Pause diff before acceptance.
- Never edit `rule-script-map.yml` by hand; the wrapper is the only path.
- A new rule that contradicts an existing one is surfaced as a conflict (via `rule-analyzer`) before its scripts are written.

## Resources

- `references/edit-modes.md`: the four sub-modes + cascade contract.
- `runtime/base/skills/rule-editor/agents/openai.yaml`: agent interface metadata.
- `src/rule-scripts/editor.ts`: markdown add/edit/remove mechanics.
- `src/rule-scripts/mutate.ts`: per-rule map mutations.
- the Decision Pause Contract (in the framework bootstrap): packet semantics for edit diffs + conflicts.
Pliki w paczce (5)
  • SKILL.md 4 KB
  • skill.meta.yaml 1 KB
  • agents/openai.yaml 1 KB
  • references/edit-modes.md 2 KB
  • scripts/edit-rule.mjs 3 KB

Wersje

W bazie nie ma innych skilli o nazwie rule-editor.

Migawka bazy z 13.11.2026 · wersja paczki 2339f266f890 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100rule-analyzer
    Klasyfikuje reguły w docs/instructions/rules jako deterministyczne, heurystyczne lub niesprawdzalne i szkicuje mapę skryptów reguł.
  • 100rule-writing
    Pomaga tworzyć i edytować reguły w src/rules/: sformułowanie wyzwalacza, klasyfikacja always lub auto i budżet rozmiaru.
  • 100rule-script-reconciler
    Porównuje mapę skryptów reguł z dokumentacją reguł i zarejestrowanymi skryptami, zgłasza rozbieżności RS-* bez oceny modelu.
  • 100add-rule
    Tworzy lub edytuje instrukcję live-rules w atomowym zestawie reguł projektu, czyli regułę, wytyczną kodowania, barierę, konwencję lub automatyczne przypomnienie.
  • 100build-rule
    Prowadzi interaktywnie przez tworzenie definicji reguł Gobby w YAML, gdy użytkownik chce zbudować lub dodać regułę egzekwującą.
  • 100create-rule
    Pomaga tworzyć i aktualizować pliki reguł Claude Code w .claude/rules, z formatem, zakresem ścieżek i dobrymi praktykami.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.