linersh 0.5.7 → 1.0.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/README.md +84 -159
- package/bin/liner.js +89 -44
- package/cli-update-docs/README.md +6 -6
- package/cli-update-docs/SKILL.md +72 -37
- package/cli-update-docs/quality-check-tests.md +256 -8
- package/cli-update-docs/source-finding-tactics.md +140 -3
- package/cli-update-docs/source-quality-hierarchy.md +83 -0
- package/cli-update-docs/synthesis-guidance.md +19 -5
- package/dist/agents/artifact-validation.js +440 -0
- package/dist/agents/artifact-validation.js.map +1 -0
- package/dist/agents/candidate-longlist.js +100 -0
- package/dist/agents/candidate-longlist.js.map +1 -0
- package/dist/agents/detect.js +3 -2
- package/dist/agents/detect.js.map +1 -1
- package/dist/agents/evaluation-assembly.js +270 -0
- package/dist/agents/evaluation-assembly.js.map +1 -0
- package/dist/agents/headless-runner.js +227 -0
- package/dist/agents/headless-runner.js.map +1 -0
- package/dist/agents/jtbd-clarify.js +42 -41
- package/dist/agents/jtbd-clarify.js.map +1 -1
- package/dist/agents/models.js +6 -7
- package/dist/agents/models.js.map +1 -1
- package/dist/agents/prompts.js +220 -20
- package/dist/agents/prompts.js.map +1 -1
- package/dist/agents/runner.js +462 -21
- package/dist/agents/runner.js.map +1 -1
- package/dist/phases.js +13 -13
- package/dist/phases.js.map +1 -1
- package/dist/source-inbox.js +297 -0
- package/dist/source-inbox.js.map +1 -0
- package/dist/version.js +3 -9
- package/dist/version.js.map +1 -1
- package/dist/yaml-io.js +42 -11
- package/dist/yaml-io.js.map +1 -1
- package/package.json +26 -23
- package/cli-update-docs/ABOUT.md +0 -69
- package/cli-update-docs/AI-HANDOFF.md +0 -241
- package/cli-update-docs/CURATION.md +0 -261
- package/cli-update-docs/JOB-STORY-MIGRATION.md +0 -99
- package/cli-update-docs/JTBD-MASTER-PROMPT-ABOUT.md +0 -133
- package/cli-update-docs/JTBD-MASTER-PROMPT.md +0 -147
- package/cli-update-docs/LINER-MASTER.md +0 -546
- package/cli-update-docs/MIXTAPE-FORMAT.md +0 -398
- package/cli-update-docs/PLATFORM.md +0 -210
- package/cli-update-docs/TUI-BACKLOG.md +0 -155
- package/dist/App.js +0 -220
- package/dist/App.js.map +0 -1
- package/dist/colors.js +0 -132
- package/dist/colors.js.map +0 -1
- package/dist/components/Header.js +0 -15
- package/dist/components/Header.js.map +0 -1
- package/dist/components/KeyHints.js +0 -17
- package/dist/components/KeyHints.js.map +0 -1
- package/dist/components/LabeledBox.js +0 -53
- package/dist/components/LabeledBox.js.map +0 -1
- package/dist/components/NextSteps.js +0 -18
- package/dist/components/NextSteps.js.map +0 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +0 -1
- package/dist/screens/AgentSetup.js +0 -224
- package/dist/screens/AgentSetup.js.map +0 -1
- package/dist/screens/BootSplash.js +0 -163
- package/dist/screens/BootSplash.js.map +0 -1
- package/dist/screens/CompileView.js +0 -567
- package/dist/screens/CompileView.js.map +0 -1
- package/dist/screens/FramingConfirmReview.js +0 -197
- package/dist/screens/FramingConfirmReview.js.map +0 -1
- package/dist/screens/Gate1Review.js +0 -147
- package/dist/screens/Gate1Review.js.map +0 -1
- package/dist/screens/Gate2Review.js +0 -162
- package/dist/screens/Gate2Review.js.map +0 -1
- package/dist/screens/ImportPrompt.js +0 -173
- package/dist/screens/ImportPrompt.js.map +0 -1
- package/dist/screens/JsSetup.js +0 -77
- package/dist/screens/JsSetup.js.map +0 -1
- package/dist/screens/LocalFilePicker.js +0 -139
- package/dist/screens/LocalFilePicker.js.map +0 -1
- package/dist/screens/NewMixtapeWizard.js +0 -662
- package/dist/screens/NewMixtapeWizard.js.map +0 -1
- package/dist/screens/PhaseRunner.js +0 -1203
- package/dist/screens/PhaseRunner.js.map +0 -1
- package/dist/screens/ProcessManifest.js +0 -160
- package/dist/screens/ProcessManifest.js.map +0 -1
- package/dist/screens/ProjectHub.js +0 -557
- package/dist/screens/ProjectHub.js.map +0 -1
- package/dist/screens/SourceModal.js +0 -269
- package/dist/screens/SourceModal.js.map +0 -1
- package/dist/screens/TapeBrowser.js +0 -312
- package/dist/screens/TapeBrowser.js.map +0 -1
- package/dist/screens/TapeDraftReview.js +0 -444
- package/dist/screens/TapeDraftReview.js.map +0 -1
- package/dist/screens/TapeEditor.js +0 -310
- package/dist/screens/TapeEditor.js.map +0 -1
- package/dist/screens/cassette-art.js +0 -72
- package/dist/screens/cassette-art.js.map +0 -1
- package/dist/store.js +0 -10
- package/dist/store.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jtbd-clarify.js","sourceRoot":"","sources":["../../src/agents/jtbd-clarify.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"jtbd-clarify.js","sourceRoot":"","sources":["../../src/agents/jtbd-clarify.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,0DAA0D;AAC1D,EAAE;AACF,4EAA4E;AAC5E,sEAAsE;AACtE,+EAA+E;AAC/E,6EAA6E;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmB3C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,IAAgB;IAC9D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;IAC3G,CAAC;IAED,MAAM,MAAM,GAAG,8BAA8B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAC9C,IAAI,CAAC;YACH,OAAO,MAAM,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI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AK,CAAC,wBAAwB,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC3D,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,CAAC;IACtC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YAC5C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACxB,CAAC;aAAM,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;YAClE,uEAAuE;YACvE,MAAM,CAAC,GAAI,IAAgC,CAAC,UAAU,CAAC,CAAC;YACxD,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE;gBAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/agents/models.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
// Per-phase model selection.
|
|
2
2
|
//
|
|
3
3
|
// Candidate discovery + evaluation are ~65% of a cycle's token cost, and their
|
|
4
|
-
// work is fetch/triage-heavy rather than taste-heavy
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
4
|
+
// work is fetch/triage-heavy rather than taste-heavy. Claude has a stable
|
|
5
|
+
// `sonnet` alias we can safely use for those two phases. Codex's concrete
|
|
6
|
+
// model IDs vary by account type, so Codex stays on its own default unless the
|
|
7
|
+
// user explicitly configures an override. On a subscription the win is
|
|
8
8
|
// rate-limit quota, not dollars.
|
|
9
9
|
//
|
|
10
10
|
// A phase absent from the map runs on the agent's default model (no --model
|
|
11
11
|
// flag). Users override per agent + phase in ~/.liner/config.yaml — set a
|
|
12
12
|
// phase back to a flagship model to undo the downgrade.
|
|
13
13
|
// Default downgrades, applied unless the user overrides them in config. The
|
|
14
|
-
// values are the agent CLIs' own model identifiers/aliases
|
|
15
|
-
// `sonnet` alias; Codex takes a model id via -m/--model.
|
|
14
|
+
// values are the agent CLIs' own model identifiers/aliases.
|
|
16
15
|
const DEFAULT_MODELS = {
|
|
17
16
|
claude: { candidates: "sonnet", evaluation: "sonnet" },
|
|
18
|
-
codex: {
|
|
17
|
+
codex: {},
|
|
19
18
|
};
|
|
20
19
|
export function defaultModelMap(agent) {
|
|
21
20
|
return DEFAULT_MODELS[agent] ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/agents/models.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,EAAE;AACF,+EAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/agents/models.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,EAAE;AACF,+EAA+E;AAC/E,0EAA0E;AAC1E,0EAA0E;AAC1E,+EAA+E;AAC/E,uEAAuE;AACvE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,wDAAwD;AAOxD,4EAA4E;AAC5E,4DAA4D;AAC5D,MAAM,cAAc,GAAmC;IACrD,MAAM,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;IACtD,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAc,EACd,OAAgB,EAChB,SAAyB;IAEzB,IAAI,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC;QAC1E,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC;IACzC,CAAC;IACD,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/agents/prompts.js
CHANGED
|
@@ -10,38 +10,84 @@ const COMPANIONS = {
|
|
|
10
10
|
quality: ["quality-check-tests.md"],
|
|
11
11
|
synthesis: ["synthesis-guidance.md"],
|
|
12
12
|
};
|
|
13
|
+
export const WORKSPACE_DISCIPLINE = `# Workspace discipline
|
|
14
|
+
|
|
15
|
+
- Treat the project folder as a mixtape artifact folder, not a git worktree, unless a \`.git\` directory is actually present there or you are explicitly inspecting a source repository that belongs to the corpus.
|
|
16
|
+
- Do not run \`git diff\`, \`git status\`, or repository introspection in the mixtape project folder just to verify generated artifacts. Use file reads and parsers against the specific artifact paths you wrote.
|
|
17
|
+
- For validation snippets, prefer Node.js or Python. If you use Ruby, stay compatible with Ruby 2.6 and do not use newer helpers such as \`Array#tally\`.
|
|
18
|
+
- Keep shell checks narrow: read or parse the required artifacts, then stop.`;
|
|
13
19
|
const PHASE_INSTRUCTIONS = {
|
|
14
20
|
framing: `## Phase 1 — Framing
|
|
15
21
|
|
|
16
|
-
Define the job-to-be-done and sketch the knowledge map.
|
|
22
|
+
Define the reusable AI capability, derive the internal job-to-be-done, and sketch the knowledge map.
|
|
17
23
|
|
|
18
|
-
- The
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
24
|
+
- The user provided a plain-language capability goal in \`tape.yaml.jtbd\` and \`working/01-jtbd-and-knowledge-map.md\`: what this Liner should help a future AI agent do. Read both.
|
|
25
|
+
- Treat that field as user intent, not as a finished formal JTBD. The user should not have to know research lanes, source categories, or Job Story syntax.
|
|
26
|
+
- **Read \`tape.yaml.jtbd_clarifications\` if present.** Those are the user's answers to sharpening questions about capability boundaries, output behavior, quality anchors, constraints, and future-agent autonomy. Use them to derive the research plan.
|
|
27
|
+
- Write a Capability Brief before the knowledge map: what future AI sessions should be able to do, what outputs/decisions/behaviors it supports, the internal JTBD, inferred research lanes, required source roles/exclusions, and runtime behavior for the future agent.
|
|
28
|
+
- The Capability Brief must include a **Required source roles** subsection. Source roles are capability-specific evidence jobs, not generic kinds. Derive them from what the future AI must do. Typical roles include: core-action methods, domain/primary authority, worked examples or case studies, implementation constraints, critique/validation evidence, dissenting practitioner voice, and domain-specific data. Delete roles that do not fit; add roles the capability clearly needs.
|
|
29
|
+
- For each required source role, name why it matters, what good evidence looks like, and the minimum kept/trim sources the corpus needs. Defaults: at least 2 strong sources for required roles; at least 3 substantive worked examples/case studies when the capability depends on taste, visual output, craft judgment, or recognizing quality; primary/official sources for legal, medical, financial, or safety-sensitive authority roles.
|
|
30
|
+
- Detect specialized **capability patterns** and write them into the Capability Brief. If the goal involves images, moodboards, visual references, inspiration, style, art direction, examples, or translating one medium/domain into another output, mark \`Capability pattern: reference-translation\`. For that pattern, source roles must separate: input/reference-domain interpretation, cross-domain translation method, target-output constraints, critique/clarification, and caller handoff language. Output-medium implementation sources are bridge evidence; they cannot satisfy the input/reference-domain or translation-method roles by themselves.
|
|
31
|
+
- For \`reference-translation\`, the brief must name the runtime output contract. It should say what the future agent returns to the caller, such as observations, interpretation, carry-forward principles, product/interface vocabulary, implementation constraints, avoid-list, validation checks, and clarification questions.
|
|
32
|
+
- The internal JTBD must be hyper-specific, not a broad topic. "SEO" is too broad; "SEO keyword research for a mental-health startup specialized in brain surgery" is specific enough to research.
|
|
33
|
+
- If the capability is still too broad after clarifications, push back in your output and ask the user to revise.
|
|
34
|
+
- The knowledge map is 4–8 sections, each with a few sub-areas. Treat it as a hypothesis to be revised during research. If multiple domains are needed for the capability, sections must visibly cover each one — uneven coverage is a framing failure.
|
|
22
35
|
|
|
23
36
|
**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
37
|
|
|
25
|
-
Write the result to working/01-jtbd-and-knowledge-map.md (overwriting placeholders including the sentinel above, keeping the
|
|
38
|
+
Write the result to working/01-jtbd-and-knowledge-map.md (overwriting placeholders including the sentinel above, keeping the user's original capability line visible and adding your derived Capability Brief). Stop after this file is written. Do not start Phase 2.`,
|
|
26
39
|
candidates: `## Phase 2 — Candidate discovery
|
|
27
40
|
|
|
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.
|
|
41
|
+
Read working/01-jtbd-and-knowledge-map.md for the Capability Brief, internal JTBD, research lanes, and knowledge map. Then read the companion file \`source-finding-tactics.md\` in the skill bundle.
|
|
29
42
|
|
|
30
43
|
- Generate a long-list of candidate sources covering every section of the knowledge map. URLs and titles only — NO fetching yet.
|
|
31
|
-
-
|
|
44
|
+
- Cover the **Required source roles** from the Capability Brief, not only the knowledge-map sections. Each candidate reason should name the source role it may satisfy. If a role is required, aim for 3–6 plausible candidates before stopping; if no good candidates exist, write a "Role gaps" note in the long-list.
|
|
45
|
+
- Aim wide enough for the evidence contract: roughly 2–4× the eventual kept count, but derive the candidate count from the Required source roles, capability pattern, and source ecology rather than a fixed target.
|
|
32
46
|
- **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
47
|
- For each candidate, capture: URL, title, one-line reason it's a candidate.
|
|
48
|
+
- If \`tape.yaml\` already has curator-provided web or YouTube sources, seed the long-list with those URLs before searching. Treat local files and skill sources as curator-provided context that should inform the reasons and sections, even when they are not URL candidates.
|
|
49
|
+
- **Find sources for the capability, not just the topic.** Extract the core future-agent action from the Capability Brief ("translate moodboards into UI direction", "debug failing CI", "write grant narratives", "generate medical SEO keyword clusters") and make sure the long-list includes sources that directly teach, demonstrate, or constrain that action. Implementation references, design-system docs, tooling docs, or process articles may be useful bridge sources, but they cannot satisfy the core action by themselves.
|
|
50
|
+
- **Deepen curator-named anchors.** When the curator names a person, studio, product, software, channel, or example they like, research why that anchor matters: their case studies, interviews, talks, docs, essays, YouTube appearances, or worked examples. Do not stop at a homepage/gallery/crawler result unless no deeper readable source exists, and say so in the reason.
|
|
51
|
+
- **For visual-output JTBDs, include visual and worked-example evidence.** If the job involves images, moodboards, art, posters, editorial design, interface concepts, or craft taste, search for image-heavy examples, case studies, design breakdowns, portfolios with rationale, talks, or videos. A corpus made mostly of UX primers, CSS references, and design-system docs is probably under-serving the job even if every knowledge-map section has a source.
|
|
52
|
+
- **For reference-translation capabilities, build a source ecology.** If Phase 1 marked \`Capability pattern: reference-translation\`, the candidate list must include candidates for at least two input/reference domains outside the target output medium, plus candidates that teach the translation move and candidates that demonstrate handoff language for the caller. For an art-direction-to-web project, web craft and accessibility sources are bridge/constraint candidates; they do not replace sources from visual culture, art direction, graphic design, architecture/interiors, photography/film, fashion, packaging, sports/media identity, or other source worlds named or implied by the goal.
|
|
53
|
+
- **If this is an improvement pass, use the audit.** If \`working/05-operating-fit-audit.md\` exists with \`status: improvement_recommended\`, treat this run as a focused second pass. Preserve the strongest existing source roles, search for the missing roles named in the audit, and rebuild the candidate list around the gap instead of restarting from the generic topic.
|
|
54
|
+
|
|
55
|
+
**Bounded search discipline:** Phase 2 should produce a useful long-list, not exhaust the internet. Count coverage by source roles and capability-pattern lanes, not by a universal source target. For ordinary narrow projects, stop when every required role and central knowledge-map section has enough candidates; that may be under 20. For broad, multi-domain, or \`reference-translation\` projects, continue past 30 when needed until each required role and each declared input/reference domain has 3–6 plausible verified candidates, usually topping out around 40–60 unless the Capability Brief explicitly needs more. If added candidates are redundant or low-signal, stop and write a Role gaps note instead of padding. If a URL cannot be verified after one direct attempt and one alternate search, skip it or include a nearby verified substitute instead of continuing to chase it.
|
|
34
56
|
|
|
35
57
|
**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
58
|
|
|
37
|
-
Write to working/02-candidate-longlist.md, grouped by knowledge-map section. Stop after this file is written.
|
|
59
|
+
Write to working/02-candidate-longlist.md, grouped by knowledge-map section. Replace the placeholder entirely. Stop after this file is written; do not keep searching after you have enough candidates.
|
|
38
60
|
|
|
39
61
|
⚠ 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
62
|
evaluation: `## Phase 4 — Evaluation
|
|
41
63
|
|
|
42
64
|
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
65
|
|
|
44
|
-
|
|
66
|
+
**Bounded fetch discipline:** do not get stuck chasing unavailable content. Try one direct fetch/read per candidate. If that fails, make at most one recovery attempt (alternate transcript source, search result, mirror, or metadata page). After two failed retrieval attempts total, stop searching for that candidate and evaluate from verified metadata, the Phase 2 reason, and whatever partial content is available. Usually that means \`dropped\`. Do not mark a source \`kept\` or \`trim\` from title, URL, search snippet, crawler metadata, or model memory alone.
|
|
67
|
+
|
|
68
|
+
Every candidate still needs a decision in the YAML: keep / trim / drop against the JTBD. For kept and trimmed sources, write a rating (1–5), a \`jtbd_fit\` label, a primary \`source_role\` from the Capability Brief when available, fetch evidence, a content-quality judgment, and a curator note in the three-thing template (role / where the value is / limitations).
|
|
69
|
+
|
|
70
|
+
**Evidence contract for kept/trimmed sources:**
|
|
71
|
+
- \`fetch_status: readable | partial\`. Use \`readable\` when you retrieved the substantive article/transcript/PDF body. Use \`partial\` when you retrieved enough real source content to judge, such as an abstract plus substantial excerpt. If the page is \`metadata_only\` or \`unavailable\`, the decision must be \`dropped\`.
|
|
72
|
+
- \`content_quality: high | medium\`. If the readable content is shallow, generic, AI-slop, SEO filler, a homepage/gallery with no rationale, or otherwise low-value, mark it \`dropped\` instead of keeping it.
|
|
73
|
+
- \`evidence:\` at least two content-specific evidence bullets from the fetched/read source. These are not quotes; they are concrete claims, sections, examples, transcript moments, or methods you actually saw in the content. Search snippets, titles, and model memory do not count.
|
|
74
|
+
|
|
75
|
+
**JTBD-fit labels are required for kept and trimmed sources**:
|
|
76
|
+
- \`direct\` — teaches, demonstrates, or argues for the core action in the JTBD.
|
|
77
|
+
- \`bridge\` — helps execute the result after the core decision is made, such as implementation mechanics, tokens, layout, or process.
|
|
78
|
+
- \`background\` — broad context, vocabulary, or primer material. Background sources should rarely be \`required\`.
|
|
79
|
+
|
|
80
|
+
If a section contains only \`bridge\` or \`background\` sources, the evaluation must say it is weak coverage and either backfill a direct source or mark the section as a known gap. Do not let topic adjacency pass as JTBD fit.
|
|
81
|
+
|
|
82
|
+
**Source-role discipline**:
|
|
83
|
+
- Assign each kept/trim source to the strongest matching required source role. If it does not satisfy any required role, mark \`source_role: supporting/background\` and explain why it is still worth keeping.
|
|
84
|
+
- Do not count a homepage, gallery index, metadata page, or shallow listicle as satisfying a worked-example/case-study role unless the fetched content includes real rationale, process, analysis, or artifacts the future AI can learn from.
|
|
85
|
+
- For visual-output, taste, craft, or example-dependent capabilities, one or two examples is a warning sign, not a pass. Prefer several distinct worked examples with rationale over more primers.
|
|
86
|
+
- For \`reference-translation\` capabilities, direct fit means the source either teaches how to read/interpret the input reference domain or demonstrates a real translation from reference qualities into target-output decisions. Target-medium implementation mechanics, accessibility specs, token formats, and style-guide infrastructure are usually \`bridge\` fit unless they explicitly teach that translation move.
|
|
87
|
+
|
|
88
|
+
**Chunked decision discipline:** do not hold all decisions in conversation memory until the end. Create \`working/evaluation-decisions/\` and, after each knowledge-map section or every ~10 candidates, write/update a small YAML fragment there. Use filenames like \`01-foundations.yaml\`, \`02-patterns.yaml\`, etc. Each fragment uses the same \`candidates:\` list shape shown below and must include every candidate from that section/chunk. Liner can assemble \`working/03-evaluation.yaml\` from these fragments in the original longlist order.
|
|
89
|
+
|
|
90
|
+
**Artifact closure discipline:** write \`working/03-evaluation.yaml\` as soon as you have enough evidence to decide. Do not announce that you are "ready to write" before writing either the fragments or the final file. For dropped candidates, keep the entry compact: URL, title, decision, section if known, and one rationale sentence. Rating and note are required only for \`kept\` and \`trim\`. If the final YAML is long, prioritize complete fragments in \`working/evaluation-decisions/\`; Liner will assemble and validate the final YAML.
|
|
45
91
|
|
|
46
92
|
Write decisions to working/03-evaluation.yaml in the format:
|
|
47
93
|
|
|
@@ -51,23 +97,44 @@ candidates:
|
|
|
51
97
|
title: ...
|
|
52
98
|
decision: kept # kept | trim | dropped
|
|
53
99
|
rating: 5
|
|
100
|
+
jtbd_fit: direct # direct | bridge | background
|
|
101
|
+
source_role: core-action method
|
|
102
|
+
fetch_status: readable # readable | partial; metadata_only/unavailable must be dropped
|
|
103
|
+
content_quality: high # high | medium; low must be dropped
|
|
104
|
+
evidence:
|
|
105
|
+
- The fetched source includes a specific method/example/argument, not just a title.
|
|
106
|
+
- Another source-specific detail that proves the content was read.
|
|
54
107
|
section: foundations
|
|
55
108
|
rationale: One specific sentence.
|
|
56
109
|
note: |
|
|
57
110
|
Multi-line curator note for kept/trim sources. Use the three-thing template.
|
|
58
111
|
\`\`\`
|
|
59
112
|
|
|
60
|
-
Stop after
|
|
113
|
+
Stop after the fragments and/or final file are written. Do not draft synthesis yet.`,
|
|
61
114
|
quality: `## Phase 5 — Quality checks
|
|
62
115
|
|
|
63
116
|
Read working/03-evaluation.yaml. Then read \`quality-check-tests.md\` in the skill bundle — note especially the strengthened framing-gap rules below.
|
|
64
117
|
|
|
65
|
-
|
|
118
|
+
**Bounded quality discipline:** Phase 5 is an audit of the evaluated corpus, not a fresh research phase. Start from the existing \`kept\` and \`trim\` entries in \`working/03-evaluation.yaml\`. If those entries lack \`kind\`, assign \`reference / principle / prescription / example\` from the title, note, section, rating, and source type before you consider any search. Missing \`kind\` metadata is not itself a reason to backfill.
|
|
119
|
+
|
|
120
|
+
Run the core-action test, then the eight standard tests against the keep-list:
|
|
121
|
+
0. Core-action fit — what is the exact action in the JTBD, and which kept sources directly teach or demonstrate it?
|
|
66
122
|
1. Redundancy — any two kept sources making essentially the same point?
|
|
67
123
|
2. Coverage — any knowledge-map section with zero sources?
|
|
68
124
|
3. Disagreement — strongest claim with a credible counter included?
|
|
69
125
|
4. Framing-gap — is any whole way of thinking about the JTBD missing?
|
|
70
126
|
5. Source-kind balance — distribution across the four kinds. Any kind at zero must be defended or backfilled.
|
|
127
|
+
6. Note-quality — does each kept/trim curator note say how to use the source, what value/bar it provides, and one limitation or boundary?
|
|
128
|
+
7. Source-role fit — do the kept/trim sources satisfy the Required source roles named in the Capability Brief?
|
|
129
|
+
8. Capability-pattern fit — if Phase 1 named a specialized pattern such as \`reference-translation\`, does the corpus satisfy the pattern-specific evidence contract?
|
|
130
|
+
|
|
131
|
+
**Core-action fit rules (strict)**:
|
|
132
|
+
|
|
133
|
+
- Quote or paraphrase the JTBD's core action before judging the source list.
|
|
134
|
+
- Count kept sources by \`jtbd_fit\`: \`direct / bridge / background\`. If older entries lack \`jtbd_fit\`, infer it from the title, rationale, note, and section, then update \`working/03-evaluation.yaml\`.
|
|
135
|
+
- A healthy action-oriented mixtape needs at least two \`direct\` kept sources, and every central knowledge-map section needs either one \`direct\` source or an explicit reason why a \`bridge\` source is sufficient.
|
|
136
|
+
- Curator-named anchors do not count as direct fit if the fetched source is only a homepage, gallery index, metadata page, or unreadable pointer. They may be taste anchors, but the quality report must say whether their rationale/process was actually retrieved.
|
|
137
|
+
- If the direct count is weak, take exactly one action: backfill direct sources within the Phase 5 search budget, or document the gap and recommend re-running Candidate discovery with action-specific search terms.
|
|
71
138
|
|
|
72
139
|
**Framing-gap test rules (strict)**:
|
|
73
140
|
|
|
@@ -82,16 +149,60 @@ Run the five tests against the keep-list:
|
|
|
82
149
|
- **(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
150
|
- **(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
151
|
|
|
152
|
+
**Search budget for Phase 5**:
|
|
153
|
+
|
|
154
|
+
- Use at most one search pass for any single missing perspective.
|
|
155
|
+
- Use at most one source-kind backfill search total, and only after assigning kinds to every existing kept/trim source.
|
|
156
|
+
- Do not exceed four external search/fetch attempts for the whole Quality phase. If the budget is spent, stop searching, document the gap or defense, and write \`working/04-quality-checks.md\`.
|
|
157
|
+
- On resume after a paused/cancelled Quality run, do not continue a search loop. Use the evidence already gathered, finish the kind assignments, and write the quality report.
|
|
158
|
+
|
|
85
159
|
**Source-kind balance rules**:
|
|
86
160
|
|
|
87
161
|
- The four kinds are \`reference / principle / prescription / example\`. They represent four argumentative roles in the corpus.
|
|
162
|
+
- If existing kept/trim entries are missing \`kind\`, classify them first. Use \`reference\` for specs/manuals/API docs, \`principle\` for essays/arguments, \`prescription\` for style guides/rules/how-to guidance, and \`example\` for case studies/demos/worked products. Update \`working/03-evaluation.yaml\` with those assignments.
|
|
88
163
|
- Count the distribution. A zero in any column is a decision, not an accident.
|
|
89
164
|
- 0 \`reference\` → no substrate authority. 0 \`principle\` → no philosophical anchor. 0 \`prescription\` → no concrete rules. 0 \`example\` → no taste calibration.
|
|
90
165
|
- 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
166
|
|
|
167
|
+
**Note-quality rules**:
|
|
168
|
+
|
|
169
|
+
- Review every kept/trim entry's \`note\`. A useful curator note must do three jobs: name how to use/read the source, name the concrete value or quality bar it contributes, and name one limitation, scope boundary, or reason not to over-weight it.
|
|
170
|
+
- If a note is filler, generic, or only says "useful background", repair it in \`working/03-evaluation.yaml\` before moving to synthesis. Do not fetch/search just to repair prose; use the already gathered rationale, title, source type, section, and partial content.
|
|
171
|
+
- In \`working/04-quality-checks.md\`, report how many notes were checked, how many were repaired, and cite the source titles or URLs for any repairs.
|
|
172
|
+
|
|
173
|
+
**Source-role fit rules (strict)**:
|
|
174
|
+
|
|
175
|
+
- Read the Required source roles from the Capability Brief in \`working/01-jtbd-and-knowledge-map.md\`. If the brief is older and lacks them, infer 4–7 required roles from the core action before judging the corpus, then write those inferred roles into \`working/04-quality-checks.md\`.
|
|
176
|
+
- For each required role, count kept/trim sources that actually satisfy that role. Count by content evidence, not by title, URL, kind, or topic adjacency.
|
|
177
|
+
- A source kind is not a source role. \`example: 2\` does not automatically satisfy "high-craft worked case studies" unless those examples contain enough fetched rationale/process/artifact evidence for the future AI to learn from.
|
|
178
|
+
- Required roles must meet the minimum named in the Capability Brief. If no minimum was named, use at least 2 strong sources; use at least 3 substantive worked examples/case studies when the capability depends on taste, visual output, craft judgment, or recognizing quality; require primary/official sources for legal, medical, financial, or safety-sensitive authority roles.
|
|
179
|
+
- Do not write "light but not absent" as a pass for a material role. Either improve the corpus inside the Phase 5 budget or write \`working/05-operating-fit-audit.md\` with \`status: improvement_recommended\`.
|
|
180
|
+
|
|
181
|
+
**Capability-pattern fit rules (strict)**:
|
|
182
|
+
|
|
183
|
+
- Read the Capability Brief for a \`Capability pattern:\` line. If none is present, write Test 8 as "No specialized capability pattern detected" and do not invent one.
|
|
184
|
+
- For \`reference-translation\`, audit four things:
|
|
185
|
+
1. **Input/reference-domain coverage:** at least two distinct source domains outside the target output medium have substantive kept/trim evidence. Count by content, not by a passing mention. For web/UI targets, web implementation, accessibility, token, or design-system sources do not count as input/reference-domain coverage.
|
|
186
|
+
2. **Translation-method coverage:** at least two direct kept/trim sources teach or demonstrate the move from source qualities to target decisions. Generic moodboard primers, galleries, and CSS mechanics are not enough.
|
|
187
|
+
3. **Caller-handoff coverage:** the corpus supports a concrete runtime output shape for the caller, such as observations, interpretation, carry-forward rules, implementation vocabulary, constraints, avoid-list, validation checks, and clarification questions.
|
|
188
|
+
4. **Constraint balance:** implementation/accessibility/system sources are present when needed, but they do not outnumber and replace the direct reference-reading and translation evidence in the core action.
|
|
189
|
+
- If any of those fail, update \`working/05-operating-fit-audit.md\` with \`status: improvement_recommended\`; do not call the corpus ready because it has enough general design/web sources.
|
|
190
|
+
|
|
191
|
+
**Operating-fit audit**:
|
|
192
|
+
|
|
193
|
+
- After Tests 0–7, ask whether the keep-list can actually help a future AI agent do the capability in the Capability Brief, not merely talk around the topic.
|
|
194
|
+
- Look for missing source roles, not just missing source kinds. Examples: high-craft case studies, worked image-to-interface translations, legal primary sources, medical authority, implementation constraints, dissenting practitioner voice, user-research evidence, or domain-specific keyword data.
|
|
195
|
+
- If a material role is weak and you cannot fix it inside the Phase 5 search budget, do not write "ready with limitation." Write \`working/05-operating-fit-audit.md\` with \`status: improvement_recommended\` so Liner can offer a focused improvement pass. Also summarize the recommendation in \`working/04-quality-checks.md\`.
|
|
196
|
+
- If the corpus is fit for the operating layer, do not write an improvement recommendation marker.
|
|
197
|
+
|
|
92
198
|
**Required output structure** in working/04-quality-checks.md:
|
|
93
199
|
|
|
94
200
|
\`\`\`
|
|
201
|
+
## Test 0 — Core-action fit
|
|
202
|
+
Core action: [verb phrase from JTBD]
|
|
203
|
+
Distribution: X direct / Y bridge / Z background
|
|
204
|
+
[finding + action]
|
|
205
|
+
|
|
95
206
|
## Test 1 — Redundancy
|
|
96
207
|
[finding + action]
|
|
97
208
|
|
|
@@ -114,11 +225,50 @@ Run the five tests against the keep-list:
|
|
|
114
225
|
|
|
115
226
|
Distribution: X reference / Y principle / Z prescription / W example
|
|
116
227
|
[If any zero: backfill action OR defense paragraph]
|
|
228
|
+
|
|
229
|
+
## Test 6 — Note-quality
|
|
230
|
+
|
|
231
|
+
Checked: N kept/trim notes
|
|
232
|
+
Repaired: M notes
|
|
233
|
+
[If repaired: list Source/title/URL and the note issue fixed. If none repaired: one sentence explaining why the notes already carry use cue, value/bar, and limitation.]
|
|
234
|
+
|
|
235
|
+
## Test 7 — Source-role fit
|
|
236
|
+
|
|
237
|
+
Required roles:
|
|
238
|
+
- [role] — minimum: N; current: M; status: pass|weak|gap; evidence: [source titles]
|
|
239
|
+
|
|
240
|
+
[If any required role is weak/gap: backfill action OR operating-fit audit path]
|
|
241
|
+
|
|
242
|
+
## Test 8 — Capability-pattern fit
|
|
243
|
+
|
|
244
|
+
Pattern: [reference-translation | none | other named pattern]
|
|
245
|
+
[For reference-translation: input/reference-domain coverage, translation-method coverage, caller-handoff coverage, constraint balance]
|
|
246
|
+
[finding + action]
|
|
247
|
+
\`\`\`
|
|
248
|
+
|
|
249
|
+
If an improvement pass is recommended, also write:
|
|
250
|
+
|
|
251
|
+
\`\`\`
|
|
252
|
+
# Operating-fit audit
|
|
253
|
+
|
|
254
|
+
status: improvement_recommended
|
|
255
|
+
gap: [the missing source role or weak evidence role]
|
|
256
|
+
missing_roles:
|
|
257
|
+
- role: [required source role]
|
|
258
|
+
current_coverage: [what the keep-list has now]
|
|
259
|
+
needed: [what is missing]
|
|
260
|
+
why_it_matters: [why this gap would hurt a future AI agent using the corpus]
|
|
261
|
+
recommended_pass:
|
|
262
|
+
- [search lane or source type Liner should look for]
|
|
263
|
+
- [search lane or source type Liner should look for]
|
|
264
|
+
user_can_add:
|
|
265
|
+
- [concrete custom source the user could add if web research stays thin]
|
|
266
|
+
skip_note: [what remains weaker if the user skips for now]
|
|
117
267
|
\`\`\`
|
|
118
268
|
|
|
119
|
-
Every named perspective must appear in the audit with explicit coverage status. A missing "Perspectives audit" section,
|
|
269
|
+
Every named perspective must appear in the audit with explicit coverage status. A missing "Perspectives audit" section, a Test 5 section without the distribution, a missing Test 6 note-quality section, a missing Test 7 source-role section, or a missing Test 8 capability-pattern section means the test wasn't run honestly.
|
|
120
270
|
|
|
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.
|
|
271
|
+
If a test fails, fix the keep-list (update working/03-evaluation.yaml) before reporting done when the fix fits inside the Phase 5 budget. If it requires a wider second pass, write the operating-fit audit instead of presenting the corpus as fully ready. Even tests that pass without changes should be noted — silent passes train the model to treat the tests as ceremonial.
|
|
122
272
|
|
|
123
273
|
Stop after working/04-quality-checks.md is written and any necessary changes are reflected in 03-evaluation.yaml.`,
|
|
124
274
|
synthesis: `## Phase 6 — Synthesis
|
|
@@ -129,6 +279,10 @@ Draft synthesis.md as continuous prose, 800–2000 words. The synthesis is the c
|
|
|
129
279
|
|
|
130
280
|
⚠ 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
281
|
|
|
282
|
+
**Required operating sections**:
|
|
283
|
+
- Include a \`## Generative rules\` section with about five imperative rules the consuming AI can apply directly. These are the "if you remember nothing else" rules, phrased as actions or constraints, not summaries. Example shape: "Channel discipline: stdout is for data, stderr is for humans, and exit codes mean what they say."
|
|
284
|
+
- Include a \`## Stances this corpus takes\` section naming the corpus's opinionated positions and trade-offs. This section should say what the mixtape leans toward, what it resists, and where a dissenting source should still temper the rule.
|
|
285
|
+
|
|
132
286
|
**Weight sources by their \`kind\`** (set during Phase 7, but visible in 03-evaluation.yaml too):
|
|
133
287
|
- \`reference\` sources (specs, RFCs) — substrate. Cite once for authority; don't lean on them for framing.
|
|
134
288
|
- \`principle\` sources (essays, manifestos) — load-bearing for the synthesis's stance section. These earn the most quoting.
|
|
@@ -153,7 +307,7 @@ Build the draft as YAML with a top-level \`sources:\` list. Each entry needs:
|
|
|
153
307
|
|
|
154
308
|
\`\`\`yaml
|
|
155
309
|
sources:
|
|
156
|
-
- type: web # web | youtube | local_file
|
|
310
|
+
- type: web # web | youtube | local_file | skill
|
|
157
311
|
url: https://...
|
|
158
312
|
section: foundations
|
|
159
313
|
priority: required # required | optional
|
|
@@ -164,12 +318,16 @@ sources:
|
|
|
164
318
|
\`\`\`
|
|
165
319
|
|
|
166
320
|
Rules:
|
|
167
|
-
-
|
|
168
|
-
-
|
|
321
|
+
- Include every candidate marked \`kept\` or \`trim\` in 03-evaluation.yaml only when it has \`fetch_status: readable|partial\`, \`content_quality: high|medium\`, and at least two \`evidence\` bullets. If an older evaluation marks a source kept/trim without this evidence, stop and repair \`working/03-evaluation.yaml\` instead of drafting.
|
|
322
|
+
- Drop evaluated URL candidates marked \`dropped\`, \`metadata_only\`, \`unavailable\`, or \`content_quality: low\`.
|
|
323
|
+
- Preserve every existing \`local_file\` and \`skill\` source from tape.yaml even though those entries do not appear in the URL-only evaluation file. Carry forward \`path\`, \`url\`, \`citation\`, \`note\`, \`priority\`, \`section\`, and \`kind\` where present. If any required review metadata is missing, add it without changing the source identity.
|
|
324
|
+
- Do not silently convert \`local_file\` or \`skill\` sources into \`web\` sources. Skill sources are reference material, not active instructions.
|
|
325
|
+
- Preserve current tape order first, then append newly kept/trimmed URL candidates that were not already on the tape. Dedupe by URL for web/youtube, by \`path\`+\`citation\` for local_file, and by \`path\` or \`url\` for skill.
|
|
326
|
+
- Within a section, order new evaluated URL candidates by rating (highest first).
|
|
169
327
|
- Order sections in reading order: foundations / patterns / applications / craft (or whatever the synthesis suggests).
|
|
170
328
|
- Notes come straight from 03-evaluation.yaml's \`note\` field. Do not paraphrase.
|
|
171
329
|
- Mark a source \`priority: optional\` only when the methodology genuinely treats it as skippable (rare).
|
|
172
|
-
- \`local_file\` entries:
|
|
330
|
+
- \`local_file\` and \`skill\` entries: never invent paths or skill identifiers. Include them only when they already exist in tape.yaml.
|
|
173
331
|
|
|
174
332
|
**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
333
|
|
|
@@ -200,7 +358,7 @@ export function buildPhasePrompt(args) {
|
|
|
200
358
|
- Title: ${tape.title || "(not set)"}
|
|
201
359
|
- Description: ${tape.description || "(not set)"}
|
|
202
360
|
- Mode: ${tape.mode ?? "quick"}
|
|
203
|
-
-
|
|
361
|
+
- AI-agent goal: ${tape.jtbd || "(not set)"}
|
|
204
362
|
- Curator: ${tape.curator || "(not set)"}
|
|
205
363
|
- Sources currently on tape: ${tape.sources.length}
|
|
206
364
|
|
|
@@ -220,7 +378,9 @@ ${phaseInstruction}
|
|
|
220
378
|
|
|
221
379
|
- Work on the filesystem. Do not paste large file contents back in your response — write them to disk.
|
|
222
380
|
- Be concise in your spoken output. The user is watching a TUI; long monologues clutter the screen.
|
|
223
|
-
- If you cannot proceed (missing
|
|
381
|
+
- If you cannot proceed (missing AI-agent goal, missing prior-phase artifact), say so clearly and stop. Do NOT make up content.
|
|
382
|
+
|
|
383
|
+
${WORKSPACE_DISCIPLINE}
|
|
224
384
|
|
|
225
385
|
# Final message format (required)
|
|
226
386
|
|
|
@@ -272,6 +432,46 @@ If you don't have a concrete TUI-scoped checklist item, **omit the section**. An
|
|
|
272
432
|
${skillContents}
|
|
273
433
|
`;
|
|
274
434
|
}
|
|
435
|
+
export function buildEvaluationSectionPrompt(args) {
|
|
436
|
+
const base = buildPhasePrompt({
|
|
437
|
+
phaseId: "evaluation",
|
|
438
|
+
project: args.project,
|
|
439
|
+
skillPath: args.skillPath,
|
|
440
|
+
tape: args.tape,
|
|
441
|
+
});
|
|
442
|
+
const candidates = args.group.candidates
|
|
443
|
+
.map((candidate, i) => {
|
|
444
|
+
const lines = [
|
|
445
|
+
`${i + 1}. ${candidate.title || "(untitled)"}`,
|
|
446
|
+
` URL: ${candidate.url}`,
|
|
447
|
+
` Section: ${candidate.section || args.group.section}`,
|
|
448
|
+
];
|
|
449
|
+
if (candidate.reason)
|
|
450
|
+
lines.push(` Phase 2 reason: ${candidate.reason}`);
|
|
451
|
+
return lines.join("\n");
|
|
452
|
+
})
|
|
453
|
+
.join("\n\n");
|
|
454
|
+
return `${base}
|
|
455
|
+
|
|
456
|
+
# Section-scoped Evaluation run
|
|
457
|
+
|
|
458
|
+
This is Evaluation chunk ${args.group.index} of ${args.group.total}. Keep the context short and finish only this chunk.
|
|
459
|
+
|
|
460
|
+
Evaluate only these ${args.group.candidates.length} candidates from the "${args.group.section}" section:
|
|
461
|
+
|
|
462
|
+
${candidates}
|
|
463
|
+
|
|
464
|
+
# Required chunk output
|
|
465
|
+
|
|
466
|
+
- Create \`working/evaluation-decisions/\` if needed.
|
|
467
|
+
- Write exactly one YAML fragment at \`${args.group.fragmentPath}\`.
|
|
468
|
+
- The fragment must have a top-level \`candidates:\` list.
|
|
469
|
+
- Include every URL listed above exactly once.
|
|
470
|
+
- Do not write or edit \`working/03-evaluation.yaml\`; Liner assembles it after all chunks finish.
|
|
471
|
+
- Do not evaluate candidates from any other section.
|
|
472
|
+
- Stop after the fragment is written and parsed.
|
|
473
|
+
`;
|
|
474
|
+
}
|
|
275
475
|
function safeRead(path) {
|
|
276
476
|
try {
|
|
277
477
|
return readFileSync(path, "utf8");
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/agents/prompts.ts"],"names":[],"mappings":"AA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