chore: publish the corpus as @taskless/cli/reference.json - #260
Merged
Conversation
The subpath carried the word "demo" into a name consumers type. What the file holds is a conformance corpus -- prompts, rules, held-out cases and the constraints `verify` enforces -- and the demonstration command is one of the things built ON that data rather than what the data is about. Asset renamed to match the subpath, so `exports` and the file agree and neither has to be read to predict the other. The changeset is amended rather than added to. This changeset has not been released: the version PR is still open and the only thing carrying the old name is last night's nightly, which is republished from main on every merge. So the release note describes the name that will actually ship, and one change still gets one note. Internal names keep the "demo" prefix on purpose -- the generator script, its `demo:reference` task, and the test are all specifically about the demonstration rules, and renaming them would churn without making anything truer. Verified the asset guard still refuses a mis-declared export by removing `files` and watching the build fail with the message naming the new path, and confirmed the tarball carries `assets/reference.json`.
Follows the subpath rename through the code. The `sg` and `vale` entries are reference material too -- they are simply not what the demo command writes -- so scoping the corpus to "demo" was wrong in the same way the published name was. Moves, by what each file is actually about rather than by where it started: src/rules/demo/reference.ts -> src/rules/reference.ts src/rules/demo/constraints.ts -> src/rules/constraints.ts The constraints move furthest and had the least business being there: they describe what `verify` and `test` enforce on ANY rule. Nothing about them is demonstration-specific, and filing them under `demo/` implied a scope they never had. `src/rules/demo/` keeps `manifest.ts` and `rule.ts`, which really are the rules the demo command writes. Identifiers follow: buildDemoReference -> buildReference, DemoReference -> Reference, DEMO_REFERENCE_* -> REFERENCE_*. Script and task follow too: `write-demo-reference.ts` -> `write-reference.ts`, and `demo:reference` -> `reference`. Tests renamed to match the modules they cover. `demo:manifests` and `print-demo-manifests.ts` keep the prefix, and that is the line: they exist so CI can stage what the demo command writes, which is genuinely about the demo. No behaviour change. The payload is byte-identical -- regenerated after the move and it matched -- and the asset guard was re-broken to confirm it still refuses a mis-declared export under the new path.
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.
Renames the published subpath from
@taskless/cli/demo-reference.jsonto@taskless/cli/reference.json, and follows that through the code.Why
The name carried "demo" into something consumers type, and into modules whose
subject is broader than the demo command. The
sgandvaleentries arereference material too — they are simply not what
taskless demowrites. Soscoping the corpus to "demo" was wrong in the same way the published name was.
Moves, by what each file is about
The constraints move furthest and had the least business being under
demo/:they describe what
verifyandtestenforce on any rule. Nothing aboutthem is demonstration-specific, and the old location implied a scope they never
had.
src/rules/demo/keepsmanifest.tsandrule.ts— those really are the rulesthe demo command writes.
Identifiers and tasks follow:
buildDemoReference→buildReference,DemoReference→Reference,DEMO_REFERENCE_*→REFERENCE_*,write-demo-reference.ts→write-reference.ts,demo:reference→reference. Tests renamed to match the modules they cover.demo:manifestsandprint-demo-manifests.tskeep the prefix, and that isthe line: they exist so CI can stage what the demo command writes.
The changeset is amended, not added to
It has not been released — the Version Packages PR is still open, and the only
artifact carrying the old name is last night's nightly, republished from
mainon every merge. So the release note describes the name that will actually ship,
and one change still gets one note.
Verified
filesandwatched the build fail:
npm notice 12.8kB assets/reference.json./reference.json -> ./assets/reference.json,rules: sg,vale,runtime,constraints: 7No behaviour change.