linersh 0.5.0

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.
Files changed (95) hide show
  1. package/README.md +168 -0
  2. package/bin/liner.js +126 -0
  3. package/dist/App.js +195 -0
  4. package/dist/App.js.map +1 -0
  5. package/dist/agents/detect.js +102 -0
  6. package/dist/agents/detect.js.map +1 -0
  7. package/dist/agents/events.js +8 -0
  8. package/dist/agents/events.js.map +1 -0
  9. package/dist/agents/jtbd-clarify.js +144 -0
  10. package/dist/agents/jtbd-clarify.js.map +1 -0
  11. package/dist/agents/parsers.js +316 -0
  12. package/dist/agents/parsers.js.map +1 -0
  13. package/dist/agents/prompts.js +301 -0
  14. package/dist/agents/prompts.js.map +1 -0
  15. package/dist/agents/run-log.js +71 -0
  16. package/dist/agents/run-log.js.map +1 -0
  17. package/dist/agents/runner.js +180 -0
  18. package/dist/agents/runner.js.map +1 -0
  19. package/dist/agents/types.js +2 -0
  20. package/dist/agents/types.js.map +1 -0
  21. package/dist/bin-resolver.js +92 -0
  22. package/dist/bin-resolver.js.map +1 -0
  23. package/dist/browser-support.js +62 -0
  24. package/dist/browser-support.js.map +1 -0
  25. package/dist/colors.js +105 -0
  26. package/dist/colors.js.map +1 -0
  27. package/dist/components/Header.js +17 -0
  28. package/dist/components/Header.js.map +1 -0
  29. package/dist/components/KeyHints.js +10 -0
  30. package/dist/components/KeyHints.js.map +1 -0
  31. package/dist/components/LabeledBox.js +53 -0
  32. package/dist/components/LabeledBox.js.map +1 -0
  33. package/dist/components/NextSteps.js +18 -0
  34. package/dist/components/NextSteps.js.map +1 -0
  35. package/dist/config.js +88 -0
  36. package/dist/config.js.map +1 -0
  37. package/dist/editor.js +40 -0
  38. package/dist/editor.js.map +1 -0
  39. package/dist/gates.js +121 -0
  40. package/dist/gates.js.map +1 -0
  41. package/dist/index.js +17 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/ipc.js +136 -0
  44. package/dist/ipc.js.map +1 -0
  45. package/dist/phases.js +348 -0
  46. package/dist/phases.js.map +1 -0
  47. package/dist/progress.js +185 -0
  48. package/dist/progress.js.map +1 -0
  49. package/dist/screens/AgentSetup.js +217 -0
  50. package/dist/screens/AgentSetup.js.map +1 -0
  51. package/dist/screens/BootSplash.js +159 -0
  52. package/dist/screens/BootSplash.js.map +1 -0
  53. package/dist/screens/BrowserSetup.js +181 -0
  54. package/dist/screens/BrowserSetup.js.map +1 -0
  55. package/dist/screens/CompileView.js +297 -0
  56. package/dist/screens/CompileView.js.map +1 -0
  57. package/dist/screens/FramingConfirmReview.js +193 -0
  58. package/dist/screens/FramingConfirmReview.js.map +1 -0
  59. package/dist/screens/Gate1Review.js +143 -0
  60. package/dist/screens/Gate1Review.js.map +1 -0
  61. package/dist/screens/Gate2Review.js +158 -0
  62. package/dist/screens/Gate2Review.js.map +1 -0
  63. package/dist/screens/ImportPrompt.js +65 -0
  64. package/dist/screens/ImportPrompt.js.map +1 -0
  65. package/dist/screens/LocalFilePicker.js +139 -0
  66. package/dist/screens/LocalFilePicker.js.map +1 -0
  67. package/dist/screens/NewMixtapeWizard.js +662 -0
  68. package/dist/screens/NewMixtapeWizard.js.map +1 -0
  69. package/dist/screens/NewProjectPrompt.js +66 -0
  70. package/dist/screens/NewProjectPrompt.js.map +1 -0
  71. package/dist/screens/PhaseRunner.js +1119 -0
  72. package/dist/screens/PhaseRunner.js.map +1 -0
  73. package/dist/screens/ProcessManifest.js +158 -0
  74. package/dist/screens/ProcessManifest.js.map +1 -0
  75. package/dist/screens/ProjectHub.js +546 -0
  76. package/dist/screens/ProjectHub.js.map +1 -0
  77. package/dist/screens/Settings.js +72 -0
  78. package/dist/screens/Settings.js.map +1 -0
  79. package/dist/screens/SourceModal.js +269 -0
  80. package/dist/screens/SourceModal.js.map +1 -0
  81. package/dist/screens/TapeBrowser.js +277 -0
  82. package/dist/screens/TapeBrowser.js.map +1 -0
  83. package/dist/screens/TapeDraftReview.js +440 -0
  84. package/dist/screens/TapeDraftReview.js.map +1 -0
  85. package/dist/screens/TapeEditor.js +310 -0
  86. package/dist/screens/TapeEditor.js.map +1 -0
  87. package/dist/screens/cassette-art.js +72 -0
  88. package/dist/screens/cassette-art.js.map +1 -0
  89. package/dist/store.js +10 -0
  90. package/dist/store.js.map +1 -0
  91. package/dist/types.js +3 -0
  92. package/dist/types.js.map +1 -0
  93. package/dist/yaml-io.js +345 -0
  94. package/dist/yaml-io.js.map +1 -0
  95. package/package.json +54 -0
@@ -0,0 +1,301 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ /**
4
+ * Companion files referenced by each phase per SKILL.md. The agent is told
5
+ * which ones to read at the top of the relevant phase.
6
+ */
7
+ const COMPANIONS = {
8
+ candidates: ["source-finding-tactics.md"],
9
+ evaluation: ["source-quality-hierarchy.md", "curator-notes.md"],
10
+ quality: ["quality-check-tests.md"],
11
+ synthesis: ["synthesis-guidance.md"],
12
+ };
13
+ const PHASE_INSTRUCTIONS = {
14
+ framing: `## Phase 1 — Framing
15
+
16
+ Define the job-to-be-done and sketch the knowledge map.
17
+
18
+ - The JTBD is a *single specific sentence*, not a topic. The user already provided a draft in tape.yaml.jtbd and in working/01-jtbd-and-knowledge-map.md. Read both.
19
+ - **Read \`tape.yaml.jtbd_clarifications\` if present.** Those are the user's answers to sharpening questions about scope splits, expected output kinds, quality anchors, and audience model. Weight the knowledge map by them. For example: if the user said two domains are equally weighted, give them equal section counts; if the user named specific tools as quality anchors, build sections that match the conceptual coverage those tools cover.
20
+ - If the draft JTBD is genuinely a topic (e.g. "Mobile design") and the clarifications didn't sharpen it, push back in your output and ask the user to revise.
21
+ - The knowledge map is 4–8 sections, each with a few sub-areas. Treat it as a hypothesis to be revised during research. If two domains were named in the JTBD or clarifications, sections must visibly cover BOTH — uneven coverage is a framing failure.
22
+
23
+ **You MUST remove the placeholder line** \`TODO — Phase 1 replaces this with 4–8 sections…\` from working/01-jtbd-and-knowledge-map.md as part of writing the real knowledge map. That sentinel is how the TUI knows Phase 1 has been completed — leaving it in place will keep the hub's progress cursor stuck on Framing even after you write good content.
24
+
25
+ Write the result to working/01-jtbd-and-knowledge-map.md (overwriting placeholders including the sentinel above, keeping the JTBD line as-is). Stop after this file is written. Do not start Phase 2.`,
26
+ candidates: `## Phase 2 — Candidate discovery
27
+
28
+ Read working/01-jtbd-and-knowledge-map.md for the JTBD and knowledge map. Then read the companion file \`source-finding-tactics.md\` in the skill bundle.
29
+
30
+ - Generate a long-list of candidate sources covering every section of the knowledge map. URLs and titles only — NO fetching yet.
31
+ - Aim wide: 2–4× the eventual kept count.
32
+ - **Verify each URL exists** via WebFetch (or your fetch tool) — AI hallucinates URLs that sound plausible. A 404 candidate is worse than a missing one.
33
+ - For each candidate, capture: URL, title, one-line reason it's a candidate.
34
+
35
+ **Search YouTube too, not just the web.** Liner fetches video transcripts and titles automatically (\`youtube.com/watch?v=…\` and \`youtu.be/…\` URLs are first-class sources). For most JTBDs there will be conference talks, lectures, or long-form interviews on YouTube that cover the topic from a different angle than written articles do. Look there explicitly. The quality hierarchy (in \`source-quality-hierarchy.md\`) treats conference talks from credible speakers as tier-3 sources — equal in standing to expert articles. Skip TED-style talks unless density is unusually high.
36
+
37
+ Write to working/02-candidate-longlist.md, grouped by knowledge-map section. Stop after this file is written.
38
+
39
+ ⚠ Bias correction: do NOT default to popular/recent sources. Search deliberately for primary sources (specs, canonical papers, official docs, foundational books). Mix media types — articles, YouTube talks/lectures, papers, primary docs.`,
40
+ evaluation: `## Phase 4 — Evaluation
41
+
42
+ Read working/02-candidate-longlist.md. Then read the companion files \`source-quality-hierarchy.md\` and \`curator-notes.md\` in the skill bundle. Then fetch each candidate's content (transcripts for YouTube; readable body for web articles).
43
+
44
+ For each candidate, decide keep / trim / drop against the JTBD. For kept and trimmed sources, write a rating (1–5) and a curator note in the three-thing template (role / where the value is / limitations).
45
+
46
+ Write decisions to working/03-evaluation.yaml in the format:
47
+
48
+ \`\`\`yaml
49
+ candidates:
50
+ - url: https://...
51
+ title: ...
52
+ decision: kept # kept | trim | dropped
53
+ rating: 5
54
+ section: foundations
55
+ rationale: One specific sentence.
56
+ note: |
57
+ Multi-line curator note for kept/trim sources. Use the three-thing template.
58
+ \`\`\`
59
+
60
+ Stop after this file is written. Do not draft synthesis yet.`,
61
+ quality: `## Phase 5 — Quality checks
62
+
63
+ Read working/03-evaluation.yaml. Then read \`quality-check-tests.md\` in the skill bundle — note especially the strengthened framing-gap rules below.
64
+
65
+ Run the five tests against the keep-list:
66
+ 1. Redundancy — any two kept sources making essentially the same point?
67
+ 2. Coverage — any knowledge-map section with zero sources?
68
+ 3. Disagreement — strongest claim with a credible counter included?
69
+ 4. Framing-gap — is any whole way of thinking about the JTBD missing?
70
+ 5. Source-kind balance — distribution across the four kinds. Any kind at zero must be defended or backfilled.
71
+
72
+ **Framing-gap test rules (strict)**:
73
+
74
+ - Before looking at the keep-list, NAME 2–3 candidate perspectives that could exist outside the corpus (e.g. designer voice, accessibility-first viewpoint, security/abuse perspective, contrarian, adjacent discipline). Write them into working/04-quality-checks.md.
75
+ - For each named perspective, classify coverage in TWO dimensions:
76
+ - **Stance** — is there a verified source whose author *argues for* this perspective as a design center of gravity? \`stance-represented\` or \`stance-absent\`.
77
+ - **Concerns** — do any kept sources address the perspective's operational concerns, even from a different stance? \`concerns-addressed\` or \`concerns-absent\`.
78
+ A perspective is fully covered only when its stance is represented. \`concerns-addressed\` alone is a SOFT GAP — the corpus internalizes the concern without giving the consuming AI a worked rival argument to cite.
79
+ - **Unverified sources do NOT count.** A source whose Phase 4 note acknowledges unfetched content, broken URLs, or unobtainable transcripts cannot satisfy a perspective slot. Tokenism is the failure mode this rule prevents.
80
+ - For each perspective that is not \`stance-represented\`, take exactly one of three actions:
81
+ - **(a) Search for a stance source.** Vocabulary: who would *argue for* this position, what would they write, where would they publish? (e.g., "Brandur Leach on terminal density," not "CLI scriptability best practices.") One search pass; if a verified source fits, add it.
82
+ - **(b) Argue concerns are sufficient.** Write the argument explicitly: "Concerns covered by [Sources N, M] inside the [dominant] stance. The dissenting stance is real but its operational implications are absorbed; no separate source needed." Not a free pass — if you can't articulate the trade-off, fall back to (a) or (c).
83
+ - **(c) Flag the bias explicitly.** Document: "Perspective: [name] — stance unrepresented after one search pass. Corpus argues from [X] but no source argues for [Y]. Recommendation: ship + document, OR weaken the JTBD claim."
84
+
85
+ **Source-kind balance rules**:
86
+
87
+ - The four kinds are \`reference / principle / prescription / example\`. They represent four argumentative roles in the corpus.
88
+ - Count the distribution. A zero in any column is a decision, not an accident.
89
+ - 0 \`reference\` → no substrate authority. 0 \`principle\` → no philosophical anchor. 0 \`prescription\` → no concrete rules. 0 \`example\` → no taste calibration.
90
+ - For each zero, either backfill (one search pass for a source of that role) or write a defense: "Kinds audit: X/Y/Z/W. Accepted: [reason this JTBD legitimately doesn't need that kind]."
91
+
92
+ **Required output structure** in working/04-quality-checks.md:
93
+
94
+ \`\`\`
95
+ ## Test 1 — Redundancy
96
+ [finding + action]
97
+
98
+ ## Test 2 — Coverage
99
+ [finding + action]
100
+
101
+ ## Test 3 — Disagreement
102
+ [finding + action]
103
+
104
+ ## Test 4 — Framing-gap
105
+
106
+ ### Perspectives audit
107
+ - [Perspective name] — stance-represented (Source N, verified) ✓
108
+ - [Perspective name] — stance-absent, concerns-absent. Backfill: searched [vocabulary], found [source] → now stance-represented (Source M) ✓
109
+ - [Perspective name] — stance-absent, concerns-addressed by [Sources L, K]. Argued sufficient: [explicit trade-off paragraph].
110
+ OR
111
+ - [Perspective name] — stance-absent after one search pass. Corpus argues from [X], no source argues for [Y]. Recommendation: [...].
112
+
113
+ ## Test 5 — Source-kind balance
114
+
115
+ Distribution: X reference / Y principle / Z prescription / W example
116
+ [If any zero: backfill action OR defense paragraph]
117
+ \`\`\`
118
+
119
+ Every named perspective must appear in the audit with explicit coverage status. A missing "Perspectives audit" section, or a Test 5 section without the distribution, means the test wasn't run honestly.
120
+
121
+ If a test fails, fix the keep-list (update working/03-evaluation.yaml) before reporting done. Even tests that pass without changes should be noted — silent passes train the model to treat the tests as ceremonial.
122
+
123
+ Stop after working/04-quality-checks.md is written and any necessary changes are reflected in 03-evaluation.yaml.`,
124
+ synthesis: `## Phase 6 — Synthesis
125
+
126
+ Read synthesis.md (replacing the placeholder), working/03-evaluation.yaml (the keep-list), and \`synthesis-guidance.md\` in the skill bundle.
127
+
128
+ Draft synthesis.md as continuous prose, 800–2000 words. The synthesis is the curator's *distilled understanding of the domain* — principles, contested questions, framework distinctions. NOT a recap of source content.
129
+
130
+ ⚠ Bias correction: do NOT write "Source 1 says X; Source 2 says Y." Push toward the curator's framing. Synthesis is the first thing the consuming AI reads — it sets the lens.
131
+
132
+ **Weight sources by their \`kind\`** (set during Phase 7, but visible in 03-evaluation.yaml too):
133
+ - \`reference\` sources (specs, RFCs) — substrate. Cite once for authority; don't lean on them for framing.
134
+ - \`principle\` sources (essays, manifestos) — load-bearing for the synthesis's stance section. These earn the most quoting.
135
+ - \`prescription\` sources (style guides, rules) — useful for concrete distinctions but rarely for the synthesis's voice.
136
+ - \`example\` sources (case studies, surveys) — taste calibration. Cite when arguing what "good" looks like.
137
+
138
+ If a source's \`kind\` field is absent, treat it as principle-equivalent (the synthesis-writing default).
139
+
140
+ For methodology mode, mark spots where the curator should personalize ("[curator's view: …]") so they have explicit handoff points. For quick mode, write a coherent draft they can lightly edit.
141
+
142
+ Stop after synthesis.md is written.`,
143
+ assembly: `## Phase 7 — Assembly (draft)
144
+
145
+ You are preparing a *draft* of the sources list for the curator to review. **DO NOT touch tape.yaml directly.** Write your proposal to \`working/07-tape-draft.yaml\` and stop.
146
+
147
+ Read these inputs:
148
+ - \`working/03-evaluation.yaml\` — the keep-list with curator notes and ratings.
149
+ - \`synthesis.md\` — the curator's framing, to inform section ordering.
150
+ - \`tape.yaml\` — preserve any existing source order the curator already chose; you're proposing additions/changes, not erasing.
151
+
152
+ Build the draft as YAML with a top-level \`sources:\` list. Each entry needs:
153
+
154
+ \`\`\`yaml
155
+ sources:
156
+ - type: web # web | youtube | local_file
157
+ url: https://...
158
+ section: foundations
159
+ priority: required # required | optional
160
+ kind: prescription # reference | principle | prescription | example
161
+ note: |
162
+ One-paragraph curator note: role of this source, where the value lives,
163
+ and any limitations. Use the three-thing template.
164
+ \`\`\`
165
+
166
+ Rules:
167
+ - Only include candidates marked \`kept\` or \`trim\` in 03-evaluation.yaml. Drop everything else.
168
+ - Within a section, order by rating (highest first).
169
+ - Order sections in reading order: foundations / patterns / applications / craft (or whatever the synthesis suggests).
170
+ - Notes come straight from 03-evaluation.yaml's \`note\` field. Do not paraphrase.
171
+ - Mark a source \`priority: optional\` only when the methodology genuinely treats it as skippable (rare).
172
+ - \`local_file\` entries: only include them if 03-evaluation.yaml already has them. Never invent paths.
173
+
174
+ **Source \`kind\` is required on every entry.** It tells the synthesis prompt and the consuming AI which sources to weight how. Pick the best fit:
175
+
176
+ - \`reference\` — specs / standards cited but not deep-read (POSIX, RFCs, official manual pages). The consuming AI cites these for authority but doesn't quote them at length.
177
+ - \`principle\` — read for stance / framing (essays, manifestos, philosophical pieces). Shapes how the AI thinks about the domain.
178
+ - \`prescription\` — read for concrete rules (style guides, conventions, explicit do/don't lists). The AI quotes these directly when applying rules.
179
+ - \`example\` — read for taste / illustration (case studies, tool surveys, worked examples). Shows what good looks like.
180
+
181
+ A source can plausibly fit two categories; pick the one closest to *how the consuming AI should USE this source*. When in doubt: rules → \`prescription\`; arguments → \`principle\`; examples → \`example\`; authority without narrative → \`reference\`.
182
+
183
+ When done, write \`working/07-tape-draft.yaml\` and stop. The TUI will show the curator a review screen to accept, edit, or discard. DO NOT modify tape.yaml.`,
184
+ empirical: `## Phase 8 — Empirical test
185
+
186
+ Read MIXTAPE.md (if present) and the project's JTBD. Then check whether \`tape.yaml\` has a \`parent\` field set:
187
+
188
+ **If \`tape.parent\` is NOT set** (the default), run the standard with-vs-without test:
189
+
190
+ 1. Suggest 2–3 substantive questions that should benefit from the JTBD.
191
+ 2. Show what a "with mixtape" answer should be able to do that a "without mixtape" answer cannot.
192
+ 3. Help the user record both responses and write a verdict to working/05-empirical-test.md.
193
+
194
+ **If \`tape.parent\` IS set**, the project is a replay of an earlier mixtape — set by \`liner replay\`. Run a v1-vs-v2 comparison test instead:
195
+
196
+ 1. Read the parent project's MIXTAPE.md and synthesis.md (the path is in tape.parent).
197
+ 2. Suggest 2–3 substantive questions that should benefit from the JTBD.
198
+ 3. For the agreed question, show what answers using the v1 mixtape vs the v2 mixtape should be able to do differently. The hypothesis is that v2 covers a perspective v1 missed, or has sharper framing — be specific about WHICH dimension to compare on (perspective coverage, framing sharpness, specific claims included or dropped).
199
+ 4. Help the user record both "with v1" and "with v2" responses and write a verdict to working/05-empirical-test.md naming a concrete difference and which corpus better serves the JTBD.
200
+
201
+ This phase is interactive — talk with the user to pick the question and capture the verdict. Stop after working/05-empirical-test.md has a real question + verdict.`,
202
+ };
203
+ /** Construct the system+user prompt blob passed to the agent. */
204
+ export function buildPhasePrompt(args) {
205
+ const { phaseId, project, skillPath, tape } = args;
206
+ const skillContents = safeRead(join(skillPath, "SKILL.md")) ??
207
+ "(SKILL.md not found at " + skillPath + ")";
208
+ const phaseInstruction = PHASE_INSTRUCTIONS[phaseId] ??
209
+ `## Phase ${phaseId}\n\nNo dedicated instruction. Use SKILL.md to figure out what to do for the ${phaseId} phase, then stop.`;
210
+ const companionNote = (COMPANIONS[phaseId] ?? [])
211
+ .map((f) => ` - ${join(skillPath, f)}`)
212
+ .join("\n");
213
+ return `You are running the curating-mixtapes methodology on behalf of a curator.
214
+
215
+ # Mixtape context
216
+
217
+ - Project folder: ${project}
218
+ - Title: ${tape.title || "(not set)"}
219
+ - Description: ${tape.description || "(not set)"}
220
+ - Mode: ${tape.mode ?? "quick"}
221
+ - JTBD: ${tape.jtbd || "(not set)"}
222
+ - Curator: ${tape.curator || "(not set)"}
223
+ - Sources currently on tape: ${tape.sources.length}
224
+
225
+ # Skill bundle
226
+
227
+ The methodology is documented in:
228
+ - ${join(skillPath, "SKILL.md")}
229
+
230
+ Companion files (read the ones listed in the phase instructions below):
231
+ ${companionNote || " (none for this phase)"}
232
+
233
+ # What to do
234
+
235
+ ${phaseInstruction}
236
+
237
+ # Output discipline
238
+
239
+ - Work on the filesystem. Do not paste large file contents back in your response — write them to disk.
240
+ - Be concise in your spoken output. The user is watching a TUI; long monologues clutter the screen.
241
+ - If you cannot proceed (missing JTBD, missing prior-phase artifact), say so clearly and stop. Do NOT make up content.
242
+
243
+ # Final message format (required)
244
+
245
+ When the phase finishes, end with a markdown message in **this exact shape**.
246
+ The TUI renders this — section headings (**Bold:**) become colored chips, bullets render with • glyphs, and bracketed paths render dim. Following the format gives the curator a scannable summary; freeform prose does not.
247
+
248
+ \`\`\`
249
+ Done with Phase N.
250
+
251
+ **What I did:**
252
+ - Verb-first sentence describing one concrete output [path/to/file]
253
+ - Another verb-first sentence [path/to/another-file]
254
+
255
+ **Mix:** (only if you discovered or surveyed sources — skip otherwise)
256
+ - Category one: short list of representative items
257
+ - Category two: short list
258
+
259
+ **Review checklist:** (only if there's something the curator should verify in *this TUI screen* before moving on — skip if not)
260
+ - A specific judgment call to make from what's visible here
261
+ - Another specific judgment call
262
+ \`\`\`
263
+
264
+ Rules:
265
+ - **Lead every bullet with a verb-phrase**, not a file path or URL. Put paths in \`[brackets]\` at the very end of the bullet.
266
+ - Don't introduce extra sections. The TUI styles only these three headings; anything else renders as plain text.
267
+ - Skip sections that don't apply. Better to omit "Mix:" than to fill it with filler.
268
+ - 2–4 bullets per section. Be specific, not exhaustive.
269
+ - For the opening line ("Done with Phase N.") use the actual phase number — not "this phase" or "the current phase".
270
+
271
+ **Review checklist — scope rules** (important):
272
+
273
+ The "Review checklist" is what the curator should do on the **current TUI done screen**, before pressing Enter to advance. The TUI's only affordances at that moment are: read your message, open the artifact file in \`$EDITOR\`, re-run the phase, or continue. So bullets must be answerable by ONE of:
274
+
275
+ - A yes/no judgment the curator can make by skimming what you wrote ("Does the knowledge map cover X?")
276
+ - A specific edit they can make to the artifact you just wrote ("Drop the InfoQ Q&A in the long-list — weakest entry")
277
+ - A specific source/section worth a closer look ("The Pinsker entry skews designer-voice — confirm or swap")
278
+
279
+ Do NOT include bullets that ask the curator to:
280
+ - Go find more sources (the next phase handles selection — flag it for *yourself* in a later phase note, not for them)
281
+ - Add categories or sections you didn't include (you should have included them)
282
+ - "Flag if you want a dedicated source for X" — that's outside the loop the TUI gives them
283
+ - Do open-ended research, validation, or thinking that requires leaving this screen
284
+ - Anything that doesn't fit "read → edit artifact in \$EDITOR → advance"
285
+
286
+ If you don't have a concrete TUI-scoped checklist item, **omit the section**. An empty Review checklist is better than one full of asks the curator can't act on from where they are.
287
+
288
+ # Full SKILL.md follows
289
+
290
+ ${skillContents}
291
+ `;
292
+ }
293
+ function safeRead(path) {
294
+ try {
295
+ return readFileSync(path, "utf8");
296
+ }
297
+ catch {
298
+ return null;
299
+ }
300
+ }
301
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/agents/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC;;;GAGG;AACH,MAAM,UAAU,GAAuC;IACrD,UAAU,EAAE,CAAC,2BAA2B,CAAC;IACzC,UAAU,EAAE,CAAC,6BAA6B,EAAE,kBAAkB,CAAC;IAC/D,OAAO,EAAE,CAAC,wBAAwB,CAAC;IACnC,SAAS,EAAE,CAAC,uBAAuB,CAAC;CACrC,CAAC;AAEF,MAAM,kBAAkB,GAAqC;IAC3D,OAAO,EAAE;;;;;;;;;;;sMAW2L;IAEpM,UAAU,EAAE;;;;;;;;;;;;;6OAa+N;IAE3O,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;6DAoB+C;IAE3D,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,71 @@
1
+ // Tee-style audit log of every agent run.
2
+ //
3
+ // We already get resume-on-failure for free via Claude's session.json (and
4
+ // Codex's equivalent), so this log isn't load-bearing for recovery. What it
5
+ // *does* give us:
6
+ //
7
+ // - A user-readable transcript of past runs they can scroll back through.
8
+ // - Forensic data when something behaves weirdly (rate-limit retry order,
9
+ // unexpected tool calls, parse failures in the JSON stream).
10
+ // - Raw material for a future "replay a run in the UI" feature.
11
+ //
12
+ // One file per run, namespaced by phaseId, timestamped. The first line is a
13
+ // `_liner_meta` envelope describing the run; the body is the agent's raw
14
+ // JSONL exactly as we received it; the last line is a `_liner_close` marker
15
+ // with the exit code and end time. Everything else (parsed events, derived
16
+ // UI state) is reconstructable from those primitives.
17
+ import { createWriteStream, mkdirSync } from "node:fs";
18
+ import { join } from "node:path";
19
+ const RUN_DIR = ".liner-runs";
20
+ /**
21
+ * Open a new log file for an agent run. The directory is created lazily;
22
+ * no IO until the first write. Caller owns close() in both happy and
23
+ * cancellation paths.
24
+ */
25
+ export function openRunLog(folder, taskLabel, meta) {
26
+ // Defense-in-depth: sanitize taskLabel so a malformed caller can't escape
27
+ // the .liner-runs/ directory with `..` or absolute paths.
28
+ const safeLabel = taskLabel.replace(/[^a-zA-Z0-9_-]/g, "-") || "task";
29
+ const dir = join(folder, RUN_DIR, safeLabel);
30
+ mkdirSync(dir, { recursive: true });
31
+ const startedAt = new Date().toISOString();
32
+ // Filenames need to be filesystem-safe on Windows too — strip colons.
33
+ const stamp = startedAt.replace(/:/g, "-").replace(/\..+/, "");
34
+ const path = join(dir, `${stamp}.jsonl`);
35
+ const stream = createWriteStream(path, { flags: "a" });
36
+ let closed = false;
37
+ const fullMeta = { ...meta, taskLabel: safeLabel, startedAt };
38
+ stream.write(JSON.stringify({ type: "_liner_meta", ...fullMeta }) + "\n", "utf8");
39
+ return {
40
+ path,
41
+ write(line) {
42
+ if (closed)
43
+ return;
44
+ if (!line)
45
+ return;
46
+ stream.write(line, "utf8");
47
+ if (!line.endsWith("\n"))
48
+ stream.write("\n", "utf8");
49
+ },
50
+ close() {
51
+ if (closed)
52
+ return;
53
+ closed = true;
54
+ stream.end();
55
+ },
56
+ };
57
+ }
58
+ /**
59
+ * Convenience: append a final `_liner_close` marker with exit metadata before
60
+ * the stream is shut. Callers call this from the agent's `close` handler.
61
+ */
62
+ export function closeRunLog(log, code, stderrLen) {
63
+ log.write(JSON.stringify({
64
+ type: "_liner_close",
65
+ exitCode: code,
66
+ stderrBytes: stderrLen,
67
+ endedAt: new Date().toISOString(),
68
+ }));
69
+ log.close();
70
+ }
71
+ //# sourceMappingURL=run-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-log.js","sourceRoot":"","sources":["../../src/agents/run-log.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,kBAAkB;AAClB,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,iEAAiE;AACjE,kEAAkE;AAClE,EAAE;AACF,4EAA4E;AAC5E,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,sDAAsD;AAEtD,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,MAAM,OAAO,GAAG,aAAa,CAAC;AAwB9B;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACxB,MAAc,EACd,SAAiB,EACjB,IAAiD;IAEjD,0EAA0E;IAC1E,0DAA0D;IAC1D,MAAM,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,IAAI,MAAM,C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F,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW,EAAE,IAAmB,EAAE,SAAiB;IAC7E,GAAG,CAAC,KAAK,CACP,IAAI,CAAC,SAAS,CAAC;QACb,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KAClC,CAAC,CACH,CAAC;IACF,GAAG,CAAC,KAAK,EAAE,CAAC;AACd,CAAC"}
@@ -0,0 +1,180 @@
1
+ import { spawn } from "node:child_process";
2
+ import { buildPhasePrompt } from "./prompts.js";
3
+ import { LineBuffer, parseLine } from "./parsers.js";
4
+ import { closeRunLog, openRunLog } from "./run-log.js";
5
+ /**
6
+ * Spawn the configured agent CLI with a phase-specific prompt. The agent's
7
+ * newline-delimited JSON stdout is parsed into AgentEvents so the PhaseRunner
8
+ * can render tool calls / streaming text / summary as structured panes.
9
+ *
10
+ * Thin wrapper over `runAgentTask` — builds the per-phase prompt via
11
+ * `buildPhasePrompt` and labels the audit log with the phase id.
12
+ */
13
+ export function runPhaseWithAgent(args) {
14
+ const prompt = buildPhasePrompt({
15
+ phaseId: args.phaseId,
16
+ project: args.project,
17
+ skillPath: args.skillPath,
18
+ tape: args.tape,
19
+ });
20
+ return runAgentTask({
21
+ agent: args.agent,
22
+ project: args.project,
23
+ skillPath: args.skillPath,
24
+ prompt,
25
+ taskLabel: args.phaseId,
26
+ resume: args.resume,
27
+ onEvent: args.onEvent,
28
+ });
29
+ }
30
+ /**
31
+ * Run a single agent task with a caller-supplied prompt. Used by methodology
32
+ * phases (via `runPhaseWithAgent`) and by one-off side tasks like the JTBD
33
+ * elicitation step in the new-mixtape wizard. The agent's stdout is parsed
34
+ * the same way (stream JSON → AgentEvent) so callers get tool calls + final
35
+ * text via the same callback interface.
36
+ */
37
+ export function runAgentTask(args) {
38
+ const command = args.agent.bin;
39
+ const resume = args.resume === true;
40
+ const cliArgs = buildArgs(args.agent.id, args.project, args.skillPath, resume);
41
+ const child = spawn(command, cliArgs, {
42
+ stdio: ["pipe", "pipe", "pipe"],
43
+ cwd: args.project,
44
+ env: { ...process.env },
45
+ });
46
+ // On resume, the previous session already contains the prompt + all prior
47
+ // tool-call results in context. Send a tiny continuation nudge instead of
48
+ // re-shipping the full prompt — that's the whole point of resume (cheaper,
49
+ // no re-fetching).
50
+ const stdinPayload = resume
51
+ ? "Continue from where you left off. Pick up the same task; do not re-do tool calls you already completed."
52
+ : args.prompt;
53
+ child.stdin?.write(stdinPayload, "utf8");
54
+ child.stdin?.end();
55
+ // Tee-style audit log of the raw JSONL stream. Not load-bearing (Claude's
56
+ // session.json already covers resume) — this gives us a per-run transcript
57
+ // the curator can scroll back through and a forensic record when things
58
+ // misbehave.
59
+ const log = openRunLog(args.project, args.taskLabel, {
60
+ agent: args.agent.id,
61
+ resume,
62
+ });
63
+ const buffer = new LineBuffer();
64
+ if (child.stdout) {
65
+ child.stdout.setEncoding("utf8");
66
+ child.stdout.on("data", (chunk) => {
67
+ const lines = buffer.push(chunk);
68
+ for (const line of lines) {
69
+ log.write(line);
70
+ for (const event of parseLine(args.agent.id, line)) {
71
+ args.onEvent(event);
72
+ }
73
+ }
74
+ });
75
+ }
76
+ let stderr = "";
77
+ if (child.stderr) {
78
+ child.stderr.setEncoding("utf8");
79
+ child.stderr.on("data", (chunk) => {
80
+ stderr += chunk;
81
+ // Surface stderr as raw events so users see install/auth hints inline.
82
+ for (const line of chunk.split("\n")) {
83
+ const trimmed = line.trim();
84
+ if (trimmed) {
85
+ args.onEvent({ kind: "raw", text: trimmed });
86
+ // Record stderr in the log too — wrapped so it doesn't masquerade
87
+ // as a real JSON event when the log is replayed.
88
+ log.write(JSON.stringify({ type: "_liner_stderr", text: trimmed }));
89
+ }
90
+ }
91
+ });
92
+ }
93
+ const done = new Promise((resolve) => {
94
+ child.on("close", (code) => {
95
+ // Flush any trailing partial line.
96
+ for (const line of buffer.flush()) {
97
+ log.write(line);
98
+ for (const event of parseLine(args.agent.id, line)) {
99
+ args.onEvent(event);
100
+ }
101
+ }
102
+ closeRunLog(log, code, stderr.length);
103
+ resolve({ code, stderr });
104
+ });
105
+ child.on("error", (e) => {
106
+ args.onEvent({ kind: "raw", text: `[runner error] ${e.message}` });
107
+ log.write(JSON.stringify({ type: "_liner_error", message: e.message }));
108
+ closeRunLog(log, 1, stderr.length);
109
+ resolve({ code: 1, stderr: e.message });
110
+ });
111
+ });
112
+ return {
113
+ cancel: () => {
114
+ if (!child.killed)
115
+ child.kill("SIGTERM");
116
+ },
117
+ done,
118
+ };
119
+ }
120
+ function buildArgs(id, project, skillPath, resume) {
121
+ if (id === "claude") {
122
+ // Stream-json requires --verbose. --include-partial-messages would give
123
+ // us mid-message chunking but the cost is ~10× more events; we let the
124
+ // assistant message arrive as one block per turn instead.
125
+ //
126
+ // Tool whitelist keeps the agent's reach scoped even with permissions
127
+ // skipped — Read/Write/Edit/Glob/Grep/WebFetch is exactly what the
128
+ // methodology needs and nothing more (no Bash, no Task).
129
+ //
130
+ // `--continue` (resume mode) picks up the most recent session in the
131
+ // current working directory. Since we spawn with cwd=project, "most
132
+ // recent session" is the one we started for this phase. The previous
133
+ // conversation — prompt, tool calls, partial work — stays in context.
134
+ const base = [
135
+ "-p",
136
+ "--output-format",
137
+ "stream-json",
138
+ "--verbose",
139
+ "--add-dir",
140
+ skillPath,
141
+ "--dangerously-skip-permissions",
142
+ "--allowedTools",
143
+ "Read Write Edit Glob Grep WebFetch",
144
+ ];
145
+ if (resume)
146
+ base.push("--continue");
147
+ return base;
148
+ }
149
+ if (id === "codex") {
150
+ if (resume) {
151
+ // Codex's `exec resume` subcommand resumes the most recent thread.
152
+ return [
153
+ "exec",
154
+ "resume",
155
+ "--last",
156
+ "--cd",
157
+ project,
158
+ "--skip-git-repo-check",
159
+ "-s",
160
+ "workspace-write",
161
+ "--json",
162
+ "-",
163
+ ];
164
+ }
165
+ return [
166
+ "exec",
167
+ "--cd",
168
+ project,
169
+ "--add-dir",
170
+ skillPath,
171
+ "--skip-git-repo-check",
172
+ "-s",
173
+ "workspace-write",
174
+ "--json",
175
+ "-",
176
+ ];
177
+ }
178
+ return [];
179
+ }
180
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/agents/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA8CvD;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAkB;IAClD,MAAM,MAAM,GAAG,gBAAgB,CAAC;QAC9B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;QAClB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,MAAM;QACN,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,IAAmB;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;IAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;IACpC,MAAM,OAAO,GAAG,SAAS,C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yD;QACzD,EAAE;QACF,qEAAqE;QACrE,oEAAoE;QACpE,qEAAqE;QACrE,sEAAsE;QACtE,MAAM,IAAI,GAAG;YACX,IAAI;YACJ,iBAAiB;YACjB,aAAa;YACb,WAAW;YACX,WAAW;YACX,SAAS;YACT,gCAAgC;YAChC,gBAAgB;YAChB,oCAAoC;SACrC,CAAC;QACF,IAAI,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,EAAE,KAAK,OAAO,EAAE,CAAC;QACnB,IAAI,MAAM,EAAE,CAAC;YACX,mEAAmE;YACnE,OAAO;gBACL,MAAM;gBACN,QAAQ;gBACR,QAAQ;gBACR,MAAM;gBACN,OAAO;gBACP,uBAAuB;gBACvB,IAAI;gBACJ,iBAAiB;gBACjB,QAAQ;gBACR,GAAG;aACJ,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM;YACN,MAAM;YACN,OAAO;YACP,WAAW;YACX,SAAS;YACT,uBAAuB;YACvB,IAAI;YACJ,iBAAiB;YACjB,QAAQ;YACR,GAAG;SACJ,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":""}