feat: new libraries ship the agents page and the copy-page control - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every library in the organisation is getting two things this week:
docs/agents.md, the one page you hand a coding assistant instead of the whole site, and a Copy page control that hands any page to a chat window as Markdown. A library generated from this template should not have to be retrofitted the day after it is created, so it now starts with both.What a generated project gets
docs/assets/javascripts/copy-page.js,docs/assets/stylesheets/copy-page.css,overrides/main.html,scripts/emit_markdown.py— the four shared files, byte-identical to the ones in every other repository, wired intozensical.tomland the Docs workflow. The script writes each page a second time as raw Markdown next to its HTML, which is what the control fetches.docs/agents.md— a skeleton with the sections that carry weight andTODOwhere the author has to write. It is in the nav, so a build fails while it is missing rather than shipping an empty promise.docs/reference/index.mddeclines both withcopy_page: false: its Markdown is instructions to a docstring renderer, not the API.CONTRIBUTING.mdsays the page is part of the public API and changes in the same pull request the API does, and the pull request checklist names it on the documentation line.What the author is told
NEW_LIBRARY_CHECKLIST.mdgains a step right after the local setup, and.claude/LIBRARY_CREATION.mda section of its own, both saying the same thing: fill the page in from the API you actually wrote, verify every name it tells a caller to import, delete the guidance comment, and do not commit theTODOmarkers. The clean-repository checklist and the common-mistakes list now cover it too.Verified by generating one.
copier copyinto a scratch directory, thenzensical build --cleanreports no issues,emit_markdown.pywrites 6 pages with 1 declined, and the built HTML carriesdata-copy-site="demo-lib"— the control takes the project's name fromconfig.site_name, which is why the script is the same file everywhere.