linersh 0.5.0 → 0.5.2

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 (82) hide show
  1. package/bin/liner.js +37 -0
  2. package/cli-update-docs/ABOUT.md +69 -0
  3. package/cli-update-docs/CURATION.md +261 -0
  4. package/cli-update-docs/JOB-STORY-MIGRATION.md +99 -0
  5. package/cli-update-docs/JTBD-MASTER-PROMPT-ABOUT.md +133 -0
  6. package/cli-update-docs/JTBD-MASTER-PROMPT.md +147 -0
  7. package/cli-update-docs/MIXTAPE-FORMAT.md +398 -0
  8. package/cli-update-docs/PLATFORM.md +210 -0
  9. package/cli-update-docs/README.md +107 -0
  10. package/cli-update-docs/SKILL.md +244 -0
  11. package/cli-update-docs/TUI-BACKLOG.md +155 -0
  12. package/cli-update-docs/curator-notes.md +84 -0
  13. package/cli-update-docs/quality-check-tests.md +196 -0
  14. package/cli-update-docs/source-finding-tactics.md +99 -0
  15. package/cli-update-docs/source-quality-hierarchy.md +130 -0
  16. package/cli-update-docs/synthesis-guidance.md +133 -0
  17. package/dist/App.js +29 -12
  18. package/dist/App.js.map +1 -1
  19. package/dist/agents/detect.js +14 -4
  20. package/dist/agents/detect.js.map +1 -1
  21. package/dist/agents/prompts.js +0 -18
  22. package/dist/agents/prompts.js.map +1 -1
  23. package/dist/agents/runner.js +19 -1
  24. package/dist/agents/runner.js.map +1 -1
  25. package/dist/colors.js +48 -21
  26. package/dist/colors.js.map +1 -1
  27. package/dist/components/Header.js +5 -5
  28. package/dist/components/Header.js.map +1 -1
  29. package/dist/components/KeyHints.js +9 -2
  30. package/dist/components/KeyHints.js.map +1 -1
  31. package/dist/components/LabeledBox.js +2 -2
  32. package/dist/components/LabeledBox.js.map +1 -1
  33. package/dist/components/NextSteps.js +2 -2
  34. package/dist/components/NextSteps.js.map +1 -1
  35. package/dist/open-folder.js +28 -0
  36. package/dist/open-folder.js.map +1 -0
  37. package/dist/phases.js +5 -20
  38. package/dist/phases.js.map +1 -1
  39. package/dist/progress.js +3 -6
  40. package/dist/progress.js.map +1 -1
  41. package/dist/screens/AgentSetup.js +15 -13
  42. package/dist/screens/AgentSetup.js.map +1 -1
  43. package/dist/screens/BootSplash.js +30 -15
  44. package/dist/screens/BootSplash.js.map +1 -1
  45. package/dist/screens/CompileView.js +30 -14
  46. package/dist/screens/CompileView.js.map +1 -1
  47. package/dist/screens/FramingConfirmReview.js +14 -10
  48. package/dist/screens/FramingConfirmReview.js.map +1 -1
  49. package/dist/screens/Gate1Review.js +12 -8
  50. package/dist/screens/Gate1Review.js.map +1 -1
  51. package/dist/screens/Gate2Review.js +14 -10
  52. package/dist/screens/Gate2Review.js.map +1 -1
  53. package/dist/screens/ImportPrompt.js +143 -35
  54. package/dist/screens/ImportPrompt.js.map +1 -1
  55. package/dist/screens/LocalFilePicker.js +5 -5
  56. package/dist/screens/LocalFilePicker.js.map +1 -1
  57. package/dist/screens/NewMixtapeWizard.js +14 -14
  58. package/dist/screens/NewMixtapeWizard.js.map +1 -1
  59. package/dist/screens/PhaseRunner.js +77 -54
  60. package/dist/screens/PhaseRunner.js.map +1 -1
  61. package/dist/screens/ProcessManifest.js +11 -6
  62. package/dist/screens/ProcessManifest.js.map +1 -1
  63. package/dist/screens/ProjectHub.js +97 -141
  64. package/dist/screens/ProjectHub.js.map +1 -1
  65. package/dist/screens/SourceModal.js +2 -2
  66. package/dist/screens/SourceModal.js.map +1 -1
  67. package/dist/screens/TapeBrowser.js +79 -44
  68. package/dist/screens/TapeBrowser.js.map +1 -1
  69. package/dist/screens/TapeDraftReview.js +22 -18
  70. package/dist/screens/TapeDraftReview.js.map +1 -1
  71. package/dist/screens/TapeEditor.js +5 -5
  72. package/dist/screens/TapeEditor.js.map +1 -1
  73. package/dist/screens/cassette-art.js +21 -21
  74. package/package.json +5 -4
  75. package/dist/browser-support.js +0 -62
  76. package/dist/browser-support.js.map +0 -1
  77. package/dist/screens/BrowserSetup.js +0 -181
  78. package/dist/screens/BrowserSetup.js.map +0 -1
  79. package/dist/screens/NewProjectPrompt.js +0 -66
  80. package/dist/screens/NewProjectPrompt.js.map +0 -1
  81. package/dist/screens/Settings.js +0 -72
  82. package/dist/screens/Settings.js.map +0 -1
@@ -0,0 +1,130 @@
1
+ # Source-quality hierarchy
2
+
3
+ Loaded by the `curating-mixtapes` skill at the start of Phase 4 (Evaluation).
4
+
5
+ This file describes how to rank sources, what to avoid, and the patterns to watch for when deciding keep / trim / drop. Apply it after you've fetched every candidate in Phase 3 and before you write `working/03-evaluation.yaml`.
6
+
7
+ The goal of Phase 4 is honest assessment against the JTBD. Not breadth. Not completeness. Not even fairness to every source. *Does this source help the consuming AI do the JTBD better?* If yes, keep it. If partially, trim it. If no, drop it.
8
+
9
+ ---
10
+
11
+ ## Source-quality hierarchy
12
+
13
+ Roughly in order of preference. This is not a strict ranking — context matters — but it's the order to default to when comparing sources of similar topical relevance.
14
+
15
+ ### 1. Canonical references
16
+
17
+ Specs, standards, official platform docs, RFC documents. The primary source for whatever the topic is.
18
+
19
+ Examples by domain: Apple Human Interface Guidelines, Material Design specs, W3C standards, IETF RFCs, language specifications, official API documentation, government regulatory documents.
20
+
21
+ **Always include the primary source if one exists.** No piece of commentary on a spec is a substitute for the spec itself. The AI synthesizes better from the primary document than from anyone's interpretation of it.
22
+
23
+ ### 2. Practitioner deep-dives from people who built things
24
+
25
+ Engineers, designers, and operators at credible companies writing about specific decisions they made. Concrete, battle-tested, often with consequences described honestly. The opposite of motivational content.
26
+
27
+ Hallmarks: a specific decision is named, the trade-offs are named, the outcome is described (including when the outcome was bad). The post-mortem genre is the canonical form.
28
+
29
+ ### 3. Conference talks from credible speakers
30
+
31
+ Pre-filtered by the conference's curation. A talk that made it onto a credible conference's main track has already passed at least one quality gate. Better baseline than random video search.
32
+
33
+ Two notes: (a) talk transcripts are lower-density than articles — assume more skim, less detail. (b) Same talk reposted at multiple conferences indicates substance; keep the longest cut and drop the duplicates.
34
+
35
+ ### 4. Book chapters
36
+
37
+ Specific chapters or excerpts, not whole books. A mixtape isn't a book club — the consuming AI doesn't need 300 pages on a topic when 30 will do. Link to the chapter or include the excerpt.
38
+
39
+ Books are particularly valuable for foundational concepts and frameworks that take a chapter to develop. They're less valuable for recent specifics, which change faster than books update.
40
+
41
+ ### 5. Long-form interviews with practitioners
42
+
43
+ Useful when you can cite a specific episode for a specific point — "Episode 47, the section on incident response, 18 minutes in." Less useful as a general "this practitioner is interesting" reference.
44
+
45
+ Interview transcripts are conversational and lower-density than written work. They earn their place when the practitioner says something in the interview they haven't written down anywhere else.
46
+
47
+ ### 6. Academic papers when relevant
48
+
49
+ Often underrepresented in design and engineering mixtapes because the field skews toward practitioner blogs. When a question is genuinely empirical or has been studied formally, the paper beats any number of blog posts. Don't skip them by default just because the format is intimidating.
50
+
51
+ ---
52
+
53
+ ## What to avoid
54
+
55
+ Source types that consistently produce low-value mixtapes. Drop these unless a specific exception applies.
56
+
57
+ - **Listicles ("10 tips for...", "7 things every X should know").** Optimized for clicks, not depth. Almost always shallow despite specificity in the title.
58
+ - **AI-generated content.** Now widespread, often subtly wrong, frequently fluent enough to mislead. Detection is imperfect but the tells are: generic phrasing, no specific examples or named cases, no opinionated stance, suspiciously even coverage across sub-topics.
59
+ - **Twitter / X threads as primary sources.** Real expertise sometimes lives on Twitter, but threads are usually a teaser for longer-form work elsewhere. If a thread is the primary source, look for the article it was excerpted from. If there isn't one, ask whether a thread really earns a place in the corpus.
60
+ - **Vendor blog posts with promotional angles.** Even when the technical content is good, the promotional framing distorts the analysis. Use as background, not as primary references.
61
+ - **Most TED-style talks.** Optimized for narrative, emotional resonance, and applause moments. Low density of transferable content per minute. Exceptions exist but are rare.
62
+ - **"Ultimate guides," "complete guides," "everything you need to know."** The promise in the title is almost never met. Treat as a yellow flag.
63
+
64
+ ---
65
+
66
+ ## Decision rubric
67
+
68
+ For each fetched source, decide one of: kept, trim, dropped. Rate kept and trim sources 1–5.
69
+
70
+ - **Keep (4–5).** Strong fit with JTBD. Canonical, distinctive, or load-bearing for a knowledge-map section that would otherwise be empty. The AI's downstream output is clearly better with this source than without it.
71
+ - **Trim (3).** Real content but selective. Worth including with a curator note flagging what to read and what to skip. Trim is not "kept with reservations" — it's "kept *because* the note tells the consuming AI how to use this source." The note is doing real work.
72
+ - **Drop (1–2).** Tangential, generic, low-density, or redundant with stronger sources already kept. Drop without guilt. The cost of dropping a marginal source is low; the cost of keeping it is higher than it looks because it dilutes the corpus.
73
+
74
+ **Rating calibration.** A 5 is "this source alone makes the mixtape meaningfully more useful." A 4 is "this source clearly belongs and pulls weight." A 3 is "this source belongs only with selective framing in the note." A 2 is "this source duplicates a stronger one or has shallow content." A 1 is "this source actively makes the corpus worse if included."
75
+
76
+ If you find yourself rating most sources 4–5, you're under-discriminating. The point of evaluation is to discriminate.
77
+
78
+ ---
79
+
80
+ ## Patterns to watch for
81
+
82
+ These are the recurring failure modes during evaluation. Each one is a moment where a source seems worth keeping but isn't.
83
+
84
+ ### Redundancy
85
+
86
+ Two sources making the same point with similar examples. Keep the stronger one; drop the other. Two sources covering the same ground from different angles is not redundancy — it's coverage. The test is whether the AI would generate meaningfully different output from one vs. both. If not, redundant.
87
+
88
+ ### The duplicate trap
89
+
90
+ Same talk reposted at different conferences. Same article republished on different sites. Same interview transcribed by multiple outlets. Keep one — usually the longest, most-cited, or earliest-published version. Drop the rest.
91
+
92
+ ### Framework boilerplate masquerading as design content
93
+
94
+ Common with implementation tutorials. The video or article uses design vocabulary ("usability," "user experience," "accessibility") but teaches no transferable principles — it's a walkthrough of how to use a specific framework's API.
95
+
96
+ Drop unless the source encodes a genuinely transferable pattern. A Ratatui tutorial that happens to mention layout principles is a Ratatui tutorial. A Ratatui tutorial that articulates the immediate-mode rendering principle and shows why it matters for terminal UI architecture is a design source.
97
+
98
+ ### The rescue move
99
+
100
+ A source flagged as "low-value" during candidate discovery (Phase 2) sometimes turns out to be the only one that addresses a specific gap once you've actually read every candidate. If a low-priority source uniquely covers a knowledge-map section that would otherwise be empty or thin, rescue it. Mark the decision and the rationale clearly.
101
+
102
+ > TODO: Insert worked example from the Cowork CLI/TUI synthesis. The canonical example is the Caligula segment inside transcript #34 "some cool Linux programs you've never seen" — OpenClaw flagged it as lower-value, Cowork rescued it as "the closest direct precedent in your whole corpus." This is the textbook rescue move. Pull the specific decision and the rationale used.
103
+
104
+ ### Author overrepresentation
105
+
106
+ Three of five sources in a section are by the same author. This narrows perspective and reduces the AI's ability to synthesize across views. Keep the single strongest piece by that author; replace the others with sources by different practitioners. The exception: if the author has genuinely written the canonical work in multiple sub-areas, and no other practitioner has equivalent work, keeping multiple pieces is justified — but you should be able to defend it.
107
+
108
+ ### Recency without substance
109
+
110
+ Recent does not mean better. A 2024 article that summarizes well-known points is weaker than a 2018 article that originated them. Don't auto-prefer recent. Don't auto-discount old. Apply the same JTBD-fit test regardless of publication date.
111
+
112
+ ---
113
+
114
+ ## Output: `working/03-evaluation.yaml`
115
+
116
+ Write every candidate's decision, regardless of whether it was kept or dropped. The dropped decisions matter — they're how the working notes show that evaluation actually happened.
117
+
118
+ ```yaml
119
+ candidates:
120
+ - url: https://example.com/source
121
+ title: Source title
122
+ decision: kept # kept | trim | dropped
123
+ rating: 5 # 1-5; required for kept and trim
124
+ section: foundations
125
+ rationale: One-sentence reason this decision was made.
126
+ ```
127
+
128
+ For dropped sources, the rationale should name *why* dropped — "duplicates Source 4," "shallow listicle," "AI-generated," "off-topic relative to JTBD." Generic "low quality" is not useful. Be specific.
129
+
130
+ > TODO: Insert two or three worked evaluation entries pulled from the Cowork synthesis — one keep with rating 5, one trim with rating 3, one drop with a specific rationale. These are the highest-leverage examples in the file.
@@ -0,0 +1,133 @@
1
+ # Synthesis guidance
2
+
3
+ Loaded by the `curating-mixtapes` skill at the start of Phase 6 (Synthesis).
4
+
5
+ This file describes how to draft `synthesis.md`. Apply it after Phase 5's quality checks have passed and the keep-list is locked. The synthesis is the most personal artifact in the mixtape and the one with the largest effect on downstream AI output. Don't shortcut it.
6
+
7
+ ---
8
+
9
+ ## What the synthesis is
10
+
11
+ The synthesis is the curator's distilled understanding of the domain expressed as continuous prose. It lives at the top of the compiled `MIXTAPE.md` and is the first thing the consuming AI reads.
12
+
13
+ Without a synthesis, the AI gets a list of sources and curator notes. It has to construct its own framing of the domain from those pieces, which dilutes the curator's view.
14
+
15
+ With a synthesis, the AI gets the curator's framing of the entire domain *before* it sees any source. The synthesis shapes how the AI reads everything that follows. This is the largest single lever for changing downstream AI output, and why the synthesis is required, not optional.
16
+
17
+ Length: **800–2000 words.** Shorter for narrow topics; longer for broader ones. If you find yourself below 600 words, the synthesis is probably too thin. If you're above 2500, the synthesis is doing work the sources should be doing.
18
+
19
+ ---
20
+
21
+ ## What goes in
22
+
23
+ Four kinds of content earn their place in the synthesis.
24
+
25
+ ### Principles or framework
26
+
27
+ The conceptual structure the curator sees in the domain. Not a definition list — a framework. "Good CLI design rests on four pillars: predictable command shape, humane errors, useful defaults, and machine-readable output." That framework, once articulated, shapes how the AI reads every source in the corpus.
28
+
29
+ ### Contested questions
30
+
31
+ Where credible practitioners disagree, name the disagreement and where the curator stands. "There's an ongoing argument about whether CLIs should mirror existing tool conventions or break them deliberately when the underlying behaviour differs. This mixtape leans toward mirroring; sources 7 and 12 represent the dissenting view."
32
+
33
+ Contested questions are gold for downstream AI output. They give the AI permission to represent the domain as contested rather than collapsing it into one answer.
34
+
35
+ ### Distinctions between concepts that get confused
36
+
37
+ Where the domain has terms or concepts that get used interchangeably but shouldn't, draw the line clearly. "A *wizard* and a *form* are not the same thing. A form collects fields. A wizard collects fields *in a specific order, one at a time, with the option to navigate back*. The distinction matters because [...]."
38
+
39
+ These distinctions are what an AI without the synthesis would have to infer from context. With the synthesis, they're explicit and load-bearing.
40
+
41
+ ### When to use the mixtape and when to look elsewhere
42
+
43
+ A short paragraph at the end: what kinds of questions this mixtape is meant to help with, and what kinds it isn't. This is honest about the corpus's scope. "This mixtape is calibrated for designing CLIs that humans will use interactively. It's less useful for non-interactive CI/CD scripts or for shell-script ergonomics — those are adjacent topics with different conventions."
44
+
45
+ ---
46
+
47
+ ## What doesn't go in
48
+
49
+ Content that looks like it belongs in the synthesis but doesn't.
50
+
51
+ ### Source-by-source recap
52
+
53
+ "Source 1 argues X. Source 2 argues Y. Source 3 builds on Source 1 to argue Z." This is what a literature review does for an academic paper. The mixtape doesn't need it — the source index handles that role, and the consuming AI will read individual sources when it needs the specifics.
54
+
55
+ If the synthesis is recapping sources, the curator hasn't actually synthesized yet. Force the harder question: what does the curator think about the *domain*, given all these sources?
56
+
57
+ ### Generic introductions
58
+
59
+ "Mobile design is the practice of designing applications for mobile devices, including smartphones and tablets, which have specific constraints around screen size, input methods, and connectivity." This is what the AI already knows. The synthesis isn't a Wikipedia stub. Start where the AI's training data ends.
60
+
61
+ ### Tutorial content
62
+
63
+ "To design a good CLI, first identify your audience, then decide on a command structure, then..." This is how-to writing, not synthesis. The synthesis is *what the curator thinks about the domain*, not *how to do the work*.
64
+
65
+ ### Cheerleading or motivation
66
+
67
+ "Good CLI design matters more than ever in an age of..." Cut. The AI doesn't need motivation. The curator's enthusiasm is irrelevant to the synthesis's job.
68
+
69
+ ---
70
+
71
+ ## Structure
72
+
73
+ A typical synthesis runs:
74
+
75
+ 1. **Opening framing** (1–2 paragraphs). What this domain is fundamentally about. The frame the curator uses to organize their understanding. Not a definition — a stance.
76
+ 2. **The framework or principles** (2–4 paragraphs). The structure the curator sees. Named, not just described.
77
+ 3. **Contested questions** (1–3 paragraphs). Where credible practitioners disagree. Where the curator stands.
78
+ 4. **Important distinctions** (1–2 paragraphs). Concepts the AI is likely to conflate without correction.
79
+ 5. **Scope and limits** (1 short paragraph). What this mixtape covers and what it doesn't.
80
+
81
+ This is a default. Vary it when the topic warrants — some domains lead with contested questions, some with distinctions, some with a different opening move. The structure serves the content.
82
+
83
+ ---
84
+
85
+ ## Voice and stance
86
+
87
+ The synthesis is written in the curator's voice. First-person is fine. Strong stances are fine — preferred, actually. The AI synthesizes better from a confident framing than from a hedged one.
88
+
89
+ "I think the most important distinction in CLI design is..." is better than "Many practitioners consider one of the important distinctions to be..." The first is a stance the AI can engage with; the second is mush.
90
+
91
+ This doesn't mean overconfidence. Hedging is appropriate where the curator is genuinely uncertain. But default to stance. Mush in the synthesis produces mush in downstream output.
92
+
93
+ ---
94
+
95
+ ## Quick mode vs. methodology mode
96
+
97
+ **Quick mode.** The AI drafts the synthesis. Apply this guidance during drafting. Show the curator the draft. Default is "looks good, save it." The curator lightly edits if they want.
98
+
99
+ The risk in quick mode is that AI-drafted synthesis drifts toward source-by-source recap because that's the easier output shape. Resist this actively. The AI's draft should already be a real synthesis, not a placeholder that says "the curator will rewrite this."
100
+
101
+ **Methodology mode.** The AI drafts a starting point. Expect the curator to rewrite it substantially in their own voice. The methodology-mode synthesis is the curator's voice on the domain — AI-drafted starting points with light edits don't meet the bar.
102
+
103
+ Library contributions require methodology-mode synthesis. A synthesis that reads as AI-drafted is a signal the mixtape is quick-mode in methodology-mode clothing. The reviewers will catch it.
104
+
105
+ ---
106
+
107
+ ## A failure mode worth naming
108
+
109
+ The most common synthesis failure is one I'll call **synthesis-as-recap.**
110
+
111
+ An AI drafting a synthesis gravitates toward describing what each source says, because that's the immediately available material in context. It produces something that reads like a research summary: "Sources 1, 4, and 9 argue X. Sources 2 and 6 take a different view, arguing Y. Source 7 offers a synthesis of both positions."
112
+
113
+ This is not a synthesis. It's a recap. The consuming AI can produce its own recap from the source list; what it can't produce is the curator's framing of the domain.
114
+
115
+ The fix: stop describing sources, start describing the domain. The synthesis should be readable as a coherent essay on the domain by someone who happens to have read all these sources — not as a tour of the corpus.
116
+
117
+ If the synthesis names source numbers ("Source 1 argues..."), it's probably synthesis-as-recap. Real synthesis names ideas, not sources. The source index handles attribution; the synthesis handles framing.
118
+
119
+ ---
120
+
121
+ ## Worked examples
122
+
123
+ > TODO: Insert two worked synthesis excerpts from the Cowork CLI/TUI synthesis. The full Cowork document is the longest worked example available — pull the opening framing paragraphs as one example, and a contested-question or distinction paragraph as another.
124
+
125
+ > TODO: Insert one example of synthesis-as-recap (bad) for contrast. Either invent one against the CLI/TUI material or pull an earlier draft if one exists. The bad example should make the difference between "describing sources" and "framing a domain" obvious at a glance.
126
+
127
+ ---
128
+
129
+ ## Output: `synthesis.md`
130
+
131
+ Plain markdown. No front matter. Begins with a top-level heading that matches the mixtape title (e.g., `# Mobile Design Foundations — Synthesis`). The full file gets included verbatim at the top of `MIXTAPE.md` by `liner compile`.
132
+
133
+ Write the synthesis to `synthesis.md` in the project folder. Show the curator the result before declaring Phase 6 complete.
package/dist/App.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from "react";
2
2
  import { Box, Text } from "ink";
3
3
  import { AppContext } from "./store.js";
4
- import { ERROR } from "./colors.js";
4
+ import { MUTED, ERROR } from "./colors.js";
5
5
  import { TapeBrowser } from "./screens/TapeBrowser.js";
6
6
  import { TapeEditor } from "./screens/TapeEditor.js";
7
7
  import { SourceModal } from "./screens/SourceModal.js";
@@ -44,30 +44,47 @@ export function App() {
44
44
  const [projects, setProjects] = useState([]);
45
45
  const [notification, setNotification] = useState(null);
46
46
  const [bootError, setBootError] = useState(null);
47
- // navigate(next) pushes the current screen onto a back stack and replaces
48
- // it with `next`. Side effect: clears the terminal scrollback when the
49
- // user moves between meaningfully different surfaces (any kind change, or
50
- // a phaseRunner re-entry with a different phaseId). Clearing happens
51
- // before setScreen so Ink's next render lands on a fresh canvas — vs.
52
- // clearing after, which would briefly show then erase the new screen.
47
+ // navigate(next) moves to `next` and maintains the back stack.
48
+ //
49
+ // Dedupe rule: if `next` is already somewhere in the back stack, we REWIND
50
+ // to it (drop everything above it) instead of pushing a duplicate. This is
51
+ // what stops esc loops: several screens hardcode `navigate({kind:"hub"})` /
52
+ // `navigate({kind:"browser"})` for their "go back" action instead of
53
+ // back(), which would otherwise push A→B→A→B forever (e.g. hub esc →
54
+ // browser, browser esc → back to hub, repeat). Rewinding collapses the
55
+ // cycle so esc always makes progress toward home (splash).
56
+ //
57
+ // Side effect: clears the terminal scrollback when the user moves between
58
+ // meaningfully different surfaces. Done before setScreen so Ink's next
59
+ // render lands on a fresh canvas.
53
60
  const navigate = useCallback((next) => {
54
61
  setScreen((current) => {
55
- setHistory((h) => [...h, current].slice(-HISTORY_LIMIT));
56
62
  if (process.stdout.isTTY && shouldClearOnNavigate(current, next)) {
57
63
  process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
58
64
  }
65
+ const nextKey = JSON.stringify(next);
66
+ setHistory((h) => {
67
+ const existingIdx = h.findIndex((s) => JSON.stringify(s) === nextKey);
68
+ if (existingIdx !== -1)
69
+ return h.slice(0, existingIdx);
70
+ return [...h, current].slice(-HISTORY_LIMIT);
71
+ });
59
72
  return next;
60
73
  });
61
74
  }, []);
62
75
  // back() pops the history stack and navigates to the prior screen. When
63
- // the stack is empty (root) it falls back to the browser. We pop INSIDE
64
- // setScreen so the two updates batch and Ink renders once.
76
+ // the stack is empty (root) it falls back to the splash (home). We pop
77
+ // INSIDE setScreen so the two updates batch and Ink renders once.
65
78
  const back = useCallback(() => {
66
79
  setHistory((h) => {
67
80
  if (h.length === 0) {
81
+ // Empty history = user is at the root. Land on home (splash), not
82
+ // the browser — home is the terminal screen for esc, and esc on home
83
+ // is a no-op (see BootSplash), so navigation stops there instead of
84
+ // looping home ↔ browser.
68
85
  if (process.stdout.isTTY)
69
86
  process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
70
- setScreen({ kind: "browser" });
87
+ setScreen({ kind: "splash" });
71
88
  return h;
72
89
  }
73
90
  const prev = h[h.length - 1];
@@ -98,7 +115,7 @@ export function App() {
98
115
  if (bootError) {
99
116
  return (React.createElement(Box, { flexDirection: "column" },
100
117
  React.createElement(Text, { color: ERROR }, bootError),
101
- React.createElement(Text, { dimColor: true }, "Press Ctrl+C to exit.")));
118
+ React.createElement(Text, { color: MUTED }, "Press Ctrl+C to exit.")));
102
119
  }
103
120
  const ctx = {
104
121
  screen,
package/dist/App.js.map CH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AAsE;IACtE,IAAI,CAAC,gBAAgB,EAAE;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IACpD,wEAAwE;IACxE,yDAAyD;IACzD,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACpB,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;QACjC,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAC3D,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,SAAS,qBAAqB,CAAC,IAAY,EAAE,IAAY;IACvD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,cAAc;IACrB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC1C,MAAM,GAAG,GAAG,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;IACxD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { spawnSync } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
3
  import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
4
5
  /**
5
6
  * Resolve an agent binary path. Resolution order:
6
7
  *
@@ -67,16 +68,25 @@ export function detectAgents() {
67
68
  *
68
69
  * Resolution order:
69
70
  * 1. `LINER_SKILL_PATH` env var (must contain SKILL.md).
70
- * 2. Walk up from cwd looking for `cli-update-docs/SKILL.md` or
71
- * `skills/curating-mixtapes/SKILL.md`.
72
- * 3. Walk up from the TUI binary location (covers the dev/global-install case).
71
+ * 2. Walk up from this module's own location (covers the npm-installed
72
+ * case — the skill bundle ships inside the package at
73
+ * `linersh/cli-update-docs/`, and `import.meta.url` resolves the
74
+ * symlinks npx puts in front of the package).
75
+ * 3. Walk up from cwd (covers the dev-from-repo case where the user
76
+ * is somewhere inside the liner working tree).
77
+ * 4. Walk up from `process.argv[1]` (legacy global-install case).
73
78
  */
74
79
  export function resolveSkillPath() {
75
80
  const env = process.env["LINER_SKILL_PATH"];
76
81
  if (env && existsSync(join(env, "SKILL.md")))
77
82
  return env;
78
83
  const candidates = ["cli-update-docs", "skills/curating-mixtapes"];
79
- const searchFromRoots = [process.cwd(), dirname(process.argv[1] ?? "")].filter(Boolean);
84
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
85
+ const searchFromRoots = [
86
+ moduleDir,
87
+ process.cwd(),
88
+ dirname(process.argv[1] ?? ""),
89
+ ].filter(Boolean);
80
90
  for (const root of searchFromRoots) {
81
91
  const hit = walkUp(root, candidates);
82
92
  if (hit)
@@ -1 +1 @@
1
- {"version":3,"file":"detect.js","sourceRoot":"","sources":["../../src/agents/detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;;;;;;;;;GAeG;AACH,SAAS,UAAU,CAAC,IAAY,EAAE,MAAc;IAC9C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,QAAQ,IAAI,QAA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this source*. When in doubt: rules → \`prescription\`; arguments → \`principle\`; examples → \`example\`; authority without narrative → \`reference\`.
182
182
 
183
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
184
  };
203
185
  /** Construct the system+user prompt blob passed to the agent. */
204
186
  export function buildPhasePrompt(args) {
@@ -1 +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,CAA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AAM,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -41,7 +41,19 @@ export function runAgentTask(args) {
41
41
  const child = spawn(command, cliArgs, {
42
42
  stdio: ["pipe", "pipe", "pipe"],
43
43
  cwd: args.project,
44
- env: { ...process.env },
44
+ env: {
45
+ ...process.env,
46
+ // Disable extended/interleaved thinking for the spawned Claude Code.
47
+ // A long multi-turn tool loop with thinking on hits a hard API 400 once
48
+ // Claude Code auto-compacts the conversation: a prior `thinking` block
49
+ // gets modified on replay and the API rejects the next turn
50
+ // ("`thinking` or `redacted_thinking` blocks ... cannot be modified").
51
+ // It surfaces both on fresh runs (~25+ turns) and instantly on resume
52
+ // (the resume replays the already-corrupted message). Turning thinking
53
+ // off removes the blocks entirely, so the failure class can't occur.
54
+ // Only Claude reads this; Codex ignores it.
55
+ ...(args.agent.id === "claude" ? { MAX_THINKING_TOKENS: "0" } : {}),
56
+ },
45
57
  });
46
58
  // On resume, the previous session already contains the prompt + all prior
47
59
  // tool-call results in context. Send a tiny continuation nudge instead of
@@ -131,6 +143,11 @@ function buildArgs(id, project, skillPath, resume) {
131
143
  // current working directory. Since we spawn with cwd=project, "most
132
144
  // recent session" is the one we started for this phase. The previous
133
145
  // conversation — prompt, tool calls, partial work — stays in context.
146
+ //
147
+ // `--strict-mcp-config` with no `--mcp-config` loads zero MCP servers, so
148
+ // the methodology agent doesn't inherit the user's global connectors
149
+ // (Gmail, Drive, etc.). Those are irrelevant to curation, bloat the
150
+ // context window, and widen the agent's reach for no benefit.
134
151
  const base = [
135
152
  "-p",
136
153
  "--output-format",
@@ -138,6 +155,7 @@ function buildArgs(id, project, skillPath, resume) {
138
155
  "--verbose",
139
156
  "--add-dir",
140
157
  skillPath,
158
+ "--strict-mcp-config",
141
159
  "--dangerously-skip-permissions",
142
160
  "--allowedTools",
143
161
  "Read Write Edit Glob Grep WebFetch",
@@ -1 +1 @@
1
- {"version":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