Repository navigation
feat(dwp): pack-8.0 plan surfaces — queue, blocker badge, autonomy posture - #48
Merged
Merged
Conversation
The editor's side of methodology v8 (PLAN_024), all read-only and additive: a repository without pack-8.0 data renders byte-identically to before, and the editor never writes plan state. - lua/dwp/queue.lua (new): read-only dwp-queue-v1 reader for .dwp/queue.json — the pack is the only writer. Document-level shape is enforced (schema id gates everything; a future schema is not guessed at); items stay individually tolerant so a plan is never hidden from the queue view. for_plan() gives position/ahead/lead/ start; line() the plain-language place. - state.lua: the structured-blocker badge fields (blocker_class C1-C7 + resolver lead|human, absent resolver meaning human) and the autonomy posture (stall budget, brain-may-act, promptable scope), both nil on a 7.x plan. blocker_badge() is the one badge vocabulary. - sidebar: badge and queue info lines ride under a plan row, never inside the frozen row format; reader: the posture block sits beside the goal and the badge under the needs-attention warning. - tests/smoke/dwp_queue.lua (new smoke section): queue parsing and degradation (missing, corrupt, future schema, tolerant items), badge vocabulary, both surfaces' rendering, and the 7.x degradation pass. - Docs and addon surface updated (lua/README, ARCHITECTURE, DESIGN, surface.json, CHANGELOG). Cross-check gate before release: the authoritative field paths land with pack 8.0.0-beta.1; this surface ships only after the vendored schema confirms the documented shape. Co-Authored-By: Claude Code <[email protected]>
Cross-checked against pack main (#94, the v8 contract generation): the posture is the contract's optional, closed `autonomy` block (spec/LOOP_ENGINEERING.md section 2), not a state.json field, and its keys are stall_budget, promptable, notify, brain and queue. - state.lua: the posture comes from the contract the manifest points at, only for a plan-contract/v8 schema. Every absent or malformed key takes the recorded default (3, the lead only, no target, false, none), and a v7 contract yields nil, so the plan renders as before. - reader.lua: one fact per line (stall budget, brain, promptable panes, notify targets, queue start), so no fact is split mid-phrase. - dwp_queue smoke: fixtures move to a v8 contract; adds coverage for the defaults, malformed keys and a v7 contract with a stray autonomy key. - Docs: CHANGELOG, DESIGN, lua/README and addon/surface.json wording. Co-Authored-By: Claude Opus 5.5 <[email protected]>
herdr-peers 2.1.0 (the released consumer of the v8 blocker classes) reads the class as the blocker record's `class`, the field pack 8.0.0's plan-snapshot/v8 writes, and accepts only C1-C7. The editor read a guessed `blocker_class` key; it now reads `class` with the same C1-C7 check, so the badge and the fleet report agree. The internal record field names stay unchanged. The smoke fixture moves to `class`, plus a case where a class outside C1-C7 is ignored. Re-verify against plan-snapshot/v8 when the pack publishes it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fixes the findings of the local review of the editor-surfaces PR. - queue.lua (blocking): a hand-edited state carrying a newline reached nvim_buf_set_lines and broke :DwpPlans and the reader. The queue is now validated all-or-nothing exactly like the pack's writer (valid_doc at v8.0.0-beta.1): closed document and item keys, every base key present, known state/start, pack plan ids, full pane addresses, started requires a lead, non-blank notes up to 200 characters, no duplicates, at most 64 items, a boolean parallel. The file must also be a regular file (never a followed symlink) of at most 64 KiB. - state.lua: the posture follows the live contract, the highest contracts/ revision (V6_LIFECYCLE section 5; staged .pending files ignored), not the manifest's first-written pointer. - state.lua / plans.lua / reader.lua: the posture is computed on demand by the reader (state.posture), so plans scans for the sidebar, statusline and greeter add no manifest or contract reads. - state.lua: resolver "lead" with a class outside C3/C4/C7 is read as human, matching plan-snapshot/v8's conditional. - dwp_queue smoke: 68 assertions, adding the rejection cases, the revision chain, the lead+C1 case and no posture in a scan. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Spell the pack's ASCII regex classes explicitly ([A-Za-z0-9]) instead of Lua's locale-dependent %w, so a non-ASCII plan id or pane address can never pass. A contracts/ entry whose type the filesystem does not report is no longer skipped. Smoke: a non-ASCII plan id is rejected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Read-only, additive editor surfaces for DeepWorkPlan 8.0, cross-checked against the v8.0.0-beta.1 pre-release (tag peels to
4528ba1b,SHA256SUMSfa21d59e…df66):lua/dwp/queue.luareads.dwp/queue.json(dwp-queue-v1). The sidebar and reader show each plan's queue state and place (queue: started · #2 of 3, 1 ahead). Matches the beta'sshared/queue.py: same states,startvalues, document keys and optionalnote. The editor never writes the queue.blocker(plan-snapshot/v8).classis C1–C7 (anything else is ignored) andresolverislead|human, where absent means human. RendersC3 · resolvable by: leadorC2 · needs: human. These are the same field and check that herdr-peers 2.1.0's fleet report uses.autonomyblock of aplan-contract/v8contract, found through the manifest pointer. Each absent or malformed key takes the spec's recorded default (stall budget 3, the lead only, no notify target, brain false, queue none). The reader shows one fact per line beside the goal.Every surface renders only when its data exists: a v7 plan, or a repository without a queue, renders byte-identically to before.
Three commits: the base surfaces, then two corrections from the cross-check. The posture moved from a guessed
state.jsonfield to the contract block. The blocker class moved from a guessedblocker_classkey to the record'sclass.Verification
bash tests/smoke/run.sh: newqueuesection, 53 assertions OK. It covers defaults, malformed keys, a v7 contract with a strayautonomykey, out-of-range classes, and degradation once the data is removed. All other sections pass exceptnpm guard(1/14), a known macOS-host-only failure that passes in CI.bash scripts/check-public-hygiene.sh: OK.🤖 Generated with Claude Code