Skip to content

meiluosi/rewrite-fidelity-skill

rewrite-fidelity

Verified

Use after any rewrite, simplification, or plain-language pass — English or Chinese — to check that the new text still says what the original said: same numbers, same code and identifiers, same conditions and exceptions, same requirement strength (MUST/SHOULD/MAY, 必须/建议/可以), same hedges (may have / 可能), same negations and scope, same threshold direction (at least vs at most, 以上 vs 以下), same comparison direction (A beats B vs B beats A), no stronger claim (suggests vs proves, 可能 vs 一定). Pairs with asd-ste100, zh-disambiguate, jianming-zhongwen and any other rewrite skill. Triggers: check the rewrite, did the rewrite change the meaning, verify nothing was lost, fidelity check, 改写有没有改意思, 核对改写, 保真检查, 对比原文和改写稿. Not a style checker: it never judges whether the rewrite reads better.

references/integration.md

View on GitHub
# Integration

## From another rewrite skill

Add one step at the end of the rewrite skill's process. The wording below fits asd-ste100's `## Process` section after step 4. The same text works for zh-disambiguate and jianming-zhongwen.

```markdown
5. If the rewrite-fidelity skill is installed, save the original and the rewrite to two files and run
   `python3 <rewrite-fidelity>/scripts/fidelity.py original.txt rewrite.txt`.
   Fix every error-level finding that is a real meaning change. Then do the claim check in
   rewrite-fidelity's SKILL.md (Pass 2). Do not show this check to the user unless they asked for it.
```

The step says "if installed" so the host skill still works without it.

### Proposed upstream issue for asd-ste100

asd-ste100's README says that its linter does not compare the original with the rewrite and cannot prove that meaning was preserved. This skill fills that gap. A short issue or PR to `danyuchn/asd-ste100-skill` could say:

> The README notes that ste-lint.py checks one text and cannot confirm that a rewrite preserved meaning or requirement strength. rewrite-fidelity (link) compares the original with the rewrite. It checks numbers, literals, conditions, negation, scope bounds, and modality (MUST/SHOULD/MAY and hedges such as "may have"). It is stdlib-only, like ste-lint.py. Would you accept an optional Process step that calls it when it is installed? Proposed wording: (step above).

## In CI

The script exits 1 on error-level findings, so it can gate a pull request that rewrites docs. Keep the pre-rewrite text from the base branch:

```yaml
- name: Fidelity check on rewritten tool descriptions
  run: |
    for f in $(git diff --name-only origin/main -- 'tools/*.md'); do
      git show origin/main:"$f" > /tmp/original.md || continue
      python3 rewrite-fidelity/scripts/fidelity.py /tmp/original.md "$f"
    done
```

This only makes sense for a pull request whose purpose is to rewrite text. A pull request that changes behavior also changes the facts, and the check will report those changes as errors.

## As a library

```python
from fidelity import compare   # scripts/ on sys.path
findings = compare(original_text, rewrite_text)
errors = [f for f in findings if f["severity"] == "error"]
```

Each finding is a dict with these keys: `severity`, `check`, `change`, `original`, `rewrite`, `items`, `message`.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall