fix: align settings docs and inventory completion matching

This commit is contained in:
Tom Boucher
2026-05-15 11:55:19 -04:00
parent 72bc456662
commit d20d3e88b5
5 changed files with 15 additions and 8 deletions

View File

@@ -357,7 +357,7 @@ The `gsd-planner` agent is decomposed into a core agent plus reference modules t
| `user-story-template.md` | User story format for MVP planning — "As a / I want to / So that" structured fields. |
| `spidr-splitting.md` | SPIDR splitting decomposition rules for handling large user stories in MVP mode. |
> **Subdirectory:** `get-shit-done/references/few-shot-examples/` contains additional few-shot examples (`plan-checker.md`, `verifier.md`) that are referenced from specific agents. These are not counted in the 60 top-level references.
> **Subdirectory:** `get-shit-done/references/few-shot-examples/` contains additional few-shot examples (`plan-checker.md`, `verifier.md`) that are referenced from specific agents. These are not counted in the 61 top-level references.
---

View File

@@ -19,8 +19,8 @@ function toPosixPath(p) {
}
function isCompletedInventory(status) {
const s = String(status ?? '').toLowerCase();
return s.includes('milestone complete') || s.includes('archived');
const s = String(status ?? '').trim().toLowerCase();
return /\bmilestone\s+complete\b/.test(s) || /\barchived\b/.test(s);
}
function buildWorkstreamInventory(inputs) {

View File

@@ -91,7 +91,7 @@ Verifier, TDD Mode, Code Review, Code Review Depth _(conditional — only when c
Commit Docs, Skip Discuss, Worktrees
### Features
Intel, Graphify
Intel, Graphify, Graph auto-update _(conditional — only when graphify=on)_
### Model & Pipeline
Model Profile, Auto-Advance, Branching
@@ -101,6 +101,8 @@ Context Warnings, Research Qs
**Conditional visibility — code_review_depth:** This question is shown only when the user's chosen `code_review` value (after they answer that question, or the pre-selected value if unchanged) is on. If `code_review` is off, omit the `code_review_depth` question from the AskUserQuestion block and preserve the existing `workflow.code_review_depth` value in config (do not overwrite). Implementation: ask the Model + Planning + Execution-up-to-Code-Review questions first; if `code_review=on`, include `code_review_depth` in the same batch; otherwise skip it. Conceptually this is a one-branch split on the `code_review` answer.
**Conditional visibility — graphify.auto_update:** This question is shown only when the user's chosen `graphify.enabled` value is on. If `graphify.enabled` is off, omit the `graphify.auto_update` question and preserve the existing `graphify.auto_update` value in config (do not overwrite). Implementation: ask Graphify first; only ask Graph auto-update when Graphify is enabled.
```
AskUserQuestion([
{
@@ -437,7 +439,8 @@ Write `~/.gsd/defaults.json` with:
"enabled": <current>
},
"graphify": {
"enabled": <current>
"enabled": <current>,
"auto_update": <current>
}
}
```

View File

@@ -231,6 +231,10 @@ describe('isCompletedInventory', () => {
expect(isCompletedInventory('unknown')).toBe(false);
});
it('returns false for "unarchived" (word-boundary guard)', () => {
expect(isCompletedInventory('unarchived')).toBe(false);
});
it('returns false for empty string', () => {
expect(isCompletedInventory('')).toBe(false);
});

View File

@@ -86,11 +86,11 @@ function toPosixPath(p: string): string {
/**
* Pure classifier: returns true if the given status string indicates a
* completed or archived workstream (case-insensitive substring match).
* completed or archived workstream (case-insensitive, boundary-aware match).
*/
export function isCompletedInventory(status: string): boolean {
const s = String(status ?? '').toLowerCase();
return s.includes('milestone complete') || s.includes('archived');
const s = String(status ?? '').trim().toLowerCase();
return /\bmilestone\s+complete\b/.test(s) || /\barchived\b/.test(s);
}
/**