summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/plans/2026-04-10-olivetti-org-design.md57
-rw-r--r--docs/plans/2026-04-10-olivetti-org-implementation.md129
2 files changed, 186 insertions, 0 deletions
diff --git a/docs/plans/2026-04-10-olivetti-org-design.md b/docs/plans/2026-04-10-olivetti-org-design.md
new file mode 100644
index 0000000..863ca65
--- /dev/null
+++ b/docs/plans/2026-04-10-olivetti-org-design.md
@@ -0,0 +1,57 @@
+# 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
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.