ai-agent-rules 0.15.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. ai_agent_rules-0.15.2.dist-info/METADATA +451 -0
  2. ai_agent_rules-0.15.2.dist-info/RECORD +52 -0
  3. ai_agent_rules-0.15.2.dist-info/WHEEL +5 -0
  4. ai_agent_rules-0.15.2.dist-info/entry_points.txt +3 -0
  5. ai_agent_rules-0.15.2.dist-info/licenses/LICENSE +22 -0
  6. ai_agent_rules-0.15.2.dist-info/top_level.txt +1 -0
  7. ai_rules/__init__.py +8 -0
  8. ai_rules/agents/__init__.py +1 -0
  9. ai_rules/agents/base.py +68 -0
  10. ai_rules/agents/claude.py +123 -0
  11. ai_rules/agents/cursor.py +70 -0
  12. ai_rules/agents/goose.py +47 -0
  13. ai_rules/agents/shared.py +35 -0
  14. ai_rules/bootstrap/__init__.py +75 -0
  15. ai_rules/bootstrap/config.py +261 -0
  16. ai_rules/bootstrap/installer.py +279 -0
  17. ai_rules/bootstrap/updater.py +344 -0
  18. ai_rules/bootstrap/version.py +52 -0
  19. ai_rules/cli.py +2434 -0
  20. ai_rules/completions.py +194 -0
  21. ai_rules/config/AGENTS.md +249 -0
  22. ai_rules/config/chat_agent_hints.md +1 -0
  23. ai_rules/config/claude/CLAUDE.md +1 -0
  24. ai_rules/config/claude/agents/code-reviewer.md +121 -0
  25. ai_rules/config/claude/commands/agents-md.md +422 -0
  26. ai_rules/config/claude/commands/annotate-changelog.md +191 -0
  27. ai_rules/config/claude/commands/comment-cleanup.md +161 -0
  28. ai_rules/config/claude/commands/continue-crash.md +38 -0
  29. ai_rules/config/claude/commands/dev-docs.md +169 -0
  30. ai_rules/config/claude/commands/pr-creator.md +247 -0
  31. ai_rules/config/claude/commands/test-cleanup.md +244 -0
  32. ai_rules/config/claude/commands/update-docs.md +324 -0
  33. ai_rules/config/claude/hooks/subagentStop.py +92 -0
  34. ai_rules/config/claude/mcps.json +1 -0
  35. ai_rules/config/claude/settings.json +119 -0
  36. ai_rules/config/claude/skills/doc-writer/SKILL.md +293 -0
  37. ai_rules/config/claude/skills/doc-writer/resources/templates.md +495 -0
  38. ai_rules/config/claude/skills/prompt-engineer/SKILL.md +272 -0
  39. ai_rules/config/claude/skills/prompt-engineer/resources/prompt_engineering_guide_2025.md +855 -0
  40. ai_rules/config/claude/skills/prompt-engineer/resources/templates.md +232 -0
  41. ai_rules/config/cursor/keybindings.json +14 -0
  42. ai_rules/config/cursor/settings.json +81 -0
  43. ai_rules/config/goose/.goosehints +1 -0
  44. ai_rules/config/goose/config.yaml +55 -0
  45. ai_rules/config/profiles/default.yaml +6 -0
  46. ai_rules/config/profiles/work.yaml +11 -0
  47. ai_rules/config.py +644 -0
  48. ai_rules/display.py +40 -0
  49. ai_rules/mcp.py +369 -0
  50. ai_rules/profiles.py +187 -0
  51. ai_rules/symlinks.py +207 -0
  52. ai_rules/utils.py +35 -0
@@ -0,0 +1,451 @@
1
+ Metadata-Version: 2.4
2
+ Name: ai-agent-rules
3
+ Version: 0.15.2
4
+ Summary: Manage user-level AI agent configurations
5
+ Author-email: Will Pfleger <pfleger.will@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/willpfleger/ai-rules
8
+ Project-URL: Repository, https://github.com/willpfleger/ai-rules
9
+ Project-URL: Issues, https://github.com/willpfleger/ai-rules/issues
10
+ Keywords: ai,cli,configuration,claude,goose,llm,agent
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: click>=8.1
25
+ Requires-Dist: hatch>=1.15.1
26
+ Requires-Dist: packaging>=21.0
27
+ Requires-Dist: pytest>=8.4.2
28
+ Requires-Dist: pytest-cov>=7.0.0
29
+ Requires-Dist: pytest-xdist>=3.8.0
30
+ Requires-Dist: pyyaml>=6.0
31
+ Requires-Dist: rich>=13.0
32
+ Requires-Dist: ruff>=0.14.3
33
+ Requires-Dist: tomli>=2.0.0; python_version < "3.11"
34
+ Dynamic: license-file
35
+
36
+ # AI Rules
37
+
38
+ Manage AI agent configurations through symlinks. Keep all your configs in one git-tracked location.
39
+
40
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/ai-agent-rules.svg)](https://pypi.org/project/ai-agent-rules/)
41
+ [![PyPI version](https://img.shields.io/pypi/v/ai-agent-rules.svg)](https://pypi.org/project/ai-agent-rules/)
42
+ [![Python Versions](https://img.shields.io/pypi/pyversions/ai-agent-rules.svg)](https://pypi.org/project/ai-agent-rules/)
43
+ [![CI](https://github.com/wpfleger96/ai-rules/actions/workflows/ci.yml/badge.svg)](https://github.com/wpfleger96/ai-rules/actions/workflows/ci.yml)
44
+ [![GitHub Contributors](https://img.shields.io/github/contributors/wpfleger96/ai-rules.svg)](https://github.com/wpfleger96/ai-rules/graphs/contributors)
45
+ [![Lines of Code](https://aschey.tech/tokei/github/wpfleger96/ai-rules?category=code)](https://github.com/wpfleger96/ai-rules)
46
+ [![License](https://img.shields.io/github/license/wpfleger96/ai-rules.svg)](https://github.com/wpfleger96/ai-rules/blob/main/LICENSE)
47
+
48
+ ## Overview
49
+
50
+ Consolidates config files for AI coding agents (Claude Code, Cursor, Goose) into a single source of truth via symlinks:
51
+
52
+ - Git-tracked configs synced across machines
53
+ - Edit once, apply everywhere
54
+ - Exclude specific files (e.g., company-managed)
55
+ - Per-agent customizations
56
+
57
+ **Supported:** Claude Code (settings, agents, commands), Cursor (settings, keybindings), Goose (hints, config), Shared (AGENTS.md)
58
+
59
+ ## Installation
60
+
61
+ **Requirements:** Python 3.10+, [uv](https://github.com/astral-sh/uv)
62
+
63
+ ### From PyPI (Recommended)
64
+
65
+ One-command setup from PyPI:
66
+
67
+ ```bash
68
+ uvx --from ai-agent-rules ai-rules setup
69
+ ```
70
+
71
+ This will:
72
+ 1. Install AI agent configuration symlinks
73
+ 2. Make `ai-rules` available system-wide
74
+ 3. Auto-install optional tools (claude-code-statusline)
75
+
76
+ After setup, you can run `ai-rules` from any directory.
77
+
78
+ ### Local Development
79
+
80
+ For contributing or local development:
81
+
82
+ ```bash
83
+ git clone https://github.com/wpfleger96/ai-rules.git
84
+ cd ai-rules
85
+ uv tool install -e .
86
+ ai-rules install
87
+ ```
88
+
89
+ ### Updating
90
+
91
+ Check for and install updates:
92
+
93
+ ```bash
94
+ ai-rules upgrade # Check and install updates
95
+ ai-rules upgrade --check # Only check for updates
96
+ ```
97
+
98
+ Auto-update checks run weekly by default. Configure in `~/.ai-rules/update_config.yaml`:
99
+
100
+ ```yaml
101
+ enabled: true
102
+ frequency: weekly # daily, weekly, never
103
+ notify_only: false
104
+ ```
105
+
106
+ ## Usage
107
+
108
+ ### User-Level Configuration
109
+
110
+ ```bash
111
+ ai-rules setup # One-time setup: install symlinks + make available system-wide
112
+ ai-rules upgrade # Upgrade to latest version
113
+ ai-rules upgrade --check # Check for updates without installing
114
+
115
+ ai-rules install # Install all agent configs + optional tools
116
+ ai-rules install --agents claude # Install specific agents
117
+ ai-rules install --dry-run # Preview changes
118
+ ai-rules install --force # Skip confirmations
119
+ ai-rules install --rebuild-cache # Rebuild merged settings cache
120
+
121
+ ai-rules status # Check symlink status + optional tools (✓✗⚠○)
122
+ ai-rules diff # Show config differences
123
+ ai-rules validate # Verify source files exist
124
+ ai-rules update # Re-sync after adding files
125
+ ai-rules uninstall # Remove all symlinks
126
+ ai-rules list-agents # Show available agents
127
+ ```
128
+
129
+ ### Configuration Management
130
+
131
+ ```bash
132
+ # Interactive wizard for first-time setup
133
+ ai-rules config init # Start configuration wizard
134
+
135
+ # View configuration
136
+ ai-rules config show # Show raw config files
137
+ ai-rules config show --merged # Show merged settings with overrides
138
+ ai-rules config show --agent claude # Show config for specific agent
139
+ ai-rules config edit # Edit user config in $EDITOR
140
+
141
+ # Manage exclusions
142
+ ai-rules exclude add "~/.claude/*.json" # Add exclusion pattern (supports globs)
143
+ ai-rules exclude remove "~/.claude/*.json" # Remove exclusion pattern
144
+ ai-rules exclude list # List all exclusions
145
+
146
+ # Manage settings overrides (for machine-specific settings)
147
+ ai-rules override set claude.model "claude-sonnet-4-5-20250929" # Set simple override
148
+ ai-rules override set cursor.editor.fontSize 14 # Override Cursor font size
149
+ ai-rules override set claude.hooks.SubagentStop[0].hooks[0].command "script.py" # Array notation
150
+ ai-rules override unset claude.model # Remove override
151
+ ai-rules override list # List all overrides
152
+ ```
153
+
154
+ ## Configuration
155
+
156
+ ### Quick Start with Config Wizard
157
+
158
+ Run the interactive configuration wizard for guided setup:
159
+
160
+ ```bash
161
+ ai-rules config init
162
+ ```
163
+
164
+ This will walk you through:
165
+ 1. Selecting common exclusions
166
+ 2. Adding custom exclusion patterns (with glob support)
167
+ 3. Setting up machine-specific settings overrides
168
+
169
+ ### User-Level Config
170
+
171
+ Create `~/.ai-rules-config.yaml` for user-level settings:
172
+
173
+ ```yaml
174
+ version: 1
175
+
176
+ # Global exclusions (apply to all contexts)
177
+ # Supports glob patterns: *.json, **/*.yaml, etc.
178
+ exclude_symlinks:
179
+ - "~/.config/goose/config.yaml"
180
+ - "~/.claude/*.log" # Glob: exclude all log files
181
+ - "~/.claude/agents/debug-*.md" # Glob: exclude debug agents
182
+
183
+ # Machine-specific settings overrides
184
+ # Keeps repo settings.json synced via git, but allows local overrides
185
+ settings_overrides:
186
+ claude:
187
+ model: "claude-sonnet-4-5-20250929" # Override model on personal laptop
188
+ # Other settings inherited from base config/claude/settings.json
189
+ cursor:
190
+ editor.fontSize: 14 # Override font size on this machine
191
+ goose:
192
+ provider: "anthropic"
193
+ ```
194
+
195
+ **Config File Location:**
196
+ - `~/.ai-rules-config.yaml` - User-specific config (exclusions and overrides)
197
+
198
+ ### Settings Overrides - Syncing Configs Across Machines
199
+
200
+ **Problem:** You want to sync your `settings.json` via git, but need different settings on different machines (e.g., different model access on work vs personal laptop).
201
+
202
+ **Solution:** Use `settings_overrides` in your user config:
203
+
204
+ ```yaml
205
+ # ~/.ai-rules-config.yaml on personal laptop
206
+ settings_overrides:
207
+ claude:
208
+ model: "claude-sonnet-4-5-20250929" # No Opus access
209
+
210
+ # ~/.ai-rules-config.yaml on work laptop
211
+ settings_overrides:
212
+ claude:
213
+ model: "claude-opus-4-20250514" # Has Opus access
214
+ ```
215
+
216
+ Both machines sync the same `config/claude/settings.json` via git, but each has different local overrides. The system merges them at install time:
217
+
218
+ 1. **Base settings** from `config/claude/settings.json` (git-tracked)
219
+ 2. **Merged with** overrides from `~/.ai-rules-config.yaml` (local only)
220
+ 3. **Cached** in `~/.ai-rules/cache/claude/settings.json`
221
+ 4. **Symlinked** to `~/.claude/settings.json`
222
+
223
+ After changing overrides, run:
224
+ ```bash
225
+ ai-rules install --rebuild-cache
226
+ ```
227
+
228
+ #### Array Notation for Nested Settings
229
+
230
+ Override commands support array index notation for complex nested structures:
231
+
232
+ ```bash
233
+ # Override nested array elements (e.g., hooks)
234
+ ai-rules override set claude.hooks.SubagentStop[0].hooks[0].command "uv run ~/my-hook.py"
235
+
236
+ # Override environment variables
237
+ ai-rules override set claude.env.MY_VAR "value"
238
+
239
+ # The system validates paths and provides helpful suggestions
240
+ ai-rules override set claude.modle "sonnet"
241
+ # Error: Key 'modle' not found at 'modle'
242
+ # Available options: model, env, hooks, statusLine, ...
243
+ ```
244
+
245
+ Path validation ensures you only set valid overrides that exist in the base settings, preventing typos and configuration errors.
246
+
247
+ ### Cursor Settings
248
+
249
+ Cursor settings support the same override mechanism as other agents:
250
+
251
+ ```yaml
252
+ # ~/.ai-rules-config.yaml
253
+ settings_overrides:
254
+ cursor:
255
+ editor.fontSize: 14
256
+ terminal.integrated.defaultLocation: "editor"
257
+ ```
258
+
259
+ > **Note:** `keybindings.json` uses direct symlinks without override merging (array structure).
260
+
261
+ ### Profiles - Machine-Specific Configuration
262
+
263
+ Profiles let you group configuration overrides into named presets. Instead of manually maintaining different `~/.ai-rules-config.yaml` files across machines, define profiles once and select them at install time.
264
+
265
+ ```bash
266
+ # List available profiles
267
+ ai-rules profile list
268
+
269
+ # View profile details
270
+ ai-rules profile show work
271
+ ai-rules profile show work --resolved # Show with inheritance
272
+
273
+ # Install with a specific profile
274
+ ai-rules install --profile work
275
+ ```
276
+
277
+ Profiles are stored in `src/ai_rules/config/profiles/` and support inheritance:
278
+
279
+ ```yaml
280
+ # profiles/work.yaml
281
+ name: work
282
+ description: Work laptop with extended context model
283
+ extends: null
284
+ settings_overrides:
285
+ claude:
286
+ env:
287
+ ANTHROPIC_DEFAULT_SONNET_MODEL: "claude-sonnet-4-5-20250929[1m]"
288
+ model: opusplan
289
+ ```
290
+
291
+ Configuration layers (lowest to highest priority):
292
+ 1. Profile overrides
293
+ 2. Local `~/.ai-rules-config.yaml` overrides
294
+
295
+ Your local config always wins, so you can use a profile as a base and tweak specific settings per-machine. Profiles are git-tracked and can be shared across your team.
296
+
297
+ ## Structure
298
+
299
+ ```
300
+ config/
301
+ ├── AGENTS.md # User-level rules → ~/AGENTS.md, ~/.CLAUDE.md, ~/.config/goose/.goosehints
302
+ ├── claude/
303
+ │ ├── settings.json # → ~/.claude/settings.json
304
+ │ ├── agents/*.md # → ~/.claude/agents/*.md (dynamic)
305
+ │ └── commands/*.md # → ~/.claude/commands/*.md (dynamic)
306
+ ├── cursor/
307
+ │ ├── settings.json # → ~/Library/Application Support/Cursor/User/ (macOS)
308
+ │ │ # ~/AppData/Roaming/Cursor/User/ (Windows)
309
+ │ │ # ~/.config/Cursor/User/ (Linux)
310
+ │ └── keybindings.json # → (same paths as settings.json)
311
+ └── goose/
312
+ └── config.yaml # → ~/.config/goose/config.yaml
313
+ ```
314
+
315
+ > **Note:** The Cursor config files contain the maintainer's personal preferences
316
+ > (e.g., macOS-specific terminal settings). Customize for your environment.
317
+
318
+ ## Optional Tools
319
+
320
+ AI Rules automatically installs optional tools that enhance functionality:
321
+
322
+ - **claude-code-statusline** - Custom status line for Claude Code showing token usage, git info, time, and workspace details
323
+
324
+ These tools are installed automatically during `setup` and `install` commands. Check installation status:
325
+
326
+ ```bash
327
+ ai-rules status # Shows Optional Tools section
328
+ ```
329
+
330
+ If a tool fails to install, ai-rules continues normally (fail-open behavior).
331
+
332
+ ## Extending
333
+
334
+ **Add Claude agent/command:**
335
+ 1. Create `config/claude/agents/my-agent.md` or `config/claude/commands/my-cmd.md`
336
+ 2. Run `ai-rules update`
337
+
338
+ **Add new AI tool:**
339
+ 1. Add configs to `config/<tool>/`
340
+ 2. Implement `ai_rules/agents/<tool>.py`
341
+ 3. Register in `ai_rules/cli.py::get_agents()`
342
+
343
+ ## Safety
344
+
345
+ - First-run warnings
346
+ - Timestamped backups (`*.ai-rules-backup.YYYYMMDD-HHMMSS`)
347
+ - Interactive prompts and dry-run mode
348
+ - Only manages symlinks (never deletes real files)
349
+ - Contextual error messages with tips
350
+
351
+ ## Development
352
+
353
+ ### Quick Start with Just
354
+
355
+ This project uses [just](https://github.com/casey/just) for task automation.
356
+
357
+ **Install just**:
358
+ ```bash
359
+ # macOS
360
+ brew install just
361
+
362
+ # Linux
363
+ cargo install just
364
+ # or: sudo apt install just (Ubuntu 23.04+)
365
+
366
+ # Windows
367
+ choco install just
368
+ ```
369
+
370
+ **Common commands**:
371
+ ```bash
372
+ just # Run quick quality checks (sync, type-check, lint-check, format-check)
373
+ just --list # List all available recipes
374
+
375
+ # Setup
376
+ just setup # First-time setup: sync deps + install git hooks
377
+ just sync # Sync dependencies only
378
+
379
+ # Code Quality
380
+ just check # Quick quality checks (no tests)
381
+ just check-all # All checks including tests
382
+ just lint # Fix linting issues
383
+ just format # Auto-format code
384
+ just type-check # Run mypy type checking
385
+
386
+ # Testing
387
+ just test # Run all tests (default config)
388
+ just test-unit # Unit tests only
389
+ just test-integration # Integration tests only
390
+ just test-cov # Tests with coverage report
391
+
392
+ # Benchmarking
393
+ just benchmark-save # Run and save baseline
394
+ just benchmark-compare # Compare against baseline
395
+ just benchmark-record # Compare and save
396
+ just benchmark-list # List saved benchmarks
397
+ just benchmark-clean # Remove all benchmarks
398
+
399
+ # Build
400
+ just build # Build package
401
+ just rebuild # Clean and build
402
+ ```
403
+
404
+ ### Running Tests
405
+ The test suite includes both unit tests and integration tests.
406
+
407
+ Using just (recommended):
408
+ ```bash
409
+ just test # Run all tests with default config
410
+ just test-unit # Only unit tests
411
+ just test-integration # Only integration tests
412
+ just test-cov # Tests with coverage report
413
+ ```
414
+
415
+ Using uv directly:
416
+ ```bash
417
+ uv run pytest [--cov=src --cov-report=term-missing] # All tests
418
+ uv run pytest -m unit # Unit tests only
419
+ uv run pytest -m integration # Integration tests only
420
+ ```
421
+
422
+ ## Troubleshooting
423
+
424
+ **Wrong target:** `ai-rules status` then `ai-rules install --force`
425
+
426
+ **Restore backup:**
427
+ ```bash
428
+ ls -la ~/.CLAUDE.md.ai-rules-backup.*
429
+ mv ~/.CLAUDE.md.ai-rules-backup.20250104-143022 ~/.CLAUDE.md
430
+ ```
431
+
432
+ **Disable symlink:** Use the exclude command or add to config manually:
433
+ ```bash
434
+ ai-rules exclude add "~/.claude/settings.json"
435
+ # Or edit manually: ai-rules config edit
436
+ ```
437
+
438
+ **Override not applying:** Rebuild the merged settings cache:
439
+ ```bash
440
+ ai-rules install --rebuild-cache
441
+ ```
442
+
443
+ **View merged settings:** Check what's actually being applied:
444
+ ```bash
445
+ ai-rules config show --merged
446
+ ai-rules config show --merged --agent claude
447
+ ```
448
+
449
+ ## License
450
+
451
+ MIT
@@ -0,0 +1,52 @@
1
+ ai_agent_rules-0.15.2.dist-info/licenses/LICENSE,sha256=eRdOpQ8Kaod-FPwMA-sD9U2817DCp0QNub7f_UpqMe0,1070
2
+ ai_rules/__init__.py,sha256=h0sNb8H1ED7Dy0IXON1Ww3O8cls08Sr_g1osdcQ-4i0,231
3
+ ai_rules/cli.py,sha256=hLVnIXjTS695njtsd-0UWOTAms79mgnqOB_aB0aqLjg,82846
4
+ ai_rules/completions.py,sha256=7Ymgfzd93Owlscfn6sWkopbbAfT_J5PXnY5vl3CN_Xs,5736
5
+ ai_rules/config.py,sha256=-AbRaAI6LsGjqOHaoHYUIN_KxkfLAtnmH-5ChEQXI4E,21041
6
+ ai_rules/display.py,sha256=dltgyoJZSseP1xrj-YBvj8_TOBSTouoiQMjwdC5d2MI,1225
7
+ ai_rules/mcp.py,sha256=BFBD0MWEjbbGOjZmmLwE8atK0KN-ExylA7VeDAZnv-M,11942
8
+ ai_rules/profiles.py,sha256=YI_p39bvwhtUAcgt6vv27ZymWUBSsRNIY4LjDyFOomg,6223
9
+ ai_rules/symlinks.py,sha256=gXBVMcDU96pMHXR675ePZSnXKY9d0kEEwXnUazd0xhw,6674
10
+ ai_rules/utils.py,sha256=_mjJzcNbi3-zwQLGVdgqeVUv9eVj0SYI0xebZh3262E,1324
11
+ ai_rules/agents/__init__.py,sha256=VG6BFISMVTETyfs7aAXTa_co6NH_dmvp_5aw09HI35w,32
12
+ ai_rules/agents/base.py,sha256=vVPEkdczTz8oLUS5XdjHrJbARL2kDfaKDwQOVBX6bYI,1981
13
+ ai_rules/agents/claude.py,sha256=XzlkW-E-4oZIWCZTvUihpzptPTiAKH23ADXlczdKHDM,3789
14
+ ai_rules/agents/cursor.py,sha256=PK7sl64UBVJBySRffAsdvo7Azj7lCEE9G-4NeuSNdKk,2105
15
+ ai_rules/agents/goose.py,sha256=omBEPTc0N8A0KenmDCNIkV5oqJsgeCEespJZVJakigw,1136
16
+ ai_rules/agents/shared.py,sha256=Tj9ll1Z_wZzwM19368r2ku_6aTQYyNCwxzOc_4lXqqg,839
17
+ ai_rules/bootstrap/__init__.py,sha256=nfAsEA8KjfvbY4rRxllo-FzF-RnLjt9fNb7z_PY9xzo,1842
18
+ ai_rules/bootstrap/config.py,sha256=Cp133LLC2xnyM-RRtmKsZ73cSMdm8GVzCmwHjFrcK1I,6970
19
+ ai_rules/bootstrap/installer.py,sha256=KGMcaxMSJ7saaNo1SQdbwpfZ5CQI2-QD4eUaIJ01q4Y,7926
20
+ ai_rules/bootstrap/updater.py,sha256=78YeH6yQ9Ml_rNll-R0kESTyVbq0SPaWy66BifUwyJY,10118
21
+ ai_rules/bootstrap/version.py,sha256=WCj4LwzZk-M62ViOf6qg7mQPk-AlGswwHsJWfv9bEko,1236
22
+ ai_rules/config/AGENTS.md,sha256=BKch0ZjjTZfzBRJ6n_UWrLfrWKu3WtNh7DR-4mRY2-w,11298
23
+ ai_rules/config/chat_agent_hints.md,sha256=lW3nCigFn4iuZ6vsCjntwd-Po7MVGFZynjR9X5__vY0,491
24
+ ai_rules/config/claude/CLAUDE.md,sha256=2BtrA5bS05_z_SQYFreWFVUJ-C9ryln1axNLOS44PD4,13
25
+ ai_rules/config/claude/mcps.json,sha256=yj0WO6sFU4GCciYUBWjzvvfqrBh869doeOC2Pp5EI1Y,3
26
+ ai_rules/config/claude/settings.json,sha256=xLN5Cxn6Zagct8GlXT38xJIwge327Ls2JuMtT6W1kPo,3007
27
+ ai_rules/config/claude/agents/code-reviewer.md,sha256=hFyRbuAzliQOmRVTTNAy1unV4Xx5kFb9JlWEwULL7nY,4417
28
+ ai_rules/config/claude/commands/agents-md.md,sha256=9ohpiGf0kC2KkqmkJmx-ZxwrLZwBQYeTZWP3bXily7c,13420
29
+ ai_rules/config/claude/commands/annotate-changelog.md,sha256=a9AL9Os8VLScL0hryHmesrMdusG2z0TTxH6myeu4aVU,5573
30
+ ai_rules/config/claude/commands/comment-cleanup.md,sha256=gNLc36PlplP08By-QK4n44gefgPusSQa0lnLQDGujBA,5296
31
+ ai_rules/config/claude/commands/continue-crash.md,sha256=rRi16p7PyS9IYuanuTUCh6fMmXleSoqbNqZFWzoJR0s,1378
32
+ ai_rules/config/claude/commands/dev-docs.md,sha256=ZGHrrsbVwcMkgSGy0cQV-CTRUngHOxuCUiz7BUR3fkY,7258
33
+ ai_rules/config/claude/commands/pr-creator.md,sha256=UnzDyxDdM9x0nLgOKag6lsfMrJ3FPDar01gIcQ5qVOo,8133
34
+ ai_rules/config/claude/commands/test-cleanup.md,sha256=R1SeZ-vTxllh33ee-EI65IMnxKpQxJi70VhDvepc_xk,8109
35
+ ai_rules/config/claude/commands/update-docs.md,sha256=R34D6QaLikZrXJD8iJn0RZ4DkhSqmsQASjZupBlFcxw,12289
36
+ ai_rules/config/claude/hooks/subagentStop.py,sha256=woddjbsQSsukVfWaUMsb0D5vyqir75aMZ5a5KnD8HEI,2981
37
+ ai_rules/config/claude/skills/doc-writer/SKILL.md,sha256=22SvAYgdGwKq5quUSgUsu9nGiDJh_6GEFnvlxa4oEuo,10550
38
+ ai_rules/config/claude/skills/doc-writer/resources/templates.md,sha256=qGkqvY78N8DTox06nQWbGlCF62ckpiNHBiEd9l3blTY,11636
39
+ ai_rules/config/claude/skills/prompt-engineer/SKILL.md,sha256=TA6c1SUvJKy0pQnTwGGj_IbQEXqe4wUrFZJuaBVpNJ4,9664
40
+ ai_rules/config/claude/skills/prompt-engineer/resources/prompt_engineering_guide_2025.md,sha256=h3WlOQTYn1zGymJGSoD6dHCZsOTCe9Tne9a3tuRJFFQ,29592
41
+ ai_rules/config/claude/skills/prompt-engineer/resources/templates.md,sha256=4gIR1i5k-_GxWrZXStFyYAEfqZJvzh1KngZfq1T2pLY,6856
42
+ ai_rules/config/cursor/keybindings.json,sha256=nfCqj_G_WUjUNj6f3hkchMH6M-SHADhh9-GNS95ypEk,291
43
+ ai_rules/config/cursor/settings.json,sha256=uzPbbyVBXJlNl0EKupT-ACDyoMT3-KNhEKKrXtgLIfk,2488
44
+ ai_rules/config/goose/.goosehints,sha256=2BtrA5bS05_z_SQYFreWFVUJ-C9ryln1axNLOS44PD4,13
45
+ ai_rules/config/goose/config.yaml,sha256=N_QzIANL_7WnX5xSrMZN_t94wbrGXXHMleQ6gzzIaC8,1396
46
+ ai_rules/config/profiles/default.yaml,sha256=B1sjVz0V11gE1t3_XYXD5HpiaOWPPXEdzzotwVH8UmI,140
47
+ ai_rules/config/profiles/work.yaml,sha256=e982yg7kY6Mp0h6wE94m48s-mK_kpm7zAQ5OYyBIpBo,314
48
+ ai_agent_rules-0.15.2.dist-info/METADATA,sha256=zI94Tl21rLFn3D-Wjpc9XkZXIMXogYfzP0gSz7LPhXY,14662
49
+ ai_agent_rules-0.15.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
50
+ ai_agent_rules-0.15.2.dist-info/entry_points.txt,sha256=Dnt2pQp6vSWz374RsUNZ5Zh5qmuTy45xR02r5fH_p_E,82
51
+ ai_agent_rules-0.15.2.dist-info/top_level.txt,sha256=1jJObrxql_i5okMXb4dxsiQa_cpjtzwwskVvwedEHow,9
52
+ ai_agent_rules-0.15.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ ai-agent-rules = ai_rules.cli:main
3
+ ai-rules = ai_rules.cli:main
@@ -0,0 +1,22 @@
1
+
2
+ MIT License
3
+
4
+ Copyright (c) 2025 Will Pfleger
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ ai_rules
ai_rules/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ """AI Rules - Manage AI agent configurations through symlinks."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("ai-agent-rules")
7
+ except PackageNotFoundError:
8
+ __version__ = "dev"
@@ -0,0 +1 @@
1
+ """AI agent implementations."""
@@ -0,0 +1,68 @@
1
+ """Base agent class."""
2
+
3
+ from abc import ABC, abstractmethod
4
+ from functools import cached_property
5
+ from pathlib import Path
6
+
7
+ from ai_rules.config import Config
8
+
9
+
10
+ class Agent(ABC):
11
+ """Base class for AI agent configuration managers."""
12
+
13
+ def __init__(self, config_dir: Path, config: Config):
14
+ self.config_dir = config_dir
15
+ self.config = config
16
+
17
+ @property
18
+ @abstractmethod
19
+ def name(self) -> str:
20
+ """Human-readable name of the agent."""
21
+ pass
22
+
23
+ @property
24
+ @abstractmethod
25
+ def agent_id(self) -> str:
26
+ """Short identifier for the agent (e.g., 'claude', 'goose')."""
27
+ pass
28
+
29
+ @property
30
+ @abstractmethod
31
+ def config_file_name(self) -> str:
32
+ """Config file name for the agent (e.g., 'settings.json', 'config.yaml')."""
33
+ pass
34
+
35
+ @property
36
+ @abstractmethod
37
+ def config_file_format(self) -> str:
38
+ """Config file format ('json' or 'yaml')."""
39
+ pass
40
+
41
+ @cached_property
42
+ @abstractmethod
43
+ def symlinks(self) -> list[tuple[Path, Path]]:
44
+ """Cached list of (target_path, source_path) tuples for symlinks.
45
+
46
+ Returns:
47
+ List of tuples where:
48
+ - target_path: Where symlink should be created (e.g., ~/.CLAUDE.md)
49
+ - source_path: What symlink should point to (e.g., repo/config/AGENTS.md)
50
+ """
51
+ pass
52
+
53
+ def get_filtered_symlinks(self) -> list[tuple[Path, Path]]:
54
+ """Get symlinks filtered by config exclusions."""
55
+ return [
56
+ (target, source)
57
+ for target, source in self.symlinks
58
+ if not self.config.is_excluded(str(target))
59
+ ]
60
+
61
+ def get_deprecated_symlinks(self) -> list[Path]:
62
+ """Get list of deprecated symlink paths that should be cleaned up.
63
+
64
+ Returns:
65
+ List of paths that were previously used but are now deprecated.
66
+ These will be removed during install if they point to our config files.
67
+ """
68
+ return []