sf snapshot: pre-dispatch, uncommitted changes after 30m inactivity
This commit is contained in:
parent
8ed0c4078e
commit
a4ae2feaac
5 changed files with 10 additions and 10 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* SF Command — /sf backlog
|
||||
*
|
||||
* Structured backlog management with 999.x numbering.
|
||||
* Items stored in .sf/USER-BACKLOG.md as markdown checklist.
|
||||
* Items stored in .sf/WORK-QUEUE.md as markdown checklist.
|
||||
* Items can be promoted to active slices via add-slice.
|
||||
*/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ interface BacklogItem {
|
|||
}
|
||||
|
||||
function backlogPath(basePath: string): string {
|
||||
return join(sfRoot(basePath), "USER-BACKLOG.md");
|
||||
return join(sfRoot(basePath), "WORK-QUEUE.md");
|
||||
}
|
||||
|
||||
function parseBacklog(basePath: string): BacklogItem[] {
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ function renderSkillProposals(result: TodoTriageResult): string {
|
|||
}
|
||||
|
||||
function backlogPath(basePath: string): string {
|
||||
return join(sfRoot(basePath), "USER-BACKLOG.md");
|
||||
return join(sfRoot(basePath), "WORK-QUEUE.md");
|
||||
}
|
||||
|
||||
function nextBacklogId(content: string): string {
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ const NESTED_COMPLETIONS: CompletionMap = {
|
|||
todo: [
|
||||
{ cmd: "triage", desc: "Triage root TODO.md into .sf/triage artifacts" },
|
||||
{ cmd: "triage --no-clear", desc: "Triage TODO.md without resetting it" },
|
||||
{ cmd: "triage --backlog", desc: "Also add implementation tasks to .sf/USER-BACKLOG.md" },
|
||||
{ cmd: "triage --backlog", desc: "Also add implementation tasks to .sf/WORK-QUEUE.md" },
|
||||
],
|
||||
"pr-branch": [
|
||||
{ cmd: "--dry-run", desc: "Preview what would be filtered" },
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function cleanup(base: string): void {
|
|||
}
|
||||
|
||||
function backlogPath(base: string): string {
|
||||
return join(base, ".sf", "USER-BACKLOG.md");
|
||||
return join(base, ".sf", "WORK-QUEUE.md");
|
||||
}
|
||||
|
||||
function writeBacklog(base: string, content: string): void {
|
||||
|
|
@ -176,7 +176,7 @@ test("backlog: next ID increments correctly", () => {
|
|||
test("backlog: empty backlog returns no items", () => {
|
||||
const base = makeTmpBase();
|
||||
try {
|
||||
// No USER-BACKLOG.md exists
|
||||
// No WORK-QUEUE.md exists
|
||||
assert.ok(!existsSync(backlogPath(base)));
|
||||
// Would return empty array
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ test("triageTodoDump appends implementation tasks to backlog only when requested
|
|||
{ date: fixedDate, backlog: true },
|
||||
);
|
||||
|
||||
const backlogPath = join(base, ".sf", "BACKLOG.md");
|
||||
const backlogPath = join(base, ".sf", "WORK-QUEUE.md");
|
||||
assert.equal(output.backlogItemsAdded, 1);
|
||||
assert.equal(existsSync(backlogPath), true);
|
||||
assert.match(
|
||||
|
|
@ -387,7 +387,7 @@ test("triageTodoDump writes backlog JSONL with valid BacklogEntry schema", async
|
|||
assert.equal(lines.length, 2, "should have one JSONL entry per implementation task");
|
||||
|
||||
const entries = lines.map((line) => JSON.parse(line));
|
||||
const backlogMd = readFileSync(join(base, ".sf", "BACKLOG.md"), "utf-8");
|
||||
const backlogMd = readFileSync(join(base, ".sf", "WORK-QUEUE.md"), "utf-8");
|
||||
|
||||
for (let i = 0; i < entries.length; i++) {
|
||||
const entry = entries[i];
|
||||
|
|
@ -402,7 +402,7 @@ test("triageTodoDump writes backlog JSONL with valid BacklogEntry schema", async
|
|||
);
|
||||
assert.ok(
|
||||
backlogMd.includes(entry.id),
|
||||
`JSONL entry id ${entry.id} should match an id in BACKLOG.md`,
|
||||
`JSONL entry id ${entry.id} should match an id in WORK-QUEUE.md`,
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
|
|
@ -636,7 +636,7 @@ test("triageTodoDump in CI mode forces no-clear and backlog", async () => {
|
|||
assert.equal(output.skipped, false);
|
||||
assert.ok(existsSync(join(base, "TODO.md")), "TODO.md should NOT be cleared in CI mode");
|
||||
assert.equal(output.backlogItemsAdded, 1, "backlog should be forced true in CI mode");
|
||||
assert.ok(existsSync(join(base, ".sf", "BACKLOG.md")));
|
||||
assert.ok(existsSync(join(base, ".sf", "WORK-QUEUE.md")));
|
||||
} finally {
|
||||
rmSync(base, { recursive: true, force: true });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue