spec: track pending implementation in §13
Backfill scope reminder for the audit that surfaced the Phase 14 deferred surface. §13 consolidates the items still owed from earlier phases so a future "what's left" check doesn't have to re-derive scope from the per-phase prose. - §13.1 lists the 11 deferred Phase 14 commands (list/table/link rewriters + colorize), each with an implementation sketch and a suggested cluster (list rewriters, table rewriters, link helpers, Phase-17-blocked). - §13.2 documents the deliberately-deferred `will_rename` / `will_delete` file-operation variants from the Phase 13 backfill. - §13.3 reminds readers that Phases 17–19 are roadmap, not missing-from-earlier-phases. - §13.4 clarifies that §9 syntax checklist `[ ]` rows are parser coverage rather than missing features. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1326,3 +1326,86 @@ No new workflow files. The existing `ci.yaml` continues to gate
|
||||
`fmt`/`clippy`/`test`. New phases land behind feature additions in the
|
||||
existing crates; the test suite grows accordingly.
|
||||
|
||||
---
|
||||
|
||||
## 13. Pending Implementation
|
||||
|
||||
Items specified in earlier phases but not yet implemented. Tracked here
|
||||
so a future audit doesn't have to re-derive the scope from the per-phase
|
||||
prose. Each entry includes the originating SPEC section, why it was
|
||||
deferred, and a sketch of what the implementation needs.
|
||||
|
||||
### 13.1 Phase 14 — list/table/link/colorize commands
|
||||
|
||||
Phase 14 shipped a focused subset (checkbox toggle/cycle/reject,
|
||||
nextTask navigation, heading promote/demote). The structural-rewriter
|
||||
commands below were deferred — each needs its own AST-aware rewriter,
|
||||
and they don't share enough scaffolding to land together cheaply.
|
||||
|
||||
| Command | SPEC | What it does | Sketch |
|
||||
|---|---|---|---|
|
||||
| `nuwiki.list.changeSymbol` | §12.5 | Rewrite list marker (`-` → `*` → `#` → `1.` …), single item or whole list (`whole_list: bool` arg). | Locate item span via existing `find_list_item_at`; rewrite the marker token; if `whole_list` and numeric, renumber. |
|
||||
| `nuwiki.list.changeLevel` | §12.5 | Indent/dedent one item or a subtree (`delta: i32`, `whole_subtree: bool`). | Compute leading-whitespace delta per line; re-indent each line of the item span; if subtree, descend into `ListItemNode.sublist`. |
|
||||
| `nuwiki.list.renumber` | §12.5 | Re-sequence numeric markers across a list or a whole file (`whole_file: bool`). | Walk every `ListNode` whose `symbol` is `Numeric`/`NumericParen`/`AlphaParen`/…; rewrite the marker substrings in source order. |
|
||||
| `nuwiki.list.removeDone` | §12.5 | Strip `[X]` / `[-]` items and their checked children. | Recursive list walker emitting delete spans for matching items; also delete the trailing newline so the surrounding list stays valid. |
|
||||
| `nuwiki.table.align` | §12.5 | Reformat columns to max width. | Two-pass: width-per-column scan, then re-render every row with padding; respect `>` (col span) and `\/` (row span) markers. |
|
||||
| `nuwiki.table.moveColumn` | §12.5 | Swap column with neighbour (`dir: "left" \| "right"`). | Locate `TableNode` under cursor; for each row, swap `cells[col]` and `cells[col±1]`; re-emit. |
|
||||
| `nuwiki.table.insert` | §12.5 | Insert blank table at cursor (`cols`, `rows`). | Pure string templating; align outputs to current indentation. |
|
||||
| `nuwiki.link.normalize` | §12.5 | Convert word/selection to `[[wikilink]]`, add description if missing. | Inspect cursor selection; if a plain word, wrap in `[[…]]`; if already a wikilink, ensure `\|description` is present. |
|
||||
| `nuwiki.link.pasteWikilink` | §12.5 | Paste current page name as an absolute wikilink. | One-line insert; page name from `index::page_name_from_uri`. |
|
||||
| `nuwiki.link.pasteUrl` | §12.5 | Paste the corresponding HTML output URL. | Blocked on Phase 17 (`html_path` / `html_filename_parameterization` config). |
|
||||
| `nuwiki.colorize` | §12.5 | Wrap range in colour tag per `color_tag_template`. | Blocked on Phase 17 (`color_dic` config) — until then the template isn't reachable. |
|
||||
|
||||
#### Estimated sequencing
|
||||
|
||||
- **Cluster A (list rewriters)** — `changeSymbol`, `changeLevel`,
|
||||
`renumber`, `removeDone` share a list-walker pattern. Likely one
|
||||
PR with a shared `ops::list_walker` helper and four command handlers.
|
||||
- **Cluster B (table rewriters)** — `align`, `moveColumn`, `insert`
|
||||
share a column-width pass and a row-by-row re-emitter. Likely a
|
||||
second PR.
|
||||
- **Cluster C (link helpers)** — `normalize` and `pasteWikilink` are
|
||||
small and don't share much; can land independently.
|
||||
- **Phase-17-blocked** — `pasteUrl` and `colorize` wait until the
|
||||
HTML export commands land the necessary config keys.
|
||||
|
||||
### 13.2 Phase 13 — `will_rename` / `will_delete` capability
|
||||
|
||||
The Phase 17 backfill (commit `ad1b55a`) advertised `did_rename` and
|
||||
`did_delete` but intentionally left `will_rename` / `will_delete` off.
|
||||
Those variants return a `WorkspaceEdit` synchronously from the server —
|
||||
useful for, e.g., rewriting all incoming `[[Page]]` links *before* a
|
||||
client-initiated file rename commits to disk. Implementation would
|
||||
share most of the cross-doc rewrite logic from
|
||||
`rename::compute_rename` (Phase 13) but at a different LSP entry point.
|
||||
Deferred because the value proposition over the existing
|
||||
`workspace/rename` flow is marginal and the editor-side support is
|
||||
inconsistent across clients.
|
||||
|
||||
### 13.3 v1.1 phases 17–19
|
||||
|
||||
Tracked in §10 with status `⏳`. Not "missing" from earlier phases —
|
||||
they're future work in the v1.1 roadmap:
|
||||
|
||||
- **Phase 17** — HTML export commands (`nuwiki.export.*`), template
|
||||
resolution, CSS file management, auto-export. Brings in
|
||||
`html_path` / `template_path` / `color_dic` / etc. config keys.
|
||||
- **Phase 18** — Multi-wiki. Data structures (Wiki aggregate,
|
||||
per-wiki index) already landed in Phase 11; this phase is the
|
||||
config-shape change and the picker commands.
|
||||
- **Phase 19** — Editor glue v2: `:Vimwiki*` compat layer, default
|
||||
keymaps, text objects, folding (P14 already resolved in favour of
|
||||
LSP `foldingRange` + `foldexpr` fallback).
|
||||
|
||||
### 13.4 §9 syntax checklist status
|
||||
|
||||
The §9 checklist tracks every vimwiki-syntax surface. Items currently
|
||||
marked `[ ]` there are parser-level coverage assertions, not missing
|
||||
commands — they're driven by the existing test suite, not by Phase
|
||||
14+ command work. Don't confuse "syntax checklist unchecked" with
|
||||
"feature missing" — most of those rows are exercised by the parser
|
||||
tests under `crates/nuwiki-core/tests/` and just haven't had their
|
||||
checkboxes ticked.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user