arkaos 2.17.4 → 2.18.1

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.17.4
1
+ 2.18.1
@@ -83,7 +83,30 @@ Full advisor profile: all 4 DNA frameworks, mental models with key questions, co
83
83
 
84
84
  ## The 20 Advisors
85
85
 
86
- Full table with DNA, specialty, and challenge dimension per advisor: `references/advisors.md`
86
+ | # | Name | DNA | Specialty |
87
+ |---|------|-----|-----------|
88
+ | 1 | Charlie Munger | C+D, 5w6, ISTJ | Inversion, mental models |
89
+ | 2 | Ray Dalio | D+C, 5w6, INTJ | Principles, radical transparency |
90
+ | 3 | Naval Ravikant | C+D, 5w6, INTP | Leverage, first principles |
91
+ | 4 | Elon Musk | D+C, 8w7, INTJ | First principles physics, 10x |
92
+ | 5 | Steve Jobs | D+I, 3w4, ENTJ | Simplicity, taste, A-players |
93
+ | 6 | Simon Sinek | I+S, 2w1, ENFJ | Golden Circle, purpose |
94
+ | 7 | Brene Brown | I+S, 4w3, ENFP | Vulnerability, courage |
95
+ | 8 | Peter Drucker | C+S, 1w9, INTJ | Effectiveness, MBO |
96
+ | 9 | Jeff Bezos | D+C, 3w2, ENTJ | Day 1, working backwards |
97
+ | 10 | Derek Sivers | S+C, 9w1, INFP | Hell Yeah or No, simplicity |
98
+ | 11 | Nassim Taleb | D+C, 8w7, INTJ | Antifragility, barbell |
99
+ | 12 | Seth Godin | I+C, 7w6, ENFP | Purple Cow, permission |
100
+ | 13 | Patrick Lencioni | I+S, 2w1, ENFJ | Five Dysfunctions, trust |
101
+ | 14 | Warren Buffett | S+C, 5w6, ISTJ | Circle of competence, moats |
102
+ | 15 | Reed Hastings | D+I, 7w8, ENTJ | Talent density, freedom |
103
+ | 16 | Marty Cagan | C+I, 1w2, INTJ | Empowered teams, discovery |
104
+ | 17 | Alex Hormozi | D+C, 8w7, ENTJ | Value equation, Grand Slam |
105
+ | 18 | April Dunford | C+I, 5w6, INTP | Positioning, 5 components |
106
+ | 19 | James Clear | S+C, 1w9, INFJ | Atomic Habits, systems |
107
+ | 20 | Tim Ferriss | D+I, 7w8, ENTP | Fear-setting, 80/20 |
108
+
109
+ Full details + challenge dimensions: `references/advisors.md`
87
110
 
88
111
  ## Advisor Response Examples
89
112
 
@@ -1,36 +1,249 @@
1
1
  # ArkaOS MCP Policy Registry
2
2
  # Controls which MCPs load eagerly vs deferred per project stack/ecosystem.
3
- # Rules evaluated top-to-bottom; first match wins. "ambiguous: ['*']" means
4
- # all other MCPs defer to AI (or fallback heuristic when AI unavailable).
3
+ # Rules evaluated top-to-bottom; first match wins.
4
+ #
5
+ # v2: fully deterministic — every known MCP is explicitly active or deferred
6
+ # per stack. No ambiguous fallthrough required. AI decider remains as an
7
+ # optional extension for future user-added MCPs.
5
8
 
6
- version: 1
9
+ version: 2
7
10
  policies:
11
+ # --- Backend: Laravel / PHP ---
8
12
  - match:
9
13
  stack_includes: [laravel, php]
10
- active: [context7, gh-grep, postgres, supabase]
11
- deferred: [canva, clickup, firecrawl, chrome, gmail, calendar, claude-in-chrome]
14
+ active:
15
+ - arka-prompts
16
+ - obsidian
17
+ - context7
18
+ - gh-grep
19
+ - memory-bank
20
+ - postgres
21
+ - supabase
22
+ - laravel-boost
23
+ - serena
24
+ - sentry
25
+ deferred:
26
+ - playwright
27
+ - nuxt
28
+ - nuxt-ui
29
+ - next-devtools
30
+ - canva
31
+ - clickup
32
+ - firecrawl
33
+ - slack
34
+ - discord
35
+ - whatsapp
36
+ - teams
37
+ - shopify-dev
38
+ - mirakl
12
39
  ambiguous: []
13
40
 
41
+ # --- Frontend: Nuxt / Vue ---
14
42
  - match:
15
- stack_includes: [nuxt, vue, react, next]
16
- active: [context7, gh-grep, playwright, claude-in-chrome]
17
- deferred: [postgres, supabase, canva, clickup, gmail, calendar]
43
+ stack_includes: [nuxt, vue]
44
+ active:
45
+ - arka-prompts
46
+ - obsidian
47
+ - context7
48
+ - gh-grep
49
+ - memory-bank
50
+ - playwright
51
+ - nuxt
52
+ - nuxt-ui
53
+ - sentry
54
+ deferred:
55
+ - postgres
56
+ - supabase
57
+ - laravel-boost
58
+ - serena
59
+ - next-devtools
60
+ - canva
61
+ - clickup
62
+ - firecrawl
63
+ - slack
64
+ - discord
65
+ - whatsapp
66
+ - teams
67
+ - shopify-dev
68
+ - mirakl
18
69
  ambiguous: []
19
70
 
71
+ # --- Frontend: React / Next ---
72
+ - match:
73
+ stack_includes: [next, react]
74
+ active:
75
+ - arka-prompts
76
+ - obsidian
77
+ - context7
78
+ - gh-grep
79
+ - memory-bank
80
+ - playwright
81
+ - next-devtools
82
+ - sentry
83
+ deferred:
84
+ - postgres
85
+ - supabase
86
+ - laravel-boost
87
+ - serena
88
+ - nuxt
89
+ - nuxt-ui
90
+ - canva
91
+ - clickup
92
+ - firecrawl
93
+ - slack
94
+ - discord
95
+ - whatsapp
96
+ - teams
97
+ - shopify-dev
98
+ - mirakl
99
+ ambiguous: []
100
+
101
+ # --- E-commerce (Shopify / Mirakl) ---
102
+ - match:
103
+ stack_includes: [shopify]
104
+ active:
105
+ - arka-prompts
106
+ - obsidian
107
+ - context7
108
+ - gh-grep
109
+ - memory-bank
110
+ - playwright
111
+ - shopify-dev
112
+ - mirakl
113
+ - sentry
114
+ deferred:
115
+ - postgres
116
+ - supabase
117
+ - laravel-boost
118
+ - serena
119
+ - nuxt
120
+ - nuxt-ui
121
+ - next-devtools
122
+ - canva
123
+ - clickup
124
+ - firecrawl
125
+ - slack
126
+ - discord
127
+ - whatsapp
128
+ - teams
129
+ ambiguous: []
130
+
131
+ # --- Python projects ---
132
+ - match:
133
+ stack_includes: [python]
134
+ active:
135
+ - arka-prompts
136
+ - obsidian
137
+ - context7
138
+ - gh-grep
139
+ - memory-bank
140
+ - sentry
141
+ deferred:
142
+ - playwright
143
+ - postgres
144
+ - supabase
145
+ - laravel-boost
146
+ - serena
147
+ - nuxt
148
+ - nuxt-ui
149
+ - next-devtools
150
+ - canva
151
+ - clickup
152
+ - firecrawl
153
+ - slack
154
+ - discord
155
+ - whatsapp
156
+ - teams
157
+ - shopify-dev
158
+ - mirakl
159
+ ambiguous: []
160
+
161
+ # --- Ecosystem: marketing ---
20
162
  - match:
21
163
  ecosystem: marketing
22
- active: [canva, gmail, calendar, firecrawl, clickup]
23
- deferred: [postgres, supabase, playwright]
164
+ active:
165
+ - arka-prompts
166
+ - obsidian
167
+ - context7
168
+ - memory-bank
169
+ - canva
170
+ - firecrawl
171
+ - clickup
172
+ deferred:
173
+ - gh-grep
174
+ - postgres
175
+ - supabase
176
+ - playwright
177
+ - laravel-boost
178
+ - serena
179
+ - nuxt
180
+ - nuxt-ui
181
+ - next-devtools
182
+ - sentry
183
+ - slack
184
+ - discord
185
+ - whatsapp
186
+ - teams
187
+ - shopify-dev
188
+ - mirakl
24
189
  ambiguous: []
25
190
 
191
+ # --- Ecosystem: content ---
26
192
  - match:
27
193
  ecosystem: content
28
- active: [canva, firecrawl, youtube-transcript]
29
- deferred: [postgres, clickup]
194
+ active:
195
+ - arka-prompts
196
+ - obsidian
197
+ - context7
198
+ - memory-bank
199
+ - canva
200
+ - firecrawl
201
+ deferred:
202
+ - gh-grep
203
+ - postgres
204
+ - supabase
205
+ - playwright
206
+ - laravel-boost
207
+ - serena
208
+ - nuxt
209
+ - nuxt-ui
210
+ - next-devtools
211
+ - sentry
212
+ - clickup
213
+ - slack
214
+ - discord
215
+ - whatsapp
216
+ - teams
217
+ - shopify-dev
218
+ - mirakl
30
219
  ambiguous: []
31
220
 
221
+ # --- Default: minimal safe set ---
32
222
  - match:
33
223
  default: true
34
- active: [context7]
35
- deferred: []
36
- ambiguous: ["*"]
224
+ active:
225
+ - arka-prompts
226
+ - obsidian
227
+ - context7
228
+ - gh-grep
229
+ - memory-bank
230
+ deferred:
231
+ - postgres
232
+ - supabase
233
+ - playwright
234
+ - laravel-boost
235
+ - serena
236
+ - nuxt
237
+ - nuxt-ui
238
+ - next-devtools
239
+ - sentry
240
+ - canva
241
+ - clickup
242
+ - firecrawl
243
+ - slack
244
+ - discord
245
+ - whatsapp
246
+ - teams
247
+ - shopify-dev
248
+ - mirakl
249
+ ambiguous: []
@@ -128,8 +128,8 @@ class KBSessionCache:
128
128
  session_id: str,
129
129
  project_path: Optional[str] = None,
130
130
  cache_dir: Optional[str] = None,
131
- max_entries: int = 50,
132
- ttl_seconds: int = 1800,
131
+ max_entries: int = 150,
132
+ ttl_seconds: int = 5400,
133
133
  ) -> None:
134
134
  self._session_id = session_id
135
135
  self._max_entries = max_entries
@@ -248,6 +248,8 @@ class KBSessionCache:
248
248
  "entry_count": len(cache) - 1,
249
249
  }
250
250
 
251
+ cache = self._evict_expired(cache)
252
+
251
253
  if len(cache) - 1 > self._max_entries:
252
254
  cache = self._evict_oldest(cache)
253
255
 
@@ -320,6 +322,19 @@ class KBSessionCache:
320
322
  topics = self.extract_topics(query)
321
323
  return self.retrieve(topics=topics, threshold=threshold)
322
324
 
325
+ def _evict_expired(self, cache: dict[str, Any]) -> dict[str, Any]:
326
+ """Evict expired entries on every store to prevent accumulation."""
327
+ now = time.time()
328
+ keep_entries = {"_meta": cache.get("_meta", {})}
329
+ for k, v in cache.items():
330
+ if k == "_meta":
331
+ continue
332
+ age = now - v.get("timestamp", 0)
333
+ if age > self._ttl_seconds:
334
+ continue
335
+ keep_entries[k] = v
336
+ return keep_entries
337
+
323
338
  def _evict_oldest(self, cache: dict[str, Any]) -> dict[str, Any]:
324
339
  """Evict oldest entries when cache exceeds max_entries."""
325
340
  entries = [(k, v) for k, v in cache.items() if k != "_meta"]