-
Notifications
You must be signed in to change notification settings - Fork 0
drive: WP-32: Sharpen backlog picker's actionability selection #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,58 @@ | ||
| # NEXT — Gate 3: Build the work package consumer | ||
| # NEXT — WP-32: Sharpen backlog picker's actionability selection | ||
|
|
||
| **Scope:** Gate 3 — close the Garden's loop. CODE task, SDK-side. The picker EMITS a work package (sdk/src/backlog-picker.ts + testdata/backlog-picker.flow.yaml, merged, four tested properties) and NOTHING consumes it — that is the missing half. Build the consumer: an SDK entrypoint taking an emitted package and turning it into something runnable, validating it has a title, a non-empty scope and a definition of done, and REFUSING with a typed reason when it does not, because a package that cannot be verified must not become work. NOTE: two previous attempts (ee5c9b3e, 06c0d6ab) did this correctly and their files were LOST before delivery by a platform fault — the build sandbox's .git points at a directory that does not exist, so writes cannot be captured. You are not duplicating live work. | ||
| This run is pinned to **gate 3** per ops/TARGET.md. | ||
|
|
||
| ## Objective | ||
|
|
||
| Build the SDK entrypoint that takes an emitted work package and turns it into something runnable. The consumer must validate that the package has: | ||
| - A title (non-empty string) | ||
| - A non-empty scope | ||
| - A definition of done | ||
|
|
||
| When any of these is missing or invalid, the consumer REFUSES with a typed reason. A package that cannot be verified must not become work. | ||
| Fix `validateWorkPackage` / `packageFromEntry` in `sdk/src/backlog-picker.ts` so `select-entry` selects a real engineering task from the current ops/BACKLOG.md and does NOT select the "Upstream issues" notes entry. | ||
|
|
||
| ## Root cause (quoted from TARGET.md) | ||
|
|
||
| > Run `select-entry` against the real ops/BACKLOG.md. It prints: | ||
| > | ||
| > SKIPPED_UNACTIONABLE=10 ... | ||
| > | ||
| > and then selects a dated notes blob ("Upstream issues (2026-08-27):") as the | ||
| > work package. Ten genuine engineering tasks were skipped in favour of a list of | ||
| > links. | ||
| > | ||
| > The cause: `validateWorkPackage` decides "actionable" using only two shallow | ||
| > signals — does the text contain a backticked path, and does it contain a | ||
| > multi-word backticked phrase. A notes blob full of backticked identifiers | ||
| > passes both. A real task written in prose ("Refuse a path-like deterministic | ||
| > command word when that path does not exist") fails both. | ||
| > | ||
| > The guard is correct. The SELECTION is poor. That is what to fix. | ||
|
|
||
| ## Files in scope | ||
|
|
||
| - `sdk/src/` (new consumer code) | ||
| - `sdk/tests/` (new consumer tests) | ||
| - NO changes to `kernel/` (PR #19 is open) | ||
| - NO changes to `sdk/src/demo-hn-monitor.ts` (PR #19 is open) | ||
|
|
||
| ## Definition of done | ||
|
|
||
| 1. **SDK code exists** that consumes an emitted work package | ||
| 2. **Validation tests exist** for: | ||
| - Missing title → typed refusal | ||
| - Empty title → typed refusal | ||
| - Missing scope → typed refusal | ||
| - Empty scope → typed refusal | ||
| - Missing definition of done → typed refusal | ||
| - Empty definition of done → typed refusal | ||
| - Valid package → accepted | ||
| 3. **Every new test is confirmed to FAIL against current code** with literal output pasted | ||
| 4. **SDK test suite passes:** | ||
| ``` | ||
| cd sdk && npm test | ||
| ``` | ||
| Paste the literal output showing all tests pass, 0 failed | ||
| 5. **Final verification** — as the LAST action, run: | ||
| ``` | ||
| git status --porcelain | ||
| ``` | ||
| And paste the output to make lost writes visible immediately | ||
|
|
||
| ## Out of scope | ||
|
|
||
| - Kernel changes (different PR) | ||
| - Integration with hn-monitor (different PR) | ||
| - Any changes to the backlog picker itself (already merged in PRs #20, #21, #22) | ||
| - Changes to flow execution or scheduling | ||
| - `sdk/src/backlog-picker.ts` — sharpen the notion of actionability | ||
| - `sdk/src/index.ts` — wire new exports if any | ||
| - `testdata/backlog-picker.flow.yaml` — only if changes required | ||
| - `testdata/backlog-picker.spec.canonical.json` — MUST regenerate if yaml changes | ||
| - Tests covering the new behavior | ||
|
|
||
| ## Definition of done (all of it, from TARGET.md) | ||
|
|
||
| 1. A sharper notion of actionability in `sdk/src/backlog-picker.ts`, wired into sdk/src/index.ts if it is a new export | ||
| 2. It must SELECT a real engineering task from the current ops/BACKLOG.md and must NOT select the "Upstream issues" notes entry. **Quote the literal before/after `select-entry` output** — the actual title it picked before your change and after it. | ||
| 3. Tests covering the new behavior AND every existing test still passing | ||
| 4. `cd sdk && npm test` green | ||
| 5. `cd kernel && sh ../ops/cargo.sh test` green | ||
| 6. If you touch testdata/backlog-picker.flow.yaml you MUST regenerate testdata/backlog-picker.spec.canonical.json — the kernel consumes the canonical spec, not the yaml, and a drift test will fail you | ||
| 7. **EVERY new test confirmed to FAIL against current code**, with the literal failing output quoted in your summary | ||
| 8. As your LAST action, run `git status --porcelain` and paste it | ||
|
|
||
| ## Explicitly OUT of scope | ||
|
|
||
| - Re-implementing `nonexistent_files` check (already done and merged in PR #28) | ||
| - Re-implementing malformed-backlog handling (already done and merged in PR #30) | ||
| - Work on any gate other than gate 3 | ||
| - Any work not directly required to fix the selection rule | ||
|
|
||
| ## Success criteria | ||
|
|
||
| The `select-entry` step against the real ops/BACKLOG.md must: | ||
| - Skip the "Upstream issues" notes blob | ||
| - Select a genuine engineering task instead | ||
| - The before/after command output must be quoted literally in the final summary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current
ops/BACKLOG.md, this only rejects the exact dated “Upstream issues” title while the unchanged backtick-derived scope/definition checks still discard earlier genuine work, including the P1 deterministic-command task; the flow consequently skips down to the later P3steps: []documentation entry. A renamed or undated notes rollup would also pass again. Determine actionability from the entry's content rather than special-casing this one observed title so the selection-quality defect is actually resolved.Useful? React with 👍 / 👎.