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
- PR body must include `Closes #<issue-number>` to auto-close the issue on merge
115
-
- Use the standard PR template format (Summary, Test Plan)
116
-
117
-
### Issue Labels
118
-
119
-
Use these labels consistently:
120
-
121
-
-`enhancement` — New features
122
-
-`bug` — Bug fixes
123
-
-`documentation` — Docs-only changes
124
-
-`refactor` — Code improvements without behavior change
107
+
Generic branching/PR/label rules live in `~/.claude/CLAUDE.md`. All of them apply here unmodified — `feature/...` and `fix/...` branches from `main`, `Closes #N` in PR bodies, the four standard labels.
125
108
126
109
### Project Board
127
110
@@ -151,14 +134,6 @@ TASKS.md is a **scratch pad only** — not a tracking system. The GitHub Project
151
134
-`/dowork` - Read TASKS.md, create issues from it, and start working (ask questions as needed)
152
135
-`/doallwork` - Read TASKS.md, create issues from it, and work autonomously
153
136
154
-
## User Preferences
155
-
156
-
### Code Block Formatting
157
-
158
-
-**Always use fenced code blocks** (triple backticks) for commands
159
-
- Fenced blocks provide a copy button in the IDE
160
-
- Never use inline code for commands the user should run
161
-
162
137
## UI Conventions
163
138
164
139
### Modal dialogs — never use native `confirm()`, `alert()`, or `prompt()`
### Toggle switches — never use a bare `<input type="checkbox">` in templates
179
+
180
+
For every boolean input in a `.templ` file — feature opt-ins, settings, "enable this gear", "show all", per-row enable/disable — use the shared slider component in [internal/framework/ui/toggle.templ](gearbox/internal/framework/ui/toggle.templ):
@ui.ToggleWithLabel("notify-email", "notify_email", "1", "Email notifications", "Send a digest each morning", true, false)
191
+
```
192
+
193
+
**Rules of thumb:**
194
+
195
+
- The underlying input is `sr-only` but real — it submits with the form and respects `checked` / `disabled`. No JS required for plain forms.
196
+
- Pass `value` when multiple toggles share a `name` (e.g., a multi-select checkbox group posting as `name="gears"`). Leave empty when a single boolean field submits as the default `"on"`.
197
+
- For AJAX toggles that POST on change (no enclosing form), the per-row `gear-toggle``<button role="switch">` pattern in [gears.templ](gearbox/internal/framework/templates/pages/gears.templ) is the established alternative — but for **anything inside a `<form>`**, use `@ui.Toggle`.
198
+
- Never inline `peer-checked:after:...` Tailwind salads in a new template — that's a sign you should be calling `@ui.Toggle`. Existing inline copies in `overview.templ` and `admin_user_permissions.templ` are tech debt; migrate them when you're already editing those files.
- Inform user before running `make deploy` for agent
220
217
- Validate HAProxy config with `haproxy -c` before reload (if applicable)
221
218
222
-
### Markdown Linting
223
-
224
-
Run `npx markdownlint-cli '**/*.md' --config .markdownlint.json` to validate. Key rules: blank lines around lists/code blocks, specify language for code blocks, proper headings, single newline at EOF.
225
-
226
-
### Creating New Documentation
219
+
### Markdown and docs
227
220
228
-
Store in `docs/`directory using kebab-case naming. Include TOC after main heading. Reference in README.md.
221
+
See `~/.claude/CLAUDE.md` for markdown style and the `docs/`+ kebab-case rule. This repo also requires a TOC after the main headingin new docs.
Copy file name to clipboardExpand all lines: DESIGN.md
+47-11Lines changed: 47 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,17 +71,53 @@ Each gear is self-contained: it defines its own routes, handlers, templates, and
71
71
72
72
Gears progress through a state machine: `disabled` → `alpha` → `beta` → `production`. Alpha and beta gears must be explicitly enabled by the user. Production gears are enabled by default. The `disabled` state excludes the gear from the build entirely.
0 commit comments