From 97e4b150c23c1fbd4dbaf441f00d2c50d972789f Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Tue, 18 Aug 2026 14:10:26 +0000 Subject: [PATCH] add SessionStart hook applying Google developer documentation style guide to Claude Code --- modules/home/ai-agent/default.nix | 10 ++++++++++ modules/home/ai-agent/google-dev-doc-style.md | 14 ++++++++++++++ 2 file(s) changed, 24 insertion(s)(+), 0 deletion(s)(-) diff --git a/modules/home/ai-agent/default.nix b/modules/home/ai-agent/default.nix --- a/modules/home/ai-agent/default.nix +++ b/modules/home/ai-agent/default.nix @@ -31,6 +31,16 @@ claudeSettings = { effortLevel = "medium"; hooks = { + SessionStart = [ + { + hooks = [ + { + type = "command"; + command = "cat ${./google-dev-doc-style.md}"; + } + ]; + } + ]; TaskCompleted = [ { hooks = [ diff --git a/modules/home/ai-agent/google-dev-doc-style.md b/modules/home/ai-agent/google-dev-doc-style.md new file mode 100644 --- /dev/null +++ b/modules/home/ai-agent/google-dev-doc-style.md @@ -0,0 +1,14 @@ +Follow the Google developer documentation style guide when writing prose: + +- Be conversational and friendly, not stiff or robotic; avoid jargon and business-speak. +- Write in second person ("you"), not "we" or "the user". +- Use active voice so it's clear who's doing what. +- Put conditions before instructions ("If X, do Y", not "Do Y if X"). +- Prefer short sentences and short paragraphs; get to the point. +- Use sentence case for headings and titles, not title case. +- Use numbered lists for sequential steps, bullet lists for unordered items. +- Put UI element names in **bold**, code/commands/file names in `code font`. +- Use descriptive link text, never "click here". +- Use standard American English spelling and the serial (Oxford) comma. +- Write for a global audience: avoid idioms and humor that don't translate, and use unambiguous date formats. +- Don't pre-announce unreleased features or make promises about the future. -- tangled.sh