From ddbf69ddc4a7b223aa91b98ab5fe19997d5547a9 Mon Sep 17 00:00:00 2001 From: Graham Barber Date: Fri, 31 Jul 2026 15:40:03 -0700 Subject: [PATCH] docs(openspec): archive create-standalone-page, add page-creation spec, sync outline-editor outdent bound --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/outline-editor/spec.md | 0 .../specs/page-creation/spec.md | 0 .../tasks.md | 0 openspec/specs/outline-editor/spec.md | 8 +++-- openspec/specs/page-creation/spec.md | 34 +++++++++++++++++++ 8 files changed, 40 insertions(+), 2 deletions(-) rename openspec/changes/{create-standalone-page => archive/2026-07-31-create-standalone-page}/.openspec.yaml (100%) rename openspec/changes/{create-standalone-page => archive/2026-07-31-create-standalone-page}/design.md (100%) rename openspec/changes/{create-standalone-page => archive/2026-07-31-create-standalone-page}/proposal.md (100%) rename openspec/changes/{create-standalone-page => archive/2026-07-31-create-standalone-page}/specs/outline-editor/spec.md (100%) rename openspec/changes/{create-standalone-page => archive/2026-07-31-create-standalone-page}/specs/page-creation/spec.md (100%) rename openspec/changes/{create-standalone-page => archive/2026-07-31-create-standalone-page}/tasks.md (100%) create mode 100644 openspec/specs/page-creation/spec.md diff --git a/openspec/changes/create-standalone-page/.openspec.yaml b/openspec/changes/archive/2026-07-31-create-standalone-page/.openspec.yaml similarity index 100% rename from openspec/changes/create-standalone-page/.openspec.yaml rename to openspec/changes/archive/2026-07-31-create-standalone-page/.openspec.yaml diff --git a/openspec/changes/create-standalone-page/design.md b/openspec/changes/archive/2026-07-31-create-standalone-page/design.md similarity index 100% rename from openspec/changes/create-standalone-page/design.md rename to openspec/changes/archive/2026-07-31-create-standalone-page/design.md diff --git a/openspec/changes/create-standalone-page/proposal.md b/openspec/changes/archive/2026-07-31-create-standalone-page/proposal.md similarity index 100% rename from openspec/changes/create-standalone-page/proposal.md rename to openspec/changes/archive/2026-07-31-create-standalone-page/proposal.md diff --git a/openspec/changes/create-standalone-page/specs/outline-editor/spec.md b/openspec/changes/archive/2026-07-31-create-standalone-page/specs/outline-editor/spec.md similarity index 100% rename from openspec/changes/create-standalone-page/specs/outline-editor/spec.md rename to openspec/changes/archive/2026-07-31-create-standalone-page/specs/outline-editor/spec.md diff --git a/openspec/changes/create-standalone-page/specs/page-creation/spec.md b/openspec/changes/archive/2026-07-31-create-standalone-page/specs/page-creation/spec.md similarity index 100% rename from openspec/changes/create-standalone-page/specs/page-creation/spec.md rename to openspec/changes/archive/2026-07-31-create-standalone-page/specs/page-creation/spec.md diff --git a/openspec/changes/create-standalone-page/tasks.md b/openspec/changes/archive/2026-07-31-create-standalone-page/tasks.md similarity index 100% rename from openspec/changes/create-standalone-page/tasks.md rename to openspec/changes/archive/2026-07-31-create-standalone-page/tasks.md diff --git a/openspec/specs/outline-editor/spec.md b/openspec/specs/outline-editor/spec.md index 5fa10b4..4549bca 100644 --- a/openspec/specs/outline-editor/spec.md +++ b/openspec/specs/outline-editor/spec.md @@ -14,7 +14,7 @@ The application SHALL maintain at most one live text input at any time — the f - **THEN** the edited block displays its new rendered content and the next block becomes the sole editable input, with no intermediate state where zero or two editors exist ### Requirement: Keyboard-complete outline manipulation -All outline operations SHALL be executable without the mouse: create sibling (Enter), insert a newline within the block (Shift+Enter), split block at cursor, indent/outdent (Tab/Shift+Tab), move block up/down among siblings, delete/merge with previous (Backspace at start), and fold/unfold subtree. Backspace at the start of a childless block SHALL merge it into the *visually previous* row — a previous sibling's deepest visible descendant, or the parent when the block is a first child — with the exception that merging into a page root is permitted only when the block is empty (pure deletion), never appending content into a page title. +All outline operations SHALL be executable without the mouse: create sibling (Enter), insert a newline within the block (Shift+Enter), split block at cursor, indent/outdent (Tab/Shift+Tab), move block up/down among siblings, delete/merge with previous (Backspace at start), and fold/unfold subtree. Backspace at the start of a childless block SHALL merge it into the *visually previous* row — a previous sibling's deepest visible descendant, or the parent when the block is a first child — with the exception that merging into a page root is permitted only when the block is empty (pure deletion), never appending content into a page title. Outdent SHALL be bounded by the current view: a block whose parent is the view's represented node — a page root, or the zoomed block when zoomed — SHALL NOT outdent further, since doing so would move it out of the visible outline (and, at the top level, silently mint a new root page). #### Scenario: Indent under previous sibling - **WHEN** the cursor is in a block and the user presses Tab @@ -28,6 +28,10 @@ All outline operations SHALL be executable without the mouse: create sibling (En - **WHEN** the user folds a block with descendants - **THEN** descendants are hidden, a fold indicator is shown, and keyboard navigation skips the hidden blocks +#### Scenario: Outdent stops at the view's top level +- **WHEN** the cursor is in a block whose parent is the viewed page's root (or the zoom root, when zoomed) and the user presses Shift+Tab +- **THEN** nothing changes — the block remains where it was, still visible in the current view + #### Scenario: Merge follows the eye - **WHEN** the cursor is at the start of a block whose previous sibling has visible descendants and the user presses Backspace - **THEN** the block's content joins the end of the deepest visible descendant — the row rendered directly above — and focus lands at the join point @@ -243,4 +247,4 @@ graphs open exactly as before. #### Scenario: Graphs without fold state open expanded - **WHEN** a graph written before fold persistence existed is opened -- **THEN** every block renders expanded and folding works normally from there +- **THEN** every block renders expanded and folding works normally from there diff --git a/openspec/specs/page-creation/spec.md b/openspec/specs/page-creation/spec.md new file mode 100644 index 0000000..e85a971 --- /dev/null +++ b/openspec/specs/page-creation/spec.md @@ -0,0 +1,34 @@ +# page-creation Specification + +## Purpose + +Creating standalone pages from nothing — no parental backlink required — +and sweeping abandoned empty ones so the keystroke is free to press. + +## Requirements + +### Requirement: Standalone page creation +The system SHALL provide a keyboard-bound New-Page action (default `ctrl-n`) that creates a new root page with no parental backlink, navigates to it, and focuses its heading for naming in place. The new page SHALL start with an empty heading and one empty first block, and creation MUST NOT require any existing block to reference it. + +#### Scenario: Create and name in one flow +- **WHEN** the user presses `ctrl-n` from any view and types `reading-notes` +- **THEN** a new page exists whose heading reads `reading-notes`, the text landed in the heading without any intermediate dialog, and pressing Enter moves the caret into the page's first block + +#### Scenario: Creation from an unfocused home +- **WHEN** the application opened on a home document with no block focused and the user presses `ctrl-n` +- **THEN** a fresh page opens with its heading focused, ready to type + +### Requirement: Abandoned new pages are swept +The system SHALL delete a page when navigation leaves it if it is still completely untouched — empty heading, no non-empty child blocks, and no inbound references. A page with any name, content, or reference SHALL be kept. Only the page being navigated away from SHALL be examined. + +#### Scenario: Abandoned creation leaves no litter +- **WHEN** the user presses `ctrl-n` and then navigates back without typing anything +- **THEN** the created page no longer exists and does not appear in quick-open + +#### Scenario: Named page survives +- **WHEN** the user presses `ctrl-n`, types a name, and navigates away +- **THEN** the page persists and is findable in quick-open by that name + +#### Scenario: Referenced page survives +- **WHEN** a still-empty new page gains an inbound reference from another block before the user navigates away from it +- **THEN** the page persists -- 2.51.2