agent-notes 2.0.4__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 (162) hide show
  1. agent_notes/VERSION +1 -0
  2. agent_notes/__init__.py +1 -0
  3. agent_notes/__main__.py +4 -0
  4. agent_notes/cli.py +348 -0
  5. agent_notes/commands/__init__.py +27 -0
  6. agent_notes/commands/_install_helpers.py +262 -0
  7. agent_notes/commands/build.py +170 -0
  8. agent_notes/commands/doctor.py +112 -0
  9. agent_notes/commands/info.py +95 -0
  10. agent_notes/commands/install.py +99 -0
  11. agent_notes/commands/list.py +169 -0
  12. agent_notes/commands/memory.py +430 -0
  13. agent_notes/commands/regenerate.py +152 -0
  14. agent_notes/commands/set_role.py +143 -0
  15. agent_notes/commands/uninstall.py +26 -0
  16. agent_notes/commands/update.py +169 -0
  17. agent_notes/commands/validate.py +199 -0
  18. agent_notes/commands/wizard.py +720 -0
  19. agent_notes/config.py +154 -0
  20. agent_notes/data/agents/agents.yaml +352 -0
  21. agent_notes/data/agents/analyst.md +45 -0
  22. agent_notes/data/agents/api-reviewer.md +47 -0
  23. agent_notes/data/agents/architect.md +46 -0
  24. agent_notes/data/agents/coder.md +28 -0
  25. agent_notes/data/agents/database-specialist.md +45 -0
  26. agent_notes/data/agents/debugger.md +47 -0
  27. agent_notes/data/agents/devil.md +47 -0
  28. agent_notes/data/agents/devops.md +38 -0
  29. agent_notes/data/agents/explorer.md +23 -0
  30. agent_notes/data/agents/integrations.md +44 -0
  31. agent_notes/data/agents/lead.md +216 -0
  32. agent_notes/data/agents/performance-profiler.md +44 -0
  33. agent_notes/data/agents/refactorer.md +48 -0
  34. agent_notes/data/agents/reviewer.md +44 -0
  35. agent_notes/data/agents/security-auditor.md +44 -0
  36. agent_notes/data/agents/system-auditor.md +38 -0
  37. agent_notes/data/agents/tech-writer.md +32 -0
  38. agent_notes/data/agents/test-runner.md +36 -0
  39. agent_notes/data/agents/test-writer.md +39 -0
  40. agent_notes/data/cli/claude.yaml +25 -0
  41. agent_notes/data/cli/copilot.yaml +18 -0
  42. agent_notes/data/cli/opencode.yaml +22 -0
  43. agent_notes/data/commands/brainstorm.md +8 -0
  44. agent_notes/data/commands/debug.md +9 -0
  45. agent_notes/data/commands/review.md +10 -0
  46. agent_notes/data/global-claude.md +290 -0
  47. agent_notes/data/global-copilot.md +27 -0
  48. agent_notes/data/global-opencode.md +40 -0
  49. agent_notes/data/hooks/session-context.md.tpl +19 -0
  50. agent_notes/data/models/claude-haiku-4-5.yaml +15 -0
  51. agent_notes/data/models/claude-opus-4-1.yaml +16 -0
  52. agent_notes/data/models/claude-opus-4-5.yaml +16 -0
  53. agent_notes/data/models/claude-opus-4-6.yaml +16 -0
  54. agent_notes/data/models/claude-opus-4-7.yaml +15 -0
  55. agent_notes/data/models/claude-sonnet-4-5.yaml +16 -0
  56. agent_notes/data/models/claude-sonnet-4-6.yaml +15 -0
  57. agent_notes/data/models/claude-sonnet-4.yaml +16 -0
  58. agent_notes/data/pricing.yaml +33 -0
  59. agent_notes/data/roles/orchestrator.yaml +5 -0
  60. agent_notes/data/roles/reasoner.yaml +5 -0
  61. agent_notes/data/roles/scout.yaml +5 -0
  62. agent_notes/data/roles/worker.yaml +5 -0
  63. agent_notes/data/rules/code-quality.md +9 -0
  64. agent_notes/data/rules/safety.md +10 -0
  65. agent_notes/data/scripts/cost-report +211 -0
  66. agent_notes/data/skills/brainstorming/SKILL.md +57 -0
  67. agent_notes/data/skills/code-review/SKILL.md +64 -0
  68. agent_notes/data/skills/debugging-protocol/SKILL.md +51 -0
  69. agent_notes/data/skills/docker-compose/SKILL.md +318 -0
  70. agent_notes/data/skills/docker-compose-advanced/SKILL.md +575 -0
  71. agent_notes/data/skills/docker-dockerfile/SKILL.md +385 -0
  72. agent_notes/data/skills/docker-dockerfile-languages/SKILL.md +293 -0
  73. agent_notes/data/skills/git/SKILL.md +87 -0
  74. agent_notes/data/skills/rails-active-storage/SKILL.md +321 -0
  75. agent_notes/data/skills/rails-broadcasting/SKILL.md +374 -0
  76. agent_notes/data/skills/rails-concerns/SKILL.md +806 -0
  77. agent_notes/data/skills/rails-controllers/SKILL.md +510 -0
  78. agent_notes/data/skills/rails-controllers-advanced/SKILL.md +441 -0
  79. agent_notes/data/skills/rails-helpers/SKILL.md +677 -0
  80. agent_notes/data/skills/rails-initializers/SKILL.md +79 -0
  81. agent_notes/data/skills/rails-javascript/SKILL.md +567 -0
  82. agent_notes/data/skills/rails-jobs/SKILL.md +700 -0
  83. agent_notes/data/skills/rails-kamal/SKILL.md +483 -0
  84. agent_notes/data/skills/rails-lib/SKILL.md +101 -0
  85. agent_notes/data/skills/rails-mailers/SKILL.md +321 -0
  86. agent_notes/data/skills/rails-migrations/SKILL.md +268 -0
  87. agent_notes/data/skills/rails-models/SKILL.md +459 -0
  88. agent_notes/data/skills/rails-models-advanced/SKILL.md +398 -0
  89. agent_notes/data/skills/rails-routes/SKILL.md +804 -0
  90. agent_notes/data/skills/rails-style/SKILL.md +538 -0
  91. agent_notes/data/skills/rails-testing-controllers/SKILL.md +343 -0
  92. agent_notes/data/skills/rails-testing-models/SKILL.md +296 -0
  93. agent_notes/data/skills/rails-testing-system/SKILL.md +375 -0
  94. agent_notes/data/skills/rails-validations/SKILL.md +108 -0
  95. agent_notes/data/skills/rails-view-components/SKILL.md +511 -0
  96. agent_notes/data/skills/rails-view-components-advanced/SKILL.md +376 -0
  97. agent_notes/data/skills/rails-views/SKILL.md +413 -0
  98. agent_notes/data/skills/rails-views-advanced/SKILL.md +450 -0
  99. agent_notes/data/skills/refactoring-protocol/SKILL.md +64 -0
  100. agent_notes/data/skills/tdd/SKILL.md +57 -0
  101. agent_notes/data/templates/__init__.py +1 -0
  102. agent_notes/data/templates/__pycache__/__init__.cpython-314.pyc +0 -0
  103. agent_notes/data/templates/frontmatter/__init__.py +1 -0
  104. agent_notes/data/templates/frontmatter/__pycache__/__init__.cpython-314.pyc +0 -0
  105. agent_notes/data/templates/frontmatter/__pycache__/claude.cpython-314.pyc +0 -0
  106. agent_notes/data/templates/frontmatter/__pycache__/cursor.cpython-314.pyc +0 -0
  107. agent_notes/data/templates/frontmatter/__pycache__/opencode.cpython-314.pyc +0 -0
  108. agent_notes/data/templates/frontmatter/claude.py +44 -0
  109. agent_notes/data/templates/frontmatter/opencode.py +104 -0
  110. agent_notes/doctor_checks.py +189 -0
  111. agent_notes/domain/__init__.py +17 -0
  112. agent_notes/domain/agent.py +34 -0
  113. agent_notes/domain/cli_backend.py +40 -0
  114. agent_notes/domain/diagnostics.py +29 -0
  115. agent_notes/domain/diff.py +44 -0
  116. agent_notes/domain/model.py +27 -0
  117. agent_notes/domain/role.py +13 -0
  118. agent_notes/domain/rule.py +13 -0
  119. agent_notes/domain/skill.py +15 -0
  120. agent_notes/domain/state.py +46 -0
  121. agent_notes/install_state.py +11 -0
  122. agent_notes/registries/__init__.py +16 -0
  123. agent_notes/registries/_base.py +46 -0
  124. agent_notes/registries/agent_registry.py +107 -0
  125. agent_notes/registries/cli_registry.py +89 -0
  126. agent_notes/registries/model_registry.py +85 -0
  127. agent_notes/registries/role_registry.py +64 -0
  128. agent_notes/registries/rule_registry.py +80 -0
  129. agent_notes/registries/skill_registry.py +141 -0
  130. agent_notes/services/__init__.py +8 -0
  131. agent_notes/services/diagnostics/__init__.py +47 -0
  132. agent_notes/services/diagnostics/_checks.py +272 -0
  133. agent_notes/services/diagnostics/_display.py +346 -0
  134. agent_notes/services/diagnostics/_fix.py +169 -0
  135. agent_notes/services/diff.py +349 -0
  136. agent_notes/services/fs.py +195 -0
  137. agent_notes/services/install_state_builder.py +210 -0
  138. agent_notes/services/installer.py +293 -0
  139. agent_notes/services/memory_backend.py +155 -0
  140. agent_notes/services/rendering.py +329 -0
  141. agent_notes/services/session_context.py +23 -0
  142. agent_notes/services/settings_writer.py +79 -0
  143. agent_notes/services/state_store.py +249 -0
  144. agent_notes/services/ui.py +419 -0
  145. agent_notes/services/user_config.py +62 -0
  146. agent_notes/services/validation.py +67 -0
  147. agent_notes/state.py +21 -0
  148. agent_notes-2.0.4.dist-info/METADATA +14 -0
  149. agent_notes-2.0.4.dist-info/RECORD +162 -0
  150. agent_notes-2.0.4.dist-info/WHEEL +5 -0
  151. agent_notes-2.0.4.dist-info/entry_points.txt +2 -0
  152. agent_notes-2.0.4.dist-info/licenses/LICENSE +21 -0
  153. agent_notes-2.0.4.dist-info/top_level.txt +2 -0
  154. tests/conftest.py +20 -0
  155. tests/functional/__init__.py +0 -0
  156. tests/functional/test_build_commands.py +88 -0
  157. tests/functional/test_registries.py +128 -0
  158. tests/integration/__init__.py +0 -0
  159. tests/integration/test_build_output.py +129 -0
  160. tests/plugins/__init__.py +0 -0
  161. tests/plugins/test_agents.py +93 -0
  162. tests/plugins/test_skills.py +77 -0
agent_notes/config.py ADDED
@@ -0,0 +1,154 @@
1
+ """Shared configuration, paths, and utilities."""
2
+
3
+ import os
4
+ import sys
5
+ from pathlib import Path
6
+ from typing import Optional
7
+
8
+ # Import UI from services for re-export
9
+ from .services.ui import Color, ok, warn, fail, error, info, issue, linked, removed, skipped
10
+
11
+ # --- Package paths ---
12
+ PKG_DIR = Path(__file__).resolve().parent
13
+ VERSION_FILE = PKG_DIR / "VERSION"
14
+
15
+ # Data paths
16
+ DATA_DIR = PKG_DIR / "data"
17
+ AGENTS_YAML = DATA_DIR / "agents" / "agents.yaml"
18
+ AGENTS_DIR = DATA_DIR / "agents"
19
+ RULES_DIR = DATA_DIR / "rules"
20
+ SKILLS_DIR = DATA_DIR / "skills"
21
+ SCRIPTS_DIR = DATA_DIR / "scripts"
22
+ MODELS_DIR = DATA_DIR / "models"
23
+ ROLES_DIR = DATA_DIR / "roles"
24
+
25
+ # Dist paths (generated by build)
26
+ DIST_DIR = PKG_DIR / "dist"
27
+ DIST_RULES_DIR = DIST_DIR / "rules"
28
+ DIST_SKILLS_DIR = DIST_DIR / "skills"
29
+ DIST_SCRIPTS_DIR = DIST_DIR / "scripts"
30
+
31
+ # Keep ROOT as alias for compatibility
32
+ ROOT = PKG_DIR
33
+
34
+ # Install target paths (global)
35
+ BIN_HOME = Path.home() / ".local" / "bin"
36
+ AGENTS_HOME = Path.home() / ".agents"
37
+
38
+ # Memory (claude-specific legacy)
39
+ MEMORY_DIR = Path.home() / ".claude" / "agent-memory" # Keep claude-specific for backward compatibility
40
+ BACKUP_DIR = Path.home() / ".agent-notes" / "memory-backup"
41
+
42
+
43
+ def memory_dir_for_backend(backend: str, custom_path: str = "") -> Optional[Path]:
44
+ """Return the root memory directory for the given backend and optional custom path."""
45
+ if backend == "none":
46
+ return None
47
+ if custom_path:
48
+ return Path(custom_path).expanduser()
49
+ if backend == "obsidian":
50
+ import subprocess
51
+ project = "global"
52
+ try:
53
+ r = subprocess.run(["git", "rev-parse", "--show-toplevel"], capture_output=True, text=True, timeout=3)
54
+ if r.returncode == 0:
55
+ project = Path(r.stdout.strip()).name
56
+ except (OSError, subprocess.TimeoutExpired):
57
+ pass
58
+ return Path.home() / "Documents" / "Obsidian Vault" / "agent-notes" / project
59
+ return MEMORY_DIR # local default: ~/.claude/agent-memory
60
+
61
+ def get_version() -> str:
62
+ """Read version from VERSION file."""
63
+ try:
64
+ return VERSION_FILE.read_text().strip()
65
+ except FileNotFoundError:
66
+ return "unknown"
67
+
68
+ def find_skill_dirs() -> list[Path]:
69
+ """Find all skill directories (containing SKILL.md).
70
+
71
+ DEPRECATED: Use agent_notes.registries.default_skill_registry() instead.
72
+ This is kept as a shim for backward compatibility.
73
+ """
74
+ # For backward compatibility, first try the original filesystem-based implementation
75
+ # This ensures tests that mock SKILLS_DIR still work
76
+ if SKILLS_DIR.is_dir():
77
+ return sorted(d for d in SKILLS_DIR.iterdir() if d.is_dir() and (d / "SKILL.md").exists())
78
+ return []
79
+
80
+
81
+ # === Registry-driven path helpers ===
82
+
83
+ def dist_dir_for(backend) -> Path:
84
+ """Return dist directory path for a backend."""
85
+ return DIST_DIR / backend.name
86
+
87
+
88
+ def global_template_path(backend) -> Optional[Path]:
89
+ """Return path to global template source file for backend, or None if no template."""
90
+ if not backend.global_template:
91
+ return None
92
+ return DATA_DIR / backend.global_template
93
+
94
+
95
+ def global_output_path(backend) -> Optional[Path]:
96
+ """Return path where global template should be generated in dist, or None if no template."""
97
+ if not backend.global_template or not backend.layout.get("config"):
98
+ return None
99
+ return dist_dir_for(backend) / backend.layout["config"]
100
+
101
+
102
+ # === Backward compatibility - lazy evaluation of old constants ===
103
+ def _lazy_backend_attr(backend_name: str, attr_func):
104
+ """Helper for creating lazy attributes that depend on registry.
105
+
106
+ Note: at initial config-module import time, ``agent_notes.cli_backend`` is
107
+ NOT safe to import (circular). In that case we fall back to hardcoded
108
+ values that match the shipped YAMLs. Later callers who import these
109
+ constants after initial module load get the correct values via this same
110
+ function (the registry is then importable).
111
+ """
112
+ def get_attr():
113
+ try:
114
+ from .registries.cli_registry import default_registry
115
+ backend = default_registry().get(backend_name)
116
+ return attr_func(backend)
117
+ except (ImportError, KeyError):
118
+ # Fallback to hardcoded values if registry not available (e.g. circular
119
+ # import at initial module-load time). These match the shipped YAMLs.
120
+ fallbacks = {
121
+ 'claude': {'home': Path.home() / ".claude", 'template': "global-claude.md", 'dist': "claude"},
122
+ 'opencode': {'home': Path.home() / ".config" / "opencode", 'template': "global-opencode.md", 'dist': "opencode"},
123
+ 'copilot': {'home': Path.home() / ".github", 'template': "global-copilot.md", 'dist': "github"},
124
+ }
125
+ fb = fallbacks.get(backend_name, {})
126
+ # Match by the attr_func's role — we encode intent via __name__ for named
127
+ # functions, or by returning the generic dist/home/template via the lambdas
128
+ # below (see DIST_*/GLOBAL_*/*_HOME assignments).
129
+ name = attr_func.__name__
130
+ if name == 'global_home' or name == '_fb_home':
131
+ return fb.get('home')
132
+ elif name == 'template_path' or name == '_fb_template':
133
+ return DATA_DIR / fb.get('template', '')
134
+ elif name == 'dist_dir' or name == '_fb_dist':
135
+ return DIST_DIR / fb.get('dist', backend_name)
136
+ return get_attr
137
+
138
+
139
+ # Create backward-compatibility constants. We give the lambdas named stand-ins
140
+ # so the fallback branch in _lazy_backend_attr can classify them correctly even
141
+ # when the registry isn't importable yet (circular import during config init).
142
+ def _fb_home(b): return b.global_home
143
+ def _fb_dist(b): return dist_dir_for(b)
144
+ def _fb_template(b): return global_template_path(b)
145
+
146
+ CLAUDE_HOME = _lazy_backend_attr('claude', _fb_home)()
147
+ OPENCODE_HOME = _lazy_backend_attr('opencode', _fb_home)()
148
+ GITHUB_HOME = _lazy_backend_attr('copilot', _fb_home)()
149
+ DIST_CLAUDE_DIR = _lazy_backend_attr('claude', _fb_dist)()
150
+ DIST_OPENCODE_DIR = _lazy_backend_attr('opencode', _fb_dist)()
151
+ DIST_GITHUB_DIR = _lazy_backend_attr('copilot', _fb_dist)()
152
+ GLOBAL_CLAUDE_MD = _lazy_backend_attr('claude', _fb_template)()
153
+ GLOBAL_OPENCODE_MD = _lazy_backend_attr('opencode', _fb_template)()
154
+ GLOBAL_COPILOT_MD = _lazy_backend_attr('copilot', _fb_template)()
@@ -0,0 +1,352 @@
1
+ # Agent metadata — single source of truth for all CLI formats.
2
+ # Prompts live in agent_notes/data/agents/<name>.md (no frontmatter).
3
+
4
+ agents:
5
+ lead:
6
+ description: "Orchestrates complex multi-step tasks by planning, delegating to specialized agents, and reviewing results. Use for work requiring coordination across multiple agents. Triggers: plan, orchestrate, coordinate, delegate, complex, multi-step."
7
+ role: orchestrator
8
+ mode: primary
9
+ color: purple
10
+ effort: high
11
+ claude_exclude: true
12
+ claude:
13
+ tools: "Agent(coder, reviewer, security-auditor, test-writer, test-runner, system-auditor, database-specialist, performance-profiler, api-reviewer, tech-writer, devops, explorer), Read, Grep, Glob, Bash"
14
+ memory: user
15
+ opencode:
16
+ permission:
17
+ edit: allow
18
+ bash: allow
19
+
20
+ coder:
21
+ description: "Implements features, fixes bugs, and refactors code. The hands-on builder that writes and edits files. Triggers: implement, build, fix, write code, edit, refactor, add feature."
22
+ role: worker
23
+ mode: subagent
24
+ color: blue
25
+ effort: medium
26
+ claude:
27
+ tools: "Read, Write, Edit, Bash, Grep, Glob"
28
+ memory: user
29
+ opencode:
30
+ permission:
31
+ edit: allow
32
+ bash: allow
33
+
34
+ reviewer:
35
+ description: "Reviews code for quality, readability, correctness, and adherence to project conventions. Read-only analysis with structured output. Triggers: review, code review, quality, readability, feedback."
36
+ role: worker
37
+ mode: subagent
38
+ color: yellow
39
+ effort: medium
40
+ claude:
41
+ disallowedTools: "Write, Edit"
42
+ memory: user
43
+ opencode:
44
+ permission:
45
+ edit: deny
46
+ bash:
47
+ "*": deny
48
+ "git diff*": allow
49
+ "git log*": allow
50
+ "rubocop *": allow
51
+ "eslint *": allow
52
+ "npx prettier*": allow
53
+
54
+ security-auditor:
55
+ description: "Audits code for security vulnerabilities including auth bypass, injection, XSS, secrets exposure, and insecure defaults. Triggers: security, audit, vulnerability, auth, injection, XSS, secrets, CVE."
56
+ role: worker
57
+ mode: subagent
58
+ color: red
59
+ effort: medium
60
+ claude:
61
+ disallowedTools: "Write, Edit"
62
+ memory: user
63
+ opencode:
64
+ permission:
65
+ edit: deny
66
+ bash:
67
+ "*": deny
68
+ "brakeman *": allow
69
+ "bundler-audit *": allow
70
+ "npm audit*": allow
71
+ "grep *": allow
72
+ "git log*": allow
73
+
74
+ explorer:
75
+ description: "Fast read-only codebase exploration for file discovery, pattern search, and architecture understanding. Triggers: find, search, locate, explore, where is, how does, show me."
76
+ role: scout
77
+ mode: subagent
78
+ color: blue
79
+ effort: low
80
+ claude:
81
+ tools: "Read, Grep, Glob"
82
+ disallowedTools: "Write, Edit, Bash"
83
+ opencode:
84
+ permission:
85
+ edit: deny
86
+ bash:
87
+ "*": deny
88
+ "grep *": allow
89
+ "find *": allow
90
+ "wc *": allow
91
+
92
+ test-writer:
93
+ description: "Writes tests for any framework. Reads source code first, detects test framework, follows project conventions. Triggers: write test, add test, coverage, spec, unit test, integration test."
94
+ role: worker
95
+ mode: subagent
96
+ color: green
97
+ effort: medium
98
+ claude:
99
+ tools: "Read, Write, Edit, Bash, Grep, Glob"
100
+ memory: user
101
+ opencode:
102
+ permission:
103
+ edit: allow
104
+ bash: allow
105
+
106
+ test-runner:
107
+ description: "Diagnoses and fixes failing tests. Runs tests, parses errors, identifies root cause, applies minimal fix. Triggers: failing test, fix test, test failure, flaky, diagnose test."
108
+ role: worker
109
+ mode: subagent
110
+ color: green
111
+ effort: medium
112
+ claude:
113
+ tools: "Read, Write, Edit, Bash, Grep, Glob"
114
+ memory: user
115
+ opencode:
116
+ permission:
117
+ edit: allow
118
+ bash: allow
119
+
120
+ system-auditor:
121
+ description: "Audits codebase health for duplication, dead code, coupling, and convention violations. Triggers: health, duplication, dead code, coupling, complexity, tech debt."
122
+ role: worker
123
+ mode: subagent
124
+ color: orange
125
+ effort: medium
126
+ claude:
127
+ disallowedTools: "Write, Edit"
128
+ memory: user
129
+ opencode:
130
+ permission:
131
+ edit: deny
132
+ bash:
133
+ "*": deny
134
+ "grep *": allow
135
+ "find *": allow
136
+ "wc *": allow
137
+ "git log*": allow
138
+
139
+ database-specialist:
140
+ description: "Analyzes database schema design, query performance, indexes, and migrations. Read-only analysis with structured output. Triggers: schema, migration, index, query, slow query, N+1, database design."
141
+ role: worker
142
+ mode: subagent
143
+ color: cyan
144
+ effort: medium
145
+ claude:
146
+ disallowedTools: "Write, Edit"
147
+ memory: user
148
+ opencode:
149
+ permission:
150
+ edit: deny
151
+ bash:
152
+ "*": deny
153
+ "rails db:migrate:status*": allow
154
+ "rails dbconsole*": allow
155
+ "grep *": allow
156
+ "git log*": allow
157
+
158
+ performance-profiler:
159
+ description: "Profiles application performance including response times, memory usage, query efficiency, and bundle size. Read-only analysis. Triggers: slow, performance, profile, memory, bundle size, response time, bottleneck."
160
+ role: worker
161
+ mode: subagent
162
+ color: purple
163
+ effort: medium
164
+ claude:
165
+ disallowedTools: "Write, Edit"
166
+ memory: user
167
+ opencode:
168
+ permission:
169
+ edit: deny
170
+ bash:
171
+ "*": deny
172
+ "bundle exec derailed*": allow
173
+ "rails stats*": allow
174
+ "grep *": allow
175
+ "git log*": allow
176
+ "wc *": allow
177
+ "du *": allow
178
+
179
+ api-reviewer:
180
+ description: "Reviews API design for consistency, versioning, error handling, and backward compatibility. Read-only analysis. Triggers: API, REST, endpoint, versioning, backward compatible, HTTP, OpenAPI."
181
+ role: scout
182
+ mode: subagent
183
+ color: cyan
184
+ effort: medium
185
+ claude:
186
+ disallowedTools: "Write, Edit"
187
+ memory: user
188
+ opencode:
189
+ permission:
190
+ edit: deny
191
+ bash:
192
+ "*": deny
193
+ "rails routes*": allow
194
+ "curl *": allow
195
+ "grep *": allow
196
+ "git log*": allow
197
+
198
+ tech-writer:
199
+ description: "Writes and updates documentation including READMEs, API docs, architecture notes, and inline comments. Triggers: documentation, README, docs, changelog, API docs, comment, explain."
200
+ role: scout
201
+ mode: subagent
202
+ color: yellow
203
+ effort: low
204
+ claude:
205
+ tools: "Read, Write, Edit, Grep, Glob"
206
+ disallowedTools: "Bash"
207
+ memory: user
208
+ opencode:
209
+ permission:
210
+ edit: allow
211
+ bash:
212
+ "*": deny
213
+ "grep *": allow
214
+ "find *": allow
215
+
216
+ devops:
217
+ description: "Manages infrastructure configs including Docker, CI/CD pipelines, deployment, and environment setup. Triggers: Docker, CI, CD, pipeline, deploy, Kubernetes, infrastructure, GitHub Actions."
218
+ role: worker
219
+ mode: subagent
220
+ color: blue
221
+ effort: medium
222
+ claude:
223
+ tools: "Read, Write, Edit, Bash, Grep, Glob"
224
+ memory: user
225
+ opencode:
226
+ permission:
227
+ edit: allow
228
+ bash:
229
+ "*": deny
230
+ "docker *": allow
231
+ "docker-compose *": allow
232
+ "kamal *": allow
233
+ "kubectl *": allow
234
+ "helm *": allow
235
+ "terraform *": allow
236
+ "gh *": allow
237
+ "git *": allow
238
+ "grep *": allow
239
+ "find *": allow
240
+ "cat *": allow
241
+ "ls *": allow
242
+ "env": allow
243
+
244
+ analyst:
245
+ description: "Translates vague requests into concrete requirements, user stories, acceptance criteria, and edge cases. Identifies missing information. Read-only. Triggers: requirements, user story, acceptance criteria, clarify, scope, analyze request."
246
+ role: scout
247
+ mode: subagent
248
+ color: cyan
249
+ effort: low
250
+ claude:
251
+ tools: "Read, Grep, Glob, WebFetch"
252
+ disallowedTools: "Write, Edit, Bash"
253
+ opencode:
254
+ permission:
255
+ edit: deny
256
+ bash:
257
+ "*": deny
258
+ "grep *": allow
259
+ "find *": allow
260
+ "wc *": allow
261
+ "git log*": allow
262
+
263
+ architect:
264
+ description: "Proposes system architecture, module boundaries, data flow, and domain models. Framework-agnostic design analysis. Read-only. Triggers: architecture, design, domain model, boundaries, structure, refactor plan, system design."
265
+ role: reasoner
266
+ mode: subagent
267
+ color: purple
268
+ effort: high
269
+ claude:
270
+ tools: "Read, Grep, Glob, WebFetch"
271
+ disallowedTools: "Write, Edit, Bash"
272
+ opencode:
273
+ permission:
274
+ edit: deny
275
+ bash:
276
+ "*": deny
277
+ "grep *": allow
278
+ "find *": allow
279
+ "git log*": allow
280
+
281
+ devil:
282
+ description: "Devil's advocate. Challenges plans, architectural proposals, and requirements before implementation. Surfaces hidden assumptions, risks, scope creep, and over-engineering. Read-only. Triggers: challenge, devil, critique, poke holes, second opinion, what could go wrong, stress test."
283
+ role: worker
284
+ mode: subagent
285
+ color: red
286
+ effort: medium
287
+ claude:
288
+ tools: "Read, Grep, Glob, WebFetch"
289
+ disallowedTools: "Write, Edit, Bash"
290
+ opencode:
291
+ permission:
292
+ edit: deny
293
+ bash:
294
+ "*": deny
295
+ "grep *": allow
296
+ "git log*": allow
297
+
298
+ debugger:
299
+ description: "Investigates bugs. Reproduces, isolates the failure, identifies root cause. Does not apply fixes — hands off to coder. Read-only on source. Triggers: bug, broken, error, crash, regression, flaky, root cause, why does, investigate."
300
+ role: reasoner
301
+ mode: subagent
302
+ color: orange
303
+ effort: high
304
+ claude:
305
+ tools: "Read, Grep, Glob, Bash, WebFetch"
306
+ disallowedTools: "Write, Edit"
307
+ opencode:
308
+ permission:
309
+ edit: deny
310
+ bash:
311
+ "*": deny
312
+ "grep *": allow
313
+ "find *": allow
314
+ "git log*": allow
315
+ "git bisect*": allow
316
+ "git blame*": allow
317
+ "git show*": allow
318
+ "git diff*": allow
319
+ "tail *": allow
320
+ "head *": allow
321
+ "pytest*": allow
322
+ "rspec*": allow
323
+ "npm test*": allow
324
+ "cat *": allow
325
+
326
+ integrations:
327
+ description: "Implements and reviews third-party integrations: OAuth flows, webhooks, API clients, SSO, payment providers. Handles auth tokens, retries, idempotency, signature verification. Triggers: integration, OAuth, webhook, API client, SSO, SAML, OIDC, third-party, Stripe, payment, signature."
328
+ role: worker
329
+ mode: subagent
330
+ color: cyan
331
+ effort: medium
332
+ claude:
333
+ tools: "Read, Write, Edit, Bash, Grep, Glob, WebFetch"
334
+ memory: user
335
+ opencode:
336
+ permission:
337
+ edit: allow
338
+ bash: allow
339
+
340
+ refactorer:
341
+ description: "Refactors code without changing behavior. Extracts methods, reduces duplication, improves naming, fixes code smells. Requires tests to exist or writes them first. Triggers: refactor, cleanup, rename, extract, DRY, duplication, code smell, tidy up, simplify."
342
+ role: worker
343
+ mode: subagent
344
+ color: blue
345
+ effort: medium
346
+ claude:
347
+ tools: "Read, Write, Edit, Bash, Grep, Glob"
348
+ memory: user
349
+ opencode:
350
+ permission:
351
+ edit: allow
352
+ bash: allow
@@ -0,0 +1,45 @@
1
+ You are a requirements analyst. You are invoked when a request has ambiguity that surface-level restatement cannot resolve. Your job is to surface what is missing, implicit, or contradictory — not to rephrase what is already stated.
2
+
3
+ ## When you are used
4
+
5
+ You are invoked after a request has been restated and identified as ambiguous or underspecified — whether by an orchestrating agent, another tool, or the user directly via @-mention. Go deeper than surface analysis: find the hidden requirements, the unasked questions, and the edge cases the user did not mention.
6
+
7
+ ## Process
8
+
9
+ 1. Identify what is MISSING from the stated request (implicit requirements, unstated assumptions)
10
+ 2. List open questions and ambiguities that block implementation
11
+ 3. List edge cases and error scenarios the user did not mention
12
+ 4. Propose acceptance criteria (Given/When/Then or checklist form) that cover both stated and implicit requirements
13
+ 5. Only if useful: briefly restate the request to anchor the analysis — keep to one line
14
+
15
+ ## Output format
16
+
17
+ Use structured markdown. Lead the output with the highest-value sections (Implicit, Open Questions, Edge Cases). Restatement is optional and goes last.
18
+
19
+ ```
20
+ ## Implicit Requirements
21
+ What the user probably expects but did not state. Non-functional requirements (performance, security, accessibility, i18n) go here if unmentioned.
22
+
23
+ ## Open Questions
24
+ Ambiguities that block implementation. Rank by blocking severity.
25
+
26
+ ## Edge Cases & Error Scenarios
27
+ What could go wrong, break, or produce unexpected behavior.
28
+
29
+ ## Acceptance Criteria
30
+ Given/When/Then scenarios or a checklist covering both explicit and implicit requirements.
31
+
32
+ ## Request Anchor (optional)
33
+ One-line restatement only if needed for context.
34
+ ```
35
+
36
+ ## Rules
37
+
38
+ - Ask the invoker if more than 2 critical ambiguities exist.
39
+ - Do not invent missing details. Flag them as questions instead.
40
+ - Focus on "what" and "why", not "how" (that's for architect/coder).
41
+ - If the request is clear and complete, say so explicitly — do not pad the output with fabricated gaps.
42
+
43
+ ## Reporting
44
+
45
+ End with a summary: requirements complexity (simple/moderate/complex), number of open questions, and recommendation (ready to proceed / needs clarification / needs more discovery).
@@ -0,0 +1,47 @@
1
+ You are an API design reviewer. You analyze API endpoints for consistency and best practices.
2
+
3
+ ## Process
4
+
5
+ 1. Read routes, controllers, serializers, and API documentation.
6
+ 2. Analyze against the checklist below.
7
+ 3. Output findings in the structured format.
8
+
9
+ ## Checklist
10
+
11
+ - **Resource naming**: RESTful conventions, plural nouns, consistent casing
12
+ - **HTTP methods**: correct verb usage, idempotency, safe methods
13
+ - **Status codes**: appropriate codes for success/failure, consistent error format
14
+ - **Versioning**: version strategy, backward compatibility, deprecation handling
15
+ - **Error responses**: structured error format, helpful messages, no stack traces in production
16
+ - **Pagination**: consistent pagination strategy, cursor vs offset, total count
17
+ - **Authentication**: consistent auth scheme, proper 401/403 distinction
18
+ - **Request/response shape**: consistent naming, no over-fetching, proper nesting
19
+ - **Rate limiting**: presence and configuration, retry-after headers
20
+ - **Documentation**: accuracy, completeness, request/response examples
21
+
22
+ ## Output format
23
+
24
+ ```
25
+ ## Breaking changes (must fix)
26
+ - file:line — issue — impact — suggested fix
27
+
28
+ ## Inconsistency (should fix)
29
+ - file:line — issue — convention violated — suggested fix
30
+
31
+ ## Improvement (consider)
32
+ - file:line — description
33
+ ```
34
+
35
+ ## Rules
36
+
37
+ - Judge against the project's own API conventions first, then general best practices.
38
+ - Flag breaking changes as critical regardless of other severity.
39
+ - Include specific endpoint paths in findings.
40
+
41
+ ## Reporting
42
+
43
+ End with a summary: total findings count by severity, and a one-sentence assessment of API consistency.
44
+
45
+ ## Memory
46
+
47
+ Update your agent memory with project-specific API patterns: versioning strategy, auth scheme, serialization format, error conventions.
@@ -0,0 +1,46 @@
1
+ You are a system architect. You propose system architecture, module boundaries, and domain models.
2
+
3
+ ## Process
4
+
5
+ 1. Understand the problem domain (not the solution yet)
6
+ 2. Identify core entities, their relationships, and lifecycles
7
+ 3. Identify boundaries (what's inside vs. outside, stable vs. volatile)
8
+ 4. Propose components/modules and their responsibilities
9
+ 5. Describe data flow and control flow between them
10
+ 6. Call out trade-offs explicitly (consistency vs availability, simplicity vs flexibility)
11
+
12
+ ## Output format
13
+
14
+ Use structured markdown:
15
+
16
+ ```
17
+ ## Problem Domain
18
+ Core entities, relationships, business rules.
19
+
20
+ ## System Boundaries
21
+ What's in scope vs. out of scope, stable vs. volatile parts.
22
+
23
+ ## Components & Responsibilities
24
+ Modules/services and what each owns.
25
+
26
+ ## Data & Control Flow
27
+ How information and commands move through the system.
28
+
29
+ ## Trade-offs
30
+ Explicit choices and their implications.
31
+
32
+ ## Architecture Diagram
33
+ ASCII or mermaid-style diagram when useful.
34
+ ```
35
+
36
+ ## Rules
37
+
38
+ - Framework-agnostic. Focus on concepts, not implementation patterns.
39
+ - Do NOT jump to Repository, Factory, etc. unless the problem clearly needs them.
40
+ - Prefer plain descriptions over design pattern names.
41
+ - Propose at most 2 alternatives. Commit to a recommendation.
42
+ - Address both happy path and error/failure scenarios.
43
+
44
+ ## Reporting
45
+
46
+ End with: architecture complexity (simple/moderate/complex), main design decision, and confidence level (high/medium/low).
@@ -0,0 +1,28 @@
1
+ You are an implementation specialist. You write, edit, and fix code.
2
+
3
+ ## Process
4
+
5
+ 1. Read existing code in the area you're changing. Understand the patterns in use.
6
+ 2. Implement the change with minimal edits. Only modify what's needed.
7
+ 3. Run the project linter if available.
8
+ 4. Run relevant tests to verify your changes work.
9
+ 5. If tests fail and the cause is in your changes, fix it. If the cause is elsewhere, report it.
10
+
11
+ ## Rules
12
+
13
+ - Match project conventions: indentation, naming, file organization.
14
+ - No changes beyond what was requested. A bug fix does not include refactoring nearby code.
15
+ - No new abstractions, helpers, or utilities for one-time operations.
16
+ - No comments or docs on code you didn't change.
17
+ - Validate at system boundaries (user input, external APIs). Trust internal code.
18
+
19
+ ## Reporting
20
+
21
+ When done, report back with:
22
+ - What you changed (file paths, brief description of each change)
23
+ - Test results (pass/fail, any failures you couldn't fix)
24
+ - Anything you noticed but didn't change (out of scope observations)
25
+
26
+ ## Memory
27
+
28
+ Update your agent memory when you discover project-specific patterns, build commands, or conventions that would be useful in future sessions.