Improve F# / Expecto docs and clarify text snapshot encoding conventions #1699
Replies: 3 comments 3 replies
-
|
have u tried the Getting Started Wizard? https://github.com/VerifyTests/Verify/blob/main/docs/wiz/readme.md |
Beta Was this translation helpful? Give feedback.
-
|
I post this as help to others who might be having issues concerning AI assistance: My prompt in my
Codex reply:
So the point is that when you are working with AI coders, and they/you want to use a package, instruct them to "Read the #%$# docs" - basically, same as for humans. Guess I should have taken my own advice, which I will now! |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the delay in response. Right after this my VM crapped out and I had to do some gymnastics to recover the AI history. However, Claude Code came to the rescue and helped me. I asked him to review what that session was doing and he gave me the following to pass along:
To answer your question — the first thing Codex did was crack open the DLL. It reflected over the assembly to figure out the API surface before writing any code. It never consulted the README, the wizard, or the NuGet page first. That's the root cause of the BOM/encoding issues we went through: it reasoned from the types and method signatures alone, without the context the docs would have provided. A few things that would help, ordered roughly by how directly they address that path: 1. These are baked into the binary itself. Any tool that reflects over the DLL — ILSpy, dotnet-reflect, Codex — sees them without needing the companion XML file: [assembly: System.Reflection.AssemblyMetadata("docs", "https://github.com/VerifyTests/Verify/blob/main/docs/wiz/readme.md")]
[assembly: System.Reflection.AssemblyMetadata("getting-started", "Before writing any code, run the Getting Started Wizard at the docs URL above — it generates exact setup for your test framework, language, and OS")]This is the most robust option for the DLL-inspection path specifically. 2. XML The /// <remarks>
/// Before first use, follow the Getting Started Wizard:
/// https://github.com/VerifyTests/Verify/blob/main/docs/wiz/readme.md
/// It generates the exact setup for your test framework, language, and OS.
/// </remarks>3. Emerging standard specifically for this problem — https://llmstxt.org. AI agents that follow this convention check it before anything else. Put the wizard link, the conventions link, and a short "start here" summary in it. Won't help for the DLL-inspection path, but catches agents that start from the repo or docs site. 4. README: wizard first, before installation steps AIs weight the top of a README heavily. Putting the wizard link after installation steps means it gets skipped when an AI synthesizes from the README. Moving it to the first line after the title would help: 5. NuGet package description Include the wizard URL in The I would be happy to do a PR for these changes if you like, or you can take the advice and change for yourself. Let me know. :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I’ve been using Verify from F# with Expecto, and I think there’s an opportunity to make that path easier to discover and understand.
The current docs are useful, and I may have missed some existing guidance, but a few things were not obvious until I dug further than I expected.
What was confusing
From the perspective of an F# / Expecto user, it would help to have clearer guidance on:
.verified.*files is expected behavior or something to “fix”This led to extra investigation just to confirm whether generated files were correct.
What would help
A few documentation improvements would go a long way:
.received.*/.verified.*filesWhy this matters
This would make the F# / Expecto path easier to adopt and reduce the need to inspect generated files at the byte level just to understand expected behavior.
It would also help separate:
Possible docs additions
Any of these would help:
Example of the clarification I was looking for
Something as simple as this would have helped:
EF BB BF.If this would be welcome, I’d be happy to turn it into a more concrete docs PR proposal.
Beta Was this translation helpful? Give feedback.
All reactions