Skip to content

ForceDirectedLayout/README.md publishes the pre-tuning defaults and then asserts they are the measured ones #391

Description

@matt-edmondson

What happens

Commit d99d704 ("Tune the layout defaults against the benchmark corpus") moved six settings and updated LayoutSettings.cs, PhysicsSettings.cs and CLAUDE.md — but not ForceDirectedLayout/README.md, whose last commit is the earlier 1da8962.

The README's "Tuning" block still carries every pre-tuning value:

README actual (ForceDirectedLayout/LayoutSettings.cs:131-150)
RepulsionStrength = 600_000.0 (README:107) 900_000.0
LinkSpringStrength = 0.5 (README:108) 0.1
RestLinkLength = 225.0 (README:109) 50.0
DirectionalBias = 0.5 (README:110) 4.0
LinkFlatteningStrength = 0.5 (README:111) 3.0
MinRepulsionDistance = 50.0 (README:117) 5.0

Those six are exactly the six rows of CLAUDE.md's "Tuned defaults" table — the README is publishing its was column as current.

The paragraph immediately below, at README:127, then says:

These values were not guessed. […] that is how a new default gets found.

Why it matters

This is the NuGet package README for ktsu.ForceDirectedLayout, so it is the primary reference for anyone outside the repo.

MinRepulsionDistance = 50.0 is actively harmful to copy: CLAUDE.md records that a value that high is what "used to let bodies crowd". The README comment beside it — "so touching bodies push hard, not infinitely hard" — also now contradicts LayoutCore.cs:287's MinimumRepulsionClamp, which is what actually keeps the law finite since aebc684.

So a reader following the README gets the pre-tuning behaviour the corpus was built to fix, with a paragraph underneath assuring them the numbers were measured.

Suggested fix

Sync README:106-124 to LayoutSettings.Defaults, and add a note that MinRepulsionDistance is floored internally.

Secondary: ImGui.NodeEditor/README.md:126-130 shows RepulsionStrength = 1_200_000.0 / LinkSpringStrength = 0.5 / RestLinkLength = 225.0. That block reads as illustrative rather than as a defaults listing, but it is stale in the same direction and worth correcting in the same pass.

Worth considering whether the defaults table can be generated or test-asserted, since this is the second document that has to move whenever a default does.

Activity

  1. matt-edmondson commented on Sep 11, 2026

    @matt-edmondson
    ContributorAuthor

    Triage

    Priority: Medium Effort: Small

    What needs to be done: ForceDirectedLayout/README.md's tuning table still shows the six pre-tuning default values that commit d99d704 moved (and that CLAUDE.md's "Tuned defaults" table correctly documents), with prose directly underneath asserting the numbers were measured. The stale MinRepulsionDistance = 50.0 is actively harmful to copy — CLAUDE.md records that value as what "used to let bodies crowd" — and its accompanying comment now contradicts the actual MinimumRepulsionClamp behaviour.

    Suggested next steps / acceptance criteria:

    • Sync README:106-124 to LayoutSettings.Defaults, and add a note that MinRepulsionDistance is floored internally (per the LayoutSettings.cs invariant this repo documents elsewhere).
    • Also correct ImGui.NodeEditor/README.md:126-130's stale illustrative values in the same pass, per the issue's secondary note.
    • Consider whether the defaults table can be generated or test-asserted against LayoutSettings.Defaults so it can't drift out of sync a second time (worth a follow-up issue if out of scope here).

    Blockers / dependencies: None identified. Docs-only change, no code risk.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions