Repository navigation
fix(author): problems that say what to write, for a chat without the type's file - #173
Merged
Merged
Conversation
…type's file (#172) A chat with the skill's text and no type file learns a type's shape from the build's problems alone. Measured with Haiku 5.5 on five content types, three runs each: with 0.6.0's messages 3 of 15 built at once, 13 by the fourth round, and two scenarios never. - Sub-content written in the place of the group that holds it, a field a level above its group, and the params of the one library a field takes without their sub-content are each said once, by their path and with what to write, then put where they belong and checked in the same build. - The last check takes no count of a list the generator refused an item of: a book whose chapters were refused had "0 items" besides. - A field that takes several libraries names them all, not the first. - A scenario's question with no alternatives is not reported as a loop too. - A problem's list of fields names those an author writes, and the interface texts as one. - The package carries the skill's type files, references/types/, for the build page to hand back with a source's problems. - The skill says where a Column, a slide and a book hold their sub-content, and gives the type files' address. With these messages the same replies built 12 by the second round and all 15 by the third; with the type's file beside the first problems, all 15 by the second; with the skill's new sentence, 9 of 9 books, pages and slides at once. Closes #172
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 13 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…name } too (#172) loadLibraries read a library field's options as strings, where the generator reads a name or { name }, so the two could disagree on which library is a field's only one. It now reads them with the generator's libraryOptions.
) A Game Map source that wrote `map` for the picture was told it is a field of behaviour, whose `map` holds the map's labels and fog: the name alone matched, and the next problem listed fields the author never meant. An object is now taken to a group only where it writes one of the group's fields. Found by running the weak-model test on the 23 other content types the skill lists. design/author.md records that measurement: the new messages are for a type's levels and make no difference there (36 of 46 right by round four, 35 before); the type's file does (42 by round two handed back, 28 of 28 at once given first).
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…ts where it is (#172) An object was moved into a group when it wrote a field of that group, and the group's interface texts counted as such a field. An object that held only `l10n` was sent to the group that has one, checked there, and the problem named a label's place instead of saying it is no field here. A source does not write interface texts, so they prove nothing about where an object belongs: takes() now skips them, as homesOf already does for the field it looks for. An object that also writes a field of the group is moved as before. In the pack only three groups hold labels beside author fields (Branching Scenario, Image Hotspot Question, Information Wall), all as `l10n`. cubic's finding on b20ed8d.
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.
Closes #172.
A chat in a browser has the h5p-author skill's text, no type file and nothing to run, so it learns a content type's shape from the build's problems. Gemini in Chrome could not build a simple Interactive Book that way. This makes the problems say what to write, lets the build page hand the type's file back, and puts one sentence in the skill.
Measured
The weakest Claude model, Haiku 5.5, in that position: SKILL.md's text only, each reply built as the build page builds it, its problems pasted back in the page's words, up to four rounds. An Interactive Book, a Course Presentation, a Column, a Question Set and a Branching Scenario, three runs each. Every row but the last starts from the same 15 first replies.
Every package built, in every row, plays (h5p-verify) and holds what was asked for. The third row was run twice, once with a draft of the first message's wording, and each time the 12 runs that had failed built in the next round.
What changes
The problems (
lib/generator.mjs,lib/build.mjs). What cost the rounds was a type's levels, not its fields. Three things are now said once, by their path and with what to write, then put where they belong and checked in the same build, with what is wrong inside named by where the source has it:The first was three or four problems an item, one of them a list of 35 libraries. The other two hid everything written inside them until the next build.
params.chapters: has 0 items, which was not so, and is the line Gemini quoted.lib/types.mjs).loadLibrariesloads the only library a field takes whether or not the source names it, which is what reads a chapter without its Column. Its translation is reported only where the content names it, as before.The type files in the package (
package.json,scripts/copy-type-files.mjs).prepackcopies the skill'sreferences/types/*.mdinto the package, each an export. The build page has the package and no skill: with them it can copy the type's file along with a source's problems. That page change is a separate pull request in missing-elements.github.io, after this is published.The skill (
skills/h5p-author/SKILL.md). Its line on sub-content says where a Column, a slide and a book hold theirs, and it gives the type files' address on GitHub for a chat that has its text and can open a link.Tested
pnpm --filter @missing-elements/h5p-author test: 171 pass, the page's build in Chromium among them. New tests for each message, for the cases where nothing is guessed, for the list count, and for the copied type files.pnpm --filter @missing-elements/h5p-skills test: 77 pass, so every type file's example still builds and plays.tests/sweep-content.test.ts: 5 pass. The author'stypecheckpasses.To release
h5p-author 0.7.0: two public members on
ContentGenerator(moved,shortened) and a new export. Then the build page's pull request, andnpx skills update -gfor installed copies of the skill.The other 23 listed types (added with b20ed8d)
The same test on the 23 content types the first run left out, two runs each: 46 first replies, each built package checked against what its task asked for.
So this PR is for a type's levels: a book, slides, a page, a scenario. On the other types it makes no difference, because there a weak model does not know the field names (
options,sequenceImages,questionnaireElements) and a problem tells it one level's names a round. The type's file is what works for every type, which is what the build page hands back once this is released. Every package built in the last two rows plays (h5p-verify).One misleading message of this PR's own showed up in that run and is fixed in b20ed8d: a Game Map source that wrote
mapfor the picture was told it is a field ofbehaviour, whosemapholds labels and fog. An object is now moved only into a group it writes a field of, not one of its interface texts (3b82230, cubic's finding on b20ed8d).Summary by cubic
Fixes the h5p-author build's problems so they say what to write, which lets a chat that has only the skill's text build content it could not before.
Bug Fixes
mapwritten for the picture is not sent tobehaviour.map, which holds the map's labels and fog.loadLibrariesreads a field's options as the generator does, a name or{ name }, so it loads the same one library the generator reads as a field's only one.New Features
prepackcopies the skill's type files into the package asreferences/types/<Type>.md, each an export, for the build page to hand back with a source's problems.Written for commit b20ed8d. Summary will update on new commits.