@ryodeushii/ai-product-team-agents 0.0.7 → 0.0.9
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/README.md +32 -38
- package/models.yml +3 -20
- package/package.json +1 -1
- package/src/config/schema.ts +1 -0
- package/src/models/resolver.ts +4 -3
- package/src/setup/index.ts +2 -1
- package/templates/.agents.yml +38 -30
package/README.md
CHANGED
|
@@ -82,15 +82,20 @@ autonomy: checkpoint # supervised | checkpoint | autonomous
|
|
|
82
82
|
# Deployment target (used by devops agent)
|
|
83
83
|
deploy: vercel # vercel | fly | aws | gcp | docker | k8s
|
|
84
84
|
|
|
85
|
-
#
|
|
85
|
+
# Define your own presets (optional) — use the same name to shadow a built-in
|
|
86
|
+
presets:
|
|
87
|
+
google:
|
|
88
|
+
thinking: google/gemini-2.5-pro
|
|
89
|
+
executing: google/gemini-2.5-flash
|
|
90
|
+
creative: google/gemini-2.5-pro
|
|
91
|
+
|
|
92
|
+
# Select a preset (built-in: "anthropic"; or one you defined above)
|
|
93
|
+
preset: google
|
|
94
|
+
|
|
95
|
+
# Fine-tune individual roles on top of the preset (optional)
|
|
86
96
|
models:
|
|
87
|
-
defaults:
|
|
88
|
-
thinking: anthropic/claude-sonnet-4-6 # architect, developer, reviewer…
|
|
89
|
-
executing: anthropic/claude-haiku-4-5-20251001 # explorer, fixer, seo
|
|
90
|
-
creative: google/gemini-2.5-pro # designer, marketing
|
|
91
97
|
roles:
|
|
92
|
-
|
|
93
|
-
explorer: local/qwen2.5-coder # local model via OpenCode
|
|
98
|
+
explorer: local/qwen2.5-coder # local model via OpenCode
|
|
94
99
|
|
|
95
100
|
# Disable roles you don't need
|
|
96
101
|
roles:
|
|
@@ -134,46 +139,35 @@ Models are defined in `models.yml`. Three tiers:
|
|
|
134
139
|
|
|
135
140
|
### Presets
|
|
136
141
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
```yaml
|
|
140
|
-
preset: google # gemini 2.5 pro for thinking/creative, flash for executing
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
| Preset | thinking | executing | creative |
|
|
144
|
-
|---|---|---|---|
|
|
145
|
-
| `balanced` | claude-sonnet-4-6 | claude-haiku-4-5 | claude-sonnet-4-6 |
|
|
146
|
-
| `fast` | claude-haiku-4-5 | claude-haiku-4-5 | claude-haiku-4-5 |
|
|
147
|
-
| `google` | gemini-2.5-pro | gemini-2.5-flash | gemini-2.5-pro |
|
|
148
|
-
| `openai` | gpt-4.1 | gpt-4.1-mini | gpt-4.1 |
|
|
149
|
-
|
|
150
|
-
### Per-project overrides
|
|
151
|
-
|
|
152
|
-
Mix a preset with per-role overrides:
|
|
142
|
+
The framework ships with one built-in preset (`anthropic`). Define your own presets in `.agents.yml` under `presets:` — project-defined presets shadow built-ins of the same name.
|
|
153
143
|
|
|
154
144
|
```yaml
|
|
145
|
+
# 1. Define presets in .agents.yml (once per project, or copy across projects)
|
|
146
|
+
presets:
|
|
147
|
+
google:
|
|
148
|
+
thinking: google/gemini-2.5-pro
|
|
149
|
+
executing: google/gemini-2.5-flash
|
|
150
|
+
creative: google/gemini-2.5-pro
|
|
151
|
+
fast:
|
|
152
|
+
thinking: anthropic/claude-haiku-4-5-20251001
|
|
153
|
+
executing: anthropic/claude-haiku-4-5-20251001
|
|
154
|
+
creative: anthropic/claude-haiku-4-5-20251001
|
|
155
|
+
|
|
156
|
+
# 2. Pick one
|
|
155
157
|
preset: google
|
|
156
|
-
models:
|
|
157
|
-
roles:
|
|
158
|
-
explorer: local/qwen2.5-coder # override one role on top of preset
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Or override individual tiers without a preset:
|
|
162
158
|
|
|
163
|
-
|
|
159
|
+
# 3. Fine-tune on top (optional)
|
|
164
160
|
models:
|
|
165
|
-
defaults:
|
|
166
|
-
creative: google/gemini-2.5-pro # swap just the creative tier
|
|
167
161
|
roles:
|
|
168
|
-
|
|
162
|
+
explorer: local/qwen2.5-coder
|
|
169
163
|
```
|
|
170
164
|
|
|
171
165
|
Resolution order (highest to lowest priority):
|
|
172
|
-
1. Project role override
|
|
173
|
-
2. Project tier default
|
|
174
|
-
3.
|
|
175
|
-
4. Framework role default
|
|
176
|
-
5. Framework tier default
|
|
166
|
+
1. Project role override (`models.roles.<role>`)
|
|
167
|
+
2. Project tier default (`models.defaults.<tier>`)
|
|
168
|
+
3. Selected preset — project presets first, built-in presets fallback
|
|
169
|
+
4. Framework role default (`models.yml` roles section)
|
|
170
|
+
5. Framework tier default (`models.yml` defaults section)
|
|
177
171
|
|
|
178
172
|
### Auto-update on startup (Claude Code)
|
|
179
173
|
|
package/models.yml
CHANGED
|
@@ -17,27 +17,10 @@ roles:
|
|
|
17
17
|
designer: anthropic/claude-sonnet-4-6
|
|
18
18
|
marketing: anthropic/claude-sonnet-4-6
|
|
19
19
|
|
|
20
|
+
# Built-in presets. Projects can define their own in .agents.yml
|
|
21
|
+
# and shadow these by using the same name.
|
|
20
22
|
presets:
|
|
21
|
-
|
|
22
|
-
balanced:
|
|
23
|
+
anthropic:
|
|
23
24
|
thinking: anthropic/claude-sonnet-4-6
|
|
24
25
|
executing: anthropic/claude-haiku-4-5-20251001
|
|
25
26
|
creative: anthropic/claude-sonnet-4-6
|
|
26
|
-
|
|
27
|
-
# Anthropic — all fast/cheap
|
|
28
|
-
fast:
|
|
29
|
-
thinking: anthropic/claude-haiku-4-5-20251001
|
|
30
|
-
executing: anthropic/claude-haiku-4-5-20251001
|
|
31
|
-
creative: anthropic/claude-haiku-4-5-20251001
|
|
32
|
-
|
|
33
|
-
# Google Gemini
|
|
34
|
-
google:
|
|
35
|
-
thinking: google/gemini-2.5-pro
|
|
36
|
-
executing: google/gemini-2.5-flash
|
|
37
|
-
creative: google/gemini-2.5-pro
|
|
38
|
-
|
|
39
|
-
# OpenAI
|
|
40
|
-
openai:
|
|
41
|
-
thinking: openai/gpt-4.1
|
|
42
|
-
executing: openai/gpt-4.1-mini
|
|
43
|
-
creative: openai/gpt-4.1
|
package/package.json
CHANGED
package/src/config/schema.ts
CHANGED
|
@@ -27,6 +27,7 @@ export const projectConfigSchema = z.object({
|
|
|
27
27
|
.default("checkpoint"),
|
|
28
28
|
deploy: z.string().optional(),
|
|
29
29
|
preset: z.string().optional(),
|
|
30
|
+
presets: z.record(z.string(), tierOverrideSchema).optional(),
|
|
30
31
|
models: z
|
|
31
32
|
.object({
|
|
32
33
|
defaults: tierOverrideSchema.optional(),
|
package/src/models/resolver.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/models/resolver.ts
|
|
2
2
|
|
|
3
|
-
import type { ModelsConfig, ProjectModelsOverride, Role } from "./types";
|
|
3
|
+
import type { ModelsConfig, ProjectModelsOverride, Role, Tier } from "./types";
|
|
4
4
|
import { ROLE_TIERS } from "./types";
|
|
5
5
|
|
|
6
6
|
export function resolveModel(
|
|
@@ -8,6 +8,7 @@ export function resolveModel(
|
|
|
8
8
|
framework: ModelsConfig,
|
|
9
9
|
project: ProjectModelsOverride = {},
|
|
10
10
|
preset?: string,
|
|
11
|
+
projectPresets: Record<string, Partial<Record<Tier, string>>> = {},
|
|
11
12
|
): string {
|
|
12
13
|
// 1. project role override
|
|
13
14
|
if (project.roles?.[role] !== undefined) return project.roles[role]!;
|
|
@@ -16,9 +17,9 @@ export function resolveModel(
|
|
|
16
17
|
const tier = ROLE_TIERS[role];
|
|
17
18
|
if (project.defaults?.[tier] !== undefined) return project.defaults[tier]!;
|
|
18
19
|
|
|
19
|
-
// 3. preset tier
|
|
20
|
+
// 3. preset tier — project presets shadow framework presets
|
|
20
21
|
if (preset !== undefined) {
|
|
21
|
-
const presetConfig = framework.presets[preset];
|
|
22
|
+
const presetConfig = projectPresets[preset] ?? framework.presets[preset];
|
|
22
23
|
if (presetConfig === undefined)
|
|
23
24
|
throw new Error(`Unknown preset "${preset}"`);
|
|
24
25
|
if (presetConfig[tier] !== undefined) return presetConfig[tier]!;
|
package/src/setup/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { Role } from "../models/types";
|
|
|
13
13
|
// Runs --update on every Claude Code session start so model overrides
|
|
14
14
|
// from .agents.yml are always applied without manual intervention.
|
|
15
15
|
const HOOK_COMMAND =
|
|
16
|
-
"bunx --bun @ryodeushii/ai-product-team-agents --update 2>/dev/null; true";
|
|
16
|
+
"bunx --bun --no-cache @ryodeushii/ai-product-team-agents --update 2>/dev/null; true";
|
|
17
17
|
|
|
18
18
|
interface SetupOptions {
|
|
19
19
|
projectName: string;
|
|
@@ -124,6 +124,7 @@ export async function setupProject(
|
|
|
124
124
|
framework,
|
|
125
125
|
project.models ?? {},
|
|
126
126
|
project.preset,
|
|
127
|
+
project.presets ?? {},
|
|
127
128
|
);
|
|
128
129
|
// inject or replace model: in frontmatter
|
|
129
130
|
if (content.startsWith("---")) {
|
package/templates/.agents.yml
CHANGED
|
@@ -19,42 +19,50 @@ autonomy: checkpoint # supervised | checkpoint | autonomous
|
|
|
19
19
|
# Deployment target (used by devops agent)
|
|
20
20
|
# deploy: vercel # vercel | fly | aws | gcp | docker | k8s
|
|
21
21
|
|
|
22
|
-
# ─── Model
|
|
22
|
+
# ─── Model configuration ─────────────────────────────────────────────────────
|
|
23
23
|
#
|
|
24
24
|
# Resolution order (highest → lowest priority):
|
|
25
|
-
# 1. models.roles.<role>
|
|
26
|
-
# 2. models.defaults.<tier>
|
|
27
|
-
# 3.
|
|
28
|
-
# 4. framework
|
|
29
|
-
# 5. framework tier default
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
# preset:
|
|
34
|
-
#
|
|
35
|
-
#
|
|
25
|
+
# 1. models.roles.<role> — this project, specific role
|
|
26
|
+
# 2. models.defaults.<tier> — this project, whole tier
|
|
27
|
+
# 3. presets.<selected>.<tier> — selected preset (project first, then built-in)
|
|
28
|
+
# 4. framework role default — models.yml roles section
|
|
29
|
+
# 5. framework tier default — models.yml defaults section
|
|
30
|
+
#
|
|
31
|
+
# ── Step 1: define your presets (optional) ──────────────────────────────────
|
|
32
|
+
#
|
|
33
|
+
# Built-in preset: "anthropic" (sonnet/haiku). Add your own here and they
|
|
34
|
+
# shadow built-ins of the same name.
|
|
35
|
+
#
|
|
36
|
+
# presets:
|
|
37
|
+
# google:
|
|
38
|
+
# thinking: google/gemini-2.5-pro
|
|
39
|
+
# executing: google/gemini-2.5-flash
|
|
40
|
+
# creative: google/gemini-2.5-pro
|
|
41
|
+
# openai:
|
|
42
|
+
# thinking: openai/gpt-4.1
|
|
43
|
+
# executing: openai/gpt-4.1-mini
|
|
44
|
+
# creative: openai/gpt-4.1
|
|
45
|
+
# fast:
|
|
46
|
+
# thinking: anthropic/claude-haiku-4-5-20251001
|
|
47
|
+
# executing: anthropic/claude-haiku-4-5-20251001
|
|
48
|
+
# creative: anthropic/claude-haiku-4-5-20251001
|
|
49
|
+
#
|
|
50
|
+
# ── Step 2: pick a preset ───────────────────────────────────────────────────
|
|
51
|
+
#
|
|
52
|
+
# preset: anthropic # built-in default
|
|
53
|
+
# preset: google # example project-defined preset above
|
|
54
|
+
#
|
|
55
|
+
# ── Step 3: fine-tune on top of the preset (optional) ───────────────────────
|
|
36
56
|
#
|
|
37
57
|
# models:
|
|
38
58
|
# defaults:
|
|
39
|
-
# thinking: anthropic/claude-sonnet-4-6 #
|
|
40
|
-
# executing: anthropic/claude-haiku-4-5-20251001
|
|
41
|
-
# creative: google/gemini-2.5-pro
|
|
59
|
+
# thinking: anthropic/claude-sonnet-4-6 # all thinking-tier roles
|
|
60
|
+
# executing: anthropic/claude-haiku-4-5-20251001
|
|
61
|
+
# creative: google/gemini-2.5-pro
|
|
42
62
|
# roles:
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
# reviewer: anthropic/claude-sonnet-4-6
|
|
47
|
-
# qa: anthropic/claude-sonnet-4-6
|
|
48
|
-
# devops: anthropic/claude-sonnet-4-6
|
|
49
|
-
# pm: anthropic/claude-sonnet-4-6
|
|
50
|
-
# explorer: anthropic/claude-haiku-4-5-20251001
|
|
51
|
-
# fixer: anthropic/claude-haiku-4-5-20251001
|
|
52
|
-
# seo: anthropic/claude-haiku-4-5-20251001
|
|
53
|
-
# designer: google/gemini-2.5-pro
|
|
54
|
-
# marketing: google/gemini-2.5-pro
|
|
55
|
-
# # local models via OpenCode:
|
|
56
|
-
# # explorer: local/qwen2.5-coder
|
|
57
|
-
# # fixer: local/qwen2.5-coder
|
|
63
|
+
# architect: anthropic/claude-sonnet-4-6 # one specific role
|
|
64
|
+
# explorer: local/qwen2.5-coder # local model via OpenCode
|
|
65
|
+
# designer: google/gemini-2.5-pro
|
|
58
66
|
|
|
59
67
|
# ─── Disable roles you don't need ───────────────────────────────────────────
|
|
60
68
|
# roles:
|