From e171f49287b984c83b6a49ce2703f15286c681a2 Mon Sep 17 00:00:00 2001 From: Joe Julian Date: Tue, 28 Apr 2026 21:10:44 -0700 Subject: [PATCH] Document simplifying refactor preference --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index b064fbf..def94a4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -116,6 +116,10 @@ These features are product requirements, not “nice to have” ideas. - UI state should not be the source of truth for vault structure or search behavior. - Domain packages must be test-driven where practical. - Prefer behavior-oriented tests that describe expected product behavior rather than implementation details. +- Prefer simplifying refactors that extract shared behavior into smaller named + functions. When a new path needs most of an existing function, factor the + common behavior out and let the specific functions call it instead of adding + flags or branches that make the original function larger. - Provide a secure gRPC API as a first-class programmatic surface, not as a thin wrapper around UI state. - Design browser-extension and automation integrations against the gRPC API, not against ad hoc local protocols. - Treat the vault model as local-first across all platforms: