feat(reader): show workflow kit on chapter pages
This commit is contained in:
@@ -107,6 +107,13 @@ const RE01 = {
|
|||||||
author: "Founding library · sample",
|
author: "Founding library · sample",
|
||||||
sources: "Sample MLS packet (non-confidential); market-1pager template shipped with the recipe.",
|
sources: "Sample MLS packet (non-confidential); market-1pager template shipped with the recipe.",
|
||||||
lastUpdated: "31 Aug 2026",
|
lastUpdated: "31 Aug 2026",
|
||||||
|
kit: {
|
||||||
|
youRun: "Listing agent",
|
||||||
|
tools: ["brief CLI (local redaction)", "Claude"],
|
||||||
|
files: ["sample_listings.csv", "market-1pager template"],
|
||||||
|
model: "Claude",
|
||||||
|
artifact: "One-pager market brief",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const RE02 = {
|
const RE02 = {
|
||||||
@@ -167,6 +174,13 @@ const RE02 = {
|
|||||||
author: "Founding library · sample",
|
author: "Founding library · sample",
|
||||||
sources: "Public comps sample packet; listing-voice template shipped with the recipe.",
|
sources: "Public comps sample packet; listing-voice template shipped with the recipe.",
|
||||||
lastUpdated: "31 Aug 2026",
|
lastUpdated: "31 Aug 2026",
|
||||||
|
kit: {
|
||||||
|
youRun: "Listing agent",
|
||||||
|
tools: ["listing-copy CLI", "Claude"],
|
||||||
|
files: ["sample_comps.json", "listing-voice template"],
|
||||||
|
model: "Claude",
|
||||||
|
artifact: "180-word listing draft",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RECIPES = [RE01, RE02];
|
export const RECIPES = [RE01, RE02];
|
||||||
@@ -237,6 +251,10 @@ export const CHAPTER = {
|
|||||||
/** Outline groups for the chapter map. Headings come from the essay objects. */
|
/** Outline groups for the chapter map. Headings come from the essay objects. */
|
||||||
export function buildOutline(chapter, recipes) {
|
export function buildOutline(chapter, recipes) {
|
||||||
return [
|
return [
|
||||||
|
{
|
||||||
|
label: "Start",
|
||||||
|
items: [{ id: "need", label: "What you need" }],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Essay",
|
label: "Essay",
|
||||||
items: [chapter.stakes, chapter.constraints, chapter.practice, chapter.between].map((s) => ({
|
items: [chapter.stakes, chapter.constraints, chapter.practice, chapter.between].map((s) => ({
|
||||||
@@ -252,6 +270,7 @@ export function buildOutline(chapter, recipes) {
|
|||||||
label: r.id + " · " + r.shortTitle,
|
label: r.id + " · " + r.shortTitle,
|
||||||
time: r.time,
|
time: r.time,
|
||||||
shortTitle: r.shortTitle,
|
shortTitle: r.shortTitle,
|
||||||
|
tools: r.kit && r.kit.tools ? r.kit.tools.join(", ") : "",
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -263,3 +282,30 @@ export function buildOutline(chapter, recipes) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Union of recipe kits for the chapter "What you need" strip. */
|
||||||
|
export function collectChapterKit(recipes) {
|
||||||
|
const tools = [];
|
||||||
|
const files = [];
|
||||||
|
const models = [];
|
||||||
|
const add = (arr, value) => {
|
||||||
|
if (value && !arr.includes(value)) arr.push(value);
|
||||||
|
};
|
||||||
|
recipes.forEach((r) => {
|
||||||
|
const k = r.kit || {};
|
||||||
|
(k.tools || []).forEach((item) => add(tools, item));
|
||||||
|
(k.files || []).forEach((item) => add(files, item));
|
||||||
|
add(models, k.model);
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
tools,
|
||||||
|
files,
|
||||||
|
models,
|
||||||
|
tryits: recipes.map((r) => ({
|
||||||
|
id: r.id,
|
||||||
|
time: r.time,
|
||||||
|
cost: r.cost,
|
||||||
|
artifact: r.kit && r.kit.artifact,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user