agentleFS
salvo8519salvo8519/fairmark/.claude/skills/golden-case/SKILL.md

golden-case

Skill1 starsChanged 3 days agoApache-2.0View on GitHub

Author a golden test case for a Fairmark method with expected values from an independent source. Use when adding coverage for a method or an acceptance criterion.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use only anonymised or synthetic data.

    line 32
  2. Very specific:

    Run cargo test -p fairmark-core --test golden and uv run pytest python/tests/test_golden.py.

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
<!-- Generated from .agents/skills/golden-case/SKILL.md by scripts/sync_agents.py. Edit the source, not this file. -->
  1. Choose the source of truth, in order of preference: a practitioner model supplied by the maintainer; a published worked example re-derived by hand; an independent reference implementation in scripts/reference_values.py (Python decimal, precision 50, written from the formula, not from the Rust code).
  2. Create tests/golden/<method>/<kebab-case-name>.yaml:
    # Source: <where the expected values come from>
    method: <method id>
    description: <one line>
    input: { ... }            # amounts and rates as strings, e.g. "0.085"
    expect: { field: "value" }
    tolerance: "0.000000001"
    Keys of expect are top-level fields or JSON Pointers (/years/0/total) into the result value. To assert documented defaults, add expect_meta with JSON Pointers into meta, for example /defaults_applied/0/field; it is compared like expect and protected like it. To assert that a list has no entry beyond those asserted, add expect_length with JSON Pointers into value and the expected count, for example /not_computed: "3". An error case (expect_error) may add expect_error_report with JSON Pointers into the error report (ADR 0014 G5), for example /pointer, /reason, /pointers/1 or /errors/2/pointer; values are compared exactly (null for a null field) and protected like expect. In an error case, expect_length counts arrays of the error report, for example /errors: "3", so that no error beyond those asserted is reported. Do not assert /fix: its wording is not part of the contract.
  3. Use only anonymised or synthetic data.
  4. Run cargo test -p fairmark-core --test golden and uv run pytest python/tests/test_golden.py.
  5. Existing golden files are protected by a hook: never edit them; propose a numerical-change to the maintainer instead.

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.