summaryrefslogtreecommitdiff
path: root/docs/plans/2026-04-10-olivetti-org-implementation.md
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@szymonszukalski.com>2026-04-10 13:05:30 +1000
committerSzymon Szukalski <szymon@szymonszukalski.com>2026-04-10 13:05:30 +1000
commit44f4506f29b937130e04c42049afe78c69b0dd28 (patch)
treedc0a8db8f4caa92c30c698afd890336499663754 /docs/plans/2026-04-10-olivetti-org-implementation.md
parent2d8d20c50d60644c0d1de2021893bce3b04da76a (diff)
Add olivetti for org buffers
Diffstat (limited to 'docs/plans/2026-04-10-olivetti-org-implementation.md')
-rw-r--r--docs/plans/2026-04-10-olivetti-org-implementation.md129
1 files changed, 129 insertions, 0 deletions
diff --git a/docs/plans/2026-04-10-olivetti-org-implementation.md b/docs/plans/2026-04-10-olivetti-org-implementation.md
new file mode 100644
index 0000000..7853be3
--- /dev/null
+++ b/docs/plans/2026-04-10-olivetti-org-implementation.md
@@ -0,0 +1,129 @@
+# 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.