agentleFS
stevencarpenterstevencarpenter/agents/skills/re-provenance-guidelines/SKILL.md

re-provenance-guidelines

Skill1 starsChanged 4 months agoMITView on GitHub

Use when turning reverse-engineering findings into original code, physics models, graphics pipelines, or specifications, so every constant carries a provenance label and no game value is presented as a measurement.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never present a Tunable, Design, or Spec value as the game's behaviour or as a measurement of the real world.

    line 28
  2. Distinctive:

    Do not port a known defect (mass lost at a cell ceiling, a coarse quantum, an ignored return value) unless the fidelity tier requires it.

    line 46
  3. Distinctive:

    Keep units and coordinate frames explicit and convert at one boundary (for example, a physics engine in centimetres against a simulation in …

    line 48
  4. Distinctive:

    Never copy decompiled code, shaders, scripts, or assets.

    line 50
  5. Distinctive:

    Keep the target codebase's rules: where the simulation lives, which layer owns rendering, which files are generated and must not be …

    line 53
  6. Distinctive:

    Use the reference model as the test oracle, with a per-output table that states whether a match is required (Observed) or not (Tunable, …

    line 65
  7. Distinctive:

    Read the errata before the documents they correct.

    line 76
  8. Distinctive:

    Before a specification is handed over, a fresh reader checks every claim it makes about the consumer codebase against the code.

    line 81
  9. Distinctive:

    When implementing, report the files changed, the labels used, each open item exposed as a parameter, and the exact proof command.

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Provenance Guidelines for Reconstructed Systems

Shared rubric for code built from reverse-engineering findings. A finding describes what a shipped build does. A port is original code that chooses what to keep. The labels below keep the two apart in code, tests, and documents.

Labels

LabelMeaningExample
ObservedRead from the shipped binary or shipped tables, with an address or a digestSNOW_DIVISOR = 2.5 // Observed, FINDINGS 49.2
VerifiedObserved and re-read at instruction level in a verification passSLIP_EXPONENT = 0.75 // Verified, FINDINGS 48
InferredConsistent with observed code, not confirmed by a named field or a testalways named as such, never promoted silently
DerivedComputed from observed valuesCELL_M = 24.5 / 49 // Derived
TunableA modelling choice in a reference model, not a measurementSTEP_GAIN in a registry, never in a finding
DesignA choice made here. Game tuning copied as a starting point is Design, from <game>REPOSE_DEG = 40.0 // Design, from Roadcraft findings/roadcraft-terraforming-tools.md
SpecA catalogue or data-sheet value recalled from memory, not checkedtreat as Design until cited

Rules:

  1. Label every physical or behavioural constant in code, and cite the source in the same comment. A reviewer rejects an unlabelled constant.
  2. Never present a Tunable, Design, or Spec value as the game's behaviour or as a measurement of the real world. A game value is tuning.
  3. Expose every open item as a named parameter with the documented default. Do not bury an open item inside a literal.
  4. Reference models keep three registries (OBSERVED, DERIVED, TUNABLES). A self-check fails when a module constant is in none or in more than one.

Precedence when sources disagree

Highest first: errata tables read from the listing; the ledger of record; derived specifications; a reference model's OBSERVED and DERIVED registries; design notes. Nothing in design notes is a finding, and no finding lives only in design notes.

Porting rules

  • Implement from the specification and the ledger. Read disassembly only to close an open item.
  • Port absence explicitly. If the game has no decay, no lateral transport, or no collision on a render-only mesh, write that down as a decision, either kept (fidelity) or exceeded (Design).
  • Do not port a known defect (mass lost at a cell ceiling, a coarse quantum, an ignored return value) unless the fidelity tier requires it. Name the defect and the choice.
  • Keep units and coordinate frames explicit and convert at one boundary (for example, a physics engine in centimetres against a simulation in metres).
  • Never copy decompiled code, shaders, scripts, or assets. Describe the behaviour, then write it in the target language with its own idioms. Shipped data files stay read-only and byte-exact when they are vendored as evidence.
  • Keep the target codebase's rules: where the simulation lives, which layer owns rendering, which files are generated and must not be hand-edited.

Fidelity tiers and tests

  • Tier 1, exact. Grid sizes, texel encodings, gate order, clamp bounds. Test with values from shipped data.
  • Tier 2, behavioural. Monotonic ramps, no overshoot, clamped borders, conservation. Test with properties.
  • Tier 3, design. Depth scales, storage format, relaxation. Test against the design, and say so.

Use the reference model as the test oracle, with a per-output table that states whether a match is required (Observed) or not (Tunable, Design). Name acceptance tests (T1, T6c) in both the specification and the code.

Citing and vendoring

  • Cite FINDINGS <section>, SPEC/<doc> section <n>, findings/<file>, or evidence/<dir>/<file> in code comments and commit messages.
  • Vendor a findings package under docs/research/<package>/ with SHA256SUMS and the source commit. Rename the package's AGENTS.md to AGENTS.source.md and drop its CLAUDE.md, so the consumer repository does not load the package's instructions.
  • Read the errata before the documents they correct. Keep an "errata precedence" line at the top of any derived document.

Builder check

Before a specification is handed over, a fresh reader checks every claim it makes about the consumer codebase against the code. One such check found six wrong claims in a 900-line specification. Fold the answers back in and list the calls the author made.

Output contract

When implementing, report the files changed, the labels used, each open item exposed as a parameter, and the exact proof command. When reviewing, lead with unlabelled or mislabelled constants, then inferences presented as findings, then defects ported without a decision.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.