Skip to content

feat(author): the hand-over carries the source file, the build page link and where to say how it went - #191

Merged
alekswebnet merged 2 commits into
mainfrom
feat/author-hand-over
Nov 12, 2026
Merged

alekswebnet merged 2 commits into
mainfrom
feat/author-hand-over

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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:
    • the source as a file under the package's name with .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;
    • what step 3's command printed for this source: the build page's link that carries it, where the user plays the package in any browser, changes the source and builds it again, and in every case the line where they can say how it went. A link is still only what a command printed.
  • Step 3's two commands, Node's and Python's, print a second line under the link: 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 (any path) 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.
  • The skill names no product. The build routes said "Claude Code", "ChatGPT" and "Gemini"; they now say what each environment can do, and what a name carried stays as what an agent can observe: the registry's errors, a sandbox that downloads only what a browsing tool has opened, a code tool that can be unavailable for hours.
  • design/author.md says 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 source builds nothing there (sourceFromFragment reads source alone); 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

  • Files a source names (P2): right about the link, which carries the source's text only. The page asks for those files by name, but a link cannot bring them, and a picture at a web address reaches the page only where its host lets another site fetch it. So such a source gets no link, decided by the source and not by its type: nearly every type takes media, and most sources name none.
  • 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 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:

Skill text Runs Source file Link that decodes to the source Where to say how it went
0.9.4 3 2 0 0
The feedback line last in step 5's list 3 3 3 2
The feedback line third in the list 3 3 3 1
"End the reply with" it 4 4 4 3
Printed by step 3's command under the link 4 4 4 3; the fourth sent the user to the link's page
This PR: printed by the command, "in every case" in step 5 2 2 2 2

One Multiple Choice question with the user's drawing above it:

Skill text Runs Source file No link Picture named Where to say how it went
The commands print why there is no link, then the feedback line 3 3 3 3 0
This PR: the feedback line alone 3 3 3 2 3

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

  • h5p-author 0.9.5, a patch (the skill's text), then the org site's pin, for chats that read the skill by link.
  • npx skills update -g, and a new zip for the Claude app.

Not verified

  • The Claude app's sandbox and other chat apps: only Haiku in a shell was run, so the routes reworded without app names were not run in the apps they describe.
  • A long source: a book's link was not tried.

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.

  • Step 5 hands over the source as a .source.json file 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.
  • A link carries a source's text, not the files it names, so for a source that names files step 3's commands print the feedback line alone, step 5 hands it over in every case, and the build page route gives such a source whole for pasting.
  • The build routes now describe what each environment needs (a shell reaching the npm registry, Node with fetching, or a browser) instead of naming products.
  • Measured on Haiku: all 14 runs handed over the source file and a working link; the feedback line reached 3 of 4 replies, with the fourth sent to the link's page.
  • design/author.md documents why, and its rule count updates from nineteen to twenty-four.

Written for commit 774ab49. Summary will update on new commits.

View guided diff Turn on auto-fix

…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
@alekswebnet alekswebnet added the enhancement New feature or request label Nov 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread skills/h5p-author/SKILL.md Outdated

- 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;

@cubic-dev-ai cubic-dev-ai Bot Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
(`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;
Fix with cubic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +160 to +161
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')"

@cubic-dev-ai cubic-dev-ai Bot Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')"
Fix with cubic

@alekswebnet
alekswebnet merged commit f254944 into main Nov 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

h5p-author: a package built in the chat comes with no source file, no build page link and nowhere to say how it went

1 participant