|
1 | | -# Agent Guideline |
| 1 | +# Agent Guidelines |
2 | 2 |
|
3 | 3 | ## Repository Overview |
4 | 4 |
|
5 | | -This repository manages macOS dotfiles using chezmoi. Source files live under the `src/` directory (configured via `.chezmoiroot`), and chezmoi deploys them from `~/.local/share/chezmoi` to the appropriate locations in the home directory. |
| 5 | +This repository manages macOS dotfiles with chezmoi. `.chezmoiroot` sets `src/` as the chezmoi source directory, while repository-level files configure development tooling and CI. |
6 | 6 |
|
7 | | -## Development Commands |
| 7 | +Follow chezmoi's source-state conventions when changing files under `src/`. Use the existing nearby files as the guide for naming and organization. |
8 | 8 |
|
9 | | -### Running Tests |
| 9 | +## Sources of Truth |
10 | 10 |
|
11 | | -```sh |
12 | | -# Run all linters and format checks |
13 | | -hk check --all |
| 11 | +- `README.md`: setup instructions |
| 12 | +- `mise.toml`: tools, bootstrap configuration, and project tasks |
| 13 | +- `hk.pkl`: linting, formatting, and git hooks |
| 14 | +- `Brewfile`: Homebrew dependencies |
| 15 | +- `.github/`: CI workflows and automation |
| 16 | +- `goss.yaml` and `test/goss/`: applied-system validation |
| 17 | +- `src/.chezmoiscripts/`: scripts run by chezmoi |
| 18 | +- `src/.chezmoiexternal.toml.tmpl`: external files managed by chezmoi |
| 19 | +- `src/.chezmoiignore`: deployment exclusions |
14 | 20 |
|
15 | | -# Auto-fix formatting and lint issues |
16 | | -hk fix --all |
17 | | -``` |
| 21 | +Consult these files instead of copying version numbers, tool lists, or workflow details into documentation. |
18 | 22 |
|
19 | | -### Setup and Apply |
| 23 | +## Development Workflow |
20 | 24 |
|
21 | | -```sh |
22 | | -# Initial setup (installs Homebrew, chezmoi, and applies configuration) |
23 | | -./install.sh |
| 25 | +Use the commands defined by the current project configuration: |
24 | 26 |
|
25 | | -# Apply chezmoi changes in clean environment |
26 | | -mise run cz apply -v # or: ./bin/cz-clean-env apply -v |
| 27 | +- Use `mise` for tools, tasks, and bootstrap operations. |
| 28 | +- Use `hk` for repository checks and automatic fixes. |
| 29 | +- Use `chezmoi diff` to review deployment changes before applying them. |
27 | 30 |
|
28 | | -# Preview changes before applying |
29 | | -mise run cz diff |
30 | | - |
31 | | -# Note: CI tests run install.sh twice to verify idempotency |
32 | | -``` |
33 | | - |
34 | | -### Environment Tools |
35 | | - |
36 | | -- **Homebrew**: package management (defined in `Brewfile`) |
37 | | -- **hk**: lint/format runner with pre-commit hook (config in `hk.pkl`) |
38 | | -- **mise**: runtime/tool version management (config in `mise.toml`; manages dprint, hk, shellcheck, etc.) |
| 31 | +Run the checks configured in `hk.pkl` after making changes. When behavior changes, update the closest relevant validation alongside it. |
0 commit comments