A brief is one JSON file. During the interview it is a draft (drafts/<slug>.json). After
the user approves the spec it is approved, and the generator copies it into the new
repository as project.json with a generated resolved section added.
tools/Test-FoundryBrief.ps1 (module function Test-FoundryBrief).pwsh -File tools/New-FoundryDraft.ps1 -Name "Moon Miner" -Idea "..." # creates drafts/moon-miner.json
pwsh -File tools/Test-FoundryBrief.ps1 drafts/moon-miner.json # draft mode: what's missing, where to resume
pwsh -File tools/Show-FoundrySpec.ps1 drafts/moon-miner.json # spec for the user to approve
pwsh -File tools/Test-FoundryBrief.ps1 drafts/moon-miner.json -Mode Approved
Validator exit codes: 0 valid for the mode, 1 invalid or incomplete, 4 conflicts (constraints the user must choose between).
Validator output kinds:
| Kind | Meaning | Blocks generation |
|---|---|---|
MISSING [stage] |
A field the interview still has to fill; grouped by stage | yes (allowed in a draft) |
ERROR [path] |
Malformed value or broken reference | yes |
CONFLICT [path] |
Two constraints cannot both hold; the message says what to ask the user | yes |
WARNING [path] |
Allowed, but tell the user (for example an unverified starter configuration) | no |
The resume stage is the first interview stage with missing fields. If nothing is missing, it is the first stage with errors or conflicts. Order: idea, target, first-release, details, toolchain, plan, destination, review. The validator prints the questions for that stage, after any saved interview.openQuestions.
| Field | Required | Notes |
|---|---|---|
schemaVersion |
yes | "1.0" |
status |
yes | draft or approved. Only approved briefs can be generated. |
approval |
approved | { approvedBy, approvedOn: "YYYY-MM-DD", notes? } |
interview |
no | { startedOn, stage, openQuestions[], notes[] }. Used to resume. |
destination |
yes | Folder for the new repo. Relative paths resolve against the Foundry root. It must not be inside the Foundry, must not end in a dot or space, and must not use < > " \| ? * or reserved names. Spaces are fine. |
project| Field | Notes |
|---|---|
name |
Display name, up to 60 characters |
slug |
3-50 characters, a-z 0-9 -; used for file names |
idea |
The user's original words, verbatim |
summary |
2-4 sentences, as you understand it |
kind |
game, utility, demo, tool, education, other |
smallestUsefulVersion |
The smallest useful or playable version you proposed and the user accepted |
targets[] (one per machine/display combination that is verified separately)| Field | Notes |
|---|---|
id |
Short id used in commands (tools/run.ps1 -Target <id>), a-z 0-9 - |
name |
Optional display name |
platform |
c64, c128-native (C128 mode), c128-c64mode (C128 running C64 mode) |
display |
vicii-40 (VIC-II 40 columns) or vdc-80 (C128 VDC 80 columns, c128-native only). Native 40- and 80-column operation are separate targets. |
video |
pal, ntsc or pal-ntsc (smoke test uses PAL unless ntsc) |
expectedBehavior |
What this target does that can be observed (the artifact behavior for this target) |
artifact |
Optional; default build/<slug>.prg (or build/<slug>-<id>.prg for several native builds) |
disk |
Optional disk image: { name: "diskname,id", format: d64/d71/d81, image?, files: [{ source, name, type: prg/seq, convert?: "ascii-to-petscii", lineEndings?: "cr"/"keep" }] }. Use "$artifact" as source for the program itself. |
autostart |
prg (default: inject the program) or disk (load from the disk image like a user would) |
smokeLimitCycles |
Optional VICE cycle budget for the smoke run (default 30 M for prg, 80 M for disk) |
dualTarget (required when there is more than one target)strategy |
Meaning | Required targets |
|---|---|---|
c64-mode-on-both |
One C64 program; the C128 runs it in C64 mode | a c64 and a c128-c64mode target |
native-per-target |
Separate C64 and native C128 builds from shared source | a c64 and a c128-native target |
multi-display |
One native C128 program verified on 40 and 80 columns | only c128-native targets |
notes must say what is shared and what differs.
| Field | Notes |
|---|---|
buildLocation |
windows-cross (default) or on-commodore |
onCommodore |
Required for on-commodore: { targetTool, transfer, diskFormat: d64/d71/d81, programName? (max 16) } |
testing.emulator |
vice |
testing.realHardware |
{ requested: bool, reason }. The reason names the requirement that needs hardware. |
| Field | Notes |
|---|---|
scope.firstRelease |
One paragraph |
scope.inScope[], scope.outOfScope[] |
Both non-empty |
requirements[] |
{ id: R1.., title, priority: must/should/could, text, acceptance[] (observable), capabilities[] } |
capabilities[] |
Union of what the project needs; names from catalog/recipes.json (text-ui, keyboard-input, joystick-input, disk-seq-io, sprites, custom-charset, sid-sound, smooth-animation, raster-interrupts, vdc-80col, mouse-1351). The validator checks them against the language and display. Capabilities listed under capabilityEmulator in the catalog also add emulator options to every target (mouse-1351: VICE -controlport1device 3). Capabilities under capabilityFiles also add source files to the generated repo when the language and every target platform fit (mouse-1351: src/mouse1351.s / .h from templates/capabilities/mouse-1351 for C and mixed C + ca65 on c64 / c128-c64mode). |
designRequired topics: controls, visuals, sound, persistence, fileFormats, peripherals, budgets. Optional: other[] with topic. Each topic is { value, source }, where source is one of:
user - the user decided.default - the Foundry proposed it and the user accepted. It shows as “practical default”.n/a - does not apply; the value says why.open - undecided. An openDecisions entry with the same topic is required.assumptions[], openDecisions[]assumptions[]: { id, text, status: default/unverified/confirmed }openDecisions[]: { id, topic, question, default (used until decided), status: open/resolved }toolchain| Field | Notes |
|---|---|
recipe |
cc65, basic-petcat, basic-onboard, asm-onboard (see the catalog) |
language |
c, mixed-c-asm, asm-ca65, basic-v2, basic-7, asm-onboard |
recommended |
{ recipe, language }: the Foundry's default recommendation |
reasons[] |
Plain-English reasons |
alternatives[] |
{ option, whyNot } |
override |
null or { requestedLanguage, requestedBy, reason, accepted }. When present, language must equal requestedLanguage (the override takes precedence). If language differs from recommended with no override, that is an error. |
assumptionsToVerify[] |
Tool or timing assumptions the implementation must check |
starter| Field | Notes |
|---|---|
screenTitle |
Text on row 0, 1-38 characters of A-Z 0-9 and simple punctuation (no quotes) |
expectedScreen |
What the starter shows; copied into the README and manual tests |
smokeChecks[] |
Optional { row, col, text, description?, targets?[] }. Default: the title on row 0 and STARTER OK on row 2. On vdc-80 targets, rows 0-3 can be checked. |
filesDir |
Optional folder (relative to the brief) with project-specific files that overlay the recipe starter: src/, fixtures/, anything else. *.tmpl files are rendered. |
requirements[] |
Requirements the starter (M0) already satisfies |
milestones[]{ id: M1.., title, goal, tasks[], manualTests[] }. M0 (“Starter builds and runs”) is added by the generator.
tasks[]: { id, text, requirements[] (must exist), outcome (buildable result), check (how completion is verified) }. Every requirement must be linked from a task or from starter.requirements.manualTests[]: { id, title, target (target id, all or real-hardware), setup, steps[], expected[], requirements[] }*.tmpl files){{PROJECT_NAME}}, {{PROJECT_NAME_LOWER}}, {{PROJECT_SLUG}}, {{SCREEN_TITLE}}, {{SCREEN_TITLE_LOWER}}, plus the document blocks used by templates/repo/ (see New-DocVariables in tools/Foundry.psm1). Unknown placeholders stop generation. After rendering, any {{...}} left in a generated text file also stops generation.
resolved section of project.json (generated)The generator adds resolved: tools (with install sources and detection hints), and per target the exact build (cc65 target, defines, label file; or petcat dialect), disk, emulator (binary, arguments, autostart mode) and smoke configuration (ready point, memory dumps, checks, cycle limit), plus onCommodore transfer settings. The generated tools/*.ps1 scripts read only this section, so a generated repo does not need the Foundry.
Powered by TurnKey Linux.