feat(FN-2605): merge fusion/fn-2605 (auto-resolved)
- test(FN-2605): complete Step 4 — align tests with planning labels - docs(FN-2605): complete Step 3 — update demo and script terminology - docs(FN-2605): complete Step 2 — update docs terminology - docs(FN-2605): complete Step 1 — update README terminology
This commit is contained in:
20
demo/seed.ts
20
demo/seed.ts
@@ -6,8 +6,8 @@
|
||||
* - Done: shipped features
|
||||
* - In Review: finished work waiting for merge
|
||||
* - In Progress: agents actively executing (with steps partially done)
|
||||
* - Todo: specified and queued
|
||||
* - Triage: raw ideas just landing
|
||||
* - Todo: planned and queued
|
||||
* - Planning: raw ideas just landing
|
||||
*/
|
||||
import { TaskStore } from "../packages/core/src/index.js";
|
||||
import { writeFile } from "node:fs/promises";
|
||||
@@ -66,7 +66,7 @@ async function main() {
|
||||
doneIds.push(task.id);
|
||||
await store.updateTask(task.id, { size: t.size, reviewLevel: t.reviewLevel });
|
||||
|
||||
// Move through the pipeline: triage → todo → in-progress → in-review → done
|
||||
// Move through the pipeline: planning → todo → in-progress → in-review → done
|
||||
await store.moveTask(task.id, "todo");
|
||||
await store.moveTask(task.id, "in-progress");
|
||||
|
||||
@@ -221,9 +221,9 @@ async function main() {
|
||||
await writePrompt(store, task.id, t.title, t.desc, steps, t.deps);
|
||||
}
|
||||
|
||||
// ── Triage ────────────────────────────────────────────────────────
|
||||
// ── Planning ──────────────────────────────────────────────────────
|
||||
|
||||
const triage = [
|
||||
const planning = [
|
||||
{
|
||||
desc: "Users are reporting slow page loads on the dashboard when they have more than 200 tasks. Probably need virtual scrolling or pagination in the UI.",
|
||||
},
|
||||
@@ -241,7 +241,7 @@ async function main() {
|
||||
},
|
||||
];
|
||||
|
||||
for (const t of triage) {
|
||||
for (const t of planning) {
|
||||
await store.createTask({ description: t.desc });
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ async function main() {
|
||||
}
|
||||
|
||||
console.log(`\nSeeded ${tasks.length} tasks:`);
|
||||
console.log(` Triage: ${byColumn["triage"] || 0}`);
|
||||
console.log(` Planning: ${byColumn["triage"] || 0}`);
|
||||
console.log(` Todo: ${byColumn["todo"] || 0}`);
|
||||
console.log(` In Progress: ${byColumn["in-progress"] || 0}`);
|
||||
console.log(` In Review: ${byColumn["in-review"] || 0}`);
|
||||
@@ -341,7 +341,7 @@ ${stepsSection}
|
||||
async function addLogs(store: TaskStore, id: string, targetColumn: string) {
|
||||
const actions: Record<string, string[][]> = {
|
||||
done: [
|
||||
["Triage complete — spec written", "approved"],
|
||||
["Planning complete — plan written", "approved"],
|
||||
["Scheduled for execution", "worktree created"],
|
||||
["Step 0 started", "in-progress"],
|
||||
["Review: step 0", "approved"],
|
||||
@@ -355,7 +355,7 @@ async function addLogs(store: TaskStore, id: string, targetColumn: string) {
|
||||
["Auto-merged into main"],
|
||||
],
|
||||
"in-review": [
|
||||
["Triage complete — spec written", "approved"],
|
||||
["Planning complete — plan written", "approved"],
|
||||
["Scheduled for execution", "worktree created"],
|
||||
["Step 0 started", "in-progress"],
|
||||
["Review: step 0", "approved"],
|
||||
@@ -368,7 +368,7 @@ async function addLogs(store: TaskStore, id: string, targetColumn: string) {
|
||||
["All steps complete — moved to review"],
|
||||
],
|
||||
"in-progress": [
|
||||
["Triage complete — spec written", "approved"],
|
||||
["Planning complete — plan written", "approved"],
|
||||
["Scheduled for execution", "worktree created"],
|
||||
["Step 0 started", "in-progress"],
|
||||
["Review: step 0", "approved"],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Simulates live board activity — tasks progressing, new ideas landing,
|
||||
* triage completing, reviews finishing. Run alongside `kb dashboard`.
|
||||
* planning completing, reviews finishing. Run alongside `kb dashboard`.
|
||||
*
|
||||
* Usage: `npx tsx demo/simulate.ts [dir]`
|
||||
*
|
||||
@@ -44,7 +44,7 @@ async function main() {
|
||||
|
||||
while (true) {
|
||||
const tasks = await store.listTasks();
|
||||
const triage = tasks.filter((t) => t.column === "triage" && !t.paused);
|
||||
const planning = tasks.filter((t) => t.column === "triage" && !t.paused);
|
||||
const inProgress = tasks.filter((t) => t.column === "in-progress" && !t.paused);
|
||||
const inReview = tasks.filter((t) => t.column === "in-review" && !t.paused);
|
||||
const todo = tasks.filter((t) => t.column === "todo" && !t.paused);
|
||||
@@ -53,23 +53,23 @@ async function main() {
|
||||
const roll = Math.random();
|
||||
|
||||
if (roll < 0.2 && ideaIndex < NEW_TASK_IDEAS.length) {
|
||||
// New task lands in triage
|
||||
// New task lands in planning
|
||||
const desc = NEW_TASK_IDEAS[ideaIndex++];
|
||||
const task = await store.createTask({ description: desc });
|
||||
console.log(` + New task: ${task.id} — "${desc.slice(0, 50)}..."`);
|
||||
await sleep(2000 + Math.random() * 3000);
|
||||
} else if (roll < 0.4 && triage.length > 0) {
|
||||
// Triage completes — task gets spec'd and moves to todo
|
||||
const task = pick(triage);
|
||||
} else if (roll < 0.4 && planning.length > 0) {
|
||||
// Planning completes — task gets planned and moves to todo
|
||||
const task = pick(planning);
|
||||
const title = task.description.slice(0, 60).replace(/\.$/, "");
|
||||
await store.updateTask(task.id, {
|
||||
title,
|
||||
size: pick(["S", "M", "L"] as const),
|
||||
reviewLevel: pick([0, 1, 1, 2, 2, 3]),
|
||||
});
|
||||
await store.logEntry(task.id, "Triage complete — spec written", "approved");
|
||||
await store.logEntry(task.id, "Planning complete — plan written", "approved");
|
||||
await store.moveTask(task.id, "todo");
|
||||
console.log(` ✓ Triaged: ${task.id} → todo`);
|
||||
console.log(` ✓ Planned: ${task.id} → todo`);
|
||||
await sleep(3000 + Math.random() * 4000);
|
||||
} else if (roll < 0.6 && todo.length > 0 && inProgress.length < 3) {
|
||||
// Scheduler picks up a todo task
|
||||
|
||||
Reference in New Issue
Block a user