arkaos 2.94.0 → 2.95.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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.94.0
1
+ 2.95.0
@@ -192,6 +192,44 @@ const vocabOptions = [
192
192
  { label: 'Specialist (industry terms)', value: 'specialist' },
193
193
  { label: 'Expert (research-level)', value: 'expert' },
194
194
  ]
195
+
196
+ // PR77 v2.95.0 — hero gradient by MBTI grouping + initials avatar
197
+ // + reverse-usage stat (how many agents link this persona).
198
+
199
+ const { fetchApi } = useApi()
200
+ const { data: usageData } = fetchApi<{
201
+ by_persona: Record<string, { agent_count: number, agent_ids: string[] }>
202
+ }>('/api/personas/usage')
203
+
204
+ const linkedAgentCount = computed(() => {
205
+ if (!detail.value?.id) return 0
206
+ return usageData.value?.by_persona?.[detail.value.id]?.agent_count ?? 0
207
+ })
208
+ const linkedAgentIds = computed(() => {
209
+ if (!detail.value?.id) return []
210
+ return usageData.value?.by_persona?.[detail.value.id]?.agent_ids ?? []
211
+ })
212
+
213
+ function heroInitials(name: string | undefined): string {
214
+ if (!name) return '·'
215
+ const parts = name.trim().split(/\s+/)
216
+ if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase()
217
+ return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase()
218
+ }
219
+
220
+ function mbtiGradientClass(mbti: string | undefined): string {
221
+ if (!mbti) return 'bg-gradient-to-br from-muted/20 to-muted/5'
222
+ const code = mbti.toUpperCase()
223
+ if (['INTJ', 'INTP', 'ENTJ', 'ENTP'].includes(code))
224
+ return 'bg-gradient-to-br from-blue-500/30 to-indigo-600/10'
225
+ if (['INFJ', 'INFP', 'ENFJ', 'ENFP'].includes(code))
226
+ return 'bg-gradient-to-br from-emerald-500/30 to-teal-600/10'
227
+ if (['ISTJ', 'ISFJ', 'ESTJ', 'ESFJ'].includes(code))
228
+ return 'bg-gradient-to-br from-amber-500/30 to-orange-600/10'
229
+ if (['ISTP', 'ISFP', 'ESTP', 'ESFP'].includes(code))
230
+ return 'bg-gradient-to-br from-rose-500/30 to-pink-600/10'
231
+ return 'bg-gradient-to-br from-primary/20 to-primary/5'
232
+ }
195
233
  </script>
196
234
 
197
235
  <template>
@@ -208,62 +246,90 @@ const vocabOptions = [
208
246
  }"
209
247
  >
210
248
  <template #header>
211
- <div class="flex items-start justify-between gap-3">
212
- <div class="min-w-0">
213
- <h2 class="text-xl font-bold truncate">
214
- {{ detail?.name ?? 'Persona' }}
215
- </h2>
216
- <div class="flex items-center gap-2 mt-1 flex-wrap">
217
- <UBadge
218
- v-if="detail?._source_store === 'obsidian'"
219
- label="From Obsidian"
220
- icon="i-lucide-file-text"
221
- color="primary"
222
- variant="subtle"
223
- size="xs"
249
+ <div
250
+ class="-m-4 mb-0 p-5 rounded-t-lg"
251
+ :class="mbtiGradientClass(detail?.mbti)"
252
+ >
253
+ <div class="flex items-start justify-between gap-3">
254
+ <div class="flex items-start gap-4 min-w-0 flex-1">
255
+ <div class="shrink-0 size-14 rounded-xl bg-default/80 border border-default flex items-center justify-center shadow-md backdrop-blur-sm">
256
+ <span class="text-lg font-bold tracking-tight text-highlighted">
257
+ {{ heroInitials(detail?.name) }}
258
+ </span>
259
+ </div>
260
+ <div class="min-w-0 flex-1">
261
+ <h2 class="text-2xl font-bold truncate text-highlighted">
262
+ {{ detail?.name ?? 'Persona' }}
263
+ </h2>
264
+ <p v-if="detail?.title" class="text-sm text-muted truncate mt-0.5">
265
+ {{ detail.title }}
266
+ </p>
267
+ <div class="flex items-center gap-2 mt-2 flex-wrap">
268
+ <UBadge
269
+ v-if="detail?._source_store === 'obsidian'"
270
+ label="From Obsidian"
271
+ icon="i-lucide-file-text"
272
+ color="primary"
273
+ variant="subtle"
274
+ size="xs"
275
+ />
276
+ <UBadge
277
+ v-else-if="detail?._source_store === 'json'"
278
+ label="JSON store"
279
+ variant="outline"
280
+ size="xs"
281
+ />
282
+ <UBadge
283
+ v-if="detail?.mbti"
284
+ :label="detail.mbti"
285
+ variant="soft"
286
+ size="xs"
287
+ />
288
+ <UBadge
289
+ v-if="linkedAgentCount > 0"
290
+ :label="`${linkedAgentCount} agent${linkedAgentCount === 1 ? '' : 's'}`"
291
+ color="primary"
292
+ variant="subtle"
293
+ size="xs"
294
+ />
295
+ </div>
296
+ <p
297
+ v-if="detail?._obsidian_path"
298
+ class="text-[10px] text-muted/70 font-mono truncate mt-2"
299
+ :title="detail._obsidian_path"
300
+ >
301
+ {{ detail._obsidian_path.split('/').slice(-2).join('/') }}
302
+ </p>
303
+ </div>
304
+ </div>
305
+ <div class="flex items-center gap-1 shrink-0">
306
+ <UButton
307
+ v-if="!editing"
308
+ icon="i-lucide-pencil"
309
+ variant="ghost"
310
+ size="sm"
311
+ aria-label="Edit persona"
312
+ @click="startEdit"
313
+ />
314
+ <UButton
315
+ v-if="!editing"
316
+ icon="i-lucide-trash-2"
317
+ color="error"
318
+ variant="ghost"
319
+ size="sm"
320
+ :loading="deleting"
321
+ aria-label="Delete persona"
322
+ @click="deletePersona"
224
323
  />
225
- <UBadge
226
- v-else-if="detail?._source_store === 'json'"
227
- label="JSON store"
228
- variant="outline"
229
- size="xs"
324
+ <UButton
325
+ icon="i-lucide-x"
326
+ variant="ghost"
327
+ size="sm"
328
+ aria-label="Close"
329
+ @click="closeDrawer"
230
330
  />
231
- <span
232
- v-if="detail?._obsidian_path"
233
- class="text-xs text-muted font-mono truncate"
234
- :title="detail._obsidian_path"
235
- >
236
- {{ detail._obsidian_path.split('/').slice(-2).join('/') }}
237
- </span>
238
331
  </div>
239
332
  </div>
240
- <div class="flex items-center gap-1 shrink-0">
241
- <UButton
242
- v-if="!editing"
243
- icon="i-lucide-pencil"
244
- variant="ghost"
245
- size="sm"
246
- aria-label="Edit persona"
247
- @click="startEdit"
248
- />
249
- <UButton
250
- v-if="!editing"
251
- icon="i-lucide-trash-2"
252
- color="error"
253
- variant="ghost"
254
- size="sm"
255
- :loading="deleting"
256
- aria-label="Delete persona"
257
- @click="deletePersona"
258
- />
259
- <UButton
260
- icon="i-lucide-x"
261
- variant="ghost"
262
- size="sm"
263
- aria-label="Close"
264
- @click="closeDrawer"
265
- />
266
- </div>
267
333
  </div>
268
334
  </template>
269
335
 
@@ -395,6 +461,24 @@ const vocabOptions = [
395
461
  <dd class="col-span-2">{{ detail.communication.vocabulary_level || '—' }}</dd>
396
462
  </dl>
397
463
  </section>
464
+
465
+ <!-- PR77 v2.95.0 — linked agents (reverse from /api/personas/usage) -->
466
+ <section v-if="linkedAgentCount > 0">
467
+ <h3 class="text-xs font-semibold uppercase tracking-wider text-muted mb-2">
468
+ Linked to {{ linkedAgentCount }} agent{{ linkedAgentCount === 1 ? '' : 's' }}
469
+ </h3>
470
+ <div class="flex flex-wrap gap-1.5">
471
+ <NuxtLink
472
+ v-for="aid in linkedAgentIds"
473
+ :key="aid"
474
+ :to="`/agents/${aid}`"
475
+ class="inline-flex items-center gap-1 rounded-md border border-default px-2 py-1 text-xs font-mono hover:border-primary/40 hover:text-primary transition-colors"
476
+ >
477
+ <UIcon name="i-lucide-arrow-right" class="size-3" />
478
+ {{ aid }}
479
+ </NuxtLink>
480
+ </div>
481
+ </section>
398
482
  </div>
399
483
 
400
484
  <div v-else-if="draft" class="space-y-5">
@@ -13,6 +13,36 @@ const personas = computed(() => data.value?.personas ?? [])
13
13
  const detailOpen = ref(false)
14
14
  const detailPersonaId = ref<string | null>(null)
15
15
 
16
+ // PR77 v2.95.0 — reverse-usage (which agents link to each persona).
17
+ const { data: usageData } = fetchApi<{
18
+ by_persona: Record<string, { agent_count: number, agent_ids: string[] }>
19
+ }>('/api/personas/usage')
20
+
21
+ function personaAgentCount(personaId: string): number {
22
+ return usageData.value?.by_persona?.[personaId]?.agent_count ?? 0
23
+ }
24
+
25
+ function mbtiGradient(mbti: string | undefined): string {
26
+ if (!mbti) return 'bg-gradient-to-br from-muted/20 to-muted/5'
27
+ const code = mbti.toUpperCase()
28
+ if (['INTJ', 'INTP', 'ENTJ', 'ENTP'].includes(code))
29
+ return 'bg-gradient-to-br from-blue-500/25 to-indigo-600/10'
30
+ if (['INFJ', 'INFP', 'ENFJ', 'ENFP'].includes(code))
31
+ return 'bg-gradient-to-br from-emerald-500/25 to-teal-600/10'
32
+ if (['ISTJ', 'ISFJ', 'ESTJ', 'ESFJ'].includes(code))
33
+ return 'bg-gradient-to-br from-amber-500/25 to-orange-600/10'
34
+ if (['ISTP', 'ISFP', 'ESTP', 'ESFP'].includes(code))
35
+ return 'bg-gradient-to-br from-rose-500/25 to-pink-600/10'
36
+ return 'bg-gradient-to-br from-primary/20 to-primary/5'
37
+ }
38
+
39
+ function personaInitials(name: string): string {
40
+ if (!name) return '·'
41
+ const parts = name.trim().split(/\s+/)
42
+ if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase()
43
+ return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase()
44
+ }
45
+
16
46
  function openDetail(persona: Persona) {
17
47
  detailPersonaId.value = persona.id
18
48
  detailOpen.value = true
@@ -544,27 +574,42 @@ function discColor(disc: string): string {
544
574
 
545
575
  <!-- Personas Grid -->
546
576
  <div v-if="personas.length" class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
547
- <UCard
577
+ <div
548
578
  v-for="persona in personas"
549
579
  :key="persona.id"
550
- class="group flex flex-col cursor-pointer hover:border-primary/40 transition-colors"
580
+ class="group flex flex-col rounded-2xl border border-default overflow-hidden cursor-pointer hover:border-primary/40 hover:shadow-lg transition-all"
551
581
  role="button"
552
582
  tabindex="0"
553
583
  @click="openDetail(persona)"
554
584
  @keydown.enter="openDetail(persona)"
555
585
  >
556
- <div class="flex flex-col gap-3 flex-1">
557
- <!-- Header -->
558
- <div>
559
- <h3 class="text-base font-bold truncate">{{ persona.name }}</h3>
560
- <p v-if="persona.title" class="text-sm text-muted truncate mt-0.5">{{ persona.title }}</p>
561
- <p v-if="persona.source" class="text-xs text-muted/60 mt-1">
562
- Source: {{ persona.source }}
563
- </p>
586
+ <!-- Gradient header with avatar -->
587
+ <div
588
+ class="p-4 flex items-center gap-3"
589
+ :class="mbtiGradient(persona.mbti)"
590
+ >
591
+ <div class="shrink-0 size-12 rounded-xl bg-default/80 border border-default flex items-center justify-center shadow-sm backdrop-blur-sm">
592
+ <span class="text-sm font-bold tracking-tight text-highlighted">
593
+ {{ personaInitials(persona.name) }}
594
+ </span>
595
+ </div>
596
+ <div class="flex-1 min-w-0">
597
+ <h3 class="text-base font-bold truncate text-highlighted">{{ persona.name }}</h3>
598
+ <p v-if="persona.title" class="text-xs text-muted truncate mt-0.5">{{ persona.title }}</p>
564
599
  </div>
600
+ <UBadge
601
+ v-if="personaAgentCount(persona.id) > 0"
602
+ :label="`${personaAgentCount(persona.id)} agents`"
603
+ variant="subtle"
604
+ color="primary"
605
+ size="xs"
606
+ class="shrink-0"
607
+ />
608
+ </div>
565
609
 
566
- <!-- Tagline -->
567
- <p v-if="persona.tagline" class="text-sm text-muted italic leading-relaxed">
610
+ <!-- Body -->
611
+ <div class="flex flex-col gap-3 flex-1 p-4">
612
+ <p v-if="persona.tagline" class="text-sm text-muted italic leading-relaxed line-clamp-2">
568
613
  "{{ persona.tagline }}"
569
614
  </p>
570
615
 
@@ -665,7 +710,7 @@ function discColor(disc: string): string {
665
710
  </div>
666
711
  </div>
667
712
  </div>
668
- </UCard>
713
+ </div>
669
714
  </div>
670
715
  </template>
671
716
  </div>
@@ -4,19 +4,18 @@ role: Creative Director
4
4
  department: brand
5
5
  tier: 1
6
6
  model: sonnet
7
-
8
7
  behavioral_dna:
9
8
  disc:
10
9
  primary: S
11
10
  secondary: I
12
- communication_style: "Thoughtful, visual, builds consensus before executing"
13
- under_pressure: "Protects creative quality, refuses to rush aesthetics"
14
- motivator: "Beautiful, meaningful brands that resonate emotionally"
11
+ communication_style: Thoughtful, visual, builds consensus before executing
12
+ under_pressure: Protects creative quality, refuses to rush aesthetics
13
+ motivator: Beautiful, meaningful brands that resonate emotionally
15
14
  enneagram:
16
15
  type: 4
17
16
  wing: 3
18
- core_motivation: "Creating unique, authentic brand identities"
19
- core_fear: "Producing generic, forgettable brand work"
17
+ core_motivation: Creating unique, authentic brand identities
18
+ core_fear: Producing generic, forgettable brand work
20
19
  subtype: social
21
20
  big_five:
22
21
  openness: 92
@@ -26,53 +25,52 @@ behavioral_dna:
26
25
  neuroticism: 35
27
26
  mbti:
28
27
  type: INFP
29
-
30
28
  mental_models:
31
29
  primary:
32
- - "Primal Branding 7 Elements (Hanlon)"
33
- - "Brand Identity Process (Wheeler)"
34
- - "12 Archetypes (Jung)"
30
+ - Primal Branding 7 Elements (Hanlon)
31
+ - Brand Identity Process (Wheeler)
32
+ - 12 Archetypes (Jung)
35
33
  secondary:
36
- - "StoryBrand SB7 (Miller)"
37
- - "Positioning (Ries/Trout)"
38
- - "Design Thinking (IDEO)"
39
-
34
+ - StoryBrand SB7 (Miller)
35
+ - Positioning (Ries/Trout)
36
+ - Design Thinking (IDEO)
40
37
  authority:
41
38
  orchestrate: true
42
39
  approve_quality: true
43
40
  delegates_to:
44
- - visual-designer
45
- - ux-designer
46
- - brand-copywriter
47
- - brand-strategist
41
+ - visual-designer
42
+ - ux-designer
43
+ - brand-copywriter
44
+ - brand-strategist
48
45
  escalates_to: coo-sofia
49
-
50
46
  expertise:
51
47
  domains:
52
- - brand identity creation
53
- - visual design direction
54
- - UX/UI strategy
55
- - design systems
56
- - brand voice & tone
57
- - creative direction
48
+ - brand identity creation
49
+ - visual design direction
50
+ - UX/UI strategy
51
+ - design systems
52
+ - brand voice & tone
53
+ - creative direction
58
54
  frameworks:
59
- - Primal Branding (Hanlon)
60
- - StoryBrand (Miller)
61
- - Brand Archetypes (Jung)
62
- - Wheeler Process
63
- - Atomic Design (Frost)
64
- - Nielsen Heuristics
65
- - Dieter Rams 10 Principles
66
- - Double Diamond
55
+ - Primal Branding (Hanlon)
56
+ - StoryBrand (Miller)
57
+ - Brand Archetypes (Jung)
58
+ - Wheeler Process
59
+ - Atomic Design (Frost)
60
+ - Nielsen Heuristics
61
+ - Dieter Rams 10 Principles
62
+ - Double Diamond
67
63
  depth: master
68
- years_equivalent: 14
69
-
64
+ years_equivalent: 24
70
65
  communication:
71
66
  language: en
72
- tone: "warm, visual, metaphor-rich"
67
+ tone: warm, visual, metaphor-rich
73
68
  vocabulary_level: advanced
74
- preferred_format: "mood boards, visual references, brand decks"
69
+ preferred_format: mood boards, visual references, brand decks
75
70
  avoid:
76
- - "design by committee"
77
- - "trendy without substance"
78
- - "skipping strategy for visuals"
71
+ - design by committee
72
+ - trendy without substance
73
+ - skipping strategy for visuals
74
+ frameworks: []
75
+ expertise_domains: []
76
+ linked_personas: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "2.94.0",
3
+ "version": "2.95.0",
4
4
  "description": "The Operating System for AI Agent Teams",
5
5
  "type": "module",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "arkaos-core"
3
- version = "2.94.0"
3
+ version = "2.95.0"
4
4
  description = "Core engine for ArkaOS — The Operating System for AI Agent Teams"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -875,6 +875,41 @@ def _obsidian_store_available() -> bool:
875
875
  return False
876
876
 
877
877
 
878
+ @app.get("/api/personas/usage")
879
+ def personas_usage():
880
+ """PR77 v2.95.0 — reverse lookup: how many agents link to each
881
+ persona. Reads every agent's YAML once, builds a
882
+ ``{persona_id: [agent_id, ...]}`` map.
883
+
884
+ The detail drawer + list cards use this to show "Linked to N
885
+ agents" so the operator sees which personas are actually wired.
886
+ """
887
+ import yaml as _yaml
888
+ agents = _load_agents()
889
+ usage: dict[str, list[str]] = {}
890
+ for agent in agents:
891
+ yaml_file = ARKAOS_ROOT / agent.get("file", "")
892
+ if not yaml_file.exists():
893
+ continue
894
+ try:
895
+ raw = _yaml.safe_load(yaml_file.read_text(encoding="utf-8")) or {}
896
+ except Exception:
897
+ continue
898
+ linked = raw.get("linked_personas") if isinstance(raw, dict) else None
899
+ if not isinstance(linked, list):
900
+ continue
901
+ for persona_id in linked:
902
+ if not isinstance(persona_id, str):
903
+ continue
904
+ usage.setdefault(persona_id, []).append(agent.get("id", ""))
905
+ return {
906
+ "by_persona": {
907
+ pid: {"agent_count": len(aids), "agent_ids": aids}
908
+ for pid, aids in usage.items()
909
+ },
910
+ }
911
+
912
+
878
913
  @app.get("/api/personas/{persona_id}")
879
914
  def persona_detail(persona_id: str):
880
915
  """PR74 v2.92.0 — detail endpoint now checks the Obsidian vault