feat(author): build routes as files, one question at most, every fact once; a page makes the link; the verifier is not waited for

Merged
AL
27m ago
+471-263

Closes #202. Closes #204.

Where ChatGPT cannot build, it hands over a link to the build page that it copies from a command's output, and it damages some of them; with its code tool unavailable there is no link at all. ChatGPT shows an html code block of a reply as a page, under Preview, on a free account too. This PR has a chat that built nothing write a small page whose script makes the link in the user's browser, so nothing compressed is typed or copied and no code tool is needed.

It also stops the skill waiting for a verifier that cannot install, and, as the owner asked, puts each build route in a file of its own, asks the user one thing at most, and writes every fact once (#204).

The page route and the verifier's check

Written in SKILL.md, then moved with the split below: the page is in references/build/browser.md, and the verifier's ten-second check became step 3's npm answer, found once.

  • The build page's route opens with the page: where no package was built and the reply is read in a chat, the chat writes one html block, the source in a noscript and a short fixed script that deflates it and writes the link Build and play it. The reply says to open the block with Preview first, and to save it as an .html file where a chat shows no Preview.
  • The link a command prints stays for a reply read outside a chat, as in a terminal, and for a package built here, as step 5 hands it over.
  • A source that names files gets neither page nor link, as before: it goes over in a json block.
  • Step 4's command asks npm for the verifier's version first, npm view … --fetch-timeout=10000 --fetch-retries=0 &&, and runs the verifier only where npm answers. A registry that hangs is found out in ten seconds.
  • Step 5 names the page first for a chat that built nothing.

Build routes, one file each; one question; every fact once (#204)

The owner's three calls: each build method in its own file; the whole conversation as fast as it can be without dropping a check that guarantees anything; and no part, check or pointer written twice.

SKILL.md is the flow.

  1. The content type, the only question the user is asked.

  2. The source.

  3. Two answers, found once:

    • Internet: none with no code tool, or where the chat's tools say so, and then nothing runs to check.
    • npm: none without internet; otherwise npm view … --fetch-timeout=10000, run beside the first file reads.

    Then the first route that holds:

    RouteWhenFile
    1the user attached the build archivereferences/build/archive.md
    2npm reaches its registrynpm.md
    3Node runs, with internettwo-files.md
    4anything elsebrowser.md
  4. One pointer: routes 1 to 3 hand over through built-here.md (problems, the verifier run only where npm answered, the link, the hand-over); route 4's file is its own hand-over.

What got faster:

  • No author or licence question. What the user gave stays; otherwise the name the model knows them by, or "Unknown", and U, said in the reply.
  • No second npm check. The verifier's own 10-second check is gone, because step 3's answer decides whether it runs.
  • Fewer tool calls. The link is written in the verifier's command line.
  • No time on the verifier's skill. Its loop is read only when a run fails.
  • Fewer questions. The brief chooses the material, audience, size and language, and says it chose them, instead of asking.

Written once:

  • The author and licence. The rule and the licence codes live in SOURCE_FIELDS, under every content type's fields, which every chat reads before writing a source, the build page's chats included. sync:skill rewrote the 28 type files.
  • The link's commands. Only in built-here.md: route 4, outside a chat, writes its page to an .html file instead of printing a link.

What a chat reads of the skill's text, against 18.9 KB before. The brief is 2.2 KB (was 2.9), and a type file grew by 0.3 KB.

RouteKBLess
the user's browser9.848%
npm11.340%
the archive11.539%
two files12.037%

The code blocks moved byte for byte, copied by a script. copy-skill.mjs (prepack) copies all of references/, the package exports references/build/*.md, .gitignore covers the copy, and build.test.ts holds the copy to the skill file for file.

Haiku, with a stand-in for a chat's skill reader that logs each file it serves. A five-question Question Set, the request naming neither author nor licence:

PositionResult
no toolsthe page; "Unknown" and U said; its link builds a package that passes
"a quiz", no type namedone question, which type, after SKILL.md and the brief only
code tool, no internet (4 runs)the page each time; the npm check still run in 3 (see below)
archive attached, no internet (2 runs)built; no verifier; unverified; link = the source file
npm working (2 runs)build, verifier and link in one command line: 2 and 3 code-tool calls; pass
two files, registry hangsone check, both files fetched, built, unverified, link = the source file

Every package built passes the verifier here.

What the runs fixed or found:

  • find / everywhere. Check 1 first ran it wherever Node ran, which on a real disk passed the code tool's 110 s. It is now whether the user attached the archive.
  • "No web tool" read as "no internet". Route 3's old condition, "can fetch a file", let one run skip it. It now reads "with internet", the answer found once, and the next run fetched both files.
  • The npm check when the tools say "no internet". Under three wordings Haiku still ran it in 4 of 6 such runs, 1 of 2 under the final bullets. It is held to 10 s and leads to the same route, so a run that ignores the bullet loses 10 s and nothing else. Not measured outside Haiku.
  • A lab leak. One run called the Skill tool and got the older skill installed on this computer; that run doesn't count, and the prompts now forbid it.
  • Licences (cubic's review of 94b9337, fixed in 7be0002). The generated text said any licence takes its version apart, but the build allows a version only for the six CC BY codes, and CC0 1.0 is one code. A licence no code stands for, such as MIT, now becomes U. Haiku kept CC0 1.0 whole, split "CC BY-SA 3.0", and turned MIT into U with a word on why: 3 of 3, each built. The same review moved the unlisted-type schema to the archive too, and a taken file name is no longer a question.

design/author.md

A new rule, In a chat that built nothing, a page the chat writes makes the link, and two paragraphs under the archive's rule. They record:

  • what ChatGPT's preview allows, from two probe pages on the owner's free account: a script, CompressionStream, a link the user allows, a download; and what it refuses: a fetch to our site or jsDelivr, a frame on the build page;
  • the six wordings and what each cost, below;
  • that the archive kept in a ChatGPT Project built a Question Set there, and that pip is closed there as npm is;
  • the verifier's wait and the ten-second check.

Another rule, Each build route is a file of its own, every fact is written once, and one question at most is asked, records #204 and its runs, and the #182 rule notes that the author is no longer asked. The count in the file's opening is corrected: it said twenty-four rules, there were twenty-six, and these are the twenty-seventh and twenty-eighth. design/layout.md and the author README name references/build/.

Measured on Haiku

31 replies. A reply "passes" where a page was due if its script is the one given, its link carries the page's source, and that source builds a package the verifier passes with no warning.

WordingNo toolsCode tool, no networknpm works
1. "Where no command runs here … if the chat shows an html block as a page"6 of 6
2. "Where the chat shows … a page, … whether or not a command runs"3 of 3
3. "In a chat, hand the source over in a page … Only … in a terminal, give a link"5 of 52 of 2built and verified, then added the page too
4. "Where no package was built here and your reply is read in a chat"1 of 11 of 1built, with no page and no link
5. "A package built here is handed over … with the link a command prints and no page"1 of 11 of 11 of 1: package, pass, exact link
6. Preview "first … only then" the file, and the verifier's check2 of 21 of 11 of 1

With wording 6:

  • the archive attached and a registry that hangs: 2 of 2 built from the archive, made one connection to the registry, and handed the package over unverified with the command's link;
  • a source naming the user's picture: 2 of 2 went over in a json block with the page's address and the picture named, with no page.

All 24 pages pass. Haiku never damages a link, so these runs show that the words are followed.

After review (b38ab60): the page first held the source in a script of type application/json, which a source showing </script> or <!-- cuts short (cubic). Haiku ignored a rule to escape them (0 of 2 Drag the Words on HTML), so the source now sits in a noscript, which only </noscript ends. Five sources moved into it arrive byte for byte and build; Haiku with the new page, 3 of 3 (two Drag the Words with raw tags, one Question Set). Not run yet in ChatGPT's Preview.

In ChatGPT, the owner's free account

  • With wording 2 as a plugin, ChatGPT printed the link by command, and asked, quoted the sentence back: a condition a model must judge about its own chat is one it passes over.
  • With wording 5, it tried npm and the two files, wrote the page, and Preview showed the link, which opened the build page with the right source. Its reply named the file first and Preview second, which wording 6 turns round. Wording 6 has not been run in ChatGPT.

Checks

  • test:unit of the author package: 183 passing, after the split too.
  • Every relative link in SKILL.md and the route files resolves (10).
  • sync:skill is clean.

Order

This needs an author release to reach people: the package ships the skill, and the organisation's site serves the zips and /h5p/skill/ from the release it pins. The guide's line on a ChatGPT Project is missing-elements/missing-elements.github.io#49.


Summary by cubic

Fixes how a chat that cannot build hands over a source: it now writes a small page whose script makes the build-page link in the user's browser, so nothing compressed is typed or copied and no code tool is needed. Step 4 also stops waiting for a verifier that cannot install, checking npm first and giving up after ten seconds. SKILL.md's build routes move into references/build/, one file a route. Closes #202 and #204.

Build routes

  • Four checks in step 3 pick the route in order; the three that build end in built-here.md, which holds the build's problems, the verifier, the link and the hand-over.
  • The skill asks at most one question, the content type; the author and licence are taken as given or defaulted ("Unknown", U) and said in the reply, and only the CC BY codes take a version.
  • A chat reads 9.8 to 12.0 KB of the skill's text where it read 18.9 KB, and prepack copies all of references/.

Hand-over details

  • The page holds the source in a noscript, which ends only at </noscript>; the earlier script of type application/json was cut short by a source showing <script>, </script> or <!--, and Haiku did not follow a rule to escape them.
  • An unlisted type's schema is served from the archive too, so a chat with the archive is not sent to fetch two files; a taken file name is not asked about, a new one is taken and said.
  • The command-printed link stays for replies read outside a chat and for packages built here; sources that name files still go over in a json block with no page or link.
  • design/author.md records the probes in ChatGPT's preview, the six wordings measured on Haiku, and the counts from all 31 runs.