@ethlete/agent-rules 0.1.0-next.20 → 0.1.0-next.21

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ethlete/agent-rules
2
2
 
3
+ ## 0.1.0-next.21
4
+
5
+ ### Patch Changes
6
+
7
+ - The subagent model rule now gives haiku small, fully specified jobs as well as lookups. The model hook also finds an agent definition whose file name is capitalized, for example an `Explore.md` that overrides the built-in agent.
8
+
3
9
  ## 0.1.0-next.20
4
10
 
5
11
  ### Minor Changes
@@ -42,7 +42,7 @@ POLICY = """A subagent's model is a choice, not an inheritance. This call passes
42
42
  would run on the model leading this session - which is how one expensive model ends up doing every small job. \
43
43
  Call the tool again with `model` set:
44
44
 
45
- - `haiku` - mechanical lookups: grep, find, read a file, run a command and report what it said.
45
+ - `haiku` - lookups and small, fully specified jobs: grep, find, read and summarize files or a CI log, run a command and report, a mechanical edit in named files.
46
46
  - `sonnet` - scoped work with a clear target: a fix in a named file, a spec, a docs page, a lint cleanup, \
47
47
  research that needs reasoning. Sonnet 5.5 is close to opus here and costs less.
48
48
  - `opus` - hard work: a bug with no known cause, a change across many files, a review of a diff, and any task \
@@ -56,7 +56,7 @@ effort, so a call that names one needs no `model` of its own."""
56
56
 
57
57
  FABLE_REASON = """This subagent would run on fable, the most expensive model. Approve it where the task is \
58
58
  judgment-heavy - planning, design, cross-cutting review, or leading other subagents. Deny it for implementation \
59
- (`model: "sonnet"` or `"opus"`) or for a mechanical lookup (`model: "haiku"`), then repeat the call with that model."""
59
+ (`model: "sonnet"` or `"opus"`) or for a lookup or a small, fully specified job (`model: "haiku"`), then repeat the call with that model."""
60
60
 
61
61
 
62
62
  def agent_name(argv):
@@ -109,11 +109,17 @@ def definition_sets_model(root, subagent_type):
109
109
  """True when a project or user agent definition of that name declares its own model."""
110
110
  if not subagent_type:
111
111
  return False
112
- file_name = f"{subagent_type.split(':')[-1]}.md"
113
- candidates = [
114
- os.path.join(root or ".", ".claude", "agents", file_name),
115
- os.path.join(os.path.expanduser("~"), ".claude", "agents", file_name),
116
- ]
112
+ file_name = f"{subagent_type.split(':')[-1]}.md".lower()
113
+ candidates = []
114
+ for directory in (
115
+ os.path.join(root or ".", ".claude", "agents"),
116
+ os.path.join(os.path.expanduser("~"), ".claude", "agents"),
117
+ ):
118
+ try:
119
+ entries = os.listdir(directory)
120
+ except OSError:
121
+ continue
122
+ candidates += [os.path.join(directory, entry) for entry in entries if entry.lower() == file_name]
117
123
  for path in candidates:
118
124
  try:
119
125
  with open(path, encoding="utf-8") as f:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: subagent-models
3
- description: A subagent's model is an explicit choice on every call - haiku for lookups, sonnet for scoped work, opus for hard work, fable for judgment.
3
+ description: A subagent's model is an explicit choice on every call - haiku for lookups and small specified jobs, sonnet for scoped work, opus for hard work, fable for judgment.
4
4
  kind: rule
5
5
  scope: both
6
6
  ---
@@ -11,12 +11,12 @@ A subagent spawned without a `model` runs on the model leading the session, so a
11
11
  model ends up doing every small job it delegates. **Set `model` on every call**, matched to the
12
12
  task:
13
13
 
14
- | Model | The work it fits |
15
- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
- | `haiku` | Mechanical lookups: grep, find, read a file, run a command and report what it said. |
17
- | `sonnet` | Scoped work with a clear target: a fix in a named file, a spec, a docs page, a lint cleanup, research that needs reasoning. Sonnet 5.5 is close to opus here and costs less. |
18
- | `opus` | Hard work: a bug with no known cause, a change across many files, a review of a diff, and any task sonnet did not finish. |
19
- | `fable` | Judgment-heavy work: planning, design, cross-cutting review, leading other subagents. The most expensive of the four, so ask the user before picking it. |
14
+ | Model | The work it fits |
15
+ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | `haiku` | Lookups and small, fully specified jobs: grep, find, read and summarize files or a CI log, run a command and report, a mechanical edit in named files. Haiku 5.5 does these well. |
17
+ | `sonnet` | Scoped work with a clear target: a fix in a named file, a spec, a docs page, a lint cleanup, research that needs reasoning. Sonnet 5.5 is close to opus here and costs less. |
18
+ | `opus` | Hard work: a bug with no known cause, a change across many files, a review of a diff, and any task sonnet did not finish. |
19
+ | `fable` | Judgment-heavy work: planning, design, cross-cutting review, leading other subagents. The most expensive of the four, so ask the user before picking it. |
20
20
 
21
21
  Effort follows the prompt, not a parameter: scope the prompt to one question, name what "done"
22
22
  means, and say "keep it brief" for a lookup. Two calls need no `model` of their own - a named
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/agent-rules",
3
- "version": "0.1.0-next.20",
3
+ "version": "0.1.0-next.21",
4
4
  "license": "MIT",
5
5
  "type": "commonjs",
6
6
  "exports": {