playable-lessons 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/cli/index.js +3 -2
- package/out/shared/prompts.js +9 -5
- package/package.json +1 -1
package/out/cli/index.js
CHANGED
|
@@ -146,6 +146,7 @@ async function readStdin() {
|
|
|
146
146
|
.option('tone', { type: 'string', default: 'professional', describe: 'Narrative tone' })
|
|
147
147
|
.option('protagonist', { type: 'string', default: 'the reader', describe: 'Protagonist type' })
|
|
148
148
|
.option('answers', { type: 'string', describe: 'Optional answers to clarifying questions' })
|
|
149
|
+
.option('retries', { type: 'number', default: 3, describe: 'Max compile attempts, with AI-assisted fixes between them (raise for weaker local models)' })
|
|
149
150
|
.option('format', { alias: 'f', type: 'string', default: 'ink,html', describe: 'Output formats: ink, html, json' })
|
|
150
151
|
.option('title', { alias: 't', type: 'string', describe: 'Story title (defaults to the input/topic name)' });
|
|
151
152
|
}, async (argv) => {
|
|
@@ -181,7 +182,7 @@ async function readStdin() {
|
|
|
181
182
|
protagonistType: argv.protagonist,
|
|
182
183
|
tone: argv.tone,
|
|
183
184
|
answers: argv.answers
|
|
184
|
-
}, config, { log: (m) => console.error(m) });
|
|
185
|
+
}, config, { log: (m) => console.error(m), maxCompileRetries: argv.retries });
|
|
185
186
|
const outputDir = argv.output;
|
|
186
187
|
await (0, promises_1.mkdir)(outputDir, { recursive: true });
|
|
187
188
|
const title = argv.title || base;
|
|
@@ -222,5 +223,5 @@ async function readStdin() {
|
|
|
222
223
|
})
|
|
223
224
|
.demandCommand(1, 'You must specify a command')
|
|
224
225
|
.help()
|
|
225
|
-
.version('0.2.
|
|
226
|
+
.version('0.2.1')
|
|
226
227
|
.parse();
|
package/out/shared/prompts.js
CHANGED
|
@@ -105,6 +105,9 @@ Requirements:
|
|
|
105
105
|
- Use conditional text { var > X: text } to make scenes respond to past choices
|
|
106
106
|
- Every path must reach -> END
|
|
107
107
|
- Write engaging, educational prose — not just placeholder text
|
|
108
|
+
- Write ALL prose yourself. Do NOT copy any example or placeholder text from the
|
|
109
|
+
syntax reference verbatim (e.g. "[Write the opening scene here]"); those
|
|
110
|
+
bracketed placeholders show structure only — replace them with real content
|
|
108
111
|
- Include at least one conditional branch that depends on a variable
|
|
109
112
|
- Mark endings with a # ENDING: tag followed by a label (good/neutral/bad)
|
|
110
113
|
|
|
@@ -134,15 +137,16 @@ VAR has_key = false
|
|
|
134
137
|
-> start
|
|
135
138
|
|
|
136
139
|
// First knot MUST be named "start"
|
|
140
|
+
// (bracketed text below = placeholders — replace with your own prose, do not copy)
|
|
137
141
|
=== start ===
|
|
138
|
-
|
|
142
|
+
[Write the opening scene here]
|
|
139
143
|
* [First choice] -> next_scene
|
|
140
144
|
|
|
141
145
|
// Other knots
|
|
142
146
|
=== knot_name ===
|
|
143
|
-
|
|
147
|
+
[Write the passage prose here]
|
|
144
148
|
* [Choice text visible to player]
|
|
145
|
-
Result
|
|
149
|
+
[Result prose shown after choosing]
|
|
146
150
|
-> next_knot
|
|
147
151
|
* [Another choice]
|
|
148
152
|
-> another_knot
|
|
@@ -150,10 +154,10 @@ Text of the passage.
|
|
|
150
154
|
// Stitches (sub-sections within a knot)
|
|
151
155
|
=== knot ===
|
|
152
156
|
= stitch_one
|
|
153
|
-
|
|
157
|
+
[Stitch prose here]
|
|
154
158
|
-> stitch_two
|
|
155
159
|
= stitch_two
|
|
156
|
-
More
|
|
160
|
+
[More stitch prose here]
|
|
157
161
|
|
|
158
162
|
// Sticky choices (can be chosen repeatedly)
|
|
159
163
|
+ [Repeatable choice]
|
package/package.json
CHANGED