Repository navigation
docs: simpler landing examples, Markdown docs for agents, and an ArkType skill - #1687
Merged
Merged
Conversation
…ype skill Landing page: a 1:1 section under the hero puts a TypeScript User type beside the equivalent ArkType definition, both hoverable to the same type. Card snippets now show one idea each in a few lines (errors, .extends, reduction), card copy drops the superlatives, and "Faster... everything" notes TypeScript 7 support, which testTsVersions checks as consumer@7.0.2. The 2.0 post keeps its original snippets. Docs for agents: writeMarkdown (replacing writeLlmsTxt) converts each MDX page to Markdown at build time and writes it to public/docs/<slug>.md, gitignored, which the static export serves next to each page. Twoslash cuts and directives are stripped, SyntaxTabs become labeled blocks, callouts become blockquotes, and the API and keyword tables are rendered as Markdown, with keyword rows moved to lib/keywords.ts so the page and the Markdown share them. llms.txt is the same Markdown in sidebar order rather than raw MDX in directory order. Each docs page gets Copy Markdown, View Markdown and Open in Claude/ChatGPT/Cursor actions, and a new Agents page covers the skill and Markdown docs. Fumadocs 15.2.3 predates includeProcessedMarkdown and its page-actions components, and the site is a static export without rewrites, so this generates the files directly instead of upgrading. Skill: ark/type/skills/arktype/SKILL.md, discoverable by `npx skills add arktypeio/arktype` and shipped in the arktype package for skills-npm. Its code blocks type-check on TS 7.1-dev and 5.9 and every definition in its tables parses against the current build. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Build-time Markdown generator:
ark/docs/lib/writeMarkdown.tsreplaceswriteLlmsTxt.ts, converting the 34(arktype)andattestMDX pages into per-page Markdown at/docs/<slug>.mdand rebuilding bothllms.txtfiles in sidebar order. I regenerated it against the branch and the output byte-matches the committedark/docs/public/llms.txtandark/docs/public/docs/attest/llms.txt. - Docs for agents: new
agents.mdxpage plus aPageActionsclient component (copy, view, and open in Claude / ChatGPT / Cursor), with the shared keyword data moved intoark/docs/lib/keywords.ts. - Landing page: new 1:1 TypeScript/ArkType hover section, one-idea-per-card snippets (
readableErrors,assignability,reduction), a "Teach your agent" section, and copy edits; the new twoslash snippets are registered inwriteSnippetsEntrypoint.ts/contentsById.ts. - Agent skill:
ark/type/skills/arktype/SKILL.md, shipped via"skills"in the packagefiles, withAGENTS.mdpointers. I spot-checked the inference, syntax, morph,.narrow, scope, extra-key, and keyword examples and they parse and run as written.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
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.

Makes arktype.io easier to take in at a glance and easier for coding agents to use, without changing its look.
Landing page
Hovering either
Userin the new section shows the same type:Mobile: before, after.
Usertype beside the ArkType definition, both twoslash-hoverable to the identical type.ArkErrors:runtime line),.extends(3 lines), reduction (number > 0andnumber >= 10→number >= 10). The 2.0 post keeps the old snippets.consumer@7.0.2intestTsVersionspasses locally and in CI.npx skills add arktypeio/arktypeand links to/llms.txtand the new Agents page.Docs for agents
/docs/<slug>.md, generated at build intopublic/docs(gitignored) bylib/writeMarkdown.ts, which replaceslib/writeLlmsTxt.ts.@errors/^?directives stripped,SyntaxTabsbecome labeled blocks, callouts become blockquotes,ApiTableand keyword tables become Markdown, relative links become absolute.llms.txtis now that Markdown in sidebar order with an llms.txt-style header, instead of raw MDX in directory order (which opened with the 2.0 post)./docs/agents): the skill, Markdown docs, and a line forAGENTS.md.lib/keywords.tsso the page and the Markdown share it.Agent Skill
ark/type/skills/arktype/SKILL.md: define/infer/validate, syntax table, composition, morphs,.narrow, scopes, undeclared keys, integrations, common mistakes.npx skills addfinds it (checked against a local clone)."skills"added tofiles) for skills-npm. The Agents page says this applies to releases after 2.2.8.Uint8Arrayisn't a keyword, value-side"string?"is valid, react-hook-form usesarktypeResolver).AGENTS.mdpoints at the skill and the.mdpages.Not done
/llms.txtstays the full docs rather than becoming an index plus/llms-full.txt, sinceAGENTS.mdand docs: split docs into per-project ArkType and Attest sections #1686 define it that way. Easy to split if you want the standard layout.includeProcessedMarkdownand the page-actions components, and the site is a static export with no rewrites. The build-time generator and a smallPageActionscomponent do the same job.SKILL.md: checked once.AGENTS.mdnow asks that its examples keep type-checking.Verified
pnpm buildDocssucceeds; 34.mdpages plus bothllms.txtinout/.text/markdown.pnpm typecheckRepo, prettier and eslint clean.🤖 Generated with Claude Code