Skip to content

Eliminate "describe the diff, not the code" pattern #73

@preference-kim

Description

@preference-kim

I noticed a common AI writing pattern not yet covered: diff-anchored writing, where documentation or comments describe what changed rather than what is, making them unreadable without knowing the prior state.

This is distinct from version-scoped documents like release notes or changelogs, where referencing changes is expected.

Before:

This function was added to replace the previous approach of iterating through all items. The old method caused O(n²) performance, so we now use a hash map instead.

After:

This function uses a hash map for O(1) lookups per item, avoiding the O(n²) cost of naive iteration.

Before:

We removed the legacy_auth middleware because legal flagged it for storing session tokens in a non-compliant way. The new implementation uses encrypted cookies.

After:

Authentication uses encrypted cookies for session storage, meeting the current compliance requirements for token handling.

Happy to submit a PR if this fits the project's direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions