Repository navigation
feat(author): the hand-over carries the source file, the build page link and where to say how it went - #191
Conversation
…ink and where to say how it went Step 5 hands over the source beside the package as <name>.source.json and both lines step 3's command now prints: the build page link that carries the source and, under it, the page's feedback section (#feedback-heading). Measured on Haiku in Claude Code's place: link and source file in all 14 runs, feedback 3 of 4 with the command. Closes #190
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/h5p-author/SKILL.md">
<violation number="1" location="skills/h5p-author/SKILL.md:216">
P2: Sources can reference local files such as `photo.jpg`, but this handoff copies only the JSON; the build-page link does not carry those bytes, so rebuilding that source fails. Include the referenced media alongside the `.source.json` with its original paths.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
|
||
| - the `.h5p` and the source; | ||
| - the `.h5p`, and its source as a file beside it, under the package's name with `.source.json` | ||
| (`course.source.json`), copied as the package was; the build page opens it too; |
There was a problem hiding this comment.
P2: Sources can reference local files such as photo.jpg, but this handoff copies only the JSON; the build-page link does not carry those bytes, so rebuilding that source fails. Include the referenced media alongside the .source.json with its original paths.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At skills/h5p-author/SKILL.md, line 216:
<comment>Sources can reference local files such as `photo.jpg`, but this handoff copies only the JSON; the build-page link does not carry those bytes, so rebuilding that source fails. Include the referenced media alongside the `.source.json` with its original paths.</comment>
<file context>
@@ -212,7 +212,12 @@ do it: the person's own play is the check, and a script of your own costs more t
-- the `.h5p` and the source;
+- the `.h5p`, and its source as a file beside it, under the package's name with `.source.json`
+ (`course.source.json`), copied as the package was; the build page opens it too;
+- both lines one of step 3's two commands printed here for this source, handed over whole: the
+ build page's link that carries it, where the user plays the package in any browser, changes the
</file context>
| (`course.source.json`), copied as the package was; the build page opens it too; | |
| (`course.source.json`), copied as the package was, and each locally referenced asset at its original relative path; the build page needs those files too; |
There was a problem hiding this comment.
Right about the link, and fixed in 774ab49: it carries the source's text, not the files it names. The build page asks for those by name once a source is opened, but a link alone cannot bring them, and a picture at a web address reaches the page only where its host allows another site to fetch it. So step 3's commands now print no link for a source that names any file (by path), only the line where to say how it went, and in the build page's route such a source goes over whole, to be pasted, its files chosen on the page.
Not taken: copying the media beside the .source.json. A video can be large, and the files are the user's already; the hand-over names the files the source reads beside it instead. Checked on Haiku with a picture in the source: no link in 3 of 3, the feedback line in 3 of 3, the picture named in 2 of 3.
…ill names no product A link carries the source's text, not the files it names (cubic's review): for a source with a path, step 3's commands print the feedback line alone, step 5 hands that line over in every case, and the build page route gives such a source whole. The build routes say what each environment needs instead of naming apps. Haiku with a picture in the source: no link 3 of 3, feedback 3 of 3; plain sources: an exact link and feedback 2 of 2. Refs #190
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/h5p-author/SKILL.md">
<violation number="1" location="skills/h5p-author/SKILL.md:160">
P2: `f` suppresses the link for every string `path`, including supported YouTube/Vimeo URLs that the browser builder keeps without downloading media. Preserve the link for URL-only media; the source fragment contains everything needed, so users otherwise have to paste it manually.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| node -e "const s=require('fs').readFileSync('source.json'),f=[];JSON.parse(s,(k,v)=>(k==='path'&&typeof v==='string'&&f.push(v),v));f.length||console.log('https://missing-elements.github.io/h5p/build/#source='+require('zlib').deflateRawSync(s).toString('base64url'));console.log('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')" | ||
| python3 -c "import base64,json,zlib;s=open('source.json','rb').read();f=[];json.loads(s,object_hook=lambda o:(isinstance(o.get('path'),str) and f.append(o['path']),o)[1]);c=zlib.compressobj(9,zlib.DEFLATED,-15);d=c.compress(s)+c.flush();f or print('https://missing-elements.github.io/h5p/build/#source='+base64.urlsafe_b64encode(d).decode().rstrip('='));print('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')" |
There was a problem hiding this comment.
P2: f suppresses the link for every string path, including supported YouTube/Vimeo URLs that the browser builder keeps without downloading media. Preserve the link for URL-only media; the source fragment contains everything needed, so users otherwise have to paste it manually.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At skills/h5p-author/SKILL.md, line 160:
<comment>`f` suppresses the link for every string `path`, including supported YouTube/Vimeo URLs that the browser builder keeps without downloading media. Preserve the link for URL-only media; the source fragment contains everything needed, so users otherwise have to paste it manually.</comment>
<file context>
@@ -153,20 +153,21 @@ for the user to play it before using it.
```bash
-node -e "console.log('https://missing-elements.github.io/h5p/build/#source=' + require('zlib').deflateRawSync(require('fs').readFileSync('source.json')).toString('base64url'));console.log('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')"
-python3 -c "import base64,zlib;c=zlib.compressobj(9,zlib.DEFLATED,-15);d=c.compress(open('source.json','rb').read())+c.flush();print('https://missing-elements.github.io/h5p/build/#source='+base64.urlsafe_b64encode(d).decode().rstrip('='));print('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')"
+node -e "const s=require('fs').readFileSync('source.json'),f=[];JSON.parse(s,(k,v)=>(k==='path'&&typeof v==='string'&&f.push(v),v));f.length||console.log('https://missing-elements.github.io/h5p/build/#source='+require('zlib').deflateRawSync(s).toString('base64url'));console.log('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')"
+python3 -c "import base64,json,zlib;s=open('source.json','rb').read();f=[];json.loads(s,object_hook=lambda o:(isinstance(o.get('path'),str) and f.append(o['path']),o)[1]);c=zlib.compressobj(9,zlib.DEFLATED,-15);d=c.compress(s)+c.flush();f or print('https://missing-elements.github.io/h5p/build/#source='+base64.urlsafe_b64encode(d).decode().rstrip('='));print('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')"
</file context>
</details>
```suggestion
node -e "const s=require('fs').readFileSync('source.json'),f=[];JSON.parse(s,(k,v)=>(k==='path'&&typeof v==='string'&&f.push(v),v));(!f.length||f.every(p=>/^https?:\\/\\//i.test(p)))&&console.log('https://missing-elements.github.io/h5p/build/#source='+require('zlib').deflateRawSync(s).toString('base64url'));console.log('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')"
python3 -c "import base64,json,zlib;s=open('source.json','rb').read();f=[];json.loads(s,object_hook=lambda o:(isinstance(o.get('path'),str) and f.append(o['path']),o)[1]);c=zlib.compressobj(9,zlib.DEFLATED,-15);d=c.compress(s)+c.flush();all(p.lower().startswith(('http://','https://')) for p in f) and print('https://missing-elements.github.io/h5p/build/#source='+base64.urlsafe_b64encode(d).decode().rstrip('='));print('How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading')"
Closes #190.
A chat that builds the package itself hands it over in the chat, and its user never sees the build page and its "How did it go?". On 0.9.4's text, Haiku with the skill, a shell and npm handed the source over as a file in 2 of 3 runs, unasked, and never a link to the build page or where to say how it went.
What changes
SKILL.md, step 5 hands over, beside the package:.source.json(course.source.json), copied as the package was, and the files it names, said by name, since a build reads them beside it; the build page opens the source file too;How did it go? Say so by email or on GitHub: https://missing-elements.github.io/h5p/build/#feedback-heading. For a source that names a file (anypath) they print that line alone: a link carries the source's text, not its files. In the build page's route such a source goes over whole, to be pasted, its files chosen on the page. Both commands run as written: each link decodes to the source byte for byte, and both print the same for a source with files.design/author.mdsays why and what was measured, in two rules. Its count of rules said "Nineteen" with 22 there before these; it now says twenty-four.The feedback address is the build page's own section, so where feedback goes (email first, or a GitHub discussion) stays the org site's to change, in one place, and the page must keep the id. A fragment without
sourcebuilds nothing there (sourceFromFragmentreadssourcealone); opened in Chromium at 1280 and 390 px wide, "How did it go?" is in view once the page has settled, with no error.cubic's review
.source.json. A video can be large, and the files are the user's already; the hand-over names them instead.Tested
Haiku in Claude Code's place: the skill, a shell, npm, the verifier left out (no browser), the author and licence given. A script read each run's reply and files: the source file beside the package and equal to the one built, every build page link decoded and held to that source, the feedback address, and for a source with a picture, that no link was given and the picture was named.
A three-question Question Set:
One Multiple Choice question with the user's drawing above it:
The links were 1,200 to 1,520 characters for three questions. A weak model shortens step 5's list as it writes it out, while what a command printed reaches the reply: a link always, and the line under it, but a line explaining why there was no link was written in the model's own words with the address left out. A first round with a picture of the project's banner was dropped: Haiku looked at the picture and refused to put it above a question about river deltas, and the drawing used instead matches its question.
No test covers
SKILL.md's text; CI runs the suites.After merge
npx skills update -g, and a new zip for the Claude app.Not verified
Summary by cubic
The skill's hand-over now carries the source file, the build page link, and where to say how it went, so a chat that builds the package itself gives its user the same play, rebuild, and feedback options the build page offers.
.source.jsonfile beside the package, plus both lines step 3's command now prints: the build page link carrying the source, and the feedback address under it.design/author.mddocuments why, and its rule count updates from nineteen to twenty-four.Written for commit 774ab49. Summary will update on new commits.