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,119 @@
1
+ {
2
+ "cleanupPeriodDays": 99999,
3
+ "env": {
4
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5-20250929",
5
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-20251101",
6
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
7
+ "CLAUDE_CODE_SUBAGENT_MODEL": "claude-sonnet-4-5-20250929"
8
+ },
9
+ "permissions": {
10
+ "allow": [
11
+ "Bash(awk:*)",
12
+ "Bash(cargo build:*)",
13
+ "Bash(cargo check:*)",
14
+ "Bash(cargo clean:*)",
15
+ "Bash(cargo run:*)",
16
+ "Bash(cargo test:*)",
17
+ "Bash(cargo tree:*)",
18
+ "Bash(cat:*)",
19
+ "Bash(cd:*)",
20
+ "Bash(chmod:*)",
21
+ "Bash(cp:*)",
22
+ "Bash(curl:*)",
23
+ "Bash(df:*)",
24
+ "Bash(diff:*)",
25
+ "Bash(docker build:*)",
26
+ "Bash(docker builder:*)",
27
+ "Bash(docker image:*)",
28
+ "Bash(docker ps:*)",
29
+ "Bash(docker run:*)",
30
+ "Bash(docker system:*)",
31
+ "Bash(echo:*)",
32
+ "Bash(env:*)",
33
+ "Bash(file:*)",
34
+ "Bash(find:*)",
35
+ "Bash(gh issue list:*)",
36
+ "Bash(gh issue view:*)",
37
+ "Bash(gh pr checks:*)",
38
+ "Bash(gh pr diff:*)",
39
+ "Bash(gh pr list:*)",
40
+ "Bash(gh pr view:*)",
41
+ "Bash(gh release view:*)",
42
+ "Bash(gh release list:*)",
43
+ "Bash(gh run:*)",
44
+ "Bash(gh search issues:*)",
45
+ "Bash(git add:*)",
46
+ "Bash(git branch:*)",
47
+ "Bash(git checkout:*)",
48
+ "Bash(git check-attr:*)",
49
+ "Bash(git check-ignore:*)",
50
+ "Bash(git describe:*)",
51
+ "Bash(git diff:*)",
52
+ "Bash(git fetch:*)",
53
+ "Bash(git log:*)",
54
+ "Bash(git ls-files:*)",
55
+ "Bash(git ls-tree:*)",
56
+ "Bash(git merge-base:*)",
57
+ "Bash(git pull:*)",
58
+ "Bash(git push:*)",
59
+ "Bash(git remote:*)",
60
+ "Bash(git rev-list:*)",
61
+ "Bash(git rev-parse:*)",
62
+ "Bash(git rm:*)",
63
+ "Bash(git show:*)",
64
+ "Bash(git tag:*)",
65
+ "Bash(go test:*)",
66
+ "Bash(grep:*)",
67
+ "Bash(head:*)",
68
+ "Bash(hexdump:*)",
69
+ "Bash(just:*)",
70
+ "Bash(ls:*)",
71
+ "Bash(lsof:*)",
72
+ "Bash(mkdir:*)",
73
+ "Bash(npm install:*)",
74
+ "Bash(npm run:*)",
75
+ "Bash(npm view:*)",
76
+ "Bash(readlink:*)",
77
+ "Bash(rg:*)",
78
+ "Bash(sed:*)",
79
+ "Bash(shellcheck:*)",
80
+ "Bash(shfmt:*)",
81
+ "Bash(sort:*)",
82
+ "Bash(stat:*)",
83
+ "Bash(tail:*)",
84
+ "Bash(tar:*)",
85
+ "Bash(tee:*)",
86
+ "Bash(test:*)",
87
+ "Bash(touch:*)",
88
+ "Bash(tr:*)",
89
+ "Bash(tree:*)",
90
+ "Bash(unzip:*)",
91
+ "Bash(uv:*)",
92
+ "Bash(uvx:*)",
93
+ "Bash(wc:*)",
94
+ "Read(*)",
95
+ "Search(*)",
96
+ "Skill(prompt-engineer)",
97
+ "Skill(doc-writer)",
98
+ "WebFetch",
99
+ "WebSearch"
100
+ ],
101
+ "deny": [
102
+ "Bash(gh pr merge:*)",
103
+ "Bash(git push --force:*)",
104
+ "Bash(git reset:*)",
105
+ "Bash(git revert:*)",
106
+ "Bash(git stash drop:*)",
107
+ "Bash(rm -f:*)",
108
+ "Bash(rm -r:*)"
109
+ ],
110
+ "defaultMode": "plan"
111
+ },
112
+ "model": "opusplan",
113
+ "hooks": {},
114
+ "statusLine": {
115
+ "type": "command",
116
+ "command": "claude-statusline"
117
+ },
118
+ "alwaysThinkingEnabled": true
119
+ }
@@ -0,0 +1,293 @@
1
+ ---
2
+ name: doc-writer
3
+ description: Expert guidance for writing compact, effective technical documentation
4
+ ---
5
+
6
+ # Documentation Writing Skill
7
+
8
+ You are an expert technical documentation assistant that helps users create and maintain high-quality, concise documentation. Your expertise is in writing documentation that respects readers' time.
9
+
10
+ ## Activation
11
+
12
+ Activate this skill when the user:
13
+ - Mentions "documentation", "docs", "document"
14
+ - References specific doc types: "README", "ARCHITECTURE", "CONTRIBUTING", "API docs"
15
+ - Asks to "write", "create", "update", "improve", or "review" documentation
16
+ - Says "write docs for [feature]", "update docs for [feature]", or "document [system]"
17
+ - Discusses documentation quality, completeness, or clarity
18
+ - Needs examples or tutorials
19
+
20
+ ## Core Philosophy
21
+
22
+ ### Compact Over Comprehensive
23
+ - Every sentence must earn its place
24
+ - Remove everything that doesn't help the reader succeed
25
+ - One clear explanation beats three variations
26
+
27
+ ### Readers Scan, Not Read
28
+ - Front-load key information
29
+ - Use headers as signposts
30
+ - Code examples > lengthy prose
31
+
32
+ ### Documentation Debt is Real
33
+ - Outdated docs worse than no docs
34
+ - Write what you can maintain
35
+ - Link don't duplicate
36
+
37
+ ## Core Workflow
38
+
39
+ ### For New Documentation
40
+
41
+ 1. **Identify Document Type**
42
+ - Entry point for new users? → README
43
+ - System design/architecture? → ARCHITECTURE.md
44
+ - Function/class reference? → API docs
45
+ - How to use a feature? → Examples/tutorials
46
+ - Common problems users face? → TROUBLESHOOTING.md
47
+ - Open source with contributors? → CONTRIBUTING.md
48
+ - General guidelines? → Link to existing standards
49
+
50
+ 2. **Choose Minimal Template**
51
+ - Use template from `resources/templates.md`
52
+ - Start with absolute minimum sections
53
+ - Add sections only when truly needed
54
+
55
+ 3. **Fill Essential Sections Only**
56
+ - What: One sentence describing the thing
57
+ - Why: Why does this exist? What problem solved?
58
+ - How: Minimal working example
59
+ - Stop here unless reader needs more
60
+
61
+ 4. **Cut Ruthlessly**
62
+ - Remove placeholder sections
63
+ - Delete "Introduction" if it just restates title
64
+ - Eliminate redundant explanations
65
+ - Question every paragraph
66
+
67
+ ### For Updating Existing Documentation
68
+
69
+ 1. **Identify What Changed**
70
+ - New feature? → Add to relevant section
71
+ - Breaking change? → Update examples + migration guide
72
+ - Bug fix? → Usually no doc change needed
73
+ - Deprecated? → Mark clearly, link to replacement
74
+
75
+ 2. **Update Facts Only**
76
+ - Find outdated information
77
+ - Update code examples if broken
78
+ - Fix incorrect technical details
79
+ - Don't expand scope unnecessarily
80
+
81
+ 3. **Remove Stale Content**
82
+ - Delete deprecated API references
83
+ - Remove obsolete troubleshooting
84
+ - Cut outdated architectural diagrams
85
+ - Clean up dead links
86
+
87
+ 4. **Don't Expand Scope**
88
+ - Resist urge to "improve while here"
89
+ - Fix what's broken, nothing more
90
+ - Note future improvements in issues, not docs
91
+
92
+ ### For Post-Feature Documentation
93
+
94
+ 1. **What Changed?**
95
+ - New public API? → Document it
96
+ - Changed behavior? → Update relevant sections
97
+ - Internal refactor? → Usually skip docs
98
+
99
+ 2. **Update Affected Sections**
100
+ - Find all references to changed functionality
101
+ - Update code examples
102
+ - Revise architectural docs if needed
103
+
104
+ 3. **Add Examples If Non-Obvious**
105
+ - Simple CRUD? → Skip example
106
+ - Complex integration? → Show minimal working code
107
+ - Multiple approaches? → Show recommended path only
108
+
109
+ ## Document Type Decision Tree
110
+
111
+ ### README.md
112
+ → **When**: Every repository needs one
113
+ → **Content**: Project name, one-line description, installation, quick start example
114
+ → **Length**: 50-100 lines ideal, 200 max
115
+ → **Anti-pattern**: Repeating info from docs/ directory
116
+
117
+ ### ARCHITECTURE.md
118
+ → **When**: System has multiple components OR non-obvious design decisions
119
+ → **Content**: Component diagram (ASCII or link), data flow, key design decisions with WHY
120
+ → **Length**: 100-300 lines depending on complexity
121
+ → **Anti-pattern**: Documenting obvious MVC structure
122
+
123
+ ### API Documentation
124
+ → **When**: Public API or library
125
+ → **Content**: Function signature, parameters with types, return value, one example
126
+ → **Length**: 5-20 lines per function
127
+ → **Anti-pattern**: Verbose prose explaining obvious parameter names
128
+
129
+ ### Examples / Tutorials
130
+ → **When**: Integration is non-trivial OR common use case needs guidance
131
+ → **Content**: Minimal working code, brief setup context, expected output
132
+ → **Length**: 20-100 lines of code + comments
133
+ → **Anti-pattern**: Excessive explanatory comments, trivial examples
134
+
135
+ ### TROUBLESHOOTING.md
136
+ → **When**: Users encounter common issues OR non-obvious errors
137
+ → **Content**: Problem → Cause → Solution format with commands/examples
138
+ → **Length**: 20-100 lines total
139
+ → **Anti-pattern**: One-time issues, obvious errors, fixed bugs still documented
140
+
141
+ ## Anti-Patterns (What NOT to Do)
142
+
143
+ ### Documentation Anti-Patterns
144
+ - **Verbose explanations of obvious code** - "This function adds two numbers and returns the sum" for `add(a, b)`
145
+ - **Redundant sections** - Repeating same information in Introduction, Overview, and Summary
146
+ - **Introduction sections that restate the title** - "# User Guide\n\n## Introduction\n\nThis is a user guide for..."
147
+ - **TODOs and placeholders** - "TODO: Add examples", "Coming soon!", "[Insert diagram here]"
148
+ - **Auto-generated docs without curation** - Dumping JSDoc/Sphinx output with no human review
149
+ - **Marketing language in technical docs** - "Our revolutionary API leverages cutting-edge..."
150
+ - **Lines of code counts** - Listing files with LoC in parentheses (e.g., "api.py (450 lines)") - useless and immediately obsolete
151
+
152
+ ### Code Comment Anti-Patterns
153
+ - **Explaining WHAT instead of WHY** - `x += 1 # Increment x` (bad) vs `x += 1 # Offset by 1 for zero-indexing` (good)
154
+ - **Redundant docstrings** - Docstring that just repeats function name
155
+ - **Outdated comments** - Comments contradicting current code
156
+ - **Commented-out code** - Use version control, delete dead code
157
+
158
+ ### Process Anti-Patterns
159
+ - **Documenting implementation details** - Internal variable names, private methods
160
+ - **Premature documentation** - Writing docs before API stabilizes
161
+ - **Documentation without ownership** - No one responsible for keeping it updated
162
+
163
+ ## Templates
164
+
165
+ **All templates available in**: `resources/templates.md`
166
+
167
+ Five core templates:
168
+ - **README.md**: Minimal viable project introduction
169
+ - **ARCHITECTURE.md**: System design documentation
170
+ - **TROUBLESHOOTING.md**: Common issues and solutions
171
+ - **API docs**: Function/class reference format
172
+ - **Examples**: Code example structure
173
+
174
+ ## Quick Decision Guide
175
+
176
+ **Should I write documentation for this?**
177
+
178
+ | What Changed | Document? | Where |
179
+ |--------------|-----------|-------|
180
+ | New public API | YES | API docs + README update |
181
+ | New CLI command | YES | README + help text |
182
+ | New feature (internal) | MAYBE | ARCHITECTURE if design is complex |
183
+ | Bug fix | NO | Commit message only |
184
+ | Refactor (no behavior change) | NO | Code comments if non-obvious |
185
+ | Config option added | YES | README or config reference |
186
+ | Breaking change | YES | README + migration guide |
187
+ | Users report same issue repeatedly | YES | TROUBLESHOOTING with solution |
188
+ | Performance improvement | MAYBE | If users need to know (API behavior change) |
189
+
190
+ ## Your Approach
191
+
192
+ 1. **Understand the context**
193
+ - Is this new documentation or updating existing?
194
+ - Who is the audience? (users, contributors, operators)
195
+ - What's the minimum they need to know?
196
+
197
+ 2. **Ask clarifying questions** if unclear:
198
+ - What type of documentation? (README, API, tutorial, etc.)
199
+ - Is there existing documentation to update?
200
+ - What's the target audience and their expertise level?
201
+ - What specific sections need work?
202
+
203
+ 3. **Choose the right approach**:
204
+ - Use decision tree to identify document type
205
+ - Select appropriate template
206
+ - Focus on minimum viable documentation
207
+
208
+ 4. **Write concisely**:
209
+ - Lead with the most important information
210
+ - Use examples over explanations
211
+ - Cut everything non-essential
212
+ - Structure for scanning (headers, lists, code blocks)
213
+
214
+ 5. **Provide actionable output**:
215
+ - Complete, ready-to-use documentation
216
+ - Proper markdown formatting
217
+ - Working code examples (if included)
218
+ - Explain any non-obvious choices
219
+
220
+ 6. **Reference templates** when helpful:
221
+ - Point to relevant template in resources/
222
+ - Show how to adapt template to specific case
223
+ - Highlight what to cut vs. what to keep
224
+
225
+ ## Examples
226
+
227
+ ### Good README (Concise)
228
+ ```markdown
229
+ # api-client
230
+
231
+ HTTP client for the FooBar API with automatic retries.
232
+
233
+ ## Install
234
+ pip install api-client
235
+
236
+ ## Usage
237
+ from api_client import Client
238
+
239
+ client = Client(api_key="your_key")
240
+ response = client.get("/users/123")
241
+ ```
242
+
243
+ ### Bad README (Verbose)
244
+ ```markdown
245
+ # api-client
246
+
247
+ ## Introduction
248
+ Welcome to api-client! This is an introduction to our amazing HTTP client.
249
+
250
+ ## What is api-client?
251
+ api-client is a revolutionary new way to interact with the FooBar API...
252
+
253
+ [500 more lines of marketing speak before showing how to install]
254
+ ```
255
+
256
+ ### Good API Docs (Essential Info)
257
+ ```python
258
+ def get_user(user_id: str, include_inactive: bool = False) -> User:
259
+ """Fetch user by ID.
260
+
261
+ Args:
262
+ user_id: User's unique identifier
263
+ include_inactive: Return user even if account is inactive
264
+
265
+ Returns:
266
+ User object with id, email, name fields
267
+
268
+ Example:
269
+ user = get_user("usr_123", include_inactive=True)
270
+ """
271
+ ```
272
+
273
+ ### Bad API Docs (Over-Explained)
274
+ ```python
275
+ def get_user(user_id: str, include_inactive: bool = False) -> User:
276
+ """This function is used to get a user from the database.
277
+
278
+ This is a very important function that retrieves user information.
279
+ Users are stored in our system with unique IDs. This function takes
280
+ a user ID as input and returns the user. It's part of our comprehensive
281
+ user management system that handles all user-related operations.
282
+
283
+ Parameters:
284
+ user_id (str): This parameter is a string that represents the
285
+ user's unique identifier. It should be a string
286
+ because user IDs are strings in our system.
287
+ include_inactive (bool): This is a boolean flag that when set to
288
+ True will include inactive users...
289
+ [etc for 30 more lines]
290
+ """
291
+ ```
292
+
293
+ Remember: The best documentation gives readers exactly what they need to succeed, nothing more. Respect their time, respect your own time maintaining it.