Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ update the baseline — do not silence the rule.
| `http.NewRequest` / `http.DefaultClient` only in `internal/httputil` | `internal/archtest/http_test.go` |
| Use `os.UserHomeDir()` — never `os.Getenv("HOME")` | `internal/archtest/envhome_test.go` |
| Error wrapping with `%w`, no bare returns | reviewer + `errcheck` (golangci-lint) |
| UI output via `ui.*` helpers — never raw `fmt.Println` in user-facing paths | reviewer (planned: archtest rule) |
| UI output via `ui.*` helpers — never raw `fmt.Println` in user-facing paths | `internal/archtest/fmtprint_test.go` |
| Destructive ops check `cfg.DryRun` before acting | `internal/archtest/dryrun_test.go` |

The full convention list lives in CLAUDE.md → "Project-specific conventions".
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ These cannot be inferred from code alone — everything else is enforced by `go
Bolded rules are enforced mechanically by `internal/archtest` (fitness functions in L1).

- **Error wrapping**: `fmt.Errorf("context: %w", err)` — never bare returns.
- **UI output**: always through `ui.*` helpers; raw `fmt.Println` is a bug in user-facing paths.
- **UI output** *(archtest: `fmtprint`)*: always through `ui.*` helpers; raw `fmt.Println` is a bug in user-facing paths.
- **Subprocess** *(archtest: `no-direct-exec`)*: `system.RunCommand` (interactive) / `system.RunCommandSilent` (captured). Do not call `exec.Command` directly from feature code — add to `system/` if a wrapper is missing.
- **Destructive ops** *(archtest: `dryrun`)*: check `cfg.DryRun` first. Always.
- **Paths** *(archtest: `no-os-getenv-home`)*: `os.UserHomeDir()` — never hardcode `~` or `/Users/...`, never `os.Getenv("HOME")`.
Expand Down
Loading