behavior-os 0.1.0__tar.gz

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 (358) hide show
  1. behavior_os-0.1.0/.gitignore +60 -0
  2. behavior_os-0.1.0/CHANGELOG.md +45 -0
  3. behavior_os-0.1.0/CONTRIBUTING.md +70 -0
  4. behavior_os-0.1.0/PKG-INFO +12 -0
  5. behavior_os-0.1.0/README.md +268 -0
  6. behavior_os-0.1.0/README.zh.md +226 -0
  7. behavior_os-0.1.0/agentic_mindset/__init__.py +5 -0
  8. behavior_os-0.1.0/agentic_mindset/cli.py +504 -0
  9. behavior_os-0.1.0/agentic_mindset/context.py +264 -0
  10. behavior_os-0.1.0/agentic_mindset/fusion.py +103 -0
  11. behavior_os-0.1.0/agentic_mindset/ir/__init__.py +0 -0
  12. behavior_os-0.1.0/agentic_mindset/ir/conditions.py +31 -0
  13. behavior_os-0.1.0/agentic_mindset/ir/models.py +79 -0
  14. behavior_os-0.1.0/agentic_mindset/pack.py +77 -0
  15. behavior_os-0.1.0/agentic_mindset/registry.py +48 -0
  16. behavior_os-0.1.0/agentic_mindset/renderer/__init__.py +0 -0
  17. behavior_os-0.1.0/agentic_mindset/renderer/inject.py +146 -0
  18. behavior_os-0.1.0/agentic_mindset/resolver/__init__.py +0 -0
  19. behavior_os-0.1.0/agentic_mindset/resolver/policies.py +58 -0
  20. behavior_os-0.1.0/agentic_mindset/resolver/resolver.py +275 -0
  21. behavior_os-0.1.0/agentic_mindset/schema/__init__.py +20 -0
  22. behavior_os-0.1.0/agentic_mindset/schema/behavior.py +19 -0
  23. behavior_os-0.1.0/agentic_mindset/schema/meta.py +43 -0
  24. behavior_os-0.1.0/agentic_mindset/schema/mindset.py +37 -0
  25. behavior_os-0.1.0/agentic_mindset/schema/personality.py +110 -0
  26. behavior_os-0.1.0/agentic_mindset/schema/sources.py +26 -0
  27. behavior_os-0.1.0/agentic_mindset/schema/version.py +16 -0
  28. behavior_os-0.1.0/agentic_mindset/schema/voice.py +23 -0
  29. behavior_os-0.1.0/characters/achilles/behavior.yaml +19 -0
  30. behavior_os-0.1.0/characters/achilles/meta.yaml +6 -0
  31. behavior_os-0.1.0/characters/achilles/mindset.yaml +46 -0
  32. behavior_os-0.1.0/characters/achilles/personality.yaml +47 -0
  33. behavior_os-0.1.0/characters/achilles/sources.yaml +12 -0
  34. behavior_os-0.1.0/characters/achilles/voice.yaml +28 -0
  35. behavior_os-0.1.0/characters/ainz-ooal-gown/behavior.yaml +23 -0
  36. behavior_os-0.1.0/characters/ainz-ooal-gown/meta.yaml +6 -0
  37. behavior_os-0.1.0/characters/ainz-ooal-gown/mindset.yaml +47 -0
  38. behavior_os-0.1.0/characters/ainz-ooal-gown/personality.yaml +53 -0
  39. behavior_os-0.1.0/characters/ainz-ooal-gown/sources.yaml +11 -0
  40. behavior_os-0.1.0/characters/ainz-ooal-gown/voice.yaml +28 -0
  41. behavior_os-0.1.0/characters/aristotle/behavior.yaml +23 -0
  42. behavior_os-0.1.0/characters/aristotle/meta.yaml +17 -0
  43. behavior_os-0.1.0/characters/aristotle/mindset.yaml +51 -0
  44. behavior_os-0.1.0/characters/aristotle/personality.yaml +51 -0
  45. behavior_os-0.1.0/characters/aristotle/sources.yaml +13 -0
  46. behavior_os-0.1.0/characters/aristotle/voice.yaml +32 -0
  47. behavior_os-0.1.0/characters/athena/behavior.yaml +22 -0
  48. behavior_os-0.1.0/characters/athena/meta.yaml +6 -0
  49. behavior_os-0.1.0/characters/athena/mindset.yaml +47 -0
  50. behavior_os-0.1.0/characters/athena/personality.yaml +51 -0
  51. behavior_os-0.1.0/characters/athena/sources.yaml +13 -0
  52. behavior_os-0.1.0/characters/athena/voice.yaml +28 -0
  53. behavior_os-0.1.0/characters/atticus-finch/behavior.yaml +21 -0
  54. behavior_os-0.1.0/characters/atticus-finch/meta.yaml +18 -0
  55. behavior_os-0.1.0/characters/atticus-finch/mindset.yaml +63 -0
  56. behavior_os-0.1.0/characters/atticus-finch/personality.yaml +51 -0
  57. behavior_os-0.1.0/characters/atticus-finch/sources.yaml +13 -0
  58. behavior_os-0.1.0/characters/atticus-finch/voice.yaml +33 -0
  59. behavior_os-0.1.0/characters/attila-the-hun/behavior.yaml +21 -0
  60. behavior_os-0.1.0/characters/attila-the-hun/meta.yaml +6 -0
  61. behavior_os-0.1.0/characters/attila-the-hun/mindset.yaml +46 -0
  62. behavior_os-0.1.0/characters/attila-the-hun/personality.yaml +50 -0
  63. behavior_os-0.1.0/characters/attila-the-hun/sources.yaml +11 -0
  64. behavior_os-0.1.0/characters/attila-the-hun/voice.yaml +26 -0
  65. behavior_os-0.1.0/characters/cao-cao/behavior.yaml +24 -0
  66. behavior_os-0.1.0/characters/cao-cao/meta.yaml +6 -0
  67. behavior_os-0.1.0/characters/cao-cao/mindset.yaml +48 -0
  68. behavior_os-0.1.0/characters/cao-cao/personality.yaml +50 -0
  69. behavior_os-0.1.0/characters/cao-cao/sources.yaml +12 -0
  70. behavior_os-0.1.0/characters/cao-cao/voice.yaml +27 -0
  71. behavior_os-0.1.0/characters/cleopatra/behavior.yaml +19 -0
  72. behavior_os-0.1.0/characters/cleopatra/meta.yaml +17 -0
  73. behavior_os-0.1.0/characters/cleopatra/mindset.yaml +45 -0
  74. behavior_os-0.1.0/characters/cleopatra/personality.yaml +47 -0
  75. behavior_os-0.1.0/characters/cleopatra/sources.yaml +12 -0
  76. behavior_os-0.1.0/characters/cleopatra/voice.yaml +27 -0
  77. behavior_os-0.1.0/characters/confucius/behavior.yaml +22 -0
  78. behavior_os-0.1.0/characters/confucius/meta.yaml +17 -0
  79. behavior_os-0.1.0/characters/confucius/mindset.yaml +65 -0
  80. behavior_os-0.1.0/characters/confucius/personality.yaml +50 -0
  81. behavior_os-0.1.0/characters/confucius/sources.yaml +15 -0
  82. behavior_os-0.1.0/characters/confucius/voice.yaml +34 -0
  83. behavior_os-0.1.0/characters/doctor-faustus/behavior.yaml +22 -0
  84. behavior_os-0.1.0/characters/doctor-faustus/meta.yaml +6 -0
  85. behavior_os-0.1.0/characters/doctor-faustus/mindset.yaml +44 -0
  86. behavior_os-0.1.0/characters/doctor-faustus/personality.yaml +51 -0
  87. behavior_os-0.1.0/characters/doctor-faustus/sources.yaml +12 -0
  88. behavior_os-0.1.0/characters/doctor-faustus/voice.yaml +28 -0
  89. behavior_os-0.1.0/characters/frederick-the-great/behavior.yaml +22 -0
  90. behavior_os-0.1.0/characters/frederick-the-great/meta.yaml +17 -0
  91. behavior_os-0.1.0/characters/frederick-the-great/mindset.yaml +49 -0
  92. behavior_os-0.1.0/characters/frederick-the-great/personality.yaml +54 -0
  93. behavior_os-0.1.0/characters/frederick-the-great/sources.yaml +13 -0
  94. behavior_os-0.1.0/characters/frederick-the-great/voice.yaml +29 -0
  95. behavior_os-0.1.0/characters/genghis-khan/behavior.yaml +20 -0
  96. behavior_os-0.1.0/characters/genghis-khan/meta.yaml +17 -0
  97. behavior_os-0.1.0/characters/genghis-khan/mindset.yaml +50 -0
  98. behavior_os-0.1.0/characters/genghis-khan/personality.yaml +54 -0
  99. behavior_os-0.1.0/characters/genghis-khan/sources.yaml +11 -0
  100. behavior_os-0.1.0/characters/genghis-khan/voice.yaml +27 -0
  101. behavior_os-0.1.0/characters/gintoki-sakata/behavior.yaml +22 -0
  102. behavior_os-0.1.0/characters/gintoki-sakata/meta.yaml +6 -0
  103. behavior_os-0.1.0/characters/gintoki-sakata/mindset.yaml +45 -0
  104. behavior_os-0.1.0/characters/gintoki-sakata/personality.yaml +51 -0
  105. behavior_os-0.1.0/characters/gintoki-sakata/sources.yaml +11 -0
  106. behavior_os-0.1.0/characters/gintoki-sakata/voice.yaml +26 -0
  107. behavior_os-0.1.0/characters/gojo-satoru/behavior.yaml +20 -0
  108. behavior_os-0.1.0/characters/gojo-satoru/meta.yaml +18 -0
  109. behavior_os-0.1.0/characters/gojo-satoru/mindset.yaml +60 -0
  110. behavior_os-0.1.0/characters/gojo-satoru/personality.yaml +55 -0
  111. behavior_os-0.1.0/characters/gojo-satoru/sources.yaml +10 -0
  112. behavior_os-0.1.0/characters/gojo-satoru/voice.yaml +30 -0
  113. behavior_os-0.1.0/characters/guts/behavior.yaml +21 -0
  114. behavior_os-0.1.0/characters/guts/meta.yaml +6 -0
  115. behavior_os-0.1.0/characters/guts/mindset.yaml +46 -0
  116. behavior_os-0.1.0/characters/guts/personality.yaml +53 -0
  117. behavior_os-0.1.0/characters/guts/sources.yaml +10 -0
  118. behavior_os-0.1.0/characters/guts/voice.yaml +26 -0
  119. behavior_os-0.1.0/characters/hamlet/behavior.yaml +19 -0
  120. behavior_os-0.1.0/characters/hamlet/meta.yaml +6 -0
  121. behavior_os-0.1.0/characters/hamlet/mindset.yaml +47 -0
  122. behavior_os-0.1.0/characters/hamlet/personality.yaml +51 -0
  123. behavior_os-0.1.0/characters/hamlet/sources.yaml +9 -0
  124. behavior_os-0.1.0/characters/hamlet/voice.yaml +29 -0
  125. behavior_os-0.1.0/characters/itachi-uchiha/behavior.yaml +21 -0
  126. behavior_os-0.1.0/characters/itachi-uchiha/meta.yaml +6 -0
  127. behavior_os-0.1.0/characters/itachi-uchiha/mindset.yaml +45 -0
  128. behavior_os-0.1.0/characters/itachi-uchiha/personality.yaml +53 -0
  129. behavior_os-0.1.0/characters/itachi-uchiha/sources.yaml +11 -0
  130. behavior_os-0.1.0/characters/itachi-uchiha/voice.yaml +28 -0
  131. behavior_os-0.1.0/characters/julius-caesar/behavior.yaml +23 -0
  132. behavior_os-0.1.0/characters/julius-caesar/meta.yaml +18 -0
  133. behavior_os-0.1.0/characters/julius-caesar/mindset.yaml +47 -0
  134. behavior_os-0.1.0/characters/julius-caesar/personality.yaml +51 -0
  135. behavior_os-0.1.0/characters/julius-caesar/sources.yaml +13 -0
  136. behavior_os-0.1.0/characters/julius-caesar/voice.yaml +29 -0
  137. behavior_os-0.1.0/characters/kaneki-ken/behavior.yaml +22 -0
  138. behavior_os-0.1.0/characters/kaneki-ken/meta.yaml +6 -0
  139. behavior_os-0.1.0/characters/kaneki-ken/mindset.yaml +48 -0
  140. behavior_os-0.1.0/characters/kaneki-ken/personality.yaml +51 -0
  141. behavior_os-0.1.0/characters/kaneki-ken/sources.yaml +11 -0
  142. behavior_os-0.1.0/characters/kaneki-ken/voice.yaml +27 -0
  143. behavior_os-0.1.0/characters/l/behavior.yaml +21 -0
  144. behavior_os-0.1.0/characters/l/meta.yaml +6 -0
  145. behavior_os-0.1.0/characters/l/mindset.yaml +48 -0
  146. behavior_os-0.1.0/characters/l/personality.yaml +50 -0
  147. behavior_os-0.1.0/characters/l/sources.yaml +11 -0
  148. behavior_os-0.1.0/characters/l/voice.yaml +28 -0
  149. behavior_os-0.1.0/characters/lelouch-vi-britannia/behavior.yaml +22 -0
  150. behavior_os-0.1.0/characters/lelouch-vi-britannia/meta.yaml +6 -0
  151. behavior_os-0.1.0/characters/lelouch-vi-britannia/mindset.yaml +48 -0
  152. behavior_os-0.1.0/characters/lelouch-vi-britannia/personality.yaml +51 -0
  153. behavior_os-0.1.0/characters/lelouch-vi-britannia/sources.yaml +11 -0
  154. behavior_os-0.1.0/characters/lelouch-vi-britannia/voice.yaml +26 -0
  155. behavior_os-0.1.0/characters/leonardo-da-vinci/behavior.yaml +20 -0
  156. behavior_os-0.1.0/characters/leonardo-da-vinci/meta.yaml +18 -0
  157. behavior_os-0.1.0/characters/leonardo-da-vinci/mindset.yaml +63 -0
  158. behavior_os-0.1.0/characters/leonardo-da-vinci/personality.yaml +52 -0
  159. behavior_os-0.1.0/characters/leonardo-da-vinci/sources.yaml +14 -0
  160. behavior_os-0.1.0/characters/leonardo-da-vinci/voice.yaml +35 -0
  161. behavior_os-0.1.0/characters/levi-ackermann/behavior.yaml +21 -0
  162. behavior_os-0.1.0/characters/levi-ackermann/meta.yaml +18 -0
  163. behavior_os-0.1.0/characters/levi-ackermann/mindset.yaml +58 -0
  164. behavior_os-0.1.0/characters/levi-ackermann/personality.yaml +53 -0
  165. behavior_os-0.1.0/characters/levi-ackermann/sources.yaml +10 -0
  166. behavior_os-0.1.0/characters/levi-ackermann/voice.yaml +30 -0
  167. behavior_os-0.1.0/characters/light-yagami/behavior.yaml +22 -0
  168. behavior_os-0.1.0/characters/light-yagami/meta.yaml +6 -0
  169. behavior_os-0.1.0/characters/light-yagami/mindset.yaml +47 -0
  170. behavior_os-0.1.0/characters/light-yagami/personality.yaml +53 -0
  171. behavior_os-0.1.0/characters/light-yagami/sources.yaml +11 -0
  172. behavior_os-0.1.0/characters/light-yagami/voice.yaml +29 -0
  173. behavior_os-0.1.0/characters/loki/behavior.yaml +21 -0
  174. behavior_os-0.1.0/characters/loki/meta.yaml +6 -0
  175. behavior_os-0.1.0/characters/loki/mindset.yaml +47 -0
  176. behavior_os-0.1.0/characters/loki/personality.yaml +50 -0
  177. behavior_os-0.1.0/characters/loki/sources.yaml +11 -0
  178. behavior_os-0.1.0/characters/loki/voice.yaml +28 -0
  179. behavior_os-0.1.0/characters/macbeth/behavior.yaml +23 -0
  180. behavior_os-0.1.0/characters/macbeth/meta.yaml +6 -0
  181. behavior_os-0.1.0/characters/macbeth/mindset.yaml +47 -0
  182. behavior_os-0.1.0/characters/macbeth/personality.yaml +50 -0
  183. behavior_os-0.1.0/characters/macbeth/sources.yaml +12 -0
  184. behavior_os-0.1.0/characters/macbeth/voice.yaml +27 -0
  185. behavior_os-0.1.0/characters/machiavelli/behavior.yaml +20 -0
  186. behavior_os-0.1.0/characters/machiavelli/meta.yaml +17 -0
  187. behavior_os-0.1.0/characters/machiavelli/mindset.yaml +54 -0
  188. behavior_os-0.1.0/characters/machiavelli/personality.yaml +52 -0
  189. behavior_os-0.1.0/characters/machiavelli/sources.yaml +12 -0
  190. behavior_os-0.1.0/characters/machiavelli/voice.yaml +30 -0
  191. behavior_os-0.1.0/characters/marcus-aurelius/behavior.yaml +12 -0
  192. behavior_os-0.1.0/characters/marcus-aurelius/meta.yaml +16 -0
  193. behavior_os-0.1.0/characters/marcus-aurelius/mindset.yaml +40 -0
  194. behavior_os-0.1.0/characters/marcus-aurelius/personality.yaml +43 -0
  195. behavior_os-0.1.0/characters/marcus-aurelius/sources.yaml +11 -0
  196. behavior_os-0.1.0/characters/marcus-aurelius/voice.yaml +28 -0
  197. behavior_os-0.1.0/characters/merlin/behavior.yaml +20 -0
  198. behavior_os-0.1.0/characters/merlin/meta.yaml +6 -0
  199. behavior_os-0.1.0/characters/merlin/mindset.yaml +42 -0
  200. behavior_os-0.1.0/characters/merlin/personality.yaml +51 -0
  201. behavior_os-0.1.0/characters/merlin/sources.yaml +12 -0
  202. behavior_os-0.1.0/characters/merlin/voice.yaml +27 -0
  203. behavior_os-0.1.0/characters/moriarty/behavior.yaml +20 -0
  204. behavior_os-0.1.0/characters/moriarty/meta.yaml +6 -0
  205. behavior_os-0.1.0/characters/moriarty/mindset.yaml +48 -0
  206. behavior_os-0.1.0/characters/moriarty/personality.yaml +50 -0
  207. behavior_os-0.1.0/characters/moriarty/sources.yaml +12 -0
  208. behavior_os-0.1.0/characters/moriarty/voice.yaml +27 -0
  209. behavior_os-0.1.0/characters/napoleon-bonaparte/behavior.yaml +19 -0
  210. behavior_os-0.1.0/characters/napoleon-bonaparte/meta.yaml +16 -0
  211. behavior_os-0.1.0/characters/napoleon-bonaparte/mindset.yaml +57 -0
  212. behavior_os-0.1.0/characters/napoleon-bonaparte/personality.yaml +51 -0
  213. behavior_os-0.1.0/characters/napoleon-bonaparte/sources.yaml +14 -0
  214. behavior_os-0.1.0/characters/napoleon-bonaparte/voice.yaml +32 -0
  215. behavior_os-0.1.0/characters/naruto-uzumaki/behavior.yaml +17 -0
  216. behavior_os-0.1.0/characters/naruto-uzumaki/meta.yaml +18 -0
  217. behavior_os-0.1.0/characters/naruto-uzumaki/mindset.yaml +60 -0
  218. behavior_os-0.1.0/characters/naruto-uzumaki/personality.yaml +53 -0
  219. behavior_os-0.1.0/characters/naruto-uzumaki/sources.yaml +10 -0
  220. behavior_os-0.1.0/characters/naruto-uzumaki/voice.yaml +32 -0
  221. behavior_os-0.1.0/characters/neutral/behavior.yaml +10 -0
  222. behavior_os-0.1.0/characters/neutral/meta.yaml +12 -0
  223. behavior_os-0.1.0/characters/neutral/mindset.yaml +13 -0
  224. behavior_os-0.1.0/characters/neutral/personality.yaml +11 -0
  225. behavior_os-0.1.0/characters/neutral/sources.yaml +10 -0
  226. behavior_os-0.1.0/characters/neutral/voice.yaml +12 -0
  227. behavior_os-0.1.0/characters/nikola-tesla/behavior.yaml +19 -0
  228. behavior_os-0.1.0/characters/nikola-tesla/meta.yaml +17 -0
  229. behavior_os-0.1.0/characters/nikola-tesla/mindset.yaml +59 -0
  230. behavior_os-0.1.0/characters/nikola-tesla/personality.yaml +52 -0
  231. behavior_os-0.1.0/characters/nikola-tesla/sources.yaml +15 -0
  232. behavior_os-0.1.0/characters/nikola-tesla/voice.yaml +35 -0
  233. behavior_os-0.1.0/characters/odysseus/behavior.yaml +19 -0
  234. behavior_os-0.1.0/characters/odysseus/meta.yaml +18 -0
  235. behavior_os-0.1.0/characters/odysseus/mindset.yaml +61 -0
  236. behavior_os-0.1.0/characters/odysseus/personality.yaml +55 -0
  237. behavior_os-0.1.0/characters/odysseus/sources.yaml +13 -0
  238. behavior_os-0.1.0/characters/odysseus/voice.yaml +31 -0
  239. behavior_os-0.1.0/characters/pain-nagato/behavior.yaml +22 -0
  240. behavior_os-0.1.0/characters/pain-nagato/meta.yaml +6 -0
  241. behavior_os-0.1.0/characters/pain-nagato/mindset.yaml +47 -0
  242. behavior_os-0.1.0/characters/pain-nagato/personality.yaml +53 -0
  243. behavior_os-0.1.0/characters/pain-nagato/sources.yaml +11 -0
  244. behavior_os-0.1.0/characters/pain-nagato/voice.yaml +27 -0
  245. behavior_os-0.1.0/characters/princess-mononoke/behavior.yaml +21 -0
  246. behavior_os-0.1.0/characters/princess-mononoke/meta.yaml +6 -0
  247. behavior_os-0.1.0/characters/princess-mononoke/mindset.yaml +48 -0
  248. behavior_os-0.1.0/characters/princess-mononoke/personality.yaml +51 -0
  249. behavior_os-0.1.0/characters/princess-mononoke/sources.yaml +11 -0
  250. behavior_os-0.1.0/characters/princess-mononoke/voice.yaml +28 -0
  251. behavior_os-0.1.0/characters/qin-shi-huang/behavior.yaml +20 -0
  252. behavior_os-0.1.0/characters/qin-shi-huang/meta.yaml +6 -0
  253. behavior_os-0.1.0/characters/qin-shi-huang/mindset.yaml +48 -0
  254. behavior_os-0.1.0/characters/qin-shi-huang/personality.yaml +54 -0
  255. behavior_os-0.1.0/characters/qin-shi-huang/sources.yaml +11 -0
  256. behavior_os-0.1.0/characters/qin-shi-huang/voice.yaml +26 -0
  257. behavior_os-0.1.0/characters/rani-of-jhansi/behavior.yaml +20 -0
  258. behavior_os-0.1.0/characters/rani-of-jhansi/meta.yaml +17 -0
  259. behavior_os-0.1.0/characters/rani-of-jhansi/mindset.yaml +49 -0
  260. behavior_os-0.1.0/characters/rani-of-jhansi/personality.yaml +50 -0
  261. behavior_os-0.1.0/characters/rani-of-jhansi/sources.yaml +12 -0
  262. behavior_os-0.1.0/characters/rani-of-jhansi/voice.yaml +27 -0
  263. behavior_os-0.1.0/characters/scar/behavior.yaml +21 -0
  264. behavior_os-0.1.0/characters/scar/meta.yaml +6 -0
  265. behavior_os-0.1.0/characters/scar/mindset.yaml +44 -0
  266. behavior_os-0.1.0/characters/scar/personality.yaml +50 -0
  267. behavior_os-0.1.0/characters/scar/sources.yaml +11 -0
  268. behavior_os-0.1.0/characters/scar/voice.yaml +28 -0
  269. behavior_os-0.1.0/characters/seneca/behavior.yaml +19 -0
  270. behavior_os-0.1.0/characters/seneca/meta.yaml +17 -0
  271. behavior_os-0.1.0/characters/seneca/mindset.yaml +65 -0
  272. behavior_os-0.1.0/characters/seneca/personality.yaml +50 -0
  273. behavior_os-0.1.0/characters/seneca/sources.yaml +15 -0
  274. behavior_os-0.1.0/characters/seneca/voice.yaml +35 -0
  275. behavior_os-0.1.0/characters/sherlock-holmes/behavior.yaml +22 -0
  276. behavior_os-0.1.0/characters/sherlock-holmes/meta.yaml +17 -0
  277. behavior_os-0.1.0/characters/sherlock-holmes/mindset.yaml +55 -0
  278. behavior_os-0.1.0/characters/sherlock-holmes/personality.yaml +61 -0
  279. behavior_os-0.1.0/characters/sherlock-holmes/sources.yaml +17 -0
  280. behavior_os-0.1.0/characters/sherlock-holmes/voice.yaml +34 -0
  281. behavior_os-0.1.0/characters/socrates/behavior.yaml +16 -0
  282. behavior_os-0.1.0/characters/socrates/meta.yaml +17 -0
  283. behavior_os-0.1.0/characters/socrates/mindset.yaml +51 -0
  284. behavior_os-0.1.0/characters/socrates/personality.yaml +57 -0
  285. behavior_os-0.1.0/characters/socrates/sources.yaml +13 -0
  286. behavior_os-0.1.0/characters/socrates/voice.yaml +29 -0
  287. behavior_os-0.1.0/characters/steve-jobs/behavior.yaml +31 -0
  288. behavior_os-0.1.0/characters/steve-jobs/meta.yaml +19 -0
  289. behavior_os-0.1.0/characters/steve-jobs/mindset.yaml +56 -0
  290. behavior_os-0.1.0/characters/steve-jobs/personality.yaml +73 -0
  291. behavior_os-0.1.0/characters/steve-jobs/sources.yaml +17 -0
  292. behavior_os-0.1.0/characters/steve-jobs/voice.yaml +36 -0
  293. behavior_os-0.1.0/characters/sun-tzu/behavior.yaml +27 -0
  294. behavior_os-0.1.0/characters/sun-tzu/meta.yaml +16 -0
  295. behavior_os-0.1.0/characters/sun-tzu/mindset.yaml +65 -0
  296. behavior_os-0.1.0/characters/sun-tzu/personality.yaml +61 -0
  297. behavior_os-0.1.0/characters/sun-tzu/sources.yaml +11 -0
  298. behavior_os-0.1.0/characters/sun-tzu/voice.yaml +44 -0
  299. behavior_os-0.1.0/characters/tanjiro-kamado/behavior.yaml +21 -0
  300. behavior_os-0.1.0/characters/tanjiro-kamado/meta.yaml +6 -0
  301. behavior_os-0.1.0/characters/tanjiro-kamado/mindset.yaml +44 -0
  302. behavior_os-0.1.0/characters/tanjiro-kamado/personality.yaml +51 -0
  303. behavior_os-0.1.0/characters/tanjiro-kamado/sources.yaml +11 -0
  304. behavior_os-0.1.0/characters/tanjiro-kamado/voice.yaml +27 -0
  305. behavior_os-0.1.0/characters/the-operator/behavior.yaml +31 -0
  306. behavior_os-0.1.0/characters/the-operator/meta.yaml +20 -0
  307. behavior_os-0.1.0/characters/the-operator/mindset.yaml +54 -0
  308. behavior_os-0.1.0/characters/the-operator/personality.yaml +71 -0
  309. behavior_os-0.1.0/characters/the-operator/sources.yaml +14 -0
  310. behavior_os-0.1.0/characters/the-operator/voice.yaml +37 -0
  311. behavior_os-0.1.0/characters/tokugawa-ieyasu/behavior.yaml +21 -0
  312. behavior_os-0.1.0/characters/tokugawa-ieyasu/meta.yaml +6 -0
  313. behavior_os-0.1.0/characters/tokugawa-ieyasu/mindset.yaml +51 -0
  314. behavior_os-0.1.0/characters/tokugawa-ieyasu/personality.yaml +53 -0
  315. behavior_os-0.1.0/characters/tokugawa-ieyasu/sources.yaml +12 -0
  316. behavior_os-0.1.0/characters/tokugawa-ieyasu/voice.yaml +28 -0
  317. behavior_os-0.1.0/characters/vegeta/behavior.yaml +22 -0
  318. behavior_os-0.1.0/characters/vegeta/meta.yaml +6 -0
  319. behavior_os-0.1.0/characters/vegeta/mindset.yaml +44 -0
  320. behavior_os-0.1.0/characters/vegeta/personality.yaml +50 -0
  321. behavior_os-0.1.0/characters/vegeta/sources.yaml +11 -0
  322. behavior_os-0.1.0/characters/vegeta/voice.yaml +28 -0
  323. behavior_os-0.1.0/docs/benchmark-spec.md +165 -0
  324. behavior_os-0.1.0/docs/demo.md +358 -0
  325. behavior_os-0.1.0/docs/golden-pack-benchmark.md +158 -0
  326. behavior_os-0.1.0/docs/launch-post.md +51 -0
  327. behavior_os-0.1.0/docs/migrations/1.0-to-1.1.md +83 -0
  328. behavior_os-0.1.0/docs/schema-reference.md +195 -0
  329. behavior_os-0.1.0/examples/01-standard-library/README.md +170 -0
  330. behavior_os-0.1.0/examples/02-custom-character/README.md +161 -0
  331. behavior_os-0.1.0/examples/02-custom-character/ada-lovelace/behavior.yaml +19 -0
  332. behavior_os-0.1.0/examples/02-custom-character/ada-lovelace/meta.yaml +20 -0
  333. behavior_os-0.1.0/examples/02-custom-character/ada-lovelace/mindset.yaml +54 -0
  334. behavior_os-0.1.0/examples/02-custom-character/ada-lovelace/personality.yaml +43 -0
  335. behavior_os-0.1.0/examples/02-custom-character/ada-lovelace/sources.yaml +18 -0
  336. behavior_os-0.1.0/examples/02-custom-character/ada-lovelace/voice.yaml +31 -0
  337. behavior_os-0.1.0/examples/sun-tzu-aurelius.yaml +6 -0
  338. behavior_os-0.1.0/prompts/extract-v1.md +28 -0
  339. behavior_os-0.1.0/pyproject.toml +30 -0
  340. behavior_os-0.1.0/tests/conftest.py +167 -0
  341. behavior_os-0.1.0/tests/test_benchmark_assertions.py +448 -0
  342. behavior_os-0.1.0/tests/test_cli.py +925 -0
  343. behavior_os-0.1.0/tests/test_conditions.py +42 -0
  344. behavior_os-0.1.0/tests/test_context.py +179 -0
  345. behavior_os-0.1.0/tests/test_fusion.py +165 -0
  346. behavior_os-0.1.0/tests/test_golden_packs.py +134 -0
  347. behavior_os-0.1.0/tests/test_ir.py +108 -0
  348. behavior_os-0.1.0/tests/test_pack.py +73 -0
  349. behavior_os-0.1.0/tests/test_registry.py +52 -0
  350. behavior_os-0.1.0/tests/test_renderer.py +153 -0
  351. behavior_os-0.1.0/tests/test_resolver.py +201 -0
  352. behavior_os-0.1.0/tests/test_schema_behavior.py +106 -0
  353. behavior_os-0.1.0/tests/test_schema_meta.py +140 -0
  354. behavior_os-0.1.0/tests/test_schema_mindset.py +73 -0
  355. behavior_os-0.1.0/tests/test_schema_personality.py +188 -0
  356. behavior_os-0.1.0/tests/test_schema_sources.py +52 -0
  357. behavior_os-0.1.0/tests/test_schema_version.py +40 -0
  358. behavior_os-0.1.0/tests/test_schema_voice.py +59 -0
@@ -0,0 +1,60 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ *.so
7
+
8
+ # Virtual environments
9
+ .venv/
10
+ venv/
11
+ env/
12
+
13
+ # Distribution / packaging
14
+ dist/
15
+ build/
16
+ *.egg-info/
17
+ *.egg
18
+
19
+ # Testing
20
+ .pytest_cache/
21
+ .coverage
22
+ htmlcov/
23
+
24
+ # Type checking
25
+ .mypy_cache/
26
+ .ruff_cache/
27
+
28
+ # IDE
29
+ .idea/
30
+ .vscode/
31
+ *.swp
32
+ *.swo
33
+
34
+ # macOS
35
+ .DS_Store
36
+
37
+ # Environment variables
38
+ .env
39
+ .env.*
40
+
41
+ # LLM provider keys and runtime wrappers (never commit)
42
+ *.key
43
+ cmini-wrapper
44
+
45
+ # Character pack backups (created by mindset migrate)
46
+ **/.backup/
47
+
48
+ # Local registry override
49
+ .agentic-mindset/
50
+
51
+ # Claude Code
52
+ .claude/
53
+ .claude/workspace/
54
+ .worktrees/
55
+
56
+ # Local harness context — do not commit
57
+ CLAUDE.md
58
+
59
+ # aurorie-teams runtime workspace — local only, do not commit
60
+ .claude/workspace/
@@ -0,0 +1,45 @@
1
+ # BehaviorOS Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+
7
+ ---
8
+
9
+ ## [1.1] — 2026-03-25
10
+
11
+ ### Added
12
+ - `DecisionFramework.heuristics`, `default_strategy`, `fallback_strategy`, `commitment_policy`
13
+ - `Drive` class — `drives` upgraded from `list[str]` to `list[Drive]` with `name`, `intensity`, `description`; bare strings auto-normalized on load
14
+ - `Trait.confidence` — optional float 0–1
15
+ - `EmotionalTendencies.baseline_mood`, `emotional_range`, `frustration_trigger`, `recovery_pattern`
16
+ - `ConditionalVariant.conjunction` — `"any" | "all"` (default: `"any"`)
17
+ - `BehaviorSchema.decision_control` — `"controlled" | "reactive" | "impulsive"`
18
+ - `ToneAxes` — `formality`, `warmth`, `intensity`, `humor` axes on `VoiceSchema`
19
+ - `MetaSchema.license`, `MetaSchema.visibility`
20
+ - `Source.evidence_level` — `"primary" | "secondary" | "tertiary"`
21
+ - 6 new `Source.type` values: `biography`, `film`, `novel`, `essay`, `letter`, `speech`
22
+ - Schema version constants module (`agentic_mindset/schema/version.py`)
23
+ - Loader version check: warning for 1.0 packs, error for unknown versions
24
+ - `docs/schema-reference.md` — full field reference with runtime-critical classification
25
+ - `docs/migrations/1.0-to-1.1.md` — migration guide
26
+ - All 13 standard library packs enriched with new fields
27
+
28
+ ### Changed
29
+ - `decision_speed` no longer accepts `"impulsive"` — use `decision_control: impulsive` instead (**BREAKING**)
30
+
31
+ ### Fixed
32
+ - `CharacterPack.load()` now uses `pack.meta.id` (attribute) instead of `pack.meta["id"]` (dict subscript)
33
+
34
+ ---
35
+
36
+ ## [1.0] — 2026-03-22
37
+
38
+ ### Added
39
+ - Initial Character Pack schema: `meta`, `mindset`, `personality`, `behavior`, `voice`, `sources`
40
+ - Standard library: 13 characters (7 historical, 6 fictional)
41
+ - Fusion Engine: weighted blend, dominant, sequential strategies
42
+ - Behavior IR pipeline: `ConflictResolver → BehaviorIR → ClaudeRenderer`
43
+ - CLI: `mindset init`, `validate`, `preview`, `list`, `generate`, `run`
44
+ - `--format inject` (Behavior IR path) and `--format text` (FusionEngine path)
45
+ - `--explain` structured YAML output for both paths
@@ -0,0 +1,70 @@
1
+ # Contributing to BehaviorOS
2
+
3
+ ## Character Pack Contributions
4
+
5
+ ### Scope
6
+
7
+ The standard library accepts:
8
+ - **Historical figures** (deceased persons with documented public records)
9
+ - **Fictional characters** (from literature, anime, games, mythology, or other creative works)
10
+
11
+ **Living persons are not accepted** into the standard library.
12
+
13
+ ### Requirements
14
+
15
+ - Minimum 3 distinct source materials in `sources.yaml` (enforced by validator)
16
+ - All 6 schema files present and passing `mindset validate`
17
+ - Sources must be publicly accessible
18
+ - For **fictional characters**: sources must include the original work (manga, novel, screenplay, game); fan-created secondary sources may supplement but not replace primary sources
19
+ - For **historical figures**: primary sources (translated writings, documented speeches) preferred; biographical analysis may supplement
20
+
21
+ ### Process
22
+
23
+ 1. Fork the repository
24
+ 2. Scaffold a new pack: `mindset init <id> --type <historical|fictional> --output characters/`
25
+ 3. Fill in all 6 YAML files with accurate, sourced content
26
+ 4. Add at least 3 sources to `sources.yaml`
27
+ 5. Validate: `mindset validate characters/<id>/` — must pass
28
+ 6. Preview: `mindset preview characters/<id>/` — review the Context Block output for quality
29
+ 7. Open a Pull Request with a brief description of your sources
30
+
31
+ ### What Makes a Good Character Pack?
32
+
33
+ - Fields are filled from documented evidence, not speculation
34
+ - `confidence` values are set on mindset core_principles to indicate evidence strength
35
+ - `signature_phrases` use direct quotes from primary sources
36
+ - The Context Block preview produces useful, coherent output
37
+
38
+ ## Development
39
+
40
+ ### Setup
41
+
42
+ ```bash
43
+ git clone https://github.com/mengran-aurorie/behavior-os
44
+ cd behavior-os
45
+ pip install -e ".[dev]"
46
+ ```
47
+
48
+ ### Running Tests
49
+
50
+ ```bash
51
+ pytest tests/ -v --cov=agentic_mindset
52
+ ```
53
+
54
+ ### Project Structure
55
+
56
+ ```
57
+ agentic_mindset/ # Core Python package
58
+ schema/ # Pydantic schema models
59
+ ir/ # BehaviorIR models and conditions
60
+ resolver/ # ConflictResolver and policies
61
+ renderer/ # ClaudeRenderer (inject path)
62
+ pack.py # CharacterPack loader
63
+ registry.py # Registry path resolution
64
+ context.py # ContextBlock output
65
+ fusion.py # FusionEngine
66
+ cli.py # Typer CLI
67
+ characters/ # Standard library packs
68
+ tests/ # Test suite (254 tests)
69
+ docs/ # Documentation
70
+ ```
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.4
2
+ Name: behavior-os
3
+ Version: 0.1.0
4
+ Summary: BehaviorOS — compile behavior, not prompts. A behavioral runtime for AI agents.
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: pydantic>=2.0
7
+ Requires-Dist: pyyaml>=6.0
8
+ Requires-Dist: rich>=13.0
9
+ Requires-Dist: typer>=0.12
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
12
+ Requires-Dist: pytest>=8.0; extra == 'dev'
@@ -0,0 +1,268 @@
1
+ # BehaviorOS
2
+
3
+ **Compile behavior, not prompts.**
4
+
5
+ <p align="center">
6
+ <a href="./README.md">English</a> | <a href="./README.zh.md">中文</a>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <img src="https://img.shields.io/badge/Python-3.11+-blue.svg" alt="Python 3.11+">
11
+ <img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License">
12
+ <img src="https://img.shields.io/badge/Schema-1.1-orange.svg" alt="Schema 1.1">
13
+ </p>
14
+
15
+ > **Naming note:** Product name is **BehaviorOS**. PyPI / package name is `agentic-mindset`. CLI command is `mindset` (preserved for compatibility). Repository is `behavior-os`.
16
+
17
+ ---
18
+
19
+ ## Most AI Personas Are Fake.
20
+
21
+ > They collapse when you mix them.
22
+ > They can't explain why they behave a certain way.
23
+ > And worse — they start hallucinating identity.
24
+
25
+ **BehaviorOS** is different.
26
+
27
+ ---
28
+
29
+ ## This Is Not Persona Prompting. This Is Behavior Compilation.
30
+
31
+ *Personas describe style. Policies define behavior.*
32
+
33
+ BehaviorOS compiles character mindsets into **behavioral directives** — not character descriptions. The system resolves conflicts, applies conditional rules, and produces outputs you can actually verify.
34
+
35
+ ```
36
+ ┌─────────────────────────────────────────────────────────────────┐
37
+ │ CharacterPack(s) → ConflictResolver → BehaviorIR │
38
+ │ → ClaudeRenderer │
39
+ │ → AI Agent │
40
+ └─────────────────────────────────────────────────────────────────┘
41
+ ```
42
+
43
+ | Stage | What it does |
44
+ |---|---|
45
+ | **FusionEngine** | Weighted merge of N characters with deterministic conflict resolution |
46
+ | **ConflictResolver** | Slot-by-slot winner selection; ConditionalSlot application |
47
+ | **BehaviorIR** | Typed intermediate representation — every decision is explicit |
48
+ | **ClaudeRenderer** | Emits behavioral directives, not character descriptions |
49
+
50
+ ---
51
+
52
+ ## Same Question, Different Behavior
53
+
54
+ **Prompt:** *We are negotiating with a much larger competitor. They have more leverage. What do we do?*
55
+
56
+ ---
57
+
58
+ ### Baseline (no persona)
59
+
60
+ > "You should consider both collaborative and competitive approaches. Assess your BATNA. Look for mutual gains..."
61
+
62
+ <span style="color:#888">→ generic, balanced, no distinctive frame</span>
63
+
64
+ ---
65
+
66
+ ### Sun Tzu
67
+
68
+ > "The negotiation is won before the first offer is made. Your goal is not to reach agreement — it is to shape the terrain so agreement favors you."
69
+
70
+ <span style="color:#c0392b">→ indirect · positioning · no premature commitment</span>
71
+
72
+ ---
73
+
74
+ ### Steve Jobs
75
+
76
+ > "Stop thinking about leverage. Ask one question: are they necessary? If yes — what's the minimum you need? Cut everything else."
77
+
78
+ <span style="color:#2980b9">→ direct · binary · refusal to dilute</span>
79
+
80
+ ---
81
+
82
+ ### Sun Tzu (60%) + Steve Jobs (40%)
83
+
84
+ > "Position first. Never enter a room where the other side has shaped the frame. Find the asymmetry — what do they need? What is their cost of walking? Then act. Precisely, not aggressively."
85
+
86
+ <span style="color:#27ae60">→ indirect strategy framing + Jobs-style refusal to dilute</span>
87
+
88
+ > **This exact phrase does not appear in either solo output.** The blend is emergent — not an average.
89
+
90
+ ---
91
+
92
+ ## The System Explains Its Own Behavior
93
+
94
+ Every run produces a `--explain` YAML that traces every decision:
95
+
96
+ ```yaml
97
+ communication:
98
+ primary:
99
+ value: Indirect, layered; teaches through demonstration
100
+ source: sun-tzu
101
+ weight: 0.6
102
+ has_conflict: true
103
+ dropped:
104
+ - value: Direct, opinionated, unvarnished
105
+ source: steve-jobs
106
+ weight: 0.4
107
+ reason: no_conflict ← Jobs' directness doesn't compete with Tzu's indirect
108
+ modifiers:
109
+ - value: Direct and uncompromising when clarity_critical
110
+ condition: [clarity_critical]
111
+ conjunction: any
112
+ source: steve-jobs
113
+ provenance: pack
114
+ ```
115
+
116
+ The `clarity_critical` modifier is a **ConditionalSlot** — Steve Jobs' directness activates only when the situation is already clear. The blend knows when to apply each layer.
117
+
118
+ > **"The system explains its own behavior — and the explanation matches reality."**
119
+
120
+ ---
121
+
122
+ ## Three Behaviors That Don't Collapse
123
+
124
+ | Claim | How BehaviorOS delivers it |
125
+ |---|---|
126
+ | **Persona changes output** | Resolver picks winner per slot; renderer enforces it in directives |
127
+ | **Fusion produces emergent behavior** | `no_conflict` drops traits that don't compete; new combinations appear that neither solo has |
128
+ | **Explain predicts output** | Dropped traits are labeled; the benchmark suite verifies they don't surface |
129
+
130
+ The benchmark suite (`tests/test_benchmark_assertions.py`) verifies all three — including `no fabricated specifics`: the system will not invent biographical facts to fill a persona frame.
131
+
132
+ ### Benchmark Snapshot
133
+
134
+ | Metric | Value |
135
+ |---|---|
136
+ | Task classes | 4 (persona change, fusion emergence, explain fidelity, no fabrication) |
137
+ | Assertions | 10 |
138
+ | Current status | All green |
139
+
140
+ ---
141
+
142
+ ## Why "OS"?
143
+
144
+ BehaviorOS is not an operating system in the traditional sense.
145
+
146
+ It is a **behavioral runtime layer** that:
147
+ - Compiles policies into deterministic behavioral directives
148
+ - Resolves conflicts between competing character traits
149
+ - Injects verifiable, explainable behavior into AI agents
150
+
151
+ Think of it as an operating system for how agents decide and act — not how they execute code.
152
+
153
+ ---
154
+
155
+ ## Support Matrix
156
+
157
+ | Tier | Runtime |
158
+ |---|---|
159
+ | **Supported** | Claude CLI |
160
+ | **Experimental** | MiniMax wrapper (`CMINI_WRAPPER_API_KEY`) |
161
+ | **Planned** | OpenAI API · Ollama · any model accepting system prompts |
162
+
163
+ ---
164
+
165
+ ## Contribute a Persona Pack in 3 Steps
166
+
167
+ 1. `mindset init my-character --type historical` — scaffold the YAML files
168
+ 2. Fill `sources.yaml` with **3+ public sources** (this is the quality floor)
169
+ 3. `mindset validate ./my-character` — verify before submitting
170
+
171
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for full authoring guide.
172
+
173
+ ---
174
+
175
+ ## Quick Start
176
+
177
+ ```bash
178
+ # Clone and install
179
+ git clone https://github.com/mengran-aurorie/behavior-os.git
180
+ cd behavior-os
181
+ pip install .
182
+
183
+ # Or editable mode for development
184
+ pip install -e .
185
+
186
+ # Single persona
187
+ mindset run claude --persona sun-tzu -- \
188
+ "We have incomplete data and significant risk. What should we do?"
189
+
190
+ # Two-persona blend
191
+ mindset run claude --persona sun-tzu --persona steve-jobs --weights 6,4 -- \
192
+ "We are negotiating with a much larger competitor."
193
+
194
+ # See every decision made
195
+ mindset run claude --persona sun-tzu --persona steve-jobs --weights 6,4 --explain -- "..."
196
+ ```
197
+
198
+ > **Requires:** Python 3.11+ · [Claude CLI](https://docs.anthropic.com/en/docs/claude-code)
199
+
200
+ ---
201
+
202
+ ## Architecture
203
+
204
+ ```
205
+ CharacterPack/
206
+ │ ├── meta.yaml # Identity, schema version, license
207
+ │ ├── mindset.yaml # Principles, decision framework, mental models
208
+ │ ├── personality.yaml # Traits, emotional tendencies, ConditionalSlots
209
+ │ ├── behavior.yaml # Work patterns, decision speed, conflict style
210
+ │ ├── voice.yaml # Tone, vocabulary, signature phrases
211
+ │ └── sources.yaml # References (3+ public sources required)
212
+
213
+
214
+ FusionEngine
215
+ (weighted merge, blend/dominant strategy)
216
+
217
+
218
+ ConflictResolver
219
+ (slot-by-slot winner, ConditionalSlot triggers)
220
+
221
+
222
+ BehaviorIR
223
+ (typed: primary, dropped, modifiers per slot)
224
+
225
+
226
+ ClaudeRenderer
227
+ (behavioral directive block)
228
+
229
+
230
+ Agent Runtime
231
+ (Claude CLI, API, or any model accepting system prompts)
232
+ ```
233
+
234
+ The inject path is **fully deterministic**: identical inputs → identical IR → identical output. No randomness until the final agent prompt.
235
+
236
+ ---
237
+
238
+ ## Standard Library
239
+
240
+ ### Golden Packs (benchmarked in `tests/test_benchmark_assertions.py`)
241
+
242
+ | ID | Persona | Behavioral signature |
243
+ |---|---|---|
244
+ | `sun-tzu` | Sun Tzu | Strategic positioning over force |
245
+ | `marcus-aurelius` | Marcus Aurelius | Stoic acceptance; control vs. influence |
246
+ | `steve-jobs` | Steve Jobs | Binary quality judgment; refusal to dilute |
247
+ | `sherlock-holmes` | Sherlock Holmes | Deduction from observed anomaly |
248
+
249
+ ### Extended Library
250
+
251
+ | ID | Persona | Behavioral signature |
252
+ |---|---|---|
253
+ | `confucius` | Confucius | Relationship-based ethics |
254
+ | `seneca` | Seneca | Stoic action; philosophy as practice |
255
+
256
+ **Build your own:**
257
+
258
+ ```bash
259
+ mindset init my-character --type historical
260
+ # Edit the YAML files
261
+ mindset validate ./my-character
262
+ ```
263
+
264
+ ---
265
+
266
+ ## License
267
+
268
+ MIT
@@ -0,0 +1,226 @@
1
+ # BehaviorOS
2
+
3
+ **Compile behavior, not prompts.**
4
+
5
+ <p align="center">
6
+ <a href="./README.md">English</a> | <a href="./README.zh.md">中文</a>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <img src="https://img.shields.io/badge/Python-3.11+-blue.svg" alt="Python 3.11+">
11
+ <img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License">
12
+ <img src="https://img.shields.io/badge/Schema-1.1-orange.svg" alt="Schema 1.1">
13
+ </p>
14
+
15
+ ---
16
+
17
+ ## 大多数 AI Persona 都是假的。
18
+
19
+ > 混合多个 persona 时,它们会坍缩成泛泛之谈。
20
+ > 它们无法解释自己为什么这样行为。
21
+ > 更糟的是 — 它们开始虚构身份。
22
+
23
+ **BehaviorOS** 不一样。
24
+
25
+ ---
26
+
27
+ ## 这不是 Persona Prompting。这是 Behavior Compilation。
28
+
29
+ *Personas 描述风格。Policies 定义行为。*
30
+
31
+ BehaviorOS 将角色思维方式编译成**行为指令**,而非角色描述。系统解析冲突,应用条件规则,输出可验证。
32
+
33
+ ```
34
+ ┌─────────────────────────────────────────────────────────────────┐
35
+ │ CharacterPack(s) → ConflictResolver → BehaviorIR │
36
+ │ → ClaudeRenderer │
37
+ │ → AI Agent │
38
+ └─────────────────────────────────────────────────────────────────┘
39
+ ```
40
+
41
+ | 阶段 | 作用 |
42
+ |---|---|
43
+ | **FusionEngine** | N 个角色的加权合并,确定性冲突解析 |
44
+ | **ConflictResolver** | 按槽位选择获胜者;触发 ConditionalSlot |
45
+ | **BehaviorIR** | 类型化中间表示 — 每个决策都显式可见 |
46
+ | **ClaudeRenderer** | 输出行为指令,而非角色描述 |
47
+
48
+ ---
49
+
50
+ ## 同一问题,不同行为
51
+
52
+ **Prompt:** *我们正在与一个更强大的竞争对手谈判。他们有更多筹码。我们该怎么办?*
53
+
54
+ ---
55
+
56
+ ### Baseline(无 persona)
57
+
58
+ > "你应该同时考虑合作和竞争策略。评估你的 BATNA。寻找互利方案..."
59
+
60
+ <span style="color:#888">→ 泛泛而谈,四平八稳,无鲜明立场</span>
61
+
62
+ ---
63
+
64
+ ### 孙子(Sun Tzu)
65
+
66
+ > "谈判在第一次报价之前就已经赢了。你的目标不是达成协议 — 而是塑造格局,让协议有利于你。"
67
+
68
+ <span style="color:#c0392b">→ 间接 · 布局 · 不轻易承诺</span>
69
+
70
+ ---
71
+
72
+ ### 史蒂夫·乔布斯(Steve Jobs)
73
+
74
+ > "别再想筹码了。问一个问题:他们不可或缺吗?如果是——你最少需要他们提供什么?其他全部砍掉。"
75
+
76
+ <span style="color:#2980b9">→ 直接 · 二元判断 · 绝不稀释</span>
77
+
78
+ ---
79
+
80
+ ### 孙子(60%)+ 乔布斯(40%)
81
+
82
+ > "先布局。不要进入一个对方已经设好框架的房间。找到不对称性——他们需要什么?他们退出的代价是什么?然后行动。精准地,而不是激进地。"
83
+
84
+ <span style="color:#27ae60">→ 孙子式战略框架 + 乔布斯式拒绝稀释</span>
85
+
86
+ > **这句话不出现在任何单角色输出中。** 这是融合产生的涌现行为——不是两者的平均。
87
+
88
+ ---
89
+
90
+ ## 系统会解释自己的行为
91
+
92
+ 每次运行都会生成 `--explain` YAML,追踪每一个决策:
93
+
94
+ ```yaml
95
+ communication:
96
+ primary:
97
+ value: Indirect, layered; teaches through demonstration
98
+ source: sun-tzu
99
+ weight: 0.6
100
+ has_conflict: true
101
+ dropped:
102
+ - value: Direct, opinionated, unvarnished
103
+ source: steve-jobs
104
+ weight: 0.4
105
+ reason: no_conflict ← 乔布斯的直接与孙子的间接并不冲突
106
+ modifiers:
107
+ - value: Direct and uncompromising when clarity_critical
108
+ condition: [clarity_critical]
109
+ conjunction: any
110
+ source: steve-jobs
111
+ provenance: pack
112
+ ```
113
+
114
+ `clarity_critical` 是一个 **ConditionalSlot** — 乔布斯的直接风格仅在局势已经明朗时才会激活。融合结果知道何时应用哪一层。
115
+
116
+ > **"系统会解释自己的行为——而解释与现实完全一致。"**
117
+
118
+ ---
119
+
120
+ ## 三种不会坍缩的行为
121
+
122
+ | 主张 | BehaviorOS 如何实现 |
123
+ |---|---|
124
+ | **Persona 改变输出** | 解析器逐槽位选优;渲染器以指令形式强制执行 |
125
+ | **融合产生涌现行为** | `no_conflict` 策略丢弃不冲突的特质;新的组合出现,单角色都不具备 |
126
+ | **Explain 预测输出** | 被丢弃的特质有标签标注;基准测试套件验证其不出现 |
127
+
128
+ 基准测试套件(`tests/test_benchmark_assertions.py`)验证以上全部——包括 `no fabricated specifics`:系统不会虚构传记事实来填充 persona 框架。
129
+
130
+ ---
131
+
132
+ ## 为什么叫 "OS"?
133
+
134
+ BehaviorOS 不是传统意义上的操作系统。
135
+
136
+ 它是一个**行为运行时层**,具备:
137
+ - 将策略编译成确定性行为指令
138
+ - 解析竞争性角色特质之间的冲突
139
+ - 向 AI Agent 注入可验证、可解释的行为
140
+
141
+ 可以把它理解为:管理 Agent 如何决策和行动的"操作系统"——而不是管理代码执行的操作系统。
142
+
143
+ ---
144
+
145
+ ## 快速开始
146
+
147
+ ```bash
148
+ # 安装
149
+ pip install agentic-mindset
150
+
151
+ # 单角色查询
152
+ mindset run claude --persona sun-tzu -- \
153
+ "数据不完整且风险很大,我们应该怎么做?"
154
+
155
+ # 双角色融合
156
+ mindset run claude --persona sun-tzu --persona steve-jobs --weights 6,4 -- \
157
+ "我们正在与一个更强大的竞争对手谈判。"
158
+
159
+ # 查看每个决策细节
160
+ mindset run claude --persona sun-tzu --persona steve-jobs --weights 6,4 --explain -- "..."
161
+ ```
162
+
163
+ > **依赖:** Python 3.11+ · [Claude CLI](https://docs.anthropic.com/en/docs/claude-code)
164
+
165
+ ---
166
+
167
+ ## 架构
168
+
169
+ ```
170
+ CharacterPack/
171
+ │ ├── meta.yaml # 身份、Schema 版本、许可证
172
+ │ ├── mindset.yaml # 核心原则、决策框架、心智模型
173
+ │ ├── personality.yaml # 特质、情绪倾向、ConditionalSlot
174
+ │ ├── behavior.yaml # 工作模式、决策速度、冲突风格
175
+ │ ├── voice.yaml # 语气、词汇偏好、标志性短语
176
+ │ └── sources.yaml # 参考资料(至少 3 个公开来源)
177
+
178
+
179
+ FusionEngine
180
+ (加权合并,blend/dominant 策略)
181
+
182
+
183
+ ConflictResolver
184
+ (逐槽位裁决,ConditionalSlot 触发)
185
+
186
+
187
+ BehaviorIR
188
+ (类型化:每个槽位的 primary、dropped、modifiers)
189
+
190
+
191
+ ClaudeRenderer
192
+ (行为指令块)
193
+
194
+
195
+ Agent Runtime
196
+ (Claude CLI、API 或任意接受系统提示词的模型)
197
+ ```
198
+
199
+ Inject 路径**完全确定性**:相同输入 → 相同 IR → 相同输出。在最终 agent 提示词之前,无任何随机性。
200
+
201
+ ---
202
+
203
+ ## 标准人物库
204
+
205
+ | ID | 人物 | 行为特征 |
206
+ |---|---|---|
207
+ | `sun-tzu` | 孙子 | 以布局谋优势,不以力拼 |
208
+ | `marcus-aurelius` | 马可·奥勒留 | 斯多葛接受;区分可控与不可控 |
209
+ | `steve-jobs` | 史蒂夫·乔布斯 | 二元质量判断;拒绝降低标准 |
210
+ | `sherlock-holmes` | 夏洛克·福尔摩斯 | 从观察异常出发进行推理 |
211
+ | `confucius` | 孔子 | 以关系为基础的伦理学 |
212
+ | `seneca` | 塞涅卡 | 斯多葛行动派;哲学即实践 |
213
+
214
+ **创建你自己的角色:**
215
+
216
+ ```bash
217
+ mindset init my-character --type historical
218
+ # 编辑 YAML 文件
219
+ mindset validate ./my-character
220
+ ```
221
+
222
+ ---
223
+
224
+ ## 许可证
225
+
226
+ MIT
@@ -0,0 +1,5 @@
1
+ from agentic_mindset.registry import CharacterRegistry
2
+ from agentic_mindset.fusion import FusionEngine
3
+ from agentic_mindset.context import ContextBlock
4
+
5
+ __all__ = ["CharacterRegistry", "FusionEngine", "ContextBlock"]