Skip to content

docs: replace drifted hard line numbers in agent-docs with symbol refs #458

Description

@vivek7405

Problem

agent-docs/lit-muscle-memory-gotchas.md (the SSR-contract section) points to "See `packages/core/src/render-server.js` around line 357", but the pre-render lifecycle code it refers to now lives at ~line 419, a ~60-line drift. The claim itself is still accurate; only the embedded line number has rotted.

Hard-coded line numbers in prose docs rot every time the referenced file changes, and nothing flags the drift. This was caught during a full re-verification of lit-muscle-memory-gotchas.md against the current source (every other claim in that file checked out against @webjsdev/core/src + check.js; this stale line ref was the only issue).

Design / approach

  • Fix the immediate reference in lit-muscle-memory-gotchas.md: drop the line number and refer to the function/symbol instead (e.g. "see the pre-render pass in render-server.js"), which stays correct as the file moves.
  • Sweep the rest of agent-docs/*.md (and nested AGENTS.md files) for other around line N / :N style hard references with grep -nE 'line [0-9]+|\.js:[0-9]+' and replace them with symbol/function-name references the same way.
  • Prefer naming the function, rule, or exported symbol over a line number anywhere a doc points into source, so references survive refactors.

Acceptance criteria

  • The render-server.js "around line 357" reference in lit-muscle-memory-gotchas.md no longer cites a line number
  • Other hard line-number references in agent-docs/*.md are replaced with symbol/function references (or confirmed none remain)
  • No behavioural code change; docs-only

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions