diff options
Diffstat (limited to 'docs/plans')
| -rw-r--r-- | docs/plans/2026-04-09-crm-property-completion-implementation.md | 144 | ||||
| -rw-r--r-- | docs/plans/2026-04-09-journal-open-narrowing-implementation.md | 85 | ||||
| -rw-r--r-- | docs/plans/2026-04-09-modular-emacs-architecture-design.md | 81 | ||||
| -rw-r--r-- | docs/plans/2026-04-09-modular-emacs-refactor.md | 152 | ||||
| -rw-r--r-- | docs/plans/2026-04-10-navigation-history-implementation.md | 118 | ||||
| -rw-r--r-- | docs/plans/2026-04-10-olivetti-org-design.md | 57 | ||||
| -rw-r--r-- | docs/plans/2026-04-10-olivetti-org-implementation.md | 129 | ||||
| -rw-r--r-- | docs/plans/2026-04-10-org-refile-design.md | 70 | ||||
| -rw-r--r-- | docs/plans/2026-04-10-org-refile-implementation.md | 108 |
9 files changed, 0 insertions, 944 deletions
diff --git a/docs/plans/2026-04-09-crm-property-completion-implementation.md b/docs/plans/2026-04-09-crm-property-completion-implementation.md deleted file mode 100644 index 88b3d01..0000000 --- a/docs/plans/2026-04-09-crm-property-completion-implementation.md +++ /dev/null @@ -1,144 +0,0 @@ -# CRM Property Completion Implementation Plan - -> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. - -**Goal:** Add data-driven CRM property completion and inline value creation to `ss-crm-add` without introducing a second source of truth. - -**Architecture:** Extend `lisp/ss-crm.el` with small lookup helpers that build on the existing parsed CRM entry cache, plus a single generic choice reader that handles blank selection, optional freeform values, confirmation, and advisory duplicate warnings. Keep seeded vocabularies in code, wire field-specific readers into `ss-crm-add`, and verify with focused ERT coverage plus batch startup loading. - -**Tech Stack:** Emacs Lisp, Org, ERT, batch Emacs verification - ---- - -### Task 1: Add failing CRM helper tests - -**Files:** -- Create: `tests/ss-crm-tests.el` -- Modify: `lisp/ss-crm.el` - -**Step 1: Write the failing test** - -```elisp -(ert-deftest ss-crm-known-property-values-sorts-and-deduplicates () - (cl-letf (((symbol-function 'ss-crm-entries) - (lambda () - (list (list :role "Engineer") - (list :role " engineer ") - (list :role "Architect") - (list :role nil))))) - (should (equal (ss-crm-known-property-values "ROLE") - '("Architect" "Engineer" " engineer "))))) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL because the new CRM helper functions do not exist yet. - -**Step 3: Write minimal implementation** - -```elisp -(defun ss-crm-known-property-values (property) - ...) -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS for the helper coverage. - -**Step 5: Commit** - -```bash -git add tests/ss-crm-tests.el lisp/ss-crm.el -git commit -m "Add CRM property completion helpers" -``` - -### Task 2: Add completion-reader tests and implement prompt behavior - -**Files:** -- Modify: `tests/ss-crm-tests.el` -- Modify: `lisp/ss-crm.el` - -**Step 1: Write the failing test** - -```elisp -(ert-deftest ss-crm-read-choice-warns-on-new-case-insensitive-duplicate () - (let (warning) - (cl-letf (((symbol-function 'completing-read) (lambda (&rest _) "sydney")) - ((symbol-function 'yes-or-no-p) (lambda (&rest _) t)) - ((symbol-function 'display-warning) - (lambda (_type message &rest _) (setq warning message)))) - (should (equal (ss-crm-read-choice "Location: " '("Sydney") - :allow-blank t - :allow-new t) - "sydney")) - (should (string-match-p "Sydney" warning)))) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL because `ss-crm-read-choice` does not support the new behavior yet. - -**Step 3: Write minimal implementation** - -```elisp -(defun ss-crm-read-choice (prompt choices &rest plist) - ...) -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS for blank selection, existing completion, and new-value confirmation coverage. - -**Step 5: Commit** - -```bash -git add tests/ss-crm-tests.el lisp/ss-crm.el -git commit -m "Add CRM completion prompts" -``` - -### Task 3: Integrate field readers into `ss-crm-add` and verify startup - -**Files:** -- Modify: `lisp/ss-crm.el` -- Review: `README.md` - -**Step 1: Write the failing test** - -```elisp -(ert-deftest ss-crm-read-manager-uses-known-person-names () - (cl-letf (((symbol-function 'ss-crm-known-person-names) - (lambda () '("Alice" "Bob"))) - ((symbol-function 'ss-crm-read-choice) - (lambda (_prompt choices &rest _plist) choices))) - (should (equal (ss-crm-read-manager) '("Alice" "Bob"))))) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL until the field readers are wired up. - -**Step 3: Write minimal implementation** - -```elisp -(defun ss-crm-read-manager () - (ss-crm-read-choice "Manager: " (ss-crm-known-person-names) - :allow-blank t - :require-match t)) -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS, then run `emacs --batch -Q --load ./init.el` to confirm startup remains healthy. - -**Step 5: Commit** - -```bash -git add tests/ss-crm-tests.el lisp/ss-crm.el README.md -git commit -m "Guide CRM add-person property entry" -``` diff --git a/docs/plans/2026-04-09-journal-open-narrowing-implementation.md b/docs/plans/2026-04-09-journal-open-narrowing-implementation.md deleted file mode 100644 index 59a80de..0000000 --- a/docs/plans/2026-04-09-journal-open-narrowing-implementation.md +++ /dev/null @@ -1,85 +0,0 @@ -# Journal Open Narrowing Implementation Plan - -> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. - -**Goal:** Make `ss-open-journal` narrow to today's subtree when today's journal entry exists, while preserving the current fallback when it does not. - -**Architecture:** Add focused ERT coverage for the journal-open helper in `tests/`, then update `lisp/ss-org.el` so it widens first, reuses the existing `ss-journal-goto-date` lookup, and narrows only on the successful path. Keep the missing-entry case unchanged by leaving point at the end of the journal buffer without creating new headings. - -**Tech Stack:** Emacs Lisp, ERT, batch Emacs verification - ---- - -### Task 1: Add failing journal-open test - -**Files:** -- Modify: `tests/ss-capture-tests.el` -- Modify: `lisp/ss-org.el` - -**Step 1: Write the failing test** - -```elisp -(ert-deftest ss-open-journal-narrows-to-today-when-entry-exists () - ...) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL because `ss-open-journal` currently widens and jumps, but does not narrow. - -**Step 3: Write minimal implementation** - -```elisp -(when (ss-journal-goto-date) - (org-narrow-to-subtree)) -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS, with the fallback case still leaving the buffer widened at end of file. - -**Step 5: Commit** - -```bash -git add tests/ss-capture-tests.el lisp/ss-org.el -git commit -m "Narrow journal open to today" -``` - -### Task 2: Run regression verification - -**Files:** -- Review: `README.md` -- Verify: `lisp/ss-org.el` - -**Step 1: Write the failing test** - -```elisp -(ert-deftest ss-open-journal-falls-back-to-end-when-today-missing () - ...) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL until the fallback remains explicitly covered. - -**Step 3: Write minimal implementation** - -```elisp -(unless (ss-journal-goto-date) - (goto-char (point-max))) -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS, then run `emacs --batch -Q --load ./init.el` to confirm startup remains healthy. - -**Step 5: Commit** - -```bash -git add tests/ss-capture-tests.el lisp/ss-org.el README.md -git commit -m "Preserve journal open fallback" -``` diff --git a/docs/plans/2026-04-09-modular-emacs-architecture-design.md b/docs/plans/2026-04-09-modular-emacs-architecture-design.md deleted file mode 100644 index 1c2ce14..0000000 --- a/docs/plans/2026-04-09-modular-emacs-architecture-design.md +++ /dev/null @@ -1,81 +0,0 @@ -# Modular Emacs Architecture Design - -**Date:** 2026-04-09 - -## Goal - -Refactor the repository from a single literate `config.org` source into a -hand-edited modular Emacs configuration built around `init.el`, -`early-init.el`, and a small set of domain-based Lisp modules under `lisp/`, -while preserving existing behavior as closely as possible. - -## Scope - -This change is an architectural refactor, not a workflow redesign. Existing -startup behavior, packages, capture flows, agenda rules, CRM commands, -completion setup, and keybindings should remain materially the same unless a -small structural adjustment is required by the new module boundaries. - -## Architecture - -### Entry points - -- `early-init.el` remains a standalone file and contains only true early - startup concerns that must exist before the first GUI frame. -- `init.el` becomes the hand-edited runtime entry point. -- `init.el` adds `lisp/` to `load-path`, defines a central - `ss-enabled-features` list, requires `ss-core`, and conditionally loads and - sets up each high-level feature module. - -### Module boundaries - -- `lisp/ss-core.el` - Owns Emacs version checks, package bootstrap, shared constants and helper - functions, note-system paths, and small shared editor defaults that other - modules depend on. -- `lisp/ss-ui.el` - Owns theme, fonts, frame behavior, modeline, and terminal-versus-GUI UI - setup. -- `lisp/ss-org.el` - Owns base Org configuration, shared Org helpers, startup MOC behavior, and - note-opening helpers. -- `lisp/ss-agenda.el` - Owns agenda file discovery rules and agenda command setup. -- `lisp/ss-capture.el` - Owns journal capture helpers and `org-capture` templates. -- `lisp/ss-denote.el` - Owns Denote configuration and note creation helpers. -- `lisp/ss-crm.el` - Owns all people CRM logic, including parsing, cache management, abbrevs, - CAPF, lookup, open/find/insert/add/report commands, and prompt helpers. -- `lisp/ss-gptel.el` - Owns the experimental `gptel` integration. -- `lisp/ss-keys.el` - Owns central global keybindings only. - -### Dependency shape - -- `ss-core` is the only unconditional module. -- Other modules may depend on `ss-core` helpers and shared path constants. -- `ss-keys` binds commands provided by other modules but should not implement - workflow logic itself. -- Side effects should happen in each module's `ss-...-setup` function rather - than during `require`, except for definitions that are harmless at load time. - -## Migration decisions - -- Remove `config.org` entirely after extraction. There will be no transitional - dual system and no compatibility tangling layer. -- Keep `build` only if it remains useful for the modular setup; otherwise - remove or repurpose it truthfully. -- Keep `reset` only if it still aligns with the hand-edited architecture; - update it so it no longer treats `init.el` or `early-init.el` as generated - artifacts. - -## Validation - -- Primary validation: `emacs --batch -Q --load ./init.el` -- If the refactor preserves terminal-specific UI behavior, also verify in a - real `emacs -nw` session when practical. -- Documentation must be updated in the same change so `README.md` and - `AGENTS.md` describe the modular architecture truthfully. diff --git a/docs/plans/2026-04-09-modular-emacs-refactor.md b/docs/plans/2026-04-09-modular-emacs-refactor.md deleted file mode 100644 index ad44ca1..0000000 --- a/docs/plans/2026-04-09-modular-emacs-refactor.md +++ /dev/null @@ -1,152 +0,0 @@ -# Modular Emacs Refactor Implementation Plan - -> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. - -**Goal:** Replace the literate `config.org` runtime with a modular hand-edited Emacs configuration centered on `init.el`, `early-init.el`, and `lisp/ss-*.el`. - -**Architecture:** Keep `early-init.el` minimal, move reusable runtime logic into domain modules under `lisp/`, and make `init.el` the single composition layer that enables features explicitly and calls one setup function per module. Preserve current behavior unless a structural refactor requires a minimal change. - -**Tech Stack:** Emacs Lisp, built-in `package.el`, `use-package`, Org mode, Denote, gptel - ---- - -### Task 1: Create the modular file layout - -**Files:** -- Create: `early-init.el` -- Create: `init.el` -- Create: `lisp/ss-core.el` -- Create: `lisp/ss-ui.el` -- Create: `lisp/ss-org.el` -- Create: `lisp/ss-agenda.el` -- Create: `lisp/ss-capture.el` -- Create: `lisp/ss-denote.el` -- Create: `lisp/ss-crm.el` -- Create: `lisp/ss-gptel.el` -- Create: `lisp/ss-keys.el` - -**Step 1: Create `early-init.el` with only early frame settings** - -Write the standalone early startup file and keep it limited to frame defaults -that previously had to exist before the first GUI frame. - -**Step 2: Create `init.el` as the composition root** - -Add `lisp/` to `load-path`, define `ss-enabled-features`, require `ss-core`, -and conditionally require each optional module before calling its setup -function. - -**Step 3: Create module skeletons** - -Add one `ss-...-setup` function per module and provide each feature. - -### Task 2: Extract shared runtime and UI behavior - -**Files:** -- Modify: `lisp/ss-core.el` -- Modify: `lisp/ss-ui.el` - -**Step 1: Move version checks, package bootstrap, shared paths, and editing defaults into `ss-core.el`** - -Keep shared constants and helper functions in one place and avoid hidden -cross-module state. - -**Step 2: Move theme, fonts, frame behavior, and modeline setup into `ss-ui.el`** - -Preserve the current GUI-versus-terminal behavior and keep side effects in -`ss-ui-setup`. - -### Task 3: Extract Org, agenda, capture, and Denote domains - -**Files:** -- Modify: `lisp/ss-org.el` -- Modify: `lisp/ss-agenda.el` -- Modify: `lisp/ss-capture.el` -- Modify: `lisp/ss-denote.el` - -**Step 1: Move shared Org paths and note helpers into `ss-org.el`** - -Keep `~/org` invariants unchanged and preserve startup MOC behavior. - -**Step 2: Move agenda discovery and agenda command wiring into `ss-agenda.el`** - -Preserve explicit include and exclude rules. - -**Step 3: Move journal capture helpers and `org-capture` templates into `ss-capture.el`** - -Keep the existing templates and journal structure intact. - -**Step 4: Move Denote setup into `ss-denote.el`** - -Preserve prompts, keywords, and key-facing commands. - -### Task 4: Extract CRM and gptel domains - -**Files:** -- Modify: `lisp/ss-crm.el` -- Modify: `lisp/ss-gptel.el` - -**Step 1: Move all CRM logic into `ss-crm.el`** - -Keep parsing, cache invalidation, abbrevs, CAPF, reports, and commands -together in the CRM module only. - -**Step 2: Move experimental Copilot-backed gptel setup into `ss-gptel.el`** - -Preserve existing commands and defaults. - -### Task 5: Centralize keybindings - -**Files:** -- Modify: `lisp/ss-keys.el` - -**Step 1: Bind the existing workflow commands in one place** - -Move global bindings out of the feature modules so feature inclusion remains -centralized and explicit. - -### Task 6: Update scripts and documentation - -**Files:** -- Modify: `README.md` -- Modify: `AGENTS.md` -- Modify or delete: `build` -- Modify: `reset` -- Delete: `config.org` - -**Step 1: Rewrite documentation to describe the modular architecture truthfully** - -Remove stale references to tangling, generated startup files, and `config.org` -as the source of truth. - -**Step 2: Update helper scripts** - -Remove or rewrite anything that only made sense for the literate build path. - -**Step 3: Remove `config.org`** - -Delete the literate source once the extracted runtime files are in place. - -### Task 7: Validate the new startup path - -**Files:** -- Verify: `init.el` -- Verify: `early-init.el` -- Verify: `lisp/ss-*.el` - -**Step 1: Run batch load verification** - -Run: `emacs --batch -Q --load ./init.el` - -Expected: startup completes without load errors. - -**Step 2: Run a terminal startup check if practical** - -Run: `emacs -nw` - -Expected: terminal UI behavior still matches the previous configuration. - -**Step 3: Summarize validation and any intentional behavior changes** - -Note any small structural changes required by the refactor, and call out -whether `README.md` and `AGENTS.md` were updated. diff --git a/docs/plans/2026-04-10-navigation-history-implementation.md b/docs/plans/2026-04-10-navigation-history-implementation.md deleted file mode 100644 index 0d58756..0000000 --- a/docs/plans/2026-04-10-navigation-history-implementation.md +++ /dev/null @@ -1,118 +0,0 @@ -# Navigation History Implementation Plan - -> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. - -**Goal:** Add small, browser-style back and forward navigation commands for note and mark-based movement across Org, agenda, CRM, and Denote workflows. - -**Architecture:** Keep the navigation state and restoration helpers in `lisp/ss-org.el`, using marker-based location records plus a simple back stack and forward stack. Record only significant jumps by wiring the repo's custom note commands and advising common built-in jump commands after they move, while skipping same-location noise and clearing forward history on fresh navigation. - -**Tech Stack:** Emacs Lisp, ERT, batch Emacs verification, interactive `emacs -nw` sanity check - ---- - -### Task 1: Add failing navigation tests - -**Files:** -- Modify: `tests/ss-capture-tests.el` -- Modify: `lisp/ss-org.el` - -**Step 1: Write the failing tests** - -```elisp -(ert-deftest ss-jump-back-restores-previous-location-and-enables-forward () - ...) - -(ert-deftest ss-navigation-push-current-location-clears-forward-on-fresh-jump () - ...) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL because the navigation stack commands and helper functions do not exist yet. - -**Step 3: Write minimal implementation** - -```elisp -(defvar ss-navigation-back-stack nil) -(defvar ss-navigation-forward-stack nil) -... -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS for the new stack behavior tests. - -**Step 5: Commit** - -```bash -git add tests/ss-capture-tests.el lisp/ss-org.el -git commit -m "Add navigation history stack" -``` - -### Task 2: Wire note and jump commands into history - -**Files:** -- Modify: `lisp/ss-org.el` -- Modify: `lisp/ss-keys.el` - -**Step 1: Write the failing test** - -```elisp -(ert-deftest ss-navigation-jump-wrapper-records-pre-jump-location () - ...) -``` - -**Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL because custom navigation commands and advised jump commands do not record history yet. - -**Step 3: Write minimal implementation** - -```elisp -(defun ss-navigation-record-before-command (&rest _) - ...) - -(advice-add 'org-open-at-point :before #'ss-navigation-record-before-command) -``` - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS, with the navigation helpers loaded cleanly beside the existing CRM and capture tests. - -**Step 5: Commit** - -```bash -git add lisp/ss-org.el lisp/ss-keys.el tests/ss-capture-tests.el -git commit -m "Wire note jumps into navigation history" -``` - -### Task 3: Update docs and verify startup behavior - -**Files:** -- Modify: `README.md` -- Review: `AGENTS.md` - -**Step 1: Update docs** - -Add the new `C-c b` and `C-c f` bindings plus a short explanation of what participates in navigation history. - -**Step 2: Run verification** - -Run: `emacs --batch -Q --load ./init.el` -Expected: PASS with the updated navigation code loaded through the normal startup path. - -**Step 3: Run interactive sanity check** - -Run: `emacs -nw` -Expected: manual verification that MOC, journal, and note jumps can go back and forward, and that a fresh jump clears forward history. - -**Step 4: Commit** - -```bash -git add README.md -git commit -m "Document navigation history bindings" -``` diff --git a/docs/plans/2026-04-10-olivetti-org-design.md b/docs/plans/2026-04-10-olivetti-org-design.md deleted file mode 100644 index 863ca65..0000000 --- a/docs/plans/2026-04-10-olivetti-org-design.md +++ /dev/null @@ -1,57 +0,0 @@ -# Olivetti Org Design - -## Context - -The configuration is modular: - -- `lisp/ss-ui.el` owns visual packages and interface defaults. -- `lisp/ss-org.el` owns Org-specific setup and hooks. -- `init.el` composes modules centrally through `ss-enabled-features`. - -The requested behavior is to add `olivetti-mode` to the configuration and -enable it automatically for Org buffers in both GUI Emacs and `emacs -nw`. - -## Options Considered - -### 1. Recommended: split package ownership and activation by module - -- Declare and configure `olivetti` in `lisp/ss-ui.el`. -- Enable `olivetti-mode` from `org-mode-hook` in `lisp/ss-org.el`. - -This matches the repository boundaries: visual package ownership remains in the -UI module, while Org-specific behavior remains in the Org module. - -### 2. Put everything in `lisp/ss-org.el` - -- Add the package declaration and the hook together in the Org module. - -This is workable but muddies module boundaries by making the Org module own a -general presentation package. - -### 3. Add a new writing-focused module - -- Introduce a dedicated module for prose layout and writing helpers. - -This is clean only if more writing-mode features are expected soon. For a -single package addition, it adds unnecessary structure. - -## Chosen Design - -Use option 1. - -- Add `olivetti` in `lisp/ss-ui.el` with a modest body width that works in GUI - and terminal frames. -- Enable `olivetti-mode` automatically in Org buffers from `lisp/ss-org.el`. -- Do not enable it globally or for non-Org buffers. -- Keep startup order unchanged. - -## Verification - -- Run `emacs --batch -Q --load ./init.el` from the repository root. -- Run an actual terminal Emacs startup check with `emacs -nw` loading this - configuration, since batch mode alone will not catch tty regressions. - -## Documentation Impact - -`README.md` should be updated so the package list and Org behavior describe the -new default truthfully. diff --git a/docs/plans/2026-04-10-olivetti-org-implementation.md b/docs/plans/2026-04-10-olivetti-org-implementation.md deleted file mode 100644 index 7853be3..0000000 --- a/docs/plans/2026-04-10-olivetti-org-implementation.md +++ /dev/null @@ -1,129 +0,0 @@ -# Olivetti Org Implementation Plan - -> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. - -**Goal:** Add `olivetti` to the Emacs config and enable it automatically for Org buffers in GUI and terminal sessions. - -**Architecture:** Keep visual package ownership in `lisp/ss-ui.el` and Org-specific activation in `lisp/ss-org.el`. Update `README.md` so the package model and Org behavior remain accurate, then verify the hand-edited startup path in batch and terminal Emacs. - -**Tech Stack:** Emacs Lisp, `use-package`, Org mode, `olivetti` - ---- - -### Task 1: Add the visual package setup - -**Files:** -- Modify: `lisp/ss-ui.el` - -**Step 1: Write the failing test** - -For this configuration-only change, there is no existing automated test harness -covering package declarations or minor-mode activation. Use startup -verification as the regression check for this unit. - -**Step 2: Run test to verify it fails** - -Not applicable for this repository layout. The useful red state is the absence -of `olivetti` configuration in the current source. - -**Step 3: Write minimal implementation** - -- Add a `use-package olivetti` declaration to `ss-ui`. -- Set a conservative width such as `olivetti-body-width 100`. - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q --load ./init.el` -Expected: startup completes without Lisp errors. - -**Step 5: Commit** - -Wait for verification and user approval before creating a commit. - -### Task 2: Enable Olivetti for Org buffers - -**Files:** -- Modify: `lisp/ss-org.el` - -**Step 1: Write the failing test** - -Use the same configuration exception as Task 1. There is no existing targeted -test scaffold for `org-mode-hook` behavior here. - -**Step 2: Run test to verify it fails** - -Not applicable. The current source does not add `olivetti-mode` to -`org-mode-hook`. - -**Step 3: Write minimal implementation** - -- Extend the existing `org-mode-hook` lambda to enable `olivetti-mode`. - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q --load ./init.el` -Expected: startup completes without Lisp errors. - -Run: `emacs -nw --eval '(progn (load-file \"./init.el\") (with-current-buffer (get-buffer-create \"*olivetti-check*\") (org-mode) (princ (if olivetti-mode \"olivetti-on\" \"olivetti-off\"))))'` -Expected: output includes `olivetti-on`. - -**Step 5: Commit** - -Wait for verification and user approval before creating a commit. - -### Task 3: Update documentation - -**Files:** -- Modify: `README.md` - -**Step 1: Write the failing test** - -The failing condition is documentation drift: the current README does not list -`olivetti` or mention that Org buffers enable it automatically. - -**Step 2: Run test to verify it fails** - -Review `README.md` and confirm it lacks that behavior. - -**Step 3: Write minimal implementation** - -- Add `olivetti` to the package model. -- Add a short note in the Org workflow description that Org buffers enable - `olivetti-mode` for centered writing layout. - -**Step 4: Run test to verify it passes** - -Review the updated README text for accuracy against the code. - -**Step 5: Commit** - -Wait for verification and user approval before creating a commit. - -### Task 4: Verify the complete change - -**Files:** -- Verify only - -**Step 1: Write the failing test** - -Use the repository’s expected verification path rather than adding new tests. - -**Step 2: Run test to verify it fails** - -Not applicable before implementation. - -**Step 3: Write minimal implementation** - -No code changes in this task. - -**Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q --load ./init.el` -Expected: exits successfully. - -Run: `emacs -nw --eval '(progn (load-file \"./init.el\") (with-temp-buffer (org-mode) (princ (if olivetti-mode \"olivetti-on\" \"olivetti-off\"))))'` -Expected: prints `olivetti-on`. - -**Step 5: Commit** - -Wait for verification and user approval before creating a commit. diff --git a/docs/plans/2026-04-10-org-refile-design.md b/docs/plans/2026-04-10-org-refile-design.md deleted file mode 100644 index ae7e881..0000000 --- a/docs/plans/2026-04-10-org-refile-design.md +++ /dev/null @@ -1,70 +0,0 @@ -# Org Refile Design - -## Context - -The configuration already has the core minibuffer completion stack in place: - -- `lisp/ss-ui.el` enables Vertico, Orderless, and Marginalia globally. -- `lisp/ss-org.el` owns base Org configuration. -- `lisp/ss-agenda.el` already discovers `org-agenda-files` from the journal and - PARA directories. - -The missing piece is Org refile configuration. The requested behavior is to -refile Org entries to any heading in the current `org-agenda-files`, using a -single, path-oriented prompt that works well with the existing Vertico-based -completion UI. - -## Options Considered - -### 1. Recommended: configure built-in Org refile against `org-agenda-files` - -- Use Org's standard `org-refile` command and target machinery. -- Refresh `org-agenda-files` before refile so the target set stays aligned with - the existing agenda discovery rules. -- Configure path-based completion so Vertico and Orderless present the target - list cleanly. - -This keeps the workflow conventional, reuses existing repository structure, and -avoids maintaining a parallel refile implementation. - -### 2. Add a custom wrapper command with richer target formatting - -- Build a custom candidate list for headings across agenda files. -- Pass the chosen destination back into Org's refile internals. - -This could show more custom metadata, but it duplicates behavior Org already -provides and increases maintenance cost for little practical gain. - -### 3. Add more completion packages just for refile - -- Introduce a Vertico extension or a separate package to alter refile prompts. - -This adds package surface area without first exhausting the built-in Org and -completion capabilities already present in the config. - -## Chosen Design - -Use option 1. - -- Configure `org-refile-targets` to use `org-agenda-files` with unrestricted - heading depth. -- Enable outline-path completion so identically named headings are - distinguishable by their parent path. -- Use the direct, path-based completion flow rather than an additional outline - navigation step. -- Refresh `org-agenda-files` before refile by reusing the existing agenda file - discovery helper instead of copying the directory rules. -- Keep the change inside the existing module boundaries: Org behavior in - `lisp/ss-org.el`, with a UI tweak in `lisp/ss-ui.el` only if the current - completion categories need one. - -## Verification - -- Add focused ERT coverage for the refile setup helper and variable values. -- Run `emacs --batch -Q --load ./init.el` from the repository root. - -## Documentation Impact - -`README.md` should be updated to describe that Org refile targets any heading in -`org-agenda-files` and uses the configured minibuffer completion stack for -path-based target selection.
\ No newline at end of file diff --git a/docs/plans/2026-04-10-org-refile-implementation.md b/docs/plans/2026-04-10-org-refile-implementation.md deleted file mode 100644 index 687e86d..0000000 --- a/docs/plans/2026-04-10-org-refile-implementation.md +++ /dev/null @@ -1,108 +0,0 @@ -# Org Refile Implementation Plan - -> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking. - -**Goal:** Configure Org refile so entries can be moved to any heading in `org-agenda-files` with a clearer Vertico-friendly path-based prompt. - -**Architecture:** Reuse the existing agenda discovery helper to keep `org-agenda-files` current before refile, then configure built-in Org refile variables in `lisp/ss-org.el`. Add narrow ERT coverage for the helper and settings, and update `README.md` so the documented workflow matches the configuration. - -**Tech Stack:** Emacs Lisp, Org mode, ERT, Vertico, Orderless, Marginalia - ---- - -## Chunk 1: Refile Configuration - -### Task 1: Add refile refresh helper and Org settings - -**Files:** -- Modify: `lisp/ss-org.el` -- Reference: `lisp/ss-agenda.el` - -- [ ] **Step 1: Write the failing test** - -Add ERT coverage that loads `ss-org`, stubs agenda refresh behavior, runs the -new setup helper, and asserts: - -- `org-refile-targets` points at `org-agenda-files` -- unlimited heading depth is enabled -- outline-path completion is enabled -- the direct path completion flow is selected - -- [ ] **Step 2: Run test to verify it fails** - -Run: `emacs --batch -Q -L lisp -l tests/ss-org-tests.el -f ert-run-tests-batch-and-exit` -Expected: FAIL because the refile helper and settings do not exist yet. - -- [ ] **Step 3: Write minimal implementation** - -- Add a small helper in `lisp/ss-org.el` that refreshes `org-agenda-files` - before refile, reusing `ss-refresh-org-agenda-files` when available. -- Configure Org refile variables during `ss-org-setup`. - -- [ ] **Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q -L lisp -l tests/ss-org-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS. - -- [ ] **Step 5: Commit** - -Wait for verification and user approval before creating a commit. - -## Chunk 2: Documentation and Startup Verification - -### Task 2: Document the refile workflow - -**Files:** -- Modify: `README.md` - -- [ ] **Step 1: Write the failing test** - -The failing condition is documentation drift: the README currently does not -describe refile behavior. - -- [ ] **Step 2: Run test to verify it fails** - -Review `README.md` and confirm it lacks refile documentation. - -- [ ] **Step 3: Write minimal implementation** - -- Add a short note describing that Org refile targets any heading in - `org-agenda-files` and uses path-based minibuffer completion. - -- [ ] **Step 4: Run test to verify it passes** - -Review the updated text against the code for accuracy. - -- [ ] **Step 5: Commit** - -Wait for verification and user approval before creating a commit. - -### Task 3: Verify the full startup path - -**Files:** -- Verify only - -- [ ] **Step 1: Write the failing test** - -Use the repository's normal startup verification path in addition to the new -targeted ERT coverage. - -- [ ] **Step 2: Run test to verify it fails** - -Not applicable before implementation. - -- [ ] **Step 3: Write minimal implementation** - -No code changes in this task. - -- [ ] **Step 4: Run test to verify it passes** - -Run: `emacs --batch -Q --load ./init.el` -Expected: exits successfully. - -Run: `emacs --batch -Q -L lisp -l tests/ss-org-tests.el -f ert-run-tests-batch-and-exit` -Expected: PASS. - -- [ ] **Step 5: Commit** - -Wait for verification and user approval before creating a commit.
\ No newline at end of file |
