pwn 0.5.628 → 0.5.629

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -21
  3. data/bin/pwn +35 -1
  4. data/bin/pwn_setup +64 -0
  5. data/documentation/AI-Integration.md +48 -9
  6. data/documentation/AWS.md +1 -1
  7. data/documentation/Agent-Tool-Registry.md +24 -0
  8. data/documentation/BurpSuite.md +4 -1
  9. data/documentation/CLI-Drivers.md +27 -10
  10. data/documentation/Configuration.md +37 -10
  11. data/documentation/Contributing.md +13 -3
  12. data/documentation/Extrospection.md +108 -98
  13. data/documentation/FFI.md +14 -2
  14. data/documentation/Fuzzing.md +3 -0
  15. data/documentation/General-PWN-Usage.md +12 -0
  16. data/documentation/Hardware.md +4 -0
  17. data/documentation/Home.md +4 -4
  18. data/documentation/How-PWN-Works.md +2 -1
  19. data/documentation/Installation.md +201 -37
  20. data/documentation/Metasploit.md +4 -1
  21. data/documentation/NmapIt.md +3 -0
  22. data/documentation/Persistence.md +5 -2
  23. data/documentation/Reporting.md +3 -0
  24. data/documentation/SDR.md +4 -0
  25. data/documentation/Skills-Memory-Learning.md +24 -11
  26. data/documentation/Swarm.md +20 -0
  27. data/documentation/Transparent-Browser.md +3 -0
  28. data/documentation/Troubleshooting.md +63 -7
  29. data/documentation/What-is-PWN.md +1 -1
  30. data/documentation/diagrams/agent-tool-registry.svg +120 -109
  31. data/documentation/diagrams/ai-integration-tool-calling.svg +76 -65
  32. data/documentation/diagrams/dot/agent-tool-registry.dot +5 -3
  33. data/documentation/diagrams/dot/ai-integration-tool-calling.dot +3 -2
  34. data/documentation/diagrams/dot/memory-skills-detailed.dot +26 -4
  35. data/documentation/diagrams/dot/overall-pwn-architecture.dot +6 -4
  36. data/documentation/diagrams/dot/persistence-filesystem.dot +4 -2
  37. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +31 -10
  38. data/documentation/diagrams/dot/swarm-multi-agent.dot +7 -1
  39. data/documentation/diagrams/extrospection-world-awareness.svg +129 -129
  40. data/documentation/diagrams/memory-skills-detailed.svg +268 -137
  41. data/documentation/diagrams/overall-pwn-architecture.svg +188 -171
  42. data/documentation/diagrams/persistence-filesystem.svg +115 -85
  43. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +407 -255
  44. data/documentation/diagrams/sdr-radio-flow.svg +51 -51
  45. data/documentation/diagrams/swarm-multi-agent.svg +156 -119
  46. data/documentation/pwn-REPL.md +1 -0
  47. data/documentation/pwn-ai-Agent.md +50 -22
  48. data/lib/pwn/ai/agent/dispatch.rb +1 -1
  49. data/lib/pwn/ai/agent/learning.rb +1 -1
  50. data/lib/pwn/ai/agent/loop.rb +40 -0
  51. data/lib/pwn/ai/agent/metrics.rb +1 -1
  52. data/lib/pwn/config.rb +2 -2
  53. data/lib/pwn/memory_index.rb +1 -1
  54. data/lib/pwn/plugins/repl.rb +26 -2
  55. data/lib/pwn/setup.rb +563 -0
  56. data/lib/pwn/version.rb +1 -1
  57. data/lib/pwn.rb +1 -0
  58. data/spec/lib/pwn/setup_spec.rb +28 -0
  59. data/third_party/pwn_rdoc.jsonl +15 -1
  60. metadata +5 -1
@@ -4,169 +4,180 @@
4
4
  <!-- Generated by graphviz version 14.1.2 (0)
5
5
  -->
6
6
  <!-- Title: PWN_AI_Integration Pages: 1 -->
7
- <svg width="680pt" height="496pt"
8
- viewBox="0.00 0.00 680.00 496.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
- <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(43.2 453.2)">
7
+ <svg width="798pt" height="530pt"
8
+ viewBox="0.00 0.00 798.00 530.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(43.2 486.95)">
10
10
  <title>PWN_AI_Integration</title>
11
- <polygon fill="#0f172a" stroke="none" points="-43.2,43.2 -43.2,-453.2 636.7,-453.2 636.7,43.2 -43.2,43.2"/>
12
- <text xml:space="preserve" text-anchor="start" x="98.75" y="-388" font-family="sans-Serif" font-weight="bold" font-size="20.00" fill="#e2e8f0">PWN::AI — Multi&#45;Provider LLM Integration</text>
13
- <text xml:space="preserve" text-anchor="start" x="186.12" y="-376.55" font-family="sans-Serif" font-size="11.00" fill="#94a3b8">one Agent Loop · five interchangeable engines</text>
11
+ <polygon fill="#0f172a" stroke="none" points="-43.2,43.2 -43.2,-486.95 754.95,-486.95 754.95,43.2 -43.2,43.2"/>
12
+ <text xml:space="preserve" text-anchor="start" x="157.88" y="-421.75" font-family="sans-Serif" font-weight="bold" font-size="20.00" fill="#e2e8f0">PWN::AI — Multi&#45;Provider LLM Integration</text>
13
+ <text xml:space="preserve" text-anchor="start" x="245.25" y="-410.3" font-family="sans-Serif" font-size="11.00" fill="#94a3b8">one Agent Loop · five interchangeable engines</text>
14
14
  <g id="clust1" class="cluster">
15
15
  <title>cluster_c</title>
16
- <path fill="#2e1065" stroke="#6d28d9" d="M213.25,-8C213.25,-8 365,-8 365,-8 371,-8 377,-14 377,-20 377,-20 377,-351 377,-351 377,-357 371,-363 365,-363 365,-363 213.25,-363 213.25,-363 207.25,-363 201.25,-357 201.25,-351 201.25,-351 201.25,-20 201.25,-20 201.25,-14 207.25,-8 213.25,-8"/>
17
- <text xml:space="preserve" text-anchor="middle" x="289.12" y="-340" font-family="sans-Serif" font-size="20.00" fill="#ddd6fe">PWN::AI::* Clients</text>
16
+ <path fill="#2e1065" stroke="#6d28d9" d="M331.5,-33.75C331.5,-33.75 483.25,-33.75 483.25,-33.75 489.25,-33.75 495.25,-39.75 495.25,-45.75 495.25,-45.75 495.25,-384.75 495.25,-384.75 495.25,-390.75 489.25,-396.75 483.25,-396.75 483.25,-396.75 331.5,-396.75 331.5,-396.75 325.5,-396.75 319.5,-390.75 319.5,-384.75 319.5,-384.75 319.5,-45.75 319.5,-45.75 319.5,-39.75 325.5,-33.75 331.5,-33.75"/>
17
+ <text xml:space="preserve" text-anchor="middle" x="407.38" y="-373.75" font-family="sans-Serif" font-size="20.00" fill="#ddd6fe">PWN::AI::* Clients</text>
18
18
  </g>
19
19
  <g id="clust3" class="cluster">
20
20
  <title>cluster_api</title>
21
- <path fill="#450a0a" stroke="#b91c1c" stroke-dasharray="5,2" d="M468,-8C468,-8 581.5,-8 581.5,-8 587.5,-8 593.5,-14 593.5,-20 593.5,-20 593.5,-351 593.5,-351 593.5,-357 587.5,-363 581.5,-363 581.5,-363 468,-363 468,-363 462,-363 456,-357 456,-351 456,-351 456,-20 456,-20 456,-14 462,-8 468,-8"/>
22
- <text xml:space="preserve" text-anchor="middle" x="524.75" y="-340" font-family="sans-Serif" font-size="20.00" fill="#fecaca">Provider APIs</text>
21
+ <path fill="#450a0a" stroke="#b91c1c" stroke-dasharray="5,2" d="M586.25,-41.75C586.25,-41.75 699.75,-41.75 699.75,-41.75 705.75,-41.75 711.75,-47.75 711.75,-53.75 711.75,-53.75 711.75,-384.75 711.75,-384.75 711.75,-390.75 705.75,-396.75 699.75,-396.75 699.75,-396.75 586.25,-396.75 586.25,-396.75 580.25,-396.75 574.25,-390.75 574.25,-384.75 574.25,-384.75 574.25,-53.75 574.25,-53.75 574.25,-47.75 580.25,-41.75 586.25,-41.75"/>
22
+ <text xml:space="preserve" text-anchor="middle" x="643" y="-373.75" font-family="sans-Serif" font-size="20.00" fill="#fecaca">Provider APIs</text>
23
23
  </g>
24
24
  <!-- Loop -->
25
25
  <g id="node1" class="node">
26
26
  <title>Loop</title>
27
- <path fill="#7dd3fc" stroke="#334155" stroke-width="2" d="M102.25,-188C102.25,-188 12,-188 12,-188 6,-188 0,-182 0,-176 0,-176 0,-164 0,-164 0,-158 6,-152 12,-152 12,-152 102.25,-152 102.25,-152 108.25,-152 114.25,-158 114.25,-164 114.25,-164 114.25,-176 114.25,-176 114.25,-182 108.25,-188 102.25,-188"/>
28
- <text xml:space="preserve" text-anchor="middle" x="57.12" y="-172.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">PWN::AI::Agent::Loop</text>
29
- <text xml:space="preserve" text-anchor="middle" x="57.12" y="-160.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">tool&#45;calling harness</text>
27
+ <path fill="#7dd3fc" stroke="#334155" stroke-width="2" d="M127,-192.75C127,-192.75 36.75,-192.75 36.75,-192.75 30.75,-192.75 24.75,-186.75 24.75,-180.75 24.75,-180.75 24.75,-168.75 24.75,-168.75 24.75,-162.75 30.75,-156.75 36.75,-156.75 36.75,-156.75 127,-156.75 127,-156.75 133,-156.75 139,-162.75 139,-168.75 139,-168.75 139,-180.75 139,-180.75 139,-186.75 133,-192.75 127,-192.75"/>
28
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-177.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">PWN::AI::Agent::Loop</text>
29
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-165.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">tool&#45;calling harness</text>
30
30
  </g>
31
31
  <!-- OpenAI -->
32
32
  <g id="node2" class="node">
33
33
  <title>OpenAI</title>
34
- <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M303.62,-324C303.62,-324 273.62,-324 273.62,-324 267.62,-324 261.62,-318 261.62,-312 261.62,-312 261.62,-300 261.62,-300 261.62,-294 267.62,-288 273.62,-288 273.62,-288 303.62,-288 303.62,-288 309.62,-288 315.62,-294 315.62,-300 315.62,-300 315.62,-312 315.62,-312 315.62,-318 309.62,-324 303.62,-324"/>
35
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-302.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">OpenAI</text>
34
+ <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M421.88,-357.75C421.88,-357.75 391.88,-357.75 391.88,-357.75 385.88,-357.75 379.88,-351.75 379.88,-345.75 379.88,-345.75 379.88,-333.75 379.88,-333.75 379.88,-327.75 385.88,-321.75 391.88,-321.75 391.88,-321.75 421.88,-321.75 421.88,-321.75 427.88,-321.75 433.88,-327.75 433.88,-333.75 433.88,-333.75 433.88,-345.75 433.88,-345.75 433.88,-351.75 427.88,-357.75 421.88,-357.75"/>
35
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-336.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">OpenAI</text>
36
36
  </g>
37
37
  <!-- Loop&#45;&gt;OpenAI -->
38
38
  <g id="edge1" class="edge">
39
39
  <title>Loop&#45;&gt;OpenAI</title>
40
- <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M80.78,-188.81C108.07,-210.83 155.92,-247.41 201.25,-272 217.35,-280.74 236.19,-288.42 252.15,-294.26"/>
41
- <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="250.85,-296.77 259.33,-296.82 252.73,-291.49 250.85,-296.77"/>
40
+ <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M100.06,-193.75C123.03,-218.01 166.03,-259.74 210.75,-283.75 262.28,-311.41 328.99,-326.74 369.55,-334.1"/>
41
+ <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="368.97,-336.85 377.33,-335.47 369.94,-331.33 368.97,-336.85"/>
42
42
  </g>
43
43
  <!-- Anthropic -->
44
44
  <g id="node3" class="node">
45
45
  <title>Anthropic</title>
46
- <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M305.25,-256C305.25,-256 272,-256 272,-256 266,-256 260,-250 260,-244 260,-244 260,-232 260,-232 260,-226 266,-220 272,-220 272,-220 305.25,-220 305.25,-220 311.25,-220 317.25,-226 317.25,-232 317.25,-232 317.25,-244 317.25,-244 317.25,-250 311.25,-256 305.25,-256"/>
47
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-234.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Anthropic</text>
46
+ <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M423.5,-289.75C423.5,-289.75 390.25,-289.75 390.25,-289.75 384.25,-289.75 378.25,-283.75 378.25,-277.75 378.25,-277.75 378.25,-265.75 378.25,-265.75 378.25,-259.75 384.25,-253.75 390.25,-253.75 390.25,-253.75 423.5,-253.75 423.5,-253.75 429.5,-253.75 435.5,-259.75 435.5,-265.75 435.5,-265.75 435.5,-277.75 435.5,-277.75 435.5,-283.75 429.5,-289.75 423.5,-289.75"/>
47
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-268.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Anthropic</text>
48
48
  </g>
49
49
  <!-- Loop&#45;&gt;Anthropic -->
50
50
  <g id="edge2" class="edge">
51
51
  <title>Loop&#45;&gt;Anthropic</title>
52
- <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M115.15,-186.9C157.31,-199.39 213.54,-216.05 250.15,-226.9"/>
53
- <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="249.12,-229.51 257.59,-229.1 250.71,-224.14 249.12,-229.51"/>
52
+ <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M107.26,-193.62C131.9,-211.59 171.79,-237.77 210.75,-250.75 263.23,-268.24 327.63,-271.99 367.72,-272.4"/>
53
+ <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="367.64,-275.2 375.65,-272.43 367.66,-269.6 367.64,-275.2"/>
54
+ </g>
55
+ <!-- Loop&#45;&gt;Anthropic -->
56
+ <g id="edge12" class="edge">
57
+ <title>Loop&#45;&gt;Anthropic</title>
58
+ <path fill="none" stroke="#fbbf24" stroke-width="1.3" stroke-dasharray="5,2" d="M139.74,-185.82C179.58,-194.16 233.84,-206.73 280.5,-221.75 298.33,-227.49 302.12,-230.76 319.5,-237.75 335.6,-244.22 353.43,-251.26 368.69,-257.25"/>
59
+ <polygon fill="#fbbf24" stroke="#fbbf24" stroke-width="1.3" points="367.52,-259.8 375.99,-260.11 369.57,-254.58 367.52,-259.8"/>
60
+ <text xml:space="preserve" text-anchor="middle" x="245.62" y="-234.2" font-family="sans-Serif" font-size="9.00" fill="#cbd5e1">reflect_engine</text>
61
+ <text xml:space="preserve" text-anchor="middle" x="245.62" y="-223.7" font-family="sans-Serif" font-size="9.00" fill="#cbd5e1">(teacher&#45;student)</text>
54
62
  </g>
55
63
  <!-- Grok -->
56
64
  <g id="node4" class="node">
57
65
  <title>Grok</title>
58
- <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M324.75,-188C324.75,-188 252.5,-188 252.5,-188 246.5,-188 240.5,-182 240.5,-176 240.5,-176 240.5,-164 240.5,-164 240.5,-158 246.5,-152 252.5,-152 252.5,-152 324.75,-152 324.75,-152 330.75,-152 336.75,-158 336.75,-164 336.75,-164 336.75,-176 336.75,-176 336.75,-182 330.75,-188 324.75,-188"/>
59
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-172.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Grok</text>
60
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-160.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">OAuth device flow</text>
66
+ <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M443,-221.75C443,-221.75 370.75,-221.75 370.75,-221.75 364.75,-221.75 358.75,-215.75 358.75,-209.75 358.75,-209.75 358.75,-197.75 358.75,-197.75 358.75,-191.75 364.75,-185.75 370.75,-185.75 370.75,-185.75 443,-185.75 443,-185.75 449,-185.75 455,-191.75 455,-197.75 455,-197.75 455,-209.75 455,-209.75 455,-215.75 449,-221.75 443,-221.75"/>
67
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-206.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Grok</text>
68
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-194.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">OAuth device flow</text>
61
69
  </g>
62
70
  <!-- Loop&#45;&gt;Grok -->
63
71
  <g id="edge3" class="edge">
64
72
  <title>Loop&#45;&gt;Grok</title>
65
- <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M115.15,-170C150.34,-170 195.32,-170 230.53,-170"/>
66
- <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="230.21,-172.8 238.21,-170 230.21,-167.2 230.21,-172.8"/>
73
+ <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M139.88,-179.87C198.51,-185.13 289.36,-193.29 348.23,-198.57"/>
74
+ <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="347.94,-201.36 356.15,-199.29 348.44,-195.78 347.94,-201.36"/>
67
75
  </g>
68
76
  <!-- Gemini -->
69
77
  <g id="node5" class="node">
70
78
  <title>Gemini</title>
71
- <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M303.62,-120C303.62,-120 273.62,-120 273.62,-120 267.62,-120 261.62,-114 261.62,-108 261.62,-108 261.62,-96 261.62,-96 261.62,-90 267.62,-84 273.62,-84 273.62,-84 303.62,-84 303.62,-84 309.62,-84 315.62,-90 315.62,-96 315.62,-96 315.62,-108 315.62,-108 315.62,-114 309.62,-120 303.62,-120"/>
72
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-98.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Gemini</text>
79
+ <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M421.88,-153.75C421.88,-153.75 391.88,-153.75 391.88,-153.75 385.88,-153.75 379.88,-147.75 379.88,-141.75 379.88,-141.75 379.88,-129.75 379.88,-129.75 379.88,-123.75 385.88,-117.75 391.88,-117.75 391.88,-117.75 421.88,-117.75 421.88,-117.75 427.88,-117.75 433.88,-123.75 433.88,-129.75 433.88,-129.75 433.88,-141.75 433.88,-141.75 433.88,-147.75 427.88,-153.75 421.88,-153.75"/>
80
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-132.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Gemini</text>
73
81
  </g>
74
82
  <!-- Loop&#45;&gt;Gemini -->
75
83
  <g id="edge4" class="edge">
76
84
  <title>Loop&#45;&gt;Gemini</title>
77
- <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M115.15,-153.1C157.92,-140.43 215.17,-123.47 251.73,-112.64"/>
78
- <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="252.25,-115.4 259.12,-110.44 250.66,-110.03 252.25,-115.4"/>
85
+ <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M139.88,-167.87C206.2,-159.86 313.73,-146.88 369.59,-140.13"/>
86
+ <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="369.83,-142.92 377.44,-139.18 369.16,-137.36 369.83,-142.92"/>
79
87
  </g>
80
88
  <!-- Ollama -->
81
89
  <g id="node6" class="node">
82
90
  <title>Ollama</title>
83
- <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M303.62,-52C303.62,-52 273.62,-52 273.62,-52 267.62,-52 261.62,-46 261.62,-40 261.62,-40 261.62,-28 261.62,-28 261.62,-22 267.62,-16 273.62,-16 273.62,-16 303.62,-16 303.62,-16 309.62,-16 315.62,-22 315.62,-28 315.62,-28 315.62,-40 315.62,-40 315.62,-46 309.62,-52 303.62,-52"/>
84
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-36.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Ollama</text>
85
- <text xml:space="preserve" text-anchor="middle" x="288.62" y="-24.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">(local)</text>
91
+ <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M471.12,-85.75C471.12,-85.75 342.62,-85.75 342.62,-85.75 336.62,-85.75 330.62,-79.75 330.62,-73.75 330.62,-73.75 330.62,-53.75 330.62,-53.75 330.62,-47.75 336.62,-41.75 342.62,-41.75 342.62,-41.75 471.12,-41.75 471.12,-41.75 477.12,-41.75 483.12,-47.75 483.12,-53.75 483.12,-53.75 483.12,-73.75 483.12,-73.75 483.12,-79.75 477.12,-85.75 471.12,-85.75"/>
92
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-72.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Ollama (local)</text>
93
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-60.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">/api/chat &#160;num_ctx · keep_alive</text>
94
+ <text xml:space="preserve" text-anchor="middle" x="406.88" y="-48.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">/api/embed → MemoryIndex</text>
86
95
  </g>
87
96
  <!-- Loop&#45;&gt;Ollama -->
88
97
  <g id="edge5" class="edge">
89
98
  <title>Loop&#45;&gt;Ollama</title>
90
- <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M80.78,-151.19C108.07,-129.17 155.92,-92.59 201.25,-68 217.35,-59.26 236.19,-51.58 252.15,-45.74"/>
91
- <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="252.73,-48.51 259.33,-43.18 250.85,-43.23 252.73,-48.51"/>
99
+ <path fill="none" stroke="#a78bfa" stroke-width="1.3" d="M138.03,-155.79C191.14,-137.54 271.86,-109.8 330.8,-89.55"/>
100
+ <polygon fill="#a78bfa" stroke="#a78bfa" stroke-width="1.3" points="331.55,-92.25 338.21,-87 329.73,-86.96 331.55,-92.25"/>
92
101
  </g>
93
102
  <!-- A1 -->
94
103
  <g id="node7" class="node">
95
104
  <title>A1</title>
96
- <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M553.25,-324C553.25,-324 495.25,-324 495.25,-324 489.25,-324 483.25,-318 483.25,-312 483.25,-312 483.25,-300 483.25,-300 483.25,-294 489.25,-288 495.25,-288 495.25,-288 553.25,-288 553.25,-288 559.25,-288 565.25,-294 565.25,-300 565.25,-300 565.25,-312 565.25,-312 565.25,-318 559.25,-324 553.25,-324"/>
97
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-302.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">api.openai.com</text>
105
+ <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M671.5,-357.75C671.5,-357.75 613.5,-357.75 613.5,-357.75 607.5,-357.75 601.5,-351.75 601.5,-345.75 601.5,-345.75 601.5,-333.75 601.5,-333.75 601.5,-327.75 607.5,-321.75 613.5,-321.75 613.5,-321.75 671.5,-321.75 671.5,-321.75 677.5,-321.75 683.5,-327.75 683.5,-333.75 683.5,-333.75 683.5,-345.75 683.5,-345.75 683.5,-351.75 677.5,-357.75 671.5,-357.75"/>
106
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-336.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">api.openai.com</text>
98
107
  </g>
99
108
  <!-- OpenAI&#45;&gt;A1 -->
100
109
  <g id="edge6" class="edge">
101
110
  <title>OpenAI&#45;&gt;A1</title>
102
- <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M315.97,-306C353.96,-306 424.85,-306 473.03,-306"/>
103
- <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="472.98,-308.8 480.98,-306 472.98,-303.2 472.98,-308.8"/>
111
+ <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M434.22,-339.75C472.21,-339.75 543.1,-339.75 591.28,-339.75"/>
112
+ <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="591.23,-342.55 599.23,-339.75 591.23,-336.95 591.23,-342.55"/>
104
113
  </g>
105
114
  <!-- A2 -->
106
115
  <g id="node8" class="node">
107
116
  <title>A2</title>
108
- <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M558.88,-256C558.88,-256 489.62,-256 489.62,-256 483.62,-256 477.62,-250 477.62,-244 477.62,-244 477.62,-232 477.62,-232 477.62,-226 483.62,-220 489.62,-220 489.62,-220 558.88,-220 558.88,-220 564.88,-220 570.88,-226 570.88,-232 570.88,-232 570.88,-244 570.88,-244 570.88,-250 564.88,-256 558.88,-256"/>
109
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-234.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">api.anthropic.com</text>
117
+ <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M677.12,-289.75C677.12,-289.75 607.88,-289.75 607.88,-289.75 601.88,-289.75 595.88,-283.75 595.88,-277.75 595.88,-277.75 595.88,-265.75 595.88,-265.75 595.88,-259.75 601.88,-253.75 607.88,-253.75 607.88,-253.75 677.12,-253.75 677.12,-253.75 683.12,-253.75 689.12,-259.75 689.12,-265.75 689.12,-265.75 689.12,-277.75 689.12,-277.75 689.12,-283.75 683.12,-289.75 677.12,-289.75"/>
118
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-268.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">api.anthropic.com</text>
110
119
  </g>
111
120
  <!-- Anthropic&#45;&gt;A2 -->
112
121
  <g id="edge7" class="edge">
113
122
  <title>Anthropic&#45;&gt;A2</title>
114
- <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M317.81,-238C354.74,-238 420.36,-238 467.51,-238"/>
115
- <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="467.31,-240.8 475.31,-238 467.31,-235.2 467.31,-240.8"/>
123
+ <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M436.06,-271.75C472.99,-271.75 538.61,-271.75 585.76,-271.75"/>
124
+ <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="585.56,-274.55 593.56,-271.75 585.56,-268.95 585.56,-274.55"/>
116
125
  </g>
117
126
  <!-- A3 -->
118
127
  <g id="node9" class="node">
119
128
  <title>A3</title>
120
- <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M539.25,-188C539.25,-188 509.25,-188 509.25,-188 503.25,-188 497.25,-182 497.25,-176 497.25,-176 497.25,-164 497.25,-164 497.25,-158 503.25,-152 509.25,-152 509.25,-152 539.25,-152 539.25,-152 545.25,-152 551.25,-158 551.25,-164 551.25,-164 551.25,-176 551.25,-176 551.25,-182 545.25,-188 539.25,-188"/>
121
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-172.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">api.x.ai</text>
122
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-160.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">auth.x.ai</text>
129
+ <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M657.5,-221.75C657.5,-221.75 627.5,-221.75 627.5,-221.75 621.5,-221.75 615.5,-215.75 615.5,-209.75 615.5,-209.75 615.5,-197.75 615.5,-197.75 615.5,-191.75 621.5,-185.75 627.5,-185.75 627.5,-185.75 657.5,-185.75 657.5,-185.75 663.5,-185.75 669.5,-191.75 669.5,-197.75 669.5,-197.75 669.5,-209.75 669.5,-209.75 669.5,-215.75 663.5,-221.75 657.5,-221.75"/>
130
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-206.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">api.x.ai</text>
131
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-194.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">auth.x.ai</text>
123
132
  </g>
124
133
  <!-- Grok&#45;&gt;A3 -->
125
134
  <g id="edge8" class="edge">
126
135
  <title>Grok&#45;&gt;A3</title>
127
- <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M337.18,-170C381.49,-170 446.6,-170 486.89,-170"/>
128
- <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="486.84,-172.8 494.84,-170 486.84,-167.2 486.84,-172.8"/>
136
+ <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M455.43,-203.75C499.74,-203.75 564.85,-203.75 605.14,-203.75"/>
137
+ <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="605.09,-206.55 613.09,-203.75 605.09,-200.95 605.09,-206.55"/>
129
138
  </g>
130
139
  <!-- A4 -->
131
140
  <g id="node10" class="node">
132
141
  <title>A4</title>
133
- <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M562.25,-120C562.25,-120 486.25,-120 486.25,-120 480.25,-120 474.25,-114 474.25,-108 474.25,-108 474.25,-96 474.25,-96 474.25,-90 480.25,-84 486.25,-84 486.25,-84 562.25,-84 562.25,-84 568.25,-84 574.25,-90 574.25,-96 574.25,-96 574.25,-108 574.25,-108 574.25,-114 568.25,-120 562.25,-120"/>
134
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-104.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">generativelanguage</text>
135
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-92.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">.googleapis.com</text>
142
+ <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M680.5,-153.75C680.5,-153.75 604.5,-153.75 604.5,-153.75 598.5,-153.75 592.5,-147.75 592.5,-141.75 592.5,-141.75 592.5,-129.75 592.5,-129.75 592.5,-123.75 598.5,-117.75 604.5,-117.75 604.5,-117.75 680.5,-117.75 680.5,-117.75 686.5,-117.75 692.5,-123.75 692.5,-129.75 692.5,-129.75 692.5,-141.75 692.5,-141.75 692.5,-147.75 686.5,-153.75 680.5,-153.75"/>
143
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-138.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">generativelanguage</text>
144
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-126.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">.googleapis.com</text>
136
145
  </g>
137
146
  <!-- Gemini&#45;&gt;A4 -->
138
147
  <g id="edge9" class="edge">
139
148
  <title>Gemini&#45;&gt;A4</title>
140
- <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M315.97,-102C351.62,-102 416.24,-102 463.88,-102"/>
141
- <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="463.81,-104.8 471.81,-102 463.81,-99.2 463.81,-104.8"/>
149
+ <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M434.22,-135.75C469.87,-135.75 534.49,-135.75 582.13,-135.75"/>
150
+ <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="582.06,-138.55 590.06,-135.75 582.06,-132.95 582.06,-138.55"/>
142
151
  </g>
143
152
  <!-- A5 -->
144
153
  <g id="node11" class="node">
145
154
  <title>A5</title>
146
- <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M554.38,-52C554.38,-52 494.12,-52 494.12,-52 488.12,-52 482.12,-46 482.12,-40 482.12,-40 482.12,-28 482.12,-28 482.12,-22 488.12,-16 494.12,-16 494.12,-16 554.38,-16 554.38,-16 560.38,-16 566.38,-22 566.38,-28 566.38,-28 566.38,-40 566.38,-40 566.38,-46 560.38,-52 554.38,-52"/>
147
- <text xml:space="preserve" text-anchor="middle" x="524.25" y="-30.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">localhost:11434</text>
155
+ <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M672.62,-85.75C672.62,-85.75 612.38,-85.75 612.38,-85.75 606.38,-85.75 600.38,-79.75 600.38,-73.75 600.38,-73.75 600.38,-61.75 600.38,-61.75 600.38,-55.75 606.38,-49.75 612.38,-49.75 612.38,-49.75 672.62,-49.75 672.62,-49.75 678.62,-49.75 684.62,-55.75 684.62,-61.75 684.62,-61.75 684.62,-73.75 684.62,-73.75 684.62,-79.75 678.62,-85.75 672.62,-85.75"/>
156
+ <text xml:space="preserve" text-anchor="middle" x="642.5" y="-64.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">localhost:11434</text>
148
157
  </g>
149
158
  <!-- Ollama&#45;&gt;A5 -->
150
159
  <g id="edge10" class="edge">
151
160
  <title>Ollama&#45;&gt;A5</title>
152
- <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M315.97,-34C353.63,-34 423.6,-34 471.75,-34"/>
153
- <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="471.71,-36.8 479.71,-34 471.71,-31.2 471.71,-36.8"/>
161
+ <path fill="none" stroke="#fb7185" stroke-width="1.3" d="M483.73,-65.05C518.59,-65.65 559.03,-66.34 590.24,-66.87"/>
162
+ <polygon fill="#fb7185" stroke="#fb7185" stroke-width="1.3" points="590.01,-69.67 598.06,-67.01 590.11,-64.07 590.01,-69.67"/>
154
163
  </g>
155
164
  <!-- Cfg -->
156
165
  <g id="node12" class="node">
157
166
  <title>Cfg</title>
158
- <path fill="#fcd34d" stroke="#334155" stroke-width="1.3" d="M108.25,-82.75C108.25,-85.78 85.33,-88.25 57.12,-88.25 28.92,-88.25 6,-85.78 6,-82.75 6,-82.75 6,-33.25 6,-33.25 6,-30.22 28.92,-27.75 57.12,-27.75 85.33,-27.75 108.25,-30.22 108.25,-33.25 108.25,-33.25 108.25,-82.75 108.25,-82.75"/>
159
- <path fill="none" stroke="#334155" stroke-width="1.3" d="M108.25,-82.75C108.25,-79.72 85.33,-77.25 57.12,-77.25 28.92,-77.25 6,-79.72 6,-82.75"/>
160
- <text xml:space="preserve" text-anchor="middle" x="57.12" y="-66.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">PWN::Config</text>
161
- <text xml:space="preserve" text-anchor="middle" x="57.12" y="-54.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">~/.pwn/config.yml</text>
162
- <text xml:space="preserve" text-anchor="middle" x="57.12" y="-42.5" font-family="sans-Serif" font-size="10.00" fill="#0f172a">engine · key · oauth</text>
167
+ <path fill="#fcd34d" stroke="#334155" stroke-width="1.3" d="M163.75,-85C163.75,-89.69 127.05,-93.5 81.88,-93.5 36.7,-93.5 0,-89.69 0,-85 0,-85 0,-8.5 0,-8.5 0,-3.81 36.7,0 81.88,0 127.05,0 163.75,-3.81 163.75,-8.5 163.75,-8.5 163.75,-85 163.75,-85"/>
168
+ <path fill="none" stroke="#334155" stroke-width="1.3" d="M163.75,-85C163.75,-80.31 127.05,-76.5 81.88,-76.5 36.7,-76.5 0,-80.31 0,-85"/>
169
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-67.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">PWN::Config</text>
170
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-55.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">~/.pwn/config.yml</text>
171
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-43.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">active · key · oauth</text>
172
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-31.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">prompt_budget · reflect_engine</text>
173
+ <text xml:space="preserve" text-anchor="middle" x="81.88" y="-19.25" font-family="sans-Serif" font-size="10.00" fill="#0f172a">plan_first · tool_router · escalation</text>
163
174
  </g>
164
175
  <!-- Cfg&#45;&gt;Loop -->
165
176
  <g id="edge11" class="edge">
166
177
  <title>Cfg&#45;&gt;Loop</title>
167
- <path fill="none" stroke="#fbbf24" stroke-width="1.3" stroke-dasharray="5,2" d="M57.12,-88.6C57.12,-104.97 57.12,-125 57.12,-141.1"/>
168
- <polygon fill="#fbbf24" stroke="#fbbf24" stroke-width="1.3" points="54.33,-141.06 57.13,-149.06 59.93,-141.06 54.33,-141.06"/>
169
- <text xml:space="preserve" text-anchor="middle" x="48.88" y="-116.83" font-family="sans-Serif" font-size="9.00" fill="#cbd5e1">active engine</text>
178
+ <path fill="none" stroke="#fbbf24" stroke-width="1.3" stroke-dasharray="5,2" d="M81.88,-94.05C81.88,-111.52 81.88,-130.78 81.88,-146.11"/>
179
+ <polygon fill="#fbbf24" stroke="#fbbf24" stroke-width="1.3" points="79.08,-146.04 81.88,-154.04 84.68,-146.04 79.08,-146.04"/>
180
+ <text xml:space="preserve" text-anchor="middle" x="73.62" y="-121.83" font-family="sans-Serif" font-size="9.00" fill="#cbd5e1">active engine</text>
170
181
  </g>
171
182
  </g>
172
183
  </svg>
@@ -9,7 +9,7 @@ digraph "PWN_Agent_Tool_Registry" {
9
9
  shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
10
  edge [color="#94a3b8", penwidth=1.1, arrowsize=0.7];
11
11
 
12
- Registry [label="Registry\nJSON-Schema\nfunction defs", fillcolor="#c4b5fd", fontsize=12, penwidth=2];
12
+ Registry [label="Registry\nJSON-Schema function defs\nrank(query) · CORE_TOOLS\ntool_router → CORE + top-K", fillcolor="#c4b5fd", fontsize=12, penwidth=2];
13
13
 
14
14
  subgraph cluster_ts {
15
15
  label="Toolsets"; fontcolor="#a7f3d0"; style=rounded;
@@ -35,9 +35,9 @@ digraph "PWN_Agent_Tool_Registry" {
35
35
  t_mem [label="memory_remember\nrecall · forget · clear"];
36
36
  t_skill [label="skill_list · view\ncreate · add_reference · delete"];
37
37
  t_sess [label="sessions_list · view\ncurrent · delete · stats"];
38
- t_learn [label="learning_note_outcome\nreflect · distill_skill\nconsolidate · outcomes · reset\nmistakes_list · record\nmistakes_resolve · reset"];
38
+ t_learn [label="learning_note_outcome\nreflect · distill_skill\nexemplars_for · export_finetune\nconsolidate · outcomes · reset\nmistakes_list · record\nmistakes_resolve · reset"];
39
39
  t_metric [label="metrics_summary\nmetrics_reset"];
40
- t_extro [label="extro_snapshot · drift\nobserve · intel · correlate\nwatch · verify · rf_tune\nobservations · stats · reset\nauto_toggle"];
40
+ t_extro [label="extro_snapshot · drift\nobserve · intel · correlate\nwatch · verify · rf_tune · osint\nserial · telecomm · packet\nvision · voice · observations\nstats · reset · auto_toggle"];
41
41
  t_cron [label="cron_list · create · run\nenable · disable · remove"];
42
42
  t_swarm [label="agent_list · spawn · ask\ndebate · broadcast\nswarm_bus · swarm_list"];
43
43
  }
@@ -56,4 +56,6 @@ digraph "PWN_Agent_Tool_Registry" {
56
56
  extro -> t_extro [color="#f59e0b"];
57
57
  cron -> t_cron [color="#f59e0b"];
58
58
  swarm -> t_swarm [color="#f59e0b"];
59
+
60
+ t_metric -> Registry [label="success_rate\n→ router tie-break", style=dashed, color="#fbbf24", constraint=false];
59
61
  }
@@ -19,7 +19,7 @@ digraph "PWN_AI_Integration" {
19
19
  Anthropic [label="Anthropic", fillcolor="#c4b5fd"];
20
20
  Grok [label="Grok\nOAuth device flow", fillcolor="#c4b5fd"];
21
21
  Gemini [label="Gemini", fillcolor="#c4b5fd"];
22
- Ollama [label="Ollama\n(local)", fillcolor="#c4b5fd"];
22
+ Ollama [label="Ollama (local)\n/api/chat num_ctx · keep_alive\n/api/embed → MemoryIndex", fillcolor="#c4b5fd"];
23
23
  }
24
24
  {rank=same; OpenAI; Anthropic; Grok; Gemini; Ollama}
25
25
 
@@ -34,7 +34,7 @@ digraph "PWN_AI_Integration" {
34
34
  }
35
35
  {rank=same; A1; A2; A3; A4; A5}
36
36
 
37
- Cfg [label="PWN::Config\n~/.pwn/config.yml\nengine · key · oauth", shape=cylinder, fillcolor="#fcd34d"];
37
+ Cfg [label="PWN::Config\n~/.pwn/config.yml\nactive · key · oauth\nprompt_budget · reflect_engine\nplan_first · tool_router · escalation", shape=cylinder, fillcolor="#fcd34d"];
38
38
 
39
39
  Loop -> OpenAI [color="#a78bfa"];
40
40
  Loop -> Anthropic [color="#a78bfa"];
@@ -47,4 +47,5 @@ digraph "PWN_AI_Integration" {
47
47
  Gemini -> A4 [color="#fb7185"];
48
48
  Ollama -> A5 [color="#fb7185"];
49
49
  Cfg -> Loop [label="active engine", style=dashed, color="#fbbf24", constraint=false];
50
+ Loop -> Anthropic [label="reflect_engine\n(teacher-student)", style=dashed, color="#fbbf24", constraint=false];
50
51
  }
@@ -18,33 +18,38 @@ digraph "PWN_MemorySkills" {
18
18
  Note [label="learning_note_outcome\nlearning_reflect", fillcolor="#6ee7b7"];
19
19
  Dist [label="learning_distill_skill\n(session → skill)", fillcolor="#6ee7b7"];
20
20
  Mrec [label="mistakes_record\nmistakes_resolve", fillcolor="#6ee7b7"];
21
+ Xft [label="Learning.export_finetune\n(sessions → dataset)", fillcolor="#6ee7b7"];
21
22
  }
22
- {rank=same; Rem; Skc; Note; Dist; Mrec}
23
+ {rank=same; Rem; Skc; Note; Dist; Mrec; Xft}
23
24
 
24
25
  subgraph cluster_files {
25
26
  label="~/.pwn/"; fontcolor="#fde68a"; style=rounded;
26
27
  color="#a16207"; bgcolor="#422006";
27
28
  Fmem [label="memory.json\nfact · pref · lesson · env", shape=cylinder, fillcolor="#fcd34d"];
29
+ Fidx [label="memory.idx\nembedding index\n(sha → vec)", shape=cylinder, fillcolor="#fcd34d"];
28
30
  Fskl [label="skills/*.md\nYAML front-matter refs", shape=cylinder, fillcolor="#fcd34d"];
29
31
  Flrn [label="learning.jsonl\noutcome log", shape=cylinder, fillcolor="#fcd34d"];
30
32
  Fses [label="sessions/*.jsonl\ntranscripts", shape=cylinder, fillcolor="#fcd34d"];
31
33
  Fmis [label="mistakes.json\nsig → count · fix · regressed", shape=cylinder, fillcolor="#fcd34d"];
32
34
  Fext [label="extrospection.json\nsnapshot · rf · web · obs", shape=cylinder, fillcolor="#fcd34d"];
35
+ Fftn [label="finetune/*.jsonl\nShareGPT / OpenAI", shape=cylinder, fillcolor="#fcd34d"];
33
36
  }
34
- {rank=same; Fmem; Fskl; Flrn; Fses; Fmis; Fext}
37
+ {rank=same; Fmem; Fidx; Fskl; Flrn; Fses; Fmis; Fext; Fftn}
35
38
 
36
39
  subgraph cluster_read {
37
40
  label="Read-Side / Injection"; fontcolor="#ddd6fe"; style=rounded;
38
41
  color="#6d28d9"; bgcolor="#2e1065";
39
42
  Rec [label="memory_recall", fillcolor="#c4b5fd"];
43
+ Midx [label="MemoryIndex\nrecall_semantic\n(cosine top-K)", fillcolor="#c4b5fd", penwidth=2];
40
44
  Skv [label="skill_list · view", fillcolor="#c4b5fd"];
41
45
  Out [label="learning_outcomes\nlearning_stats", fillcolor="#c4b5fd"];
42
46
  Sesv [label="sessions_view\nsessions_current", fillcolor="#c4b5fd"];
43
47
  Mlst [label="mistakes_list\ncorrection_hint", fillcolor="#c4b5fd"];
48
+ Exem [label="Learning.exemplars_for\n(few-shot trace)", fillcolor="#c4b5fd"];
44
49
  }
45
- {rank=same; Rec; Skv; Out; Sesv; Mlst}
50
+ {rank=same; Rec; Midx; Skv; Out; Sesv; Mlst; Exem}
46
51
 
47
- Prompt [label="PromptBuilder\nMEMORY + SKILLS + LEARNING\n+ KNOWN MISTAKES / FIXES\n+ METRICS + EXTROSPECTION", fillcolor="#7dd3fc", penwidth=2];
52
+ Prompt [label="PromptBuilder.build(request:)\nengine-aware .budget\nMEMORY (relevance-ranked) + SKILLS\n+ LEARNING + KNOWN MISTAKES/FIXES\n+ METRICS (per-engine) + EXTRO", fillcolor="#7dd3fc", penwidth=2];
48
53
 
49
54
  Rem -> Fmem [color="#f59e0b"];
50
55
  Skc -> Fskl [color="#f59e0b"];
@@ -66,8 +71,25 @@ digraph "PWN_MemorySkills" {
66
71
  Sesv -> Prompt [color="#38bdf8"];
67
72
  Mlst -> Prompt [label="do NOT repeat", color="#fb7185", penwidth=2];
68
73
 
74
+ Rem -> Fidx [label="incremental\nre-embed", style=dashed, color="#fbbf24"];
75
+ Xft -> Fftn [color="#f59e0b"];
76
+ Xft -> Fses [dir=back, style=dashed, color="#fbbf24", label="mine"];
77
+ Xft -> Flrn [dir=back, style=dashed, color="#fbbf24", label="success:true"];
78
+
79
+ Fidx -> Midx [color="#a78bfa"];
80
+ Fmem -> Midx [style=dashed, color="#a78bfa"];
81
+ Flrn -> Exem [color="#a78bfa"];
82
+ Fses -> Exem [style=dashed, color="#a78bfa"];
83
+
84
+ Midx -> Prompt [label="MEMORY block\n(top-K by cosine)", color="#38bdf8", penwidth=2];
85
+ Exem -> Prompt [label="few-shot msgs\n(local only)", color="#38bdf8"];
86
+
69
87
  ReVal [label="Extrospection.verify\nrevalidate_memory (cron)\nbrowser-backed GC", fillcolor="#fcd34d"];
70
88
  ReVal -> Fmem [label="[UNVERIFIED yyyy-mm-dd]\nprefix stale :fact", color="#fb7185", style=dashed, penwidth=2];
71
89
  ReVal -> Fext [label=":confirmed → :intel obs\n:refuted → observe stale", color="#f59e0b", style=dashed];
72
90
  Fmem -> ReVal [label=":fact w/ CVE|ver|URL", style=dashed, color="#94a3b8", constraint=false];
91
+
92
+ Teach [label="Reflect.on\n(engine: reflect_engine)\nteacher-student", fillcolor="#fda4af", penwidth=2];
93
+ Fses -> Teach [label="transcript", style=dashed, color="#94a3b8", constraint=false];
94
+ Teach -> Fmem [label="frontier-authored\n:lesson", color="#fb7185", penwidth=2];
73
95
  }
@@ -36,10 +36,10 @@ digraph "PWN_Overall_Architecture" {
36
36
  subgraph cluster_agent {
37
37
  label="PWN::AI::Agent"; fontcolor="#ddd6fe";
38
38
  style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
39
- Loop [label="Loop\nplan → dispatch → observe", fillcolor="#c4b5fd"];
40
- Registry [label="Registry\n10 toolsets · 55 tools", fillcolor="#c4b5fd"];
39
+ Loop [label="Loop\nplan_first → dispatch\n→ observe escalate", fillcolor="#c4b5fd"];
40
+ Registry [label="Registry\n10 toolsets · 61 tools\ntool_router (CORE+topK)", fillcolor="#c4b5fd"];
41
41
  Swarm [label="Swarm\npersonas · debate · bus", fillcolor="#c4b5fd"];
42
- Prompt [label="PromptBuilder\nMEMORY · SKILLS · LEARNING\nMISTAKES · METRICS · EXTRO",fillcolor="#c4b5fd"];
42
+ Prompt [label="PromptBuilder\nengine-budgeted blocks\nMemoryIndex relevance-ranked",fillcolor="#c4b5fd"];
43
43
  }
44
44
  {rank=same; Loop; Registry; Swarm; Prompt}
45
45
 
@@ -63,6 +63,7 @@ digraph "PWN_Overall_Architecture" {
63
63
  label="Persistence ~/.pwn/"; fontcolor="#fde68a";
64
64
  style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
65
65
  Memory [label="memory.json", shape=cylinder, fillcolor="#fcd34d"];
66
+ MemIdx [label="memory.idx\n(embed index)", shape=cylinder, fillcolor="#fcd34d"];
66
67
  Skills [label="skills/*.md", shape=cylinder, fillcolor="#fcd34d"];
67
68
  Learn [label="learning.jsonl", shape=cylinder, fillcolor="#fcd34d"];
68
69
  Metrics [label="metrics.json", shape=cylinder, fillcolor="#fcd34d"];
@@ -71,8 +72,9 @@ digraph "PWN_Overall_Architecture" {
71
72
  Sessions [label="sessions/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
72
73
  SwarmB [label="swarm/*/bus.jsonl", shape=cylinder, fillcolor="#fcd34d"];
73
74
  CronF [label="cron/jobs.yml", shape=cylinder, fillcolor="#fcd34d"];
75
+ Finetune [label="finetune/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
74
76
  }
75
- {rank=same; Memory; Skills; Learn; Metrics; MistF; Extro; Sessions; SwarmB; CronF}
77
+ {rank=same; Memory; MemIdx; Skills; Learn; Metrics; MistF; Extro; Sessions; SwarmB; CronF; Finetune}
76
78
 
77
79
  /* ── L0 → L1 ── */
78
80
  User -> REPL [color="#38bdf8"];
@@ -17,15 +17,17 @@ digraph "PWN_Persistence" {
17
17
  skl [label="skills/*.md\nreusable procedures + refs"];
18
18
  lrn [label="learning.jsonl\ntask outcomes"];
19
19
  mis [label="mistakes.json\nfailure fingerprints · fixes\n[REPEATING] · [REGRESSED]"];
20
- met [label="metrics.json\nper-tool telemetry"];
20
+ met [label="metrics.json\nper-tool · per-engine telemetry"];
21
21
  ext [label="extrospection.json\nsnapshot (host/net/tc/repo/env/rf/web)\n+ previous + observations[]"];
22
22
  ews [label="extrospection/web/*.png\nprobe_web / extro_watch shots"];
23
23
  ses [label="sessions/*.jsonl\ntranscripts"];
24
24
  crn [label="cron/jobs.yml\nscheduled jobs + logs"];
25
25
  agt [label="agents.yml\npersona registry"];
26
26
  swm [label="swarm/<id>/bus.jsonl\nmulti-agent chat"];
27
+ midx [label="memory.idx\nlocal embedding index\n(relevance-ranked MEMORY)"];
28
+ ftn [label="finetune/*.jsonl\nShareGPT / OpenAI\nsupervised dataset"];
27
29
  hist [label="~/.pwn_history\nREPL history"];
28
30
 
29
31
  Root->cfg; Root->mem; Root->skl; Root->lrn; Root->mis; Root->met; Root->ext;
30
- Root->ews; Root->ses; Root->crn; Root->agt; Root->swm; Root->hist;
32
+ Root->ews; Root->ses; Root->crn; Root->agt; Root->swm; Root->midx; Root->ftn; Root->hist;
31
33
  }