A template's first ask
A template may start a new forge's ask box with a sentence, so the forge opens with a good next thought ready.
- Declare it:
"firstAsk": "Add a weekly menu page"at the top level of the template'sforge.json. A string of 1 to 280 characters of plain text (a newline is allowed); an empty, longer or non-string value makes the file invalid, and a stored value that fails the same check is ignored. - Read once: when a forge is made from a template repository (
template: "owner/name"),copyIntoreadsfirstAskat the template's default branch and keeps it in the new forge'sparent.json(template.firstAsk). Later edits to the template do not change a forge already made. - Shown: on the new forge's home before its first ask, the box holds the sentence, escaped and editable; leading newlines are trimmed. The terminal's "What do you want built?" prompt (
ton the home) starts with the same text (readyAsk). - Filed as the first tell: when the new forge first boots (
src/spawn/first-boot.ts,fileFirstAsk), the sentence is told to its first app as its founder, so the crew is seen working on it at once, and it leaves the record so the box does not offer it twice. A refused tell (an unverified founder, nobody to direct) leaves it in the box. Test:test/first-ask-first-tell.test.ts. - Nothing declared: the box is empty, as before.
- On the template's page:
/templates/:owner/:nameshows the sentence, escaped, above the start button; nothing when none is declared or the stored value is invalid. - Code:
src/apps/first_ask.ts,src/spawn/template_first_ask.ts,readyAskinsrc/spawn/template_record.ts. Tests:test/template-first-ask.test.ts,test/tui-first-ask.test.ts.