Skip to content

Commit 51403a4

Browse files
nullvariantclaude
andauthored
docs: add Design Philosophy section with Karesansui Architecture (#98)
Add DESIGN_PHILOSOPHY.md documenting the extension's design principles using the Japanese dry garden metaphor (karesansui): - The Stone: Core functionality (profile CRUD, git config) - Sand Patterns: Quality aspects (90% coverage, logging, timeouts) - Accents: Differentiation (26 languages, icons, SSH/GPG) - Stones We Don't Place: Intentional constraints (no GitHub API) Also adds simplified Design Philosophy sections to EN/JA READMEs linking to the full document. 🖥️ IDE: [Cursor](https://cursor.sh) 🔌 Extension: [Claude Code](https://claude.ai/download) Model-Raw: claude-opus-4-5-20251101 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d4fd48f commit 51403a4

5 files changed

Lines changed: 162 additions & 0 deletions

File tree

extensions/git-id-switcher/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,18 @@ If you previously saved empty settings, they may have synced to the cloud and ar
538538

539539
---
540540

541+
## Design Philosophy
542+
543+
> "Who am I?" — That's the only question this extension answers.
544+
545+
Built on **Karesansui Architecture**: a simple core (100 lines),
546+
surrounded by deliberate quality (90% coverage, logging, timeouts)
547+
and intentional constraints (no GitHub API, no token management).
548+
549+
[Read the full philosophy](docs/DESIGN_PHILOSOPHY.md)
550+
551+
---
552+
541553
## Contributing
542554

543555
Contributions welcome! See [CONTRIBUTING.md](https://github.com/nullvariant/nullvariant-vscode-extensions/blob/main/CONTRIBUTING.md).
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Karesansui Architecture
2+
3+
*A design philosophy for Git ID Switcher*
4+
5+
---
6+
7+
## Placing Stones
8+
9+
The gardener asks:
10+
11+
"Why is this stone here?"
12+
13+
A stone that cannot answer should not be placed.
14+
15+
This garden called Git ID Switcher faces the same question.
16+
17+
---
18+
19+
## The Core
20+
21+
"Who am I?" — that's what we switch.
22+
23+
Nothing more.
24+
25+
```bash
26+
git config user.name
27+
git config user.email
28+
```
29+
30+
It could be written in 100 lines.
31+
32+
That's precisely why we can spend everything else on *how* to place it.
33+
34+
---
35+
36+
## The Stone
37+
38+
Immovable. The center of the garden.
39+
40+
Create a profile. Select it. Write to git config.
41+
42+
This is the stone. Everything else exists to make this stone shine.
43+
44+
---
45+
46+
## Sand Patterns
47+
48+
Ripples raked around the stone.
49+
50+
Not the stone itself, but what makes the stone a stone.
51+
52+
90% test coverage. Structured logging. Timeout handling. Input validation.
53+
54+
Sand patterns go unnoticed. But a garden without them is just barren land.
55+
56+
---
57+
58+
## Accents
59+
60+
Small presences that give the garden its story.
61+
62+
26 language support. Icons. SSH/GPG key association.
63+
64+
The garden could exist without them. But with accents, the garden becomes *someone's* garden.
65+
66+
---
67+
68+
## Stones We Don't Place
69+
70+
The most important decision is what *not* to place.
71+
72+
GitHub API integration. Token management. Authentication wizards.
73+
74+
They might be convenient. But the moment you place them, it becomes a different garden.
75+
76+
The essence of karesansui lies in *empty space*.
77+
78+
---
79+
80+
## On Over-Engineering
81+
82+
"That's excessive," they say.
83+
84+
They're right.
85+
86+
But no one questions ROI in a hobby garden.
87+
88+
Lining up coverage badges is like hanging a scroll. They're there because they're beautiful.
89+
90+
---
91+
92+
## Origin
93+
94+
2003\. CSS Zen Garden.
95+
96+
The same HTML held infinite styles.
97+
98+
Freedom exists within constraints.
99+
100+
What I learned in that garden became the seed of this one.
101+
102+
---
103+
104+
## Coda
105+
106+
Git ID Switcher is art wearing the mask of open source.
107+
108+
To users, it functions as a tool.
109+
To the maker, it exists as a garden.
110+
111+
Both are true. Both are real.
112+
113+
And so the gardener is satisfied.

extensions/git-id-switcher/docs/i18n/en/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,18 @@ If you previously saved empty settings, they may have synced to the cloud and ar
534534

535535
---
536536

537+
## Design Philosophy
538+
539+
> "Who am I?" — That's the only question this extension answers.
540+
541+
Built on **Karesansui Architecture**: a simple core (100 lines),
542+
surrounded by deliberate quality (90% coverage, logging, timeouts)
543+
and intentional constraints (no GitHub API, no token management).
544+
545+
[Read the full philosophy](../../DESIGN_PHILOSOPHY.md)
546+
547+
---
548+
537549
## Contributing
538550

539551
Contributions welcome! See [CONTRIBUTING.md](../../CONTRIBUTING.md).

extensions/git-id-switcher/docs/i18n/ja/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,18 @@ VS Codeなどのエディタは設定スキーマをメモリにキャッシュ
534534

535535
---
536536

537+
## 設計哲学
538+
539+
> **「私は誰」を切り替える** — この拡張機能が答える唯一の問い
540+
541+
**枯山水アーキテクチャ**で設計しています。コアは100行で書ける単純さ。
542+
だからこそ、残りを品質(テスト90%、ログ、タイムアウト)と
543+
意図的な制約(GitHub API連携なし、トークン管理なし)に費やせます。
544+
545+
[設計哲学の全文を読む](../../DESIGN_PHILOSOPHY.md)
546+
547+
---
548+
537549
## 貢献
538550

539551
貢献を歓迎します![CONTRIBUTING.md](../../CONTRIBUTING.md)をご覧ください。

extensions/git-id-switcher/scripts/generate-root-readme.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ function transformLicenseLink(content) {
7878
);
7979
}
8080

81+
/**
82+
* Transform DESIGN_PHILOSOPHY.md link to correct relative path
83+
* ../../DESIGN_PHILOSOPHY.md -> docs/DESIGN_PHILOSOPHY.md
84+
* (from root README perspective)
85+
*/
86+
function transformDesignPhilosophyLink(content) {
87+
return content.replace(
88+
/\(\.\.\/\.\.\/DESIGN_PHILOSOPHY\.md\)/g,
89+
`(docs/DESIGN_PHILOSOPHY.md)`
90+
);
91+
}
92+
8193
function main() {
8294
// Read source file
8395
if (!fs.existsSync(SOURCE_PATH)) {
@@ -93,6 +105,7 @@ function main() {
93105
content = removeEnSuffixFromImages(content);
94106
content = transformContributingLink(content);
95107
content = transformLicenseLink(content);
108+
content = transformDesignPhilosophyLink(content);
96109

97110
// Add auto-generated header
98111
content = AUTO_GENERATED_HEADER + content;

0 commit comments

Comments
 (0)