Uh oh!
There was an error while loading. Please reload this page.
fix: give hand-authored toolkit prose a source home in curation/ - #1112
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
documentationChunks, customImports, and subPages have no upstream source — they lived only inside the generated data/toolkits/*.json and survived by carry-forward from the previous artifact. --force-regenerate and --overwrite-output set the previous-output directory to undefined, silently deleting all hand-authored prose (82 chunks and 2 subpages across 75 toolkits). Extract that prose into per-toolkit curation/<toolkitId>.json files and read them back through --custom-sections, which the merger treats as authoritative over carry-forward. The nightly workflow now passes --custom-sections ./curation, so a forced regeneration preserves prose instead of wiping it. - custom-sections-file source now loads a directory of per-toolkit files (single-file layout still supported) - scripts/extract-curation.ts is the one-time, re-runnable extractor - curation/ is excluded from biome like its sibling data/toolkits/ - regression test asserts prose survives --force-regenerate Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e2a5fac to
0587043Comparescripts/ is not type-checked today; #1106 widens the generator project to cover it, and under exactOptionalPropertyTypes plus noUncheckedIndexedAccess this PR's files do not compile. Fixing it here keeps the PR green whichever order the two land in. - isNonEmptyArray returned boolean, so it narrowed nothing and the caller compensated with an 'as DocumentationChunk[]' cast. Making it a type predicate narrows properly and lets the cast go. - previousToolkit is declared optional but --force-regenerate and --overwrite-output pass it explicitly as undefined, which exactOptionalPropertyTypes rejects. The type now says '| undefined', matching what callers actually do — that explicit undefined is the exact scenario the prose regression test covers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The sibling generator scripts (validate-merge, sync-toolkit-sidebar, check-stale-summaries, report-tool-metadata) resolve data/toolkits through the shared resolver, which anchors on the repo root. This script used bare relative paths, so it only worked when invoked from toolkit-docs-generator/ and failed from the root — two conventions for the same directory. Anchor on the script's own location instead, matching how verify-toolkit-join, sync-toolkit-sidebar, and validate-merge already use import.meta.url. It now works from either directory. Verified from both: identical output, 75 files. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
When a curation file exists, treat its contents as authoritative so an
empty {} file deletes hand-authored prose instead of carrying it forward.
check-changes now diffs curation against committed artifacts too.
Co-authored-by: Cursor <cursoragent@cursor.com>Uh oh!
There was an error while loading. Please reload this page.
Resolve custom-sections-file conflict and align curation diff with merge semantics so only toolkits with curation files are considered changed. Co-authored-by: Cursor <cursoragent@cursor.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use valid MergedToolkit metadata and documentation chunk types so the generator typecheck passes under the widened tsconfig from main. Co-authored-by: Cursor <cursoragent@cursor.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e382f1. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
sdserranog
left a comment
There was a problem hiding this comment.
This is nice! I like the curation idea, and thanks for adding the context in the Architecture and README files. It would be good to have a skill or something more in-depth for creating one. The examples will help the agents a lot, but I'd also like a table or document that covers the types of curation files, how each frontmatter key works, and what you can do with them.
Validate curated `tool:` targets before the recoverable merge path so a mistyped target fails the run instead of landing in preserve-last-known-good recovery, where the toolkit would keep stale data and drop the chunk while CI stayed green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Deterministic gate answering one question: does joining the catalog snapshot with the enrichment and curation layers through the real merger still reproduce the toolkit JSON we ship? Rebased onto main after #1112 squash-merged, and re-verified against it: - `curationSourceHash` joins `generatedAt` as ignored. It records which curation produced a file, not anything a reader sees, and no committed artifact carries it until the next nightly writes one. - `customImports` is no longer exempt. Curation now compiles `imports/*.mdx`, so all 119 toolkits reproduce their imports and the exemption would hide a real parity dimension. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…#1125) Follow-up from Sergio's review of #1112, which gave hand-authored toolkit prose a home in curation/ but documented the format only by example. Adds toolkit-docs-generator/CURATION.md as the format reference: the three file kinds, every frontmatter key with allowed values and effect, a slot-order table for toolkit-level chunks and a per-location table for tool-level ones, the authoritative-directory rule, and every failure message. Reading the renderers to build those tables turned up behavior the naming contradicts, now stated explicitly: - `position` is a slot name, not a spatial relation. All four toolkit-level header/description slots render above the generated summary. - Several accepted combinations render nowhere — `replace` on description, auth, and custom_section; parameters/secrets/output at toolkit level. - Filenames don't set display order. The renderer re-sorts each slot by priority, then header, then body, ignoring array order. - `type: section` renders as a default callout, since the renderer has no case for it. - imports/ and pages/ reach the JSON but nothing in the app reads them. Adds .claude/skills/curate-toolkit-docs/ as the procedure an author or agent follows to add curation and verify it. Adds a `validate-curation` CLI command so that verification is possible without Engine credentials: it compiles the directory with the same code generation uses and reports per toolkit. To report every broken toolkit instead of dying on the first, the directory walk moves into `compileCurationDirectory`, which returns a result-or-error per toolkit; MarkdownCurationSource consumes it and still throws on the first error, so generation behavior is unchanged. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

Why
Hand-authored toolkit prose was stored only in generated
data/toolkits/*.json. A forced regeneration has no previous output to carry forward, so it could silently deletedocumentationChunks,customImports, andsubPages.This gives that content a durable source of truth in
curation/, so nightly generation can rebuild the JSON without losing editorial work.How it fits
The curation layer supplies the fields that do not come from an upstream API or LLM. It is loaded through the existing
--custom-sectionspath and takes precedence over carry-forward from previous output.Changes
--custom-sections ./curation.Verification
Independent of #1106 and #1113; #1111 documents the hazard this fixes.
Note
Medium Risk
Large docs corpus and generator pipeline changes affect nightly doc output and merge behavior; failures are mostly explicit validation rather than silent data loss.
Overview
Hand-authored toolkit docs (
documentationChunks, imports, subpages) now live intoolkit-docs-generator/curation/<toolkit>/as YAML-frontmatter MDX instead of only in generated JSON. A newMarkdownCurationSourcecompileschunks/,imports/, andpages/into the existing custom-sections shape; the old JSON file loader is removed.When a curation root is configured (default
./curationif present, and--custom-sections ./curationin the nightly workflow), that tree is authoritative: missing toolkit folders mean empty prose, deleting the last file clears content on the next run, and invalid frontmatter/MDX or bad tool targets fail the build rather than preserving stale JSON. Merge logic stops carry-forward from previous output in that mode, storescurationSourceHashon artifacts, and limits secret-coherence LLM rewrites on curated chunks (warn only).check-changesand--skip-unchangednow treat curation edits like API changes viagetChangedToolkitIdsFromCustomSections. The PR adds the extracted per-toolkit MDX corpus plus regression tests (force-regenerate, corpus parity with committed JSON).Reviewed by Cursor Bugbot for commit 99ec7ab. Bugbot is set up for automated code reviews on this repo. Configure here.