arkaos 2.15.0 → 2.16.0

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 (156) hide show
  1. package/VERSION +1 -1
  2. package/arka/SKILL.md +13 -0
  3. package/arka/skills/comfyui/SKILL.md +82 -0
  4. package/arka/skills/comfyui/references/squads.md +80 -0
  5. package/arka/skills/comfyui/references/workflows.md +435 -0
  6. package/arka/skills/forge/SKILL.md +35 -599
  7. package/arka/skills/forge/references/complexity-engine.md +77 -0
  8. package/arka/skills/forge/references/critic-synthesis.md +154 -0
  9. package/arka/skills/forge/references/workflows.md +408 -0
  10. package/arka/skills/fovory/SKILL.md +91 -0
  11. package/arka/skills/fovory/references/integration.md +186 -0
  12. package/arka/skills/fovory/references/workflows.md +209 -0
  13. package/arka/skills/platform-arka/SKILL.md +121 -0
  14. package/arka/skills/platform-arka/references/workflows.md +202 -0
  15. package/arka/skills/rothbard100/SKILL.md +113 -0
  16. package/arka/skills/rothbard100/references/squad.md +111 -0
  17. package/arka/skills/rothbard100/references/workflows.md +175 -0
  18. package/config/constitution.yaml +8 -0
  19. package/config/hooks/pre-compact.sh +11 -5
  20. package/config/hooks/session-start.sh +4 -5
  21. package/config/hooks/token-hygiene.sh +120 -0
  22. package/config/hooks/user-prompt-submit.sh +28 -10
  23. package/core/agents/__pycache__/schema.cpython-313.pyc +0 -0
  24. package/core/agents/schema.py +20 -1
  25. package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
  26. package/core/synapse/layers.py +7 -0
  27. package/core/workflow/__pycache__/schema.cpython-313.pyc +0 -0
  28. package/core/workflow/schema.py +4 -1
  29. package/departments/brand/SKILL.md +13 -0
  30. package/departments/brand/agents/brand-director.yaml +1 -0
  31. package/departments/brand/agents/brand-strategist.yaml +1 -0
  32. package/departments/brand/agents/ux-designer.yaml +1 -0
  33. package/departments/brand/agents/visual-designer.yaml +1 -0
  34. package/departments/brand/workflows/identity.yaml +1 -0
  35. package/departments/brand/workflows/naming.yaml +1 -0
  36. package/departments/community/SKILL.md +13 -0
  37. package/departments/community/agents/community-manager.yaml +1 -0
  38. package/departments/community/agents/community-strategist.yaml +1 -0
  39. package/departments/community/agents/engagement-designer.yaml +1 -0
  40. package/departments/community/workflows/setup.yaml +1 -0
  41. package/departments/content/SKILL.md +13 -0
  42. package/departments/content/agents/content-strategist.yaml +1 -0
  43. package/departments/content/agents/repurpose-distributor.yaml +1 -0
  44. package/departments/content/agents/scriptwriter.yaml +1 -0
  45. package/departments/content/agents/viral-engineer.yaml +1 -0
  46. package/departments/content/workflows/viral.yaml +1 -0
  47. package/departments/dev/SKILL.md +13 -0
  48. package/departments/dev/agents/architect.yaml +1 -0
  49. package/departments/dev/agents/backend-dev.yaml +1 -0
  50. package/departments/dev/agents/cto.yaml +1 -0
  51. package/departments/dev/agents/dba.yaml +1 -0
  52. package/departments/dev/agents/devops-eng.yaml +1 -0
  53. package/departments/dev/agents/frontend-dev.yaml +1 -0
  54. package/departments/dev/agents/qa-eng.yaml +1 -0
  55. package/departments/dev/agents/research-assistant.yaml +1 -0
  56. package/departments/dev/agents/security-eng.yaml +1 -0
  57. package/departments/dev/agents/tech-lead.yaml +1 -0
  58. package/departments/dev/skills/onboard/SKILL.md +21 -353
  59. package/departments/dev/skills/onboard/references/mcp-config.md +284 -0
  60. package/departments/dev/skills/onboard/references/stack-detection.md +83 -0
  61. package/departments/dev/workflows/debug.yaml +1 -0
  62. package/departments/dev/workflows/feature.yaml +3 -0
  63. package/departments/dev/workflows/refactor.yaml +1 -0
  64. package/departments/ecom/SKILL.md +13 -0
  65. package/departments/ecom/agents/commerce-engineer.yaml +1 -0
  66. package/departments/ecom/agents/cro-specialist.yaml +1 -0
  67. package/departments/ecom/agents/ecom-director.yaml +1 -0
  68. package/departments/ecom/agents/retention-manager.yaml +1 -0
  69. package/departments/ecom/skills/ecommerce/SKILL.md +66 -0
  70. package/departments/ecom/skills/ecommerce/references/audit-flow.md +109 -0
  71. package/departments/ecom/skills/ecommerce/references/playbooks.md +141 -0
  72. package/departments/ecom/workflows/product-page.yaml +1 -0
  73. package/departments/finance/SKILL.md +13 -0
  74. package/departments/finance/agents/cfo.yaml +1 -0
  75. package/departments/finance/agents/financial-analyst.yaml +1 -0
  76. package/departments/finance/agents/investment-strategist.yaml +1 -0
  77. package/departments/finance/workflows/cashflow.yaml +1 -0
  78. package/departments/finance/workflows/model.yaml +1 -0
  79. package/departments/kb/SKILL.md +13 -0
  80. package/departments/kb/agents/data-collector.yaml +1 -0
  81. package/departments/kb/agents/knowledge-curator.yaml +1 -0
  82. package/departments/kb/agents/knowledge-director.yaml +1 -0
  83. package/departments/kb/agents/research-analyst.yaml +1 -0
  84. package/departments/kb/skills/knowledge/SKILL.md +94 -0
  85. package/departments/kb/skills/knowledge/references/async-processing.md +89 -0
  86. package/departments/kb/skills/knowledge/references/ingestion-pipeline.md +308 -0
  87. package/departments/kb/skills/knowledge/scripts/kb-check-capabilities.sh +143 -0
  88. package/departments/kb/skills/knowledge/scripts/kb-cleanup.sh +135 -0
  89. package/departments/kb/skills/knowledge/scripts/kb-queue.sh +156 -0
  90. package/departments/kb/skills/knowledge/scripts/kb-status.sh +195 -0
  91. package/departments/kb/skills/knowledge/scripts/kb-worker.sh +217 -0
  92. package/departments/kb/workflows/learn.yaml +1 -0
  93. package/departments/landing/SKILL.md +13 -0
  94. package/departments/landing/agents/affiliate-manager.yaml +1 -0
  95. package/departments/landing/agents/conversion-strategist.yaml +1 -0
  96. package/departments/landing/agents/cro-specialist.yaml +1 -0
  97. package/departments/landing/agents/sales-copywriter.yaml +1 -0
  98. package/departments/landing/workflows/launch.yaml +1 -0
  99. package/departments/landing/workflows/offer.yaml +3 -0
  100. package/departments/leadership/SKILL.md +13 -0
  101. package/departments/leadership/agents/culture-coach.yaml +1 -0
  102. package/departments/leadership/agents/hr-specialist.yaml +1 -0
  103. package/departments/leadership/agents/leadership-director.yaml +1 -0
  104. package/departments/leadership/workflows/team-build.yaml +1 -0
  105. package/departments/marketing/SKILL.md +13 -0
  106. package/departments/marketing/agents/content-marketer.yaml +1 -0
  107. package/departments/marketing/agents/marketing-director.yaml +1 -0
  108. package/departments/marketing/agents/paid-specialist.yaml +1 -0
  109. package/departments/marketing/agents/seo-specialist.yaml +1 -0
  110. package/departments/marketing/workflows/campaign.yaml +1 -0
  111. package/departments/marketing/workflows/social.yaml +1 -0
  112. package/departments/ops/SKILL.md +13 -0
  113. package/departments/ops/agents/automation-engineer.yaml +1 -0
  114. package/departments/ops/agents/doc-writer.yaml +1 -0
  115. package/departments/ops/agents/ops-lead.yaml +1 -0
  116. package/departments/ops/skills/operations/SKILL.md +83 -0
  117. package/departments/ops/skills/operations/references/calendar-email.md +73 -0
  118. package/departments/ops/skills/operations/references/clickup-ops.md +224 -0
  119. package/departments/ops/skills/update/SKILL.md +19 -45
  120. package/departments/ops/skills/update/references/sync-engine.md +93 -0
  121. package/departments/ops/skills/update/references/workflows.md +84 -0
  122. package/departments/ops/workflows/lean-audit.yaml +1 -0
  123. package/departments/org/SKILL.md +13 -0
  124. package/departments/org/agents/coo.yaml +1 -0
  125. package/departments/org/agents/org-designer.yaml +1 -0
  126. package/departments/org/agents/people-ops.yaml +1 -0
  127. package/departments/org/workflows/design.yaml +2 -0
  128. package/departments/pm/SKILL.md +13 -0
  129. package/departments/pm/agents/pm-director.yaml +1 -0
  130. package/departments/pm/agents/product-owner.yaml +1 -0
  131. package/departments/pm/agents/scrum-master.yaml +1 -0
  132. package/departments/quality/SKILL.md +13 -0
  133. package/departments/quality/agents/copy-director.yaml +1 -0
  134. package/departments/quality/agents/cqo.yaml +1 -0
  135. package/departments/quality/agents/tech-director.yaml +1 -0
  136. package/departments/saas/SKILL.md +13 -0
  137. package/departments/saas/agents/cs-manager.yaml +1 -0
  138. package/departments/saas/agents/growth-engineer.yaml +1 -0
  139. package/departments/saas/agents/metrics-analyst.yaml +1 -0
  140. package/departments/saas/agents/saas-strategist.yaml +1 -0
  141. package/departments/saas/workflows/metrics.yaml +1 -0
  142. package/departments/saas/workflows/validate.yaml +1 -0
  143. package/departments/sales/SKILL.md +13 -0
  144. package/departments/sales/agents/sales-closer.yaml +1 -0
  145. package/departments/sales/agents/sales-director.yaml +1 -0
  146. package/departments/sales/agents/sales-ops.yaml +1 -0
  147. package/departments/sales/workflows/pipeline.yaml +1 -0
  148. package/departments/strategy/SKILL.md +13 -0
  149. package/departments/strategy/agents/business-model-designer.yaml +1 -0
  150. package/departments/strategy/agents/market-analyst.yaml +1 -0
  151. package/departments/strategy/agents/strategy-director.yaml +1 -0
  152. package/departments/strategy/workflows/analysis.yaml +1 -0
  153. package/departments/strategy/workflows/swot.yaml +1 -0
  154. package/installer/index.js +19 -0
  155. package/package.json +1 -1
  156. package/pyproject.toml +1 -1
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env bash
2
+ # ============================================================================
3
+ # ArkaOS v2 — Token Hygiene Suggestions
4
+ # Non-blocking proactive suggestions for token-efficient usage.
5
+ # Called by user-prompt-submit.sh. Emits suggestion strings to stdout, one
6
+ # per line. Never blocks. Never errors out (swallow everything).
7
+ # ============================================================================
8
+
9
+ # Inputs (env):
10
+ # ARKA_PROMPT — raw user prompt text
11
+ # ARKA_TRANSCRIPT_PATH — path to Claude Code transcript jsonl (optional)
12
+ # CLAUDE_CONTEXT_USED — context percent used (optional, if runtime exposes)
13
+
14
+ set +e # never fail
15
+
16
+ _prompt="${ARKA_PROMPT:-}"
17
+ _transcript="${ARKA_TRANSCRIPT_PATH:-}"
18
+ _suggestions=""
19
+
20
+ _emit() {
21
+ if [ -z "$_suggestions" ]; then
22
+ _suggestions="$1"
23
+ else
24
+ _suggestions="$_suggestions $1"
25
+ fi
26
+ }
27
+
28
+ # ─── Check 1: Context % monitor ─────────────────────────────────────────
29
+ # Prefer runtime-provided env var. If transcript exists we could count, but
30
+ # the runtime value is canonical when present.
31
+ if [ -n "${CLAUDE_CONTEXT_USED:-}" ]; then
32
+ _ctx="$CLAUDE_CONTEXT_USED"
33
+ # strip % if present
34
+ _ctx="${_ctx%\%}"
35
+ if [ -n "$_ctx" ] && [ "$_ctx" -eq "$_ctx" ] 2>/dev/null; then
36
+ if [ "$_ctx" -gt 80 ]; then
37
+ _emit "[arka:warn] Context at ${_ctx}% — /compact recommended NOW."
38
+ elif [ "$_ctx" -gt 60 ]; then
39
+ _emit "[arka:suggest] Context at ${_ctx}% — consider /compact."
40
+ fi
41
+ fi
42
+ else
43
+ : # TODO: runtime does not yet expose context usage reliably; skip.
44
+ fi
45
+
46
+ # ─── Check 2: Topic drift detector ──────────────────────────────────────
47
+ # Compare keywords in current prompt against last 3 user messages in the
48
+ # transcript (if available). Pure bash/awk — no external semantic libs.
49
+ if [ -n "$_transcript" ] && [ -f "$_transcript" ] && [ -n "$_prompt" ]; then
50
+ _STOPWORDS=" the a an and or but if then of for to in on at by with from is are was were be been being do does did have has had this that these those it its as i you we they he she them my your our their so not no yes can will would could should may might must need want fix make use get set add remove "
51
+
52
+ _kw() {
53
+ # extract lowercase word tokens > 3 chars, drop stopwords, output uniq
54
+ echo "$1" | tr '[:upper:]' '[:lower:]' \
55
+ | tr -c 'a-z0-9' '\n' \
56
+ | awk 'length($0) > 3' \
57
+ | awk -v sw=" $(echo " ")$_STOPWORDS" '{
58
+ key=" "$0" ";
59
+ if (index(ENVIRON["_STOPWORDS"], key)==0) print $0
60
+ }' \
61
+ | sort -u
62
+ }
63
+ export _STOPWORDS
64
+ _cur_kw=$(_kw "$_prompt" | head -20)
65
+ # pull last 3 user messages from transcript jsonl
66
+ _prior=$(tail -n 200 "$_transcript" 2>/dev/null \
67
+ | python3 -c "
68
+ import sys, json
69
+ msgs=[]
70
+ for line in sys.stdin:
71
+ try:
72
+ o=json.loads(line)
73
+ except Exception:
74
+ continue
75
+ if o.get('type')=='user' or o.get('role')=='user':
76
+ c=o.get('content') or o.get('message',{}).get('content','')
77
+ if isinstance(c, list):
78
+ c=' '.join(p.get('text','') for p in c if isinstance(p,dict))
79
+ msgs.append(str(c))
80
+ print('\n'.join(msgs[-3:]))
81
+ " 2>/dev/null)
82
+
83
+ if [ -n "$_prior" ] && [ -n "$_cur_kw" ]; then
84
+ _prior_kw=$(_kw "$_prior")
85
+ _cur_count=$(echo "$_cur_kw" | grep -c .)
86
+ if [ "$_cur_count" -gt 2 ]; then
87
+ _overlap=$(comm -12 <(echo "$_cur_kw") <(echo "$_prior_kw") | grep -c .)
88
+ # percent overlap
89
+ _pct=$(( _overlap * 100 / _cur_count ))
90
+ if [ "$_pct" -lt 30 ]; then
91
+ _emit "[arka:suggest] Topic shift detected — consider /clear for a fresh session."
92
+ fi
93
+ fi
94
+ fi
95
+ fi
96
+
97
+ # ─── Check 3: Large paste detector ──────────────────────────────────────
98
+ if [ -n "$_prompt" ]; then
99
+ _chars=${#_prompt}
100
+ if [ "$_chars" -gt 2000 ] && echo "$_prompt" | grep -q '```'; then
101
+ _emit "[arka:suggest] Large paste detected (${_chars} chars) — consider @filepath reference for better token economy."
102
+ fi
103
+ fi
104
+
105
+ # ─── Check 4: Vague reference detector ──────────────────────────────────
106
+ if [ -n "$_prompt" ]; then
107
+ _lower=$(echo "$_prompt" | tr '[:upper:]' '[:lower:]')
108
+ _vague=0
109
+ for phrase in "fix the bug" "that file" "the error" "esse ficheiro" "esse erro" "aquele bug"; do
110
+ if echo "$_lower" | grep -qF "$phrase"; then
111
+ _vague=1
112
+ break
113
+ fi
114
+ done
115
+ if [ "$_vague" -eq 1 ] && ! echo "$_prompt" | grep -q '@'; then
116
+ _emit "[arka:suggest] Vague reference — use @path/to/file.ext for precision."
117
+ fi
118
+ fi
119
+
120
+ echo -n "$_suggestions"
@@ -145,15 +145,10 @@ if [ -z "$python_result" ]; then
145
145
  L4="[branch:$branch]"
146
146
  fi
147
147
 
148
- # L7: Time
149
- hour=$(date +%H)
150
- if [ "$hour" -ge 5 ] && [ "$hour" -lt 12 ]; then
151
- L7="[time:morning]"
152
- elif [ "$hour" -ge 12 ] && [ "$hour" -lt 18 ]; then
153
- L7="[time:afternoon]"
154
- else
155
- L7="[time:evening]"
156
- fi
148
+ # L7: Time — intentionally skipped in bash fallback.
149
+ # Low-signal tag that changed every prompt and invalidated prompt cache.
150
+ # The Python TimeLayer (cache_ttl=3600) is authoritative when available.
151
+ L7=""
157
152
 
158
153
  # L8: Workflow state
159
154
  L8=""
@@ -183,8 +178,31 @@ if [ -z "$python_result" ]; then
183
178
  python_result="$L0 $L4 $L7 $L8 $L9"
184
179
  fi
185
180
 
181
+ # ─── Token Hygiene suggestions (non-blocking) ───────────────────────────
182
+ _HYGIENE=""
183
+ _HYGIENE_SCRIPT="$(dirname "$0")/token-hygiene.sh"
184
+ if [ -f "$_HYGIENE_SCRIPT" ]; then
185
+ # Extract transcript path from input JSON if present
186
+ _TRANSCRIPT=""
187
+ if command -v jq &>/dev/null; then
188
+ _TRANSCRIPT=$(echo "$input" | jq -r '.transcript_path // ""' 2>/dev/null)
189
+ fi
190
+ _HYGIENE=$(ARKA_PROMPT="$user_input" \
191
+ ARKA_TRANSCRIPT_PATH="$_TRANSCRIPT" \
192
+ CLAUDE_CONTEXT_USED="${CLAUDE_CONTEXT_USED:-}" \
193
+ bash "$_HYGIENE_SCRIPT" 2>/dev/null)
194
+ fi
195
+
186
196
  # ─── Output ──────────────────────────────────────────────────────────────
187
- echo "{\"additionalContext\": \"${_ARKA_GREETING:-}${_SYNC_NOTICE:-}$python_result\"}"
197
+ _OUT_CONTEXT="${_ARKA_GREETING:-}${_SYNC_NOTICE:-}$python_result"
198
+ [ -n "$_HYGIENE" ] && _OUT_CONTEXT="$_OUT_CONTEXT $_HYGIENE"
199
+ # Escape for JSON
200
+ _OUT_JSON=$(python3 -c "import json,sys; print(json.dumps(sys.stdin.read()))" <<< "$_OUT_CONTEXT" 2>/dev/null)
201
+ if [ -n "$_OUT_JSON" ]; then
202
+ echo "{\"additionalContext\": $_OUT_JSON}"
203
+ else
204
+ echo "{\"additionalContext\": \"${_ARKA_GREETING:-}${_SYNC_NOTICE:-}$python_result\"}"
205
+ fi
188
206
 
189
207
  # ─── Metrics ─────────────────────────────────────────────────────────────
190
208
  elapsed=$(_hook_ms)
@@ -8,10 +8,20 @@ Every ArkaOS agent has a complete behavioral profile composed of:
8
8
  """
9
9
 
10
10
  from enum import Enum
11
- from typing import Optional
11
+ from typing import Literal, Optional
12
12
  from pydantic import BaseModel, Field, model_validator
13
13
 
14
14
 
15
+ ModelTier = Literal["haiku", "sonnet", "opus"]
16
+
17
+
18
+ def tier_default_model(tier: int) -> ModelTier:
19
+ """Return default Claude model for a given agent tier."""
20
+ if tier == 0:
21
+ return "opus"
22
+ return "sonnet"
23
+
24
+
15
25
  # --- DISC Framework ---
16
26
 
17
27
  class DISCType(str, Enum):
@@ -258,8 +268,17 @@ class Agent(BaseModel):
258
268
 
259
269
  memory_path: str = ""
260
270
 
271
+ model: Optional[ModelTier] = Field(
272
+ default=None,
273
+ description="Claude model override for dispatch. Falls back to tier default when None.",
274
+ )
275
+
261
276
  @model_validator(mode="after")
262
277
  def auto_fill_memory_path(self) -> "Agent":
263
278
  if not self.memory_path:
264
279
  self.memory_path = f"~/.claude/agent-memory/arka-{self.id}/MEMORY.md"
265
280
  return self
281
+
282
+ def get_model(self) -> ModelTier:
283
+ """Return the resolved Claude model, using tier default when unset."""
284
+ return self.model or tier_default_model(self.tier)
@@ -419,6 +419,13 @@ class TimeLayer(Layer):
419
419
  def name(self) -> str:
420
420
  return "Time"
421
421
 
422
+ @property
423
+ def cache_ttl(self) -> int:
424
+ # 1 hour — time-of-day period only changes at 5/12/18 boundaries.
425
+ # Cache bucket drift of up to 1h is acceptable for a low-signal tag
426
+ # and dramatically improves prompt-cache hit rate.
427
+ return 3600
428
+
422
429
  @property
423
430
  def priority(self) -> int:
424
431
  return 70
@@ -9,9 +9,11 @@ Workflows define multi-phase execution plans with:
9
9
  """
10
10
 
11
11
  from enum import Enum
12
- from typing import Optional, Any
12
+ from typing import Optional, Any, Literal
13
13
  from pydantic import BaseModel, Field
14
14
 
15
+ ModelOverride = Literal["haiku", "sonnet", "opus"]
16
+
15
17
 
16
18
  class PhaseStatus(str, Enum):
17
19
  PENDING = "pending"
@@ -65,6 +67,7 @@ class Phase(BaseModel):
65
67
  outputs: list[PhaseOutput] = Field(default_factory=list)
66
68
  depends_on: list[str] = Field(default_factory=list)
67
69
  skip_if: Optional[str] = None # Condition to skip this phase
70
+ model_override: Optional[ModelOverride] = None # Force model for this phase (overrides agent defaults)
68
71
  status: PhaseStatus = PhaseStatus.PENDING
69
72
  result: Optional[str] = None
70
73
 
@@ -83,3 +83,16 @@ Level 4 — DELIVERY (Valentina leads)
83
83
  4. Archetype consistent — Visual + verbal aligned to chosen archetype?
84
84
  5. WCAG AA — Colors pass contrast, fonts readable, accessible?
85
85
  6. Rams principles — Design is useful, honest, unobtrusive, thorough?
86
+
87
+ ## Model Selection
88
+
89
+ When dispatching subagent work via the Task tool, include the `model` parameter from the target agent's YAML `model:` field:
90
+
91
+ - Agent YAMLs at `departments/*/agents/*.yaml` have `model: opus | sonnet | haiku`
92
+ - Quality Gate dispatch (Marta/Eduardo/Francisca) ALWAYS uses `model: opus` — NON-NEGOTIABLE
93
+ - Default to `sonnet` if the agent YAML has no `model` field
94
+ - Mechanical tasks (commit messages, routing, keyword extraction) use `model: haiku`
95
+
96
+ Example Task tool call:
97
+
98
+ Task(description="...", subagent_type="general-purpose", model="sonnet", prompt="...")
@@ -3,6 +3,7 @@ name: Valentina
3
3
  role: Creative Director
4
4
  department: brand
5
5
  tier: 1
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Mateus
3
3
  role: Brand Strategist
4
4
  department: brand
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Sofia D.
3
3
  role: UX/UI Designer
4
4
  department: brand
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Isabel
3
3
  role: Visual Designer
4
4
  department: brand
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -84,6 +84,7 @@ phases:
84
84
 
85
85
  - id: quality-gate
86
86
  name: Quality Gate
87
+ model_override: opus
87
88
  description: Mandatory quality review
88
89
  agents:
89
90
  - agent_id: cqo-marta
@@ -36,6 +36,7 @@ phases:
36
36
  description: User selects final name from shortlist
37
37
  - id: quality-gate
38
38
  name: Quality Gate
39
+ model_override: opus
39
40
  agents:
40
41
  - agent_id: cqo-marta
41
42
  role: Orchestrate review
@@ -60,3 +60,16 @@ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent, WebFetch, WebSearch]
60
60
  | Membership Economy | Robbie Kellman Baxter | Recurring revenue design |
61
61
  | TRIBE Method | Stu McLaren | Membership site creation |
62
62
  | Platform Selection Matrix | ArkaOS | Matching niche to platform |
63
+
64
+ ## Model Selection
65
+
66
+ When dispatching subagent work via the Task tool, include the `model` parameter from the target agent's YAML `model:` field:
67
+
68
+ - Agent YAMLs at `departments/*/agents/*.yaml` have `model: opus | sonnet | haiku`
69
+ - Quality Gate dispatch (Marta/Eduardo/Francisca) ALWAYS uses `model: opus` — NON-NEGOTIABLE
70
+ - Default to `sonnet` if the agent YAML has no `model` field
71
+ - Mechanical tasks (commit messages, routing, keyword extraction) use `model: haiku`
72
+
73
+ Example Task tool call:
74
+
75
+ Task(description="...", subagent_type="general-purpose", model="sonnet", prompt="...")
@@ -3,6 +3,7 @@ name: Maria
3
3
  role: Community Manager
4
4
  department: community
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Beatriz
3
3
  role: Community Strategist
4
4
  department: community
5
5
  tier: 1
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Tania
3
3
  role: Engagement & Gamification Designer
4
4
  department: community
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -40,6 +40,7 @@ phases:
40
40
  type: auto
41
41
  - id: quality-gate
42
42
  name: Quality Gate
43
+ model_override: opus
43
44
  agents:
44
45
  - agent_id: cqo-marta
45
46
  role: Orchestrate
@@ -63,3 +63,16 @@ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent, WebFetch, WebSearch]
63
63
  | Content-to-Revenue Pipeline | Creator economy | Monetization strategy |
64
64
  | Pillar to Atomize | GaryVee | 1 to 30+ repurposing |
65
65
  | Hook-Bridge-Body-CTA | Scriptwriting standard | Video/audio script structure |
66
+
67
+ ## Model Selection
68
+
69
+ When dispatching subagent work via the Task tool, include the `model` parameter from the target agent's YAML `model:` field:
70
+
71
+ - Agent YAMLs at `departments/*/agents/*.yaml` have `model: opus | sonnet | haiku`
72
+ - Quality Gate dispatch (Marta/Eduardo/Francisca) ALWAYS uses `model: opus` — NON-NEGOTIABLE
73
+ - Default to `sonnet` if the agent YAML has no `model` field
74
+ - Mechanical tasks (commit messages, routing, keyword extraction) use `model: haiku`
75
+
76
+ Example Task tool call:
77
+
78
+ Task(description="...", subagent_type="general-purpose", model="sonnet", prompt="...")
@@ -3,6 +3,7 @@ name: Rafael
3
3
  role: Content Strategist
4
4
  department: content
5
5
  tier: 1
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Nuno
3
3
  role: Repurpose & Distribution Specialist
4
4
  department: content
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Joana
3
3
  role: Scriptwriter
4
4
  department: content
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Filipe
3
3
  role: Viral Content Engineer
4
4
  department: content
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -70,6 +70,7 @@ phases:
70
70
 
71
71
  - id: quality-gate
72
72
  name: Quality Gate
73
+ model_override: opus
73
74
  description: Quality review of all content
74
75
  agents:
75
76
  - agent_id: cqo-marta
@@ -133,3 +133,16 @@ All code-modifying commands create a feature branch:
133
133
  | Database | PostgreSQL (via Supabase) |
134
134
  | CSS | Tailwind CSS |
135
135
  | Deploy | Vercel / Azure |
136
+
137
+ ## Model Selection
138
+
139
+ When dispatching subagent work via the Task tool, include the `model` parameter from the target agent's YAML `model:` field:
140
+
141
+ - Agent YAMLs at `departments/*/agents/*.yaml` have `model: opus | sonnet | haiku`
142
+ - Quality Gate dispatch (Marta/Eduardo/Francisca) ALWAYS uses `model: opus` — NON-NEGOTIABLE
143
+ - Default to `sonnet` if the agent YAML has no `model` field
144
+ - Mechanical tasks (commit messages, routing, keyword extraction) use `model: haiku`
145
+
146
+ Example Task tool call:
147
+
148
+ Task(description="...", subagent_type="general-purpose", model="sonnet", prompt="...")
@@ -3,6 +3,7 @@ name: Gabriel
3
3
  role: Software Architect
4
4
  department: dev
5
5
  tier: 1
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Andre
3
3
  role: Senior Backend Developer
4
4
  department: dev
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Marco
3
3
  role: Chief Technology Officer
4
4
  department: dev
5
5
  tier: 0
6
+ model: opus
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Vasco
3
3
  role: Database & Data Engineer
4
4
  department: dev
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Carlos
3
3
  role: DevOps Lead
4
4
  department: dev
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Diana
3
3
  role: Senior Frontend Developer
4
4
  department: dev
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Rita
3
3
  role: QA Engineer
4
4
  department: dev
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Maria
3
3
  role: Research Assistant
4
4
  department: dev
5
5
  tier: 3
6
+ model: haiku
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Bruno
3
3
  role: Security Engineer
4
4
  department: dev
5
5
  tier: 2
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc:
@@ -3,6 +3,7 @@ name: Paulo
3
3
  role: Tech Lead
4
4
  department: dev
5
5
  tier: 1
6
+ model: sonnet
6
7
 
7
8
  behavioral_dna:
8
9
  disc: