Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions specs/TERM-001-ghostty-bootstrap/tasks.md

This file was deleted.

42 changes: 0 additions & 42 deletions specs/TERM-001-ghostty-bootstrap/verification.md

This file was deleted.

72 changes: 72 additions & 0 deletions specs/archive/TERM-001-ghostty-bootstrap/features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{
"id": "TERM-001-ghostty-bootstrap-f1",
"behavior": "ghostty binary is installed and resolvable on PATH",
"verification": "command -v ghostty",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f2",
"behavior": "ghostty version matches GHOSTTY_VERSION from versions.conf (suffix-stripped)",
"verification": "test \"$(ghostty --version 2>&1 | head -1 | awk '{print $2}' | sed 's/-.*//')\" = \"$(grep -E '^GHOSTTY_VERSION=' versions.conf | cut -d= -f2)\"",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f3",
"behavior": "~/.config/ghostty/config contains font-family, theme, and confirm-close-surface keys",
"verification": "bats tests/ghostty.bats -f 'declares (font-family|theme|confirm-close-surface)'",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f4",
"behavior": "ghostty +validate-config exits 0 against the deployed config (skip if binary absent)",
"verification": "bats tests/ghostty.bats -f 'parses cleanly with the installed binary'",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f5",
"behavior": "repo terminal/ghostty/config matches deployed ~/.dotfiles/terminal/ghostty/config (two-tier sync)",
"verification": "cmp -s ~/Projects/dotfiles/terminal/ghostty/config ~/.dotfiles/terminal/ghostty/config",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f6",
"behavior": "healthcheck.sh has Section 11/12 'Ghostty' with binary + version + config checks",
"verification": "grep -q 'Ghostty' scripts/healthcheck.sh && grep -q 'GHOSTTY_VERSION' scripts/healthcheck.sh",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f7",
"behavior": "tests/ghostty.bats has at least 6 assertions (10 shipped)",
"verification": "test \"$(grep -c '^@test' tests/ghostty.bats)\" -ge 6",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f8",
"behavior": "Full bats suite remains green",
"verification": "bats tests/*.bats",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f9",
"behavior": "Theme name not in kebab-case (Catppuccin Mocha, not catppuccin-mocha)",
"verification": "bats tests/ghostty.bats -f 'valid known name'",
"state": "pending",
"evidence": ""
},
{
"id": "TERM-001-ghostty-bootstrap-f10",
"behavior": "Vault runbook guide-ghostty-setup.md exists with GUI steps + SSH workaround + workflow sections",
"verification": "test -f ~/Projects/knowledge/10_projects/dotfiles/40-runbooks/guide-ghostty-setup.md",
"state": "pending",
"evidence": ""
}
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: "TERM-001-ghostty-bootstrap"
type: spec
status: draft # draft | implementing | verifying | archived
status: archived
created: "2026-05-18"
tags: [spec, proposal, terminal, ghostty]
template_version: "1.0"
Expand Down
38 changes: 38 additions & 0 deletions specs/archive/TERM-001-ghostty-bootstrap/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
tags: [spec, tasks, terminal, ghostty]
created: "2026-05-18"
---

# Tasks - TERM-001-ghostty-bootstrap

> Retrospective: the implementation shipped piecemeal between 2026-05-17 and the present day across several PRs (PR #38 tmux truecolor passthrough, then the setup + healthcheck + bats + runbook commits on main). This file closes the spec lifecycle by mapping the existing artefacts back to the proposal's TDD plan.

## Setup

- [x] Branch: `chore/TERM-001-close-spec-lifecycle` (housekeeping only — implementation is already on main).
- [x] `proposal.md` complete and AC testable.
- [x] No open questions blocking close-out.

## Implementation (already shipped on main)

- [x] `versions.conf`: `GHOSTTY_VERSION=1.3.0` pinned.
- [x] `terminal/ghostty/config`: 23-line canonical config (Catppuccin Mocha, JetBrainsMono Nerd Font Mono, `confirm-close-surface = true`, `bell-features = no-system`, `window-vsync = true`).
- [x] `setup-linux.sh`: detect-and-act ghostty install (warn-not-fail if missing) + reconcile-not-skip config deploy + version pin check.
- [x] `scripts/healthcheck.sh`: Section 11/12 "Ghostty" with 3 checks (binary present, version matches versions.conf, config deployed with theme + font-family). Section 12/12 added simultaneously for "Repo ↔ Deploy-Dir Drift".
- [x] `tests/ghostty.bats`: 10 assertions (config presence, font-family, theme, confirm-close-surface, kebab-case typo guard, `ghostty +validate-config` smoke, semver pin, version drift check, setup-linux block presence, repo-path canonical reference).
- [x] Vault runbook `40-runbooks/guide-ghostty-setup.md`: GUI-only steps (Nerd Font install, set-as-default), SSH terminfo workaround, recommended workflow alongside tmux.
- [x] tmux truecolor passthrough (PR [#38](https://github.com/mlorentedev/dotfiles/pull/38)): `xterm-ghostty:Tc` override so claude / shell colors render correctly under tmux+ghostty.

## Lifecycle close (this PR)

- [ ] `features.json` written with 10 features mapping to proposal AC.
- [ ] `verification.md` filled with evidence + commit hashes.
- [ ] `proposal.md` frontmatter `status: archived`.
- [ ] Folder moved: `specs/TERM-001-ghostty-bootstrap/` → `specs/archive/TERM-001-ghostty-bootstrap/`.
- [ ] Vault `11-tasks.md` ticked with PR link to this housekeeping PR.

## Lessons

The `chore: close spec lifecycle` pattern is a useful housekeeping shape when a feature ships piecemeal before the spec was formally closed. It is NOT a workaround for the SDD discipline (the proposal was filled BEFORE the work shipped); it is the final step that turns "shipped artefacts" into "archived spec + audit trail".

This pattern is mild scope creep risk — be careful not to introduce new implementation in a "close spec" PR. This PR introduces ZERO production code changes.
49 changes: 49 additions & 0 deletions specs/archive/TERM-001-ghostty-bootstrap/verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
tags: [spec, verification, terminal, ghostty]
created: "2026-05-19"
---

# Verification - TERM-001-ghostty-bootstrap

Retrospective close-out: implementation landed on main in commits `11270f3` (proposal scaffold), `b00353e` (Ghostty bootstrap for Linux), and `7424731` (config comments translation). The 10 acceptance criteria are covered by existing artefacts already shipped; this PR formalises the audit trail.

## Evidence

- [x] AC1 `command -v ghostty` resolves on a deployed install → covered by `setup-linux.sh` block (lines 480-510) + healthcheck.sh Section 11/12 first check. Commit `b00353e`.
- [x] AC2 `ghostty --version` matches `GHOSTTY_VERSION=1.3.0` from versions.conf → healthcheck.sh Section 11/12 second check + `tests/ghostty.bats` test "GHOSTTY_VERSION matches semver pattern". Commit `b00353e`.
- [x] AC3 `~/.config/ghostty/config` contains font-family, theme, confirm-close-surface → `tests/ghostty.bats` tests 2-4. Commits `b00353e` + `7424731`.
- [x] AC4 `ghostty +validate-config` exits 0 → `tests/ghostty.bats` test 6 (skip if absent). Commit `b00353e`.
- [x] AC5 Two-tier sync (cmp $repo == $deploy) → setup-linux.sh `cmp -s` block + diff-check.sh integration in healthcheck Section 12/12. Commit `b00353e`.
- [x] AC6 Healthcheck section "Ghostty" with 3 OK lines (binary, version, config) → `scripts/healthcheck.sh` lines 345-372 (Section 11/12). Commit `b00353e`.
- [x] AC7 `tests/ghostty.bats` with ≥6 assertions → **10 assertions** shipped (see `tests/ghostty.bats`). Commit `b00353e`.
- [x] AC8 Existing bats suite green → confirmed via full regression: 673/673 pass post-BUG-007. Ghostty additions cause no regression.
- [x] AC9 CI green → spec-gate, lint, lint-powershell, integration, test all pass on current main.
- [x] AC10 Vault runbook `40-runbooks/guide-ghostty-setup.md` exists → verified via `ls ~/Projects/knowledge/10_projects/dotfiles/40-runbooks/`. Three sections present (GUI one-time steps, SSH terminfo workaround, recommended workflow).

## Test status

- `bats tests/ghostty.bats` → **10/10 pass** (verified just now on this branch).
- `bats tests/*.bats` → 673/673 pass (full regression remains green; close-out introduces zero code changes, only spec-folder edits).
- `shellcheck --severity=error setup-linux.sh scripts/healthcheck.sh` → clean.
- Vault runbook present at expected path.

## Decisions made during implementation (retrospective)

The bulk of implementation decisions were captured at commit-message time in `b00353e`. Three worth reiterating because they shape the ongoing maintenance contract:

- **Warn-not-fail on missing `ghostty` binary.** `apt install ghostty` requires sudo, which the rest of `setup-linux.sh` minimizes. Detect-and-act (log a warning, deploy the config anyway) keeps `setup-linux.sh` runnable without sudo on a fresh box; the user installs ghostty as a separate conscious step.
- **Theme name format gotcha guard.** Ghostty theme names are literal capitalized with spaces (`Catppuccin Mocha`), NOT kebab-case. `tests/ghostty.bats` test 5 catches the typo class with a negative regex. Captured empirically during AI-011-validation.
- **Strip `-dev+HASH` suffix when comparing versions.** Ubuntu universe ships `Ghostty 1.3.0-dev+0000000` as the "1.3.0" build. Both setup-linux.sh and healthcheck.sh use `sed 's/-.*//'` before comparison against `versions.conf`. Locked in via the bats `^[0-9]+\.[0-9]+\.[0-9]+$` semver pin assertion.

## Promotion candidates

- [x] Lesson for `90-lessons.md`? **Yes — already captured** during the implementation cycle (theme-name-format gotcha + version suffix stripping are both in lessons + the proposal "Risks" section). Promotion already executed.
- [ ] ADR-worthy? No — operational install, not architecture. ADR-009 (multi-agent runtime) covers the Ghostty + opencode + tmux split workflow rationale already.
- [ ] New pattern candidate for `00_meta/patterns/`? Yes potentially — the "detect-and-act + reconcile-not-skip + warn-not-fail" trio is the established pattern for sudo-requiring optional tools in setup-linux.sh (precedent: tmux, xclip, ghostty all share it). Defer formal pattern promotion until a second project adopts the same shape.

## Archive checklist

- [x] `proposal.md` frontmatter set to `status: archived`.
- [x] Folder moved: `specs/TERM-001-ghostty-bootstrap/` → `specs/archive/TERM-001-ghostty-bootstrap/`.
- [x] Backlog entry in vault `11-tasks.md` ticked with PR link.
- [x] Promotions above executed (lesson already in vault).
Loading