Skip to content

feat(dwp): pack-8.0 plan surfaces — queue, blocker badge, autonomy posture - #48

Merged
xergioalex merged 5 commits into
mainfrom
feat/v8-editor-surfaces
Nov 16, 2026
Merged

xergioalex merged 5 commits into
mainfrom
feat/v8-editor-surfaces

Conversation

@xergioalex

Copy link
Copy Markdown
Member

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, SHA256SUMS fa21d59e…df66):

  • Plan queue — lua/dwp/queue.lua reads .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's shared/queue.py: same states, start values, document keys and optional note. The editor never writes the queue.
  • Structured-blocker badge — read from the snapshot's top-level blocker (plan-snapshot/v8). class is C1–C7 (anything else is ignored) and resolver is lead|human, where absent means human. Renders C3 · resolvable by: lead or C2 · needs: human. These are the same field and check that herdr-peers 2.1.0's fleet report uses.
  • Autonomy posture — read from the autonomy block of a plan-contract/v8 contract, 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.json field to the contract block. The blocker class moved from a guessed blocker_class key to the record's class.

Verification

  • bash tests/smoke/run.sh: new queue section, 53 assertions OK. It covers defaults, malformed keys, a v7 contract with a stray autonomy key, out-of-range classes, and degradation once the data is removed. All other sections pass except npm guard (1/14), a known macOS-host-only failure that passes in CI.
  • bash scripts/check-public-hygiene.sh: OK.

🤖 Generated with Claude Code

xergioalex and others added 3 commits November 16, 2026 15:47
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]>
xergioalex and others added 2 commits November 16, 2026 15:54
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]>
@xergioalex
xergioalex merged commit 6b1f14f into main Nov 16, 2026
7 checks passed
@xergioalex
xergioalex deleted the feat/v8-editor-surfaces branch November 16, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant