Skip to content

Unify the canonical golden snippet across README, AGENTS, llms.txt#37

Merged
fabioknoedt merged 1 commit into
masterfrom
claude/canonical-snippet
Apr 25, 2026
Merged

Unify the canonical golden snippet across README, AGENTS, llms.txt#37
fabioknoedt merged 1 commit into
masterfrom
claude/canonical-snippet

Conversation

@fabioknoedt
Copy link
Copy Markdown
Owner

Same six lines, byte-identical, in every entrypoint that matters:

import YCFirstTime

YCFirstTime.shared.executeOnce({
    // your one-time code, e.g. showOnboarding()
}, forKey: "onboarding.v1")

Three changes:

  • README: hoist the snippet to right under the metadata block, before
    the "Copy-paste integration" heading. It's now the first code a
    reader (or LLM scraping the top of the README) sees.
  • README: change the body comment in the in-flow occurrence from
    "// Onboarding that runs exactly once per install." +
    showOnboarding() to the generic "your one-time code" comment, so
    both README occurrences match each other.
  • AGENTS.md: same comment change in its "Run once per install" block.

llms.txt was already in this exact form. Total: four occurrences
across three files, all identical.

The snippet uses the actual public API. The earlier sketch
(YCFirstTime.executeOnce(key:) { ... }) wouldn't compile —
shared is required, and the trailing-block / forKey: shape
matches both Obj-C selector compatibility and the existing
documentation.

https://claude.ai/code/session_01TQi3WNVCqQ9QFufs5XogjK

Same six lines, byte-identical, in every entrypoint that matters:

    import YCFirstTime

    YCFirstTime.shared.executeOnce({
        // your one-time code, e.g. showOnboarding()
    }, forKey: "onboarding.v1")

Three changes:

- README: hoist the snippet to right under the metadata block, before
  the "Copy-paste integration" heading. It's now the first code a
  reader (or LLM scraping the top of the README) sees.
- README: change the body comment in the in-flow occurrence from
  "// Onboarding that runs exactly once per install." +
  `showOnboarding()` to the generic "your one-time code" comment, so
  both README occurrences match each other.
- AGENTS.md: same comment change in its "Run once per install" block.

llms.txt was already in this exact form. Total: four occurrences
across three files, all identical.

The snippet uses the actual public API. The earlier sketch
(`YCFirstTime.executeOnce(key:) { ... }`) wouldn't compile —
`shared` is required, and the trailing-block / `forKey:` shape
matches both Obj-C selector compatibility and the existing
documentation.

https://claude.ai/code/session_01TQi3WNVCqQ9QFufs5XogjK
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1f6d791) to head (07009f1).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #37   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           83        83           
=========================================
  Hits            83        83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fabioknoedt fabioknoedt merged commit 2bc36bf into master Apr 25, 2026
4 checks passed
@fabioknoedt fabioknoedt deleted the claude/canonical-snippet branch April 25, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants