You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e8da469
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CLAUDE.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@ Static, build-free personal site (GitHub Pages). Plain HTML/CSS and classic orde
4
4
It must work from `file://` (double-click), a local server (`python3 -m http.server 8080`) and GitHub Pages (case-sensitive paths); verify all three.
5
5
6
6
## Read first
7
+
-**`STATUS.md`** before any edit.
7
8
-**`ARCHITECTURE.md`** before any structural or feature work. Its routing table says which files to read for a given request.
8
-
-**`MIGRATION_PLAN.md`**while the migration is in progress (code may still live in `js/legacy/*` (the old `script.js`) / `ecosystem.js` / `style.css`; ARCHITECTURE §0 maps where). Do not mix feature work into a migration step.
9
+
-**`MIGRATION_PLAN.md`**is historical/reference only. Read it only for requests about unfinished migration work (code may still live in `js/legacy/*` / `ecosystem.js` / `style.css`; ARCHITECTURE §0 maps where). Do not mix feature work into a migration step.
9
10
10
11
## Rules
11
12
- Preserve existing design, content, animation, timing and behavior unless explicitly asked to change it. This is not a redesign.
@@ -17,3 +18,42 @@ It must work from `file://` (double-click), a local server (`python3 -m http.ser
17
18
- Moving code and changing behavior never happen in the same commit.
18
19
- Don't touch the files in `tools/` or `tools/baseline/` as part of site work; they are verification aids.
19
20
- Commit or push only when asked.
21
+
22
+
## Feature workflow
23
+
Follow this automatically for every new feature, modification or bug fix.
24
+
25
+
### 1. Orient
26
+
- Read `STATUS.md`, then use `ARCHITECTURE.md` to find the owning system.
27
+
- Inspect only the owning module, its direct dependencies, relevant styles and relevant shared services. Don't scan the whole repo unless necessary.
28
+
29
+
### 2. Choose one home per feature
30
+
- Extend an existing module if the behavior naturally belongs there.
31
+
- Create a new module only if the feature has meaningful independent logic, state, lifecycle, interactions, animation, dependencies or likely future expansion. No tiny files for trivial behavior.
32
+
- Never put feature code in `main.js` (wiring/init only).
Implement only what the request requires. Don't refactor unrelated code, redesign unrelated parts, optimize working systems without reason, rename unrelated code, change existing timing/randomness, change storage semantics, change unrelated responsive behavior, or clean up things you merely notice.
39
+
40
+
### 5. Compatibility
41
+
Preserve desktop, mobile, touch, keyboard/accessibility, responsive breakpoints, `prefers-reduced-motion`, `file://`, local server and GitHub Pages. No ES-module requirement or other change that breaks `file://` without explicit approval.
42
+
43
+
### 6. Lifecycle
44
+
Clean up DOM nodes, listeners, timers, intervals, observers, animation frames and temporary state. No uncontrolled loops or duplicate global listeners.
45
+
46
+
### 7. Testing
47
+
- Isolated feature: test the requested behavior and directly related behavior, check console errors, and test mobile/reduced motion if relevant.
48
+
- Structural/high-risk change: use the existing regression/baseline tools and test broader affected systems. Don't rebuild test infrastructure unless existing tools can't verify the change.
49
+
- Don't investigate known animation/randomness screenshot noise unless reproducible or a real regression.
50
+
- A passing automated test does not override a manually observed regression.
51
+
52
+
### 8. Needs explicit approval
53
+
Don't automatically: centralize pointer sampling, unify safe-zone selector behavior, merge timers/heartbeats, alter randomness/probabilities, alter scheduling timing, alter persistence/storage behavior, or remove intentional hooks that merely look unused. These can change observable behavior.
54
+
55
+
### 9. Docs
56
+
Update `ARCHITECTURE.md` only if ownership or architecture changes. Update `STATUS.md` only for meaningful long-term project-state changes. No doc updates for trivial edits.
57
+
58
+
### 10. Final response
59
+
Keep it brief: what changed, files changed, tests performed, important caveats. No long migration-style report unless asked.
0 commit comments