pwn 0.5.613 → 0.5.617

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 (134) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -10
  3. data/README.md +117 -17
  4. data/bin/pwn +47 -2
  5. data/bin/pwn_gqrx_scanner +75 -18
  6. data/documentation/AI-Integration.md +36 -0
  7. data/documentation/BurpSuite.md +26 -0
  8. data/documentation/Contributing.md +31 -0
  9. data/documentation/Diagrams.md +140 -0
  10. data/documentation/Drivers.md +25 -0
  11. data/documentation/General-PWN-Usage.md +60 -0
  12. data/documentation/Home.md +78 -0
  13. data/documentation/How-PWN-Works.md +62 -0
  14. data/documentation/Installation.md +75 -0
  15. data/documentation/NmapIt.md +18 -0
  16. data/documentation/Plugins.md +59 -0
  17. data/documentation/Reporting.md +28 -0
  18. data/documentation/SAST.md +32 -0
  19. data/documentation/Skills-Memory-Learning.md +44 -0
  20. data/documentation/Transparent-Browser.md +32 -0
  21. data/documentation/Troubleshooting.md +38 -0
  22. data/documentation/What-is-PWN.md +53 -0
  23. data/documentation/Why-PWN.md +48 -0
  24. data/documentation/diagrams/ai-integration-tool-calling.svg +172 -0
  25. data/documentation/diagrams/build.sh +20 -0
  26. data/documentation/diagrams/burp-vs-zap-preference.svg +69 -0
  27. data/documentation/diagrams/code-scanning-sast.svg +172 -0
  28. data/documentation/diagrams/dot/_THEME.md +27 -0
  29. data/documentation/diagrams/dot/agent-tool-registry.dot +59 -0
  30. data/documentation/diagrams/dot/ai-integration-tool-calling.dot +50 -0
  31. data/documentation/diagrams/dot/aws-cloud-security.dot +48 -0
  32. data/documentation/diagrams/dot/burp-vs-zap-preference.dot +26 -0
  33. data/documentation/diagrams/dot/code-scanning-sast.dot +49 -0
  34. data/documentation/diagrams/dot/cron-scheduling.dot +40 -0
  35. data/documentation/diagrams/dot/driver-framework.dot +39 -0
  36. data/documentation/diagrams/dot/extrospection-world-awareness.dot +55 -0
  37. data/documentation/diagrams/dot/fuzzing-workflow.dot +47 -0
  38. data/documentation/diagrams/dot/history-to-drivers.dot +34 -0
  39. data/documentation/diagrams/dot/memory-skills-detailed.dot +60 -0
  40. data/documentation/diagrams/dot/network-infra-testing.dot +54 -0
  41. data/documentation/diagrams/dot/overall-pwn-architecture.dot +115 -0
  42. data/documentation/diagrams/dot/penetration-testing-workflow.dot +60 -0
  43. data/documentation/diagrams/dot/plugin-ecosystem.dot +45 -0
  44. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +98 -0
  45. data/documentation/diagrams/dot/pwn-repl-prototyping.dot +56 -0
  46. data/documentation/diagrams/dot/reporting-pipeline.dot +46 -0
  47. data/documentation/diagrams/dot/reverse-engineering-flow.dot +43 -0
  48. data/documentation/diagrams/dot/sdr-radio-flow.dot +45 -0
  49. data/documentation/diagrams/dot/sessions-cron-automation.dot +44 -0
  50. data/documentation/diagrams/dot/swarm-multi-agent.dot +70 -0
  51. data/documentation/diagrams/dot/web-application-testing.dot +49 -0
  52. data/documentation/diagrams/dot/zero-day-research-flow.dot +49 -0
  53. data/documentation/diagrams/driver-framework.svg +111 -0
  54. data/documentation/diagrams/fuzzing-workflow.svg +160 -0
  55. data/documentation/diagrams/history-to-drivers.svg +119 -0
  56. data/documentation/diagrams/memory-skills-detailed.svg +202 -0
  57. data/documentation/diagrams/network-infra-testing.svg +183 -0
  58. data/documentation/diagrams/overall-pwn-architecture.svg +405 -0
  59. data/documentation/diagrams/penetration-testing-workflow.svg +201 -0
  60. data/documentation/diagrams/plugin-ecosystem.svg +276 -0
  61. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +306 -0
  62. data/documentation/diagrams/pwn-repl-prototyping.svg +168 -0
  63. data/documentation/diagrams/reporting-pipeline.svg +151 -0
  64. data/documentation/diagrams/reverse-engineering-flow.svg +134 -0
  65. data/documentation/diagrams/sessions-cron-automation.svg +136 -0
  66. data/documentation/diagrams/web-application-testing.svg +173 -0
  67. data/documentation/diagrams/zero-day-research-flow.svg +153 -0
  68. data/documentation/pwn-REPL.md +33 -0
  69. data/documentation/pwn-ai-Agent.md +43 -0
  70. data/git_commit.sh +1 -1
  71. data/lib/pwn/ai/agent/assembly.rb +1 -1
  72. data/lib/pwn/ai/agent/btc.rb +1 -1
  73. data/lib/pwn/ai/agent/burp_suite.rb +1 -1
  74. data/lib/pwn/ai/agent/extrospection.rb +618 -0
  75. data/lib/pwn/ai/agent/gqrx.rb +2 -2
  76. data/lib/pwn/ai/agent/hacker_one.rb +1 -1
  77. data/lib/pwn/ai/agent/introspection.rb +91 -0
  78. data/lib/pwn/ai/agent/learning.rb +379 -0
  79. data/lib/pwn/ai/agent/loop.rb +33 -3
  80. data/lib/pwn/ai/agent/metrics.rb +155 -0
  81. data/lib/pwn/ai/agent/prompt_builder.rb +32 -3
  82. data/lib/pwn/ai/agent/sast.rb +1 -1
  83. data/lib/pwn/ai/agent/swarm.rb +437 -0
  84. data/lib/pwn/ai/agent/tools/cron.rb +163 -0
  85. data/lib/pwn/ai/agent/tools/extrospection.rb +280 -0
  86. data/lib/pwn/ai/agent/tools/learning.rb +221 -0
  87. data/lib/pwn/ai/agent/tools/memory.rb +27 -0
  88. data/lib/pwn/ai/agent/tools/metrics.rb +61 -0
  89. data/lib/pwn/ai/agent/tools/sessions.rb +139 -0
  90. data/lib/pwn/ai/agent/tools/skills.rb +124 -8
  91. data/lib/pwn/ai/agent/tools/swarm.rb +229 -0
  92. data/lib/pwn/ai/agent/transparent_browser.rb +1 -1
  93. data/lib/pwn/ai/agent/vuln_gen.rb +2 -2
  94. data/lib/pwn/ai/agent.rb +5 -0
  95. data/lib/pwn/ai/anthropic.rb +19 -4
  96. data/lib/pwn/ai/grok.rb +249 -106
  97. data/lib/pwn/ai.rb +0 -1
  98. data/lib/pwn/config.rb +96 -36
  99. data/lib/pwn/cron.rb +16 -7
  100. data/lib/pwn/plugins/monkey_patch.rb +2 -2
  101. data/lib/pwn/plugins/repl.rb +158 -284
  102. data/lib/pwn/sdr/decoder/base.rb +251 -0
  103. data/lib/pwn/sdr/decoder/gsm.rb +84 -185
  104. data/lib/pwn/sdr/decoder/pocsag.rb +62 -217
  105. data/lib/pwn/sdr/decoder.rb +1 -0
  106. data/lib/pwn/sdr/gqrx.rb +446 -65
  107. data/lib/pwn/version.rb +1 -1
  108. data/spec/lib/pwn/ai/agent/extrospection_spec.rb +15 -0
  109. data/spec/lib/pwn/ai/agent/introspection_spec.rb +15 -0
  110. data/spec/lib/pwn/ai/agent/learning_spec.rb +68 -0
  111. data/spec/lib/pwn/ai/agent/metrics_spec.rb +27 -0
  112. data/spec/lib/pwn/ai/agent/swarm_spec.rb +34 -0
  113. data/spec/lib/pwn/ai/agent/tools/cron_spec.rb +40 -0
  114. data/spec/lib/pwn/ai/agent/tools/extrospection_spec.rb +40 -0
  115. data/spec/lib/pwn/ai/agent/tools/learning_spec.rb +30 -0
  116. data/spec/lib/pwn/ai/agent/tools/metrics_spec.rb +20 -0
  117. data/spec/lib/pwn/ai/agent/tools/sessions_spec.rb +35 -0
  118. data/spec/lib/pwn/ai/agent/tools/swarm_spec.rb +17 -0
  119. data/spec/lib/pwn/{ai/introspection_spec.rb → sdr/decoder/base_spec.rb} +3 -3
  120. data/third_party/pwn_rdoc.jsonl +178 -33
  121. metadata +110 -36
  122. data/documentation/PWN.png +0 -0
  123. data/documentation/PWN_Contributors_and_Users.png +0 -0
  124. data/documentation/fax-spectrogram.png +0 -0
  125. data/documentation/fax-waveform.png +0 -0
  126. data/documentation/frozen_string_literal_files_changed_from_false_to_true.txt +0 -54
  127. data/documentation/lifecycle_authz_replay.example.yaml +0 -27
  128. data/documentation/pwn_android_war_dialer_session.png +0 -0
  129. data/documentation/pwn_install.png +0 -0
  130. data/documentation/pwn_wallpaper.jpg +0 -0
  131. data/documentation/ringing-spectrogram.png +0 -0
  132. data/documentation/ringing-waveform.png +0 -0
  133. data/documentation/vulnerability_report_template.md +0 -37
  134. data/lib/pwn/ai/introspection.rb +0 -76
@@ -0,0 +1,115 @@
1
+ digraph "PWN_Overall_Architecture" {
2
+ graph [
3
+ label=<<B>PWN — Offensive Security Automation Framework</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Overall Architecture · lib/pwn/*</FONT>>,
4
+ labelloc=t, fontsize=22, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.55, ranksep=1.15,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, compound=true, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=11, style="filled,rounded",
9
+ shape=box, penwidth=1.4, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ /* ───────── L0 · ACTORS ───────── */
14
+ subgraph cluster_actors {
15
+ label="Actors"; fontcolor="#94a3b8"; style="rounded,dashed";
16
+ color="#334155"; bgcolor="#1e293b";
17
+ User [label="👤 Researcher\nRed Team · Bug Hunter", fillcolor="#7dd3fc"];
18
+ CI [label="⚙️ CI / CD\nHeadless pipelines", fillcolor="#7dd3fc"];
19
+ LLM [label="🤖 LLM Providers\nOpenAI · Anthropic\nGrok · Gemini · Ollama", fillcolor="#c4b5fd"];
20
+ Target [label="🎯 Attack Surface\nHosts · Web · Cloud\nRadio · Hardware", fillcolor="#fda4af"];
21
+ }
22
+ {rank=same; User; CI; LLM; Target}
23
+
24
+ /* ───────── L1 · ENTRY POINTS ───────── */
25
+ subgraph cluster_entry {
26
+ label="Entry Points (bin/)"; fontcolor="#7dd3fc";
27
+ style=rounded; color="#0369a1"; bgcolor="#0c4a6e"; penwidth=2;
28
+ REPL [label="🐚 pwn REPL\nPry + PWN:: preload", fillcolor="#7dd3fc"];
29
+ PwnAI [label="✨ pwn-ai\nAgent TUI · pwn --ai", fillcolor="#7dd3fc"];
30
+ CLI [label="📜 bin/pwn_*\n52 CLI drivers", fillcolor="#7dd3fc"];
31
+ Cronb [label="⏱ PWN::Cron\nScheduled jobs", fillcolor="#7dd3fc"];
32
+ }
33
+ {rank=same; REPL; PwnAI; CLI; Cronb}
34
+
35
+ /* ───────── L2 · AI AGENT CORE ───────── */
36
+ subgraph cluster_agent {
37
+ label="PWN::AI::Agent"; fontcolor="#ddd6fe";
38
+ style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
39
+ Loop [label="Loop\nplan → dispatch → observe", fillcolor="#c4b5fd"];
40
+ Registry [label="Registry\n10 toolsets · 45+ tools", fillcolor="#c4b5fd"];
41
+ Swarm [label="Swarm\npersonas · debate · bus", fillcolor="#c4b5fd"];
42
+ Prompt [label="PromptBuilder\nMEMORY · SKILLS · EXTRO",fillcolor="#c4b5fd"];
43
+ }
44
+ {rank=same; Loop; Registry; Swarm; Prompt}
45
+
46
+ /* ───────── L3 · CAPABILITY NAMESPACES ───────── */
47
+ subgraph cluster_caps {
48
+ label="Capability Namespaces (lib/pwn/*)"; fontcolor="#a7f3d0";
49
+ style=rounded; color="#047857"; bgcolor="#022c22"; penwidth=2;
50
+ Plugins [label="Plugins\n66 modules", fillcolor="#6ee7b7"];
51
+ SAST [label="SAST\n48 rules", fillcolor="#6ee7b7"];
52
+ WWW [label="WWW\n21 site drivers", fillcolor="#6ee7b7"];
53
+ AWS [label="AWS\n90 services", fillcolor="#6ee7b7"];
54
+ SDR [label="SDR\nGQRX · Flipper · RFID", fillcolor="#6ee7b7"];
55
+ Chain [label="Blockchain\nBTC · ETH", fillcolor="#6ee7b7"];
56
+ Bounty [label="Bounty\nlifecycle replay", fillcolor="#6ee7b7"];
57
+ Reports [label="Reports\nHTML · JSON", fillcolor="#6ee7b7"];
58
+ }
59
+ {rank=same; Plugins; SAST; WWW; AWS; SDR; Chain; Bounty; Reports}
60
+
61
+ /* ───────── L4 · PERSISTENCE (~/.pwn) ───────── */
62
+ subgraph cluster_persist {
63
+ label="Persistence ~/.pwn/"; fontcolor="#fde68a";
64
+ style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
65
+ Memory [label="memory.json", shape=cylinder, fillcolor="#fcd34d"];
66
+ Skills [label="skills/*.md", shape=cylinder, fillcolor="#fcd34d"];
67
+ Learn [label="learning.jsonl", shape=cylinder, fillcolor="#fcd34d"];
68
+ Metrics [label="metrics.json", shape=cylinder, fillcolor="#fcd34d"];
69
+ Extro [label="extrospection.json", shape=cylinder, fillcolor="#fcd34d"];
70
+ Sessions [label="sessions/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
71
+ SwarmB [label="swarm/*/bus.jsonl", shape=cylinder, fillcolor="#fcd34d"];
72
+ CronF [label="cron/jobs.yml", shape=cylinder, fillcolor="#fcd34d"];
73
+ }
74
+ {rank=same; Memory; Skills; Learn; Metrics; Extro; Sessions; SwarmB; CronF}
75
+
76
+ /* ── L0 → L1 ── */
77
+ User -> REPL [color="#38bdf8"];
78
+ User -> PwnAI [color="#38bdf8"];
79
+ CI -> CLI [color="#38bdf8"];
80
+ CI -> Cronb [label="crontab", color="#38bdf8"];
81
+
82
+ /* ── L1 → L2 ── */
83
+ REPL -> Loop [color="#a78bfa"];
84
+ PwnAI -> Loop [label="natural language", color="#a78bfa", penwidth=2];
85
+ PwnAI -> Registry [color="#a78bfa"];
86
+ CLI -> Swarm [style=invis];
87
+ Cronb -> Prompt [style=invis];
88
+
89
+ /* ── L2 → L3 ── */
90
+ Loop -> Plugins [label="pwn_eval", color="#34d399", penwidth=2];
91
+ Loop -> SAST [color="#34d399"];
92
+ Registry -> WWW [color="#34d399"];
93
+ Registry -> AWS [color="#34d399"];
94
+ Swarm -> SDR [color="#34d399"];
95
+ Swarm -> Chain [color="#34d399"];
96
+ Prompt -> Bounty [style=invis];
97
+ Prompt -> Reports [style=invis];
98
+ CLI -> Plugins [color="#34d399", constraint=false];
99
+
100
+ /* ── L3 → L4 ── */
101
+ Plugins -> Memory [color="#f59e0b"];
102
+ SAST -> Skills [color="#f59e0b"];
103
+ WWW -> Learn [color="#f59e0b"];
104
+ AWS -> Metrics [color="#f59e0b"];
105
+ SDR -> Extro [color="#f59e0b"];
106
+ Chain -> Sessions [color="#f59e0b"];
107
+ Bounty -> SwarmB [color="#f59e0b"];
108
+ Reports -> CronF [color="#f59e0b"];
109
+
110
+ /* ── side flows (few, non-constraining) ── */
111
+ Loop -> LLM [label="tool-use API", color="#c4b5fd", constraint=false, penwidth=2];
112
+ Plugins -> Target [label="attack", color="#fb7185", constraint=false, penwidth=2];
113
+ Prompt -> Memory [label="inject", dir=back, color="#fbbf24", constraint=false, style=dashed];
114
+ Reports -> User [label="findings", color="#38bdf8", constraint=false, penwidth=2];
115
+ }
@@ -0,0 +1,60 @@
1
+ digraph "PWN_Pentest" {
2
+ graph [
3
+ label=<<B>End-to-End Penetration Testing with PWN</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">recon → enumerate → exploit → post-ex → report</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.2,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ Scope [label="🎯 Scope\ntargets · rules", fillcolor="#7dd3fc"];
14
+
15
+ subgraph cluster_recon {
16
+ label="1 · Recon"; fontcolor="#a7f3d0"; style=rounded;
17
+ color="#047857"; bgcolor="#022c22";
18
+ Shodan [label="Plugins::Shodan\nHunter · IPInfo", fillcolor="#6ee7b7"];
19
+ CrtSh [label="bin/pwn_crt_sh\nWWW::WaybackMachine", fillcolor="#6ee7b7"];
20
+ }
21
+ subgraph cluster_enum {
22
+ label="2 · Enumerate"; fontcolor="#a7f3d0"; style=rounded;
23
+ color="#047857"; bgcolor="#022c22";
24
+ Nmap [label="Plugins::NmapIt\nTCP/UDP discover", fillcolor="#6ee7b7"];
25
+ Spider[label="Plugins::Spider\nTransparentBrowser", fillcolor="#6ee7b7"];
26
+ }
27
+ subgraph cluster_vuln {
28
+ label="3 · Vuln Scan"; fontcolor="#fde68a"; style=rounded;
29
+ color="#a16207"; bgcolor="#422006";
30
+ Burp [label="Plugins::BurpSuite\nactive scan", fillcolor="#fcd34d"];
31
+ Nessus [label="NessusCloud\nOpenVAS · Nexpose", fillcolor="#fcd34d"];
32
+ }
33
+ subgraph cluster_xpl {
34
+ label="4 · Exploit"; fontcolor="#fecaca"; style=rounded;
35
+ color="#b91c1c"; bgcolor="#450a0a";
36
+ MSF [label="Plugins::Metasploit", fillcolor="#fda4af"];
37
+ Fuzz [label="Plugins::Fuzz\nPacket · Sock", fillcolor="#fda4af"];
38
+ }
39
+ subgraph cluster_post {
40
+ label="5 · Post-Ex"; fontcolor="#ddd6fe"; style=rounded;
41
+ color="#6d28d9"; bgcolor="#2e1065";
42
+ Beef [label="Plugins::BeEF\nAndroid · Serial", fillcolor="#c4b5fd"];
43
+ Tor [label="Plugins::Tor\npivot / exfil", fillcolor="#c4b5fd"];
44
+ }
45
+ Report [label="PWN::Reports\nHTML · JSON · DefectDojo", fillcolor="#7dd3fc"];
46
+
47
+ Scope -> Shodan [color="#38bdf8"];
48
+ Scope -> CrtSh [color="#38bdf8"];
49
+ Shodan -> Nmap [color="#34d399"];
50
+ CrtSh -> Spider [color="#34d399"];
51
+ Nmap -> Burp [color="#f59e0b"];
52
+ Nmap -> Nessus [color="#f59e0b"];
53
+ Spider -> Burp [color="#f59e0b"];
54
+ Burp -> MSF [color="#fb7185"];
55
+ Nessus -> Fuzz [color="#fb7185"];
56
+ MSF -> Beef [color="#a78bfa"];
57
+ Fuzz -> Tor [color="#a78bfa"];
58
+ Beef -> Report [color="#38bdf8", penwidth=2];
59
+ Tor -> Report [color="#38bdf8", penwidth=2];
60
+ }
@@ -0,0 +1,45 @@
1
+ digraph "PWN_Plugins" {
2
+ graph [
3
+ label=<<B>PWN::Plugins — 66 Modules by Category</B>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.25, ranksep=1.5,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=9, style="filled,rounded",
9
+ shape=box, penwidth=1.2, color="#334155", fontcolor="#0f172a"];
10
+ edge [color="#94a3b8", penwidth=1.0, arrowsize=0.6];
11
+
12
+ Root [label="PWN::Plugins", fillcolor="#7dd3fc", fontsize=14, penwidth=2];
13
+
14
+ subgraph cluster_cat {
15
+ label=""; style=invis;
16
+ Web [label="Web / Proxy", fillcolor="#6ee7b7"];
17
+ Net [label="Network", fillcolor="#6ee7b7"];
18
+ Xpl [label="Exploitation", fillcolor="#6ee7b7"];
19
+ Osint[label="OSINT", fillcolor="#6ee7b7"];
20
+ Data [label="Data / DAO", fillcolor="#6ee7b7"];
21
+ Auth [label="Auth", fillcolor="#6ee7b7"];
22
+ HW [label="Hardware", fillcolor="#6ee7b7"];
23
+ CI [label="CI / DevOps", fillcolor="#6ee7b7"];
24
+ Comm [label="Comms", fillcolor="#6ee7b7"];
25
+ Util [label="Utility", fillcolor="#6ee7b7"];
26
+ }
27
+ {rank=same; Web; Net; Xpl; Osint; Data; Auth; HW; CI; Comm; Util}
28
+
29
+ node [fillcolor="#fcd34d"];
30
+ w [label="BurpSuite ⭐ · Zaproxy\nTransparentBrowser · Spider\nOpenAPI · URIScheme"];
31
+ n [label="NmapIt · Sock · Packet\nTor · IPInfo"];
32
+ x [label="Metasploit · Fuzz\nBeEF · Assembly"];
33
+ o [label="Shodan · Hunter\nGithub · HackerOne"];
34
+ d [label="DAO::LDAP/Mongo/PG/SQLite\nJSONPathify · PDFParse · OCR"];
35
+ a [label="OAuth2 · BasicAuth\nAuthenticationHelper · Vault"];
36
+ h [label="Serial · BusPirate\nMSR206 · Android · BareSIP"];
37
+ c [label="Jenkins · Git · vSphere\nDefectDojo · BlackDuck"];
38
+ m [label="MailAgent · SlackClient\nIRC · RabbitMQ · TwitterAPI · Voice"];
39
+ u [label="FileFu · ThreadPool · Log\nChar · XXD · DetectOS\nScannableCodes · CreditCard\nSSN · EIN · VIN · Pony · PS"];
40
+
41
+ Root->Web; Root->Net; Root->Xpl; Root->Osint; Root->Data;
42
+ Root->Auth; Root->HW; Root->CI; Root->Comm; Root->Util;
43
+ Web->w; Net->n; Xpl->x; Osint->o; Data->d;
44
+ Auth->a; HW->h; CI->c; Comm->m; Util->u;
45
+ }
@@ -0,0 +1,98 @@
1
+ digraph "PWN_AI_Feedback_Learning_Loop" {
2
+ graph [
3
+ label=<<B>pwn-ai — Closed Self-Improvement Loop</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Introspection (self) ⟷ Extrospection (world)</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.6, ranksep=1.0,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true, compound=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=11, style="filled,rounded",
9
+ shape=box, penwidth=1.4, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ /* L0 ─ actors */
14
+ User [label="👤 Researcher", fillcolor="#7dd3fc"];
15
+ LLM [label="🤖 LLM Provider", fillcolor="#c4b5fd"];
16
+ World [label="🌍 Host · Net · Repo\nToolchain · Intel feeds", fillcolor="#fda4af"];
17
+ {rank=same; User; LLM; World}
18
+
19
+ /* L1 ─ agent core */
20
+ subgraph cluster_core {
21
+ label="PWN::AI::Agent::Loop"; fontcolor="#ddd6fe";
22
+ style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
23
+ Prompt [label="PromptBuilder\ninject context", fillcolor="#c4b5fd"];
24
+ Dispatch [label="Dispatch\ntool calls", fillcolor="#c4b5fd"];
25
+ Result [label="Result\nfinal answer", fillcolor="#c4b5fd"];
26
+ }
27
+ {rank=same; Prompt; Dispatch; Result}
28
+
29
+ /* L2 ─ dual engines */
30
+ subgraph cluster_intro {
31
+ label="INTROSPECTION (self)"; fontcolor="#a7f3d0";
32
+ style=rounded; color="#047857"; bgcolor="#022c22"; penwidth=2;
33
+ Metrics [label="Metrics\nper-tool success · avg ms", fillcolor="#6ee7b7"];
34
+ Learning [label="Learning\nnote_outcome · reflect\nconsolidate · distill_skill", fillcolor="#6ee7b7"];
35
+ }
36
+ subgraph cluster_extro {
37
+ label="EXTROSPECTION (world)"; fontcolor="#fde68a";
38
+ style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
39
+ Snapshot [label="snapshot · drift\nhost/net/toolchain/repo", fillcolor="#fcd34d"];
40
+ Observe [label="observe · intel\nrecon facts · CVE feed", fillcolor="#fcd34d"];
41
+ }
42
+ {rank=same; Metrics; Learning; Snapshot; Observe}
43
+
44
+ /* L3 ─ correlate */
45
+ Correlate [label="extro_correlate()\n\"I did it wrong\" vs \"the world changed\"",
46
+ fillcolor="#fda4af", penwidth=2, fontsize=12];
47
+
48
+ /* L4 ─ persistence */
49
+ subgraph cluster_store {
50
+ label="~/.pwn/"; fontcolor="#94a3b8";
51
+ style="rounded,dashed"; color="#334155"; bgcolor="#1e293b";
52
+ Fmet [label="metrics.json", shape=cylinder, fillcolor="#fcd34d"];
53
+ Flrn [label="learning.jsonl", shape=cylinder, fillcolor="#fcd34d"];
54
+ Fmem [label="memory.json", shape=cylinder, fillcolor="#fcd34d"];
55
+ Fskl [label="skills/*.md", shape=cylinder, fillcolor="#fcd34d"];
56
+ Fext [label="extrospection.json", shape=cylinder, fillcolor="#fcd34d"];
57
+ }
58
+ {rank=same; Fmet; Flrn; Fmem; Fskl; Fext}
59
+
60
+ /* L0 → L1 */
61
+ User -> Prompt [label="task", color="#38bdf8", penwidth=2];
62
+ LLM -> Dispatch [label="tool_calls", dir=both, color="#a78bfa", penwidth=2];
63
+ World-> Result [style=invis];
64
+
65
+ /* L1 internal */
66
+ Prompt -> Dispatch [color="#a78bfa"];
67
+ Dispatch -> Result [color="#a78bfa"];
68
+
69
+ /* L1 → L2 */
70
+ Dispatch -> Metrics [label="record()", color="#34d399"];
71
+ Result -> Learning [label="auto_reflect", color="#34d399"];
72
+ Dispatch -> Snapshot [label="probe", color="#f59e0b"];
73
+ Result -> Observe [label="auto_extrospect", color="#f59e0b"];
74
+ World -> Snapshot [color="#fb7185", constraint=false];
75
+ World -> Observe [color="#fb7185", constraint=false];
76
+
77
+ /* L2 → L3 */
78
+ Metrics -> Correlate [color="#34d399"];
79
+ Learning -> Correlate [color="#34d399"];
80
+ Snapshot -> Correlate [color="#f59e0b"];
81
+ Observe -> Correlate [color="#f59e0b"];
82
+
83
+ /* L3 → L4 */
84
+ Correlate -> Fmet [style=invis];
85
+ Metrics -> Fmet [color="#94a3b8"];
86
+ Learning -> Flrn [color="#94a3b8"];
87
+ Learning -> Fmem [label="lesson", color="#94a3b8"];
88
+ Learning -> Fskl [label="skill", color="#94a3b8"];
89
+ Observe -> Fext [color="#94a3b8"];
90
+
91
+ /* feedback (dashed, non-constraining) */
92
+ Fmem -> Prompt [label="MEMORY block", style=dashed, color="#fbbf24", constraint=false];
93
+ Fskl -> Prompt [label="SKILLS block", style=dashed, color="#fbbf24", constraint=false];
94
+ Fext -> Prompt [label="EXTRO block", style=dashed, color="#fbbf24", constraint=false];
95
+ Correlate -> Prompt [label="findings → next run", style=dashed, color="#fb7185",
96
+ constraint=false, penwidth=2];
97
+ Result -> User [label="answer", color="#38bdf8", constraint=false, penwidth=2];
98
+ }
@@ -0,0 +1,56 @@
1
+ digraph "PWN_REPL" {
2
+ graph [
3
+ label=<<B>The pwn REPL — Interactive Prototyping</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Pry + full PWN:: preload + custom commands</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.55, ranksep=0.9,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ User [label="👤 $ pwn", fillcolor="#7dd3fc"];
14
+
15
+ subgraph cluster_repl {
16
+ label="Plugins::REPL (Pry)"; fontcolor="#ddd6fe"; style=rounded;
17
+ color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
18
+ Prompt [label="pwn[v0.5.x]:001 >>>", fillcolor="#c4b5fd"];
19
+ Preload [label="autoload PWN::*\nBanner · MonkeyPatch", fillcolor="#c4b5fd"];
20
+ Hist [label="~/.pwn_history\nreplay · edit", fillcolor="#c4b5fd"];
21
+ }
22
+ {rank=same; Prompt; Preload; Hist}
23
+
24
+ subgraph cluster_cmds {
25
+ label="Custom Commands"; fontcolor="#a7f3d0"; style=rounded;
26
+ color="#047857"; bgcolor="#022c22";
27
+ CAI [label="pwn-ai", fillcolor="#6ee7b7"];
28
+ CASM [label="pwn-asm", fillcolor="#6ee7b7"];
29
+ CMEM [label="pwn-ai-memory", fillcolor="#6ee7b7"];
30
+ CSESS [label="pwn-ai-sessions",fillcolor="#6ee7b7"];
31
+ CCRON [label="pwn-ai-cron", fillcolor="#6ee7b7"];
32
+ CDEL [label="pwn-ai-delegate",fillcolor="#6ee7b7"];
33
+ }
34
+ {rank=same; CAI; CASM; CMEM; CSESS; CCRON; CDEL}
35
+
36
+ subgraph cluster_ns {
37
+ label="Live Namespace"; fontcolor="#fde68a"; style=rounded;
38
+ color="#a16207"; bgcolor="#422006";
39
+ NS [label="PWN::Plugins · PWN::SAST · PWN::AWS · PWN::SDR\nPWN::WWW · PWN::Reports · PWN::AI · PWN::Memory",
40
+ fillcolor="#fcd34d", fontsize=11];
41
+ }
42
+
43
+ User -> Prompt [color="#38bdf8", penwidth=2];
44
+ User -> Preload [style=invis];
45
+ User -> Hist [style=invis];
46
+ Prompt -> CAI [color="#34d399"];
47
+ Prompt -> CASM [color="#34d399"];
48
+ Preload -> CMEM [color="#34d399"];
49
+ Preload -> CSESS [color="#34d399"];
50
+ Hist -> CCRON [color="#34d399"];
51
+ Hist -> CDEL [color="#34d399"];
52
+ CAI -> NS [color="#f59e0b"];
53
+ CASM -> NS [color="#f59e0b"];
54
+ CMEM -> NS [color="#f59e0b"];
55
+ Prompt -> NS [label="direct call", color="#f59e0b", constraint=false, penwidth=2];
56
+ }
@@ -0,0 +1,46 @@
1
+ digraph "PWN_Reports" {
2
+ graph [
3
+ label=<<B>PWN::Reports — Findings Pipeline</B>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.2,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ subgraph cluster_src {
14
+ label="Finding Sources"; fontcolor="#a7f3d0"; style=rounded;
15
+ color="#047857"; bgcolor="#022c22";
16
+ Sast [label="PWN::SAST", fillcolor="#6ee7b7"];
17
+ Fuzz [label="Plugins::Fuzz", fillcolor="#6ee7b7"];
18
+ Uri [label="URI Buster", fillcolor="#6ee7b7"];
19
+ Phone[label="BareSIP recon", fillcolor="#6ee7b7"];
20
+ }
21
+ subgraph cluster_gen {
22
+ label="Generators"; fontcolor="#fde68a"; style=rounded;
23
+ color="#a16207"; bgcolor="#422006";
24
+ Rsast [label="Reports::SAST", fillcolor="#fcd34d"];
25
+ Rfuzz [label="Reports::Fuzz", fillcolor="#fcd34d"];
26
+ Ruri [label="Reports::URIBuster", fillcolor="#fcd34d"];
27
+ Rphone[label="Reports::Phone", fillcolor="#fcd34d"];
28
+ }
29
+ subgraph cluster_out {
30
+ label="Delivery"; fontcolor="#ddd6fe"; style=rounded;
31
+ color="#6d28d9"; bgcolor="#2e1065";
32
+ HTML [label="HTML\n(Header/Footer)", fillcolor="#c4b5fd"];
33
+ JSON [label="JSON", fillcolor="#c4b5fd"];
34
+ DD [label="DefectDojo\nimport/reimport", fillcolor="#c4b5fd"];
35
+ Jira [label="JiraDataCenter", fillcolor="#c4b5fd"];
36
+ }
37
+
38
+ Sast -> Rsast [color="#f59e0b"];
39
+ Fuzz -> Rfuzz [color="#f59e0b"];
40
+ Uri -> Ruri [color="#f59e0b"];
41
+ Phone -> Rphone [color="#f59e0b"];
42
+ Rsast -> HTML [color="#a78bfa"];
43
+ Rfuzz -> JSON [color="#a78bfa"];
44
+ Ruri -> DD [color="#a78bfa"];
45
+ Rphone -> Jira [color="#a78bfa"];
46
+ }
@@ -0,0 +1,43 @@
1
+ digraph "PWN_RE" {
2
+ graph [
3
+ label=<<B>Reverse Engineering &amp; Binary Exploitation</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">pwn-asm · Assembly · XXD · FFI · Radare2 banners</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.2,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ Bin [label="🔎 Binary / Firmware", fillcolor="#7dd3fc"];
14
+
15
+ subgraph cluster_static {
16
+ label="Static"; fontcolor="#a7f3d0"; style=rounded;
17
+ color="#047857"; bgcolor="#022c22";
18
+ XXD [label="Plugins::XXD\nhex dump / patch", fillcolor="#6ee7b7"];
19
+ BDBA [label="BlackDuckBinaryAnalysis\nSBOM · CVE match", fillcolor="#6ee7b7"];
20
+ }
21
+ subgraph cluster_disasm {
22
+ label="Disassemble"; fontcolor="#fde68a"; style=rounded;
23
+ color="#a16207"; bgcolor="#422006";
24
+ Asm [label="Plugins::Assembly\nopcodes ↔ asm\nmulti-arch", fillcolor="#fcd34d"];
25
+ PwnAsm [label="pwn-asm REPL\nmultiline shellcode", fillcolor="#fcd34d"];
26
+ }
27
+ subgraph cluster_dyn {
28
+ label="Dynamic"; fontcolor="#fecaca"; style=rounded;
29
+ color="#b91c1c"; bgcolor="#450a0a";
30
+ FFI [label="PWN::FFI::Stdio\nnative calls", fillcolor="#fda4af"];
31
+ Fuzz [label="Plugins::Fuzz\ntargeted crashes", fillcolor="#fda4af"];
32
+ }
33
+ Xpl [label="Exploit PoC\nMetasploit module", fillcolor="#c4b5fd"];
34
+
35
+ Bin -> XXD [color="#38bdf8"];
36
+ Bin -> BDBA [color="#38bdf8"];
37
+ XXD -> Asm [color="#f59e0b"];
38
+ BDBA -> PwnAsm [color="#f59e0b"];
39
+ Asm -> FFI [color="#fb7185"];
40
+ PwnAsm -> Fuzz [color="#fb7185"];
41
+ FFI -> Xpl [color="#a78bfa"];
42
+ Fuzz -> Xpl [color="#a78bfa"];
43
+ }
@@ -0,0 +1,45 @@
1
+ digraph "PWN_SDR" {
2
+ graph [
3
+ label=<<B>PWN::SDR — Software-Defined Radio &amp; RF Hacking</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">GQRX · FlipperZero · RFIDler · SonMicro · FrequencyAllocation</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.2,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ RF [label="📡 RF Spectrum", fillcolor="#fda4af"];
14
+
15
+ subgraph cluster_hw {
16
+ label="Hardware"; fontcolor="#a7f3d0"; style=rounded;
17
+ color="#047857"; bgcolor="#022c22";
18
+ SDRhw [label="RTL-SDR / HackRF\n(via GQRX)", fillcolor="#6ee7b7"];
19
+ Flipper [label="SDR::FlipperZero", fillcolor="#6ee7b7"];
20
+ RFID [label="SDR::RFIDler\nSonMicroRFID", fillcolor="#6ee7b7"];
21
+ }
22
+ subgraph cluster_ctrl {
23
+ label="Control"; fontcolor="#fde68a"; style=rounded;
24
+ color="#a16207"; bgcolor="#422006";
25
+ GQRX [label="SDR::GQRX\nremote control · scan\nspectrum snapshot", fillcolor="#fcd34d"];
26
+ Freq [label="SDR::FrequencyAllocation\nband lookup", fillcolor="#fcd34d"];
27
+ Scan [label="bin/pwn_gqrx_scanner\nfast · iterative", fillcolor="#fcd34d"];
28
+ }
29
+ subgraph cluster_dec {
30
+ label="Decode"; fontcolor="#ddd6fe"; style=rounded;
31
+ color="#6d28d9"; bgcolor="#2e1065";
32
+ Dec [label="SDR::Decoder::*\ndemod · protocol", fillcolor="#c4b5fd"];
33
+ Obs [label="extro_observe\nrecord signal intel", fillcolor="#c4b5fd"];
34
+ }
35
+
36
+ RF -> SDRhw [color="#fb7185"];
37
+ RF -> Flipper [color="#fb7185"];
38
+ RF -> RFID [color="#fb7185"];
39
+ SDRhw -> GQRX [color="#f59e0b"];
40
+ Flipper -> Freq [color="#f59e0b"];
41
+ RFID -> Scan [color="#f59e0b"];
42
+ GQRX -> Dec [color="#a78bfa"];
43
+ Freq -> Dec [color="#a78bfa"];
44
+ Scan -> Obs [color="#a78bfa"];
45
+ }
@@ -0,0 +1,44 @@
1
+ digraph "PWN_SessionsCron" {
2
+ graph [
3
+ label=<<B>Sessions ↔ Cron ↔ Swarm — Cross-Session Continuity</B>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.5, ranksep=1.3,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ Now [label="pwn-ai\n(interactive turn)", fillcolor="#7dd3fc"];
14
+
15
+ subgraph cluster_p {
16
+ label="~/.pwn/"; fontcolor="#fde68a"; style=rounded;
17
+ color="#a16207"; bgcolor="#422006";
18
+ Sess [label="sessions/<id>.jsonl", shape=cylinder, fillcolor="#fcd34d"];
19
+ Cron [label="cron/jobs.yml", shape=cylinder, fillcolor="#fcd34d"];
20
+ Swarm [label="swarm/<id>/bus.jsonl",shape=cylinder, fillcolor="#fcd34d"];
21
+ }
22
+ {rank=same; Sess; Cron; Swarm}
23
+
24
+ subgraph cluster_later {
25
+ label="Later / Elsewhere"; fontcolor="#ddd6fe"; style=rounded;
26
+ color="#6d28d9"; bgcolor="#2e1065";
27
+ Reflect [label="learning_reflect\n(session_id)", fillcolor="#c4b5fd"];
28
+ Fire [label="crontab → PWN::Cron.run", fillcolor="#c4b5fd"];
29
+ Resume [label="agent_debate\n(swarm_id: ...)", fillcolor="#c4b5fd"];
30
+ }
31
+ {rank=same; Reflect; Fire; Resume}
32
+
33
+ Next [label="Next pwn-ai session\ncontext restored", fillcolor="#7dd3fc"];
34
+
35
+ Now -> Sess [label="append", color="#f59e0b"];
36
+ Now -> Cron [label="cron_create", color="#f59e0b"];
37
+ Now -> Swarm [label="agent_ask", color="#f59e0b"];
38
+ Sess -> Reflect [color="#a78bfa"];
39
+ Cron -> Fire [color="#a78bfa"];
40
+ Swarm -> Resume [color="#a78bfa"];
41
+ Reflect -> Next [color="#38bdf8"];
42
+ Fire -> Next [color="#38bdf8"];
43
+ Resume -> Next [color="#38bdf8"];
44
+ }
@@ -0,0 +1,70 @@
1
+ digraph "PWN_Swarm" {
2
+ graph [
3
+ label=<<B>PWN::AI::Agent::Swarm — Native Multi-Agent Orchestration</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">personas · ask · debate · broadcast · shared bus (no daemon)</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.65, ranksep=1.0,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true, compound=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=11, style="filled,rounded",
9
+ shape=box, penwidth=1.4, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ /* L0 ─ orchestrator */
14
+ Orchestrator [label="👤 Orchestrator\n(you, in pwn-ai)", fillcolor="#7dd3fc"];
15
+
16
+ /* L1 ─ swarm verbs */
17
+ subgraph cluster_verbs {
18
+ label="Swarm Verbs (toolset: swarm)"; fontcolor="#ddd6fe";
19
+ style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
20
+ Spawn [label="agent_spawn\ndefine persona", fillcolor="#c4b5fd"];
21
+ Ask [label="agent_ask\n1 turn → 1 persona", fillcolor="#c4b5fd"];
22
+ Debate [label="agent_debate\nround-robin critique", fillcolor="#c4b5fd"];
23
+ Broadcast [label="agent_broadcast\nfan-out ensemble", fillcolor="#c4b5fd"];
24
+ }
25
+ {rank=same; Spawn; Ask; Debate; Broadcast}
26
+
27
+ /* L2 ─ personas */
28
+ subgraph cluster_personas {
29
+ label="Personas (each = full PWN::AI::Agent::Loop)"; fontcolor="#a7f3d0";
30
+ style=rounded; color="#047857"; bgcolor="#022c22"; penwidth=2;
31
+ Red [label="🔴 red_team\nengine: grok\ntoolsets: terminal,pwn", fillcolor="#6ee7b7"];
32
+ Blue [label="🔵 blue_team\nengine: anthropic\ntoolsets: pwn,extro", fillcolor="#6ee7b7"];
33
+ Recon [label="🛰 recon\nengine: ollama\ntoolsets: terminal,memory", fillcolor="#6ee7b7"];
34
+ Xpl [label="💥 exploit_dev\nengine: openai\ntoolsets: pwn,skills", fillcolor="#6ee7b7"];
35
+ }
36
+ {rank=same; Red; Blue; Recon; Xpl}
37
+
38
+ /* L3 ─ shared state */
39
+ subgraph cluster_state {
40
+ label="Shared State ~/.pwn/"; fontcolor="#fde68a";
41
+ style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
42
+ Agents [label="agents.yml\npersona registry", shape=cylinder, fillcolor="#fcd34d"];
43
+ Bus [label="swarm/<id>/bus.jsonl\nappend-only chat", shape=cylinder, fillcolor="#fcd34d"];
44
+ Pmap [label="swarm/<id>/personas.json\nname → session_id", shape=cylinder, fillcolor="#fcd34d"];
45
+ Sess [label="sessions/*.jsonl\nper-persona transcript", shape=cylinder, fillcolor="#fcd34d"];
46
+ }
47
+ {rank=same; Agents; Bus; Pmap; Sess}
48
+
49
+ /* edges */
50
+ Orchestrator -> Spawn [color="#38bdf8"];
51
+ Orchestrator -> Ask [color="#38bdf8"];
52
+ Orchestrator -> Debate [color="#38bdf8", penwidth=2];
53
+ Orchestrator -> Broadcast [color="#38bdf8"];
54
+
55
+ Spawn -> Red [style=invis];
56
+ Ask -> Red [color="#34d399"];
57
+ Debate -> Blue [color="#34d399"];
58
+ Debate -> Recon [color="#34d399"];
59
+ Broadcast -> Xpl [color="#34d399"];
60
+
61
+ Red -> Agents [style=invis];
62
+ Red -> Bus [label="append reply", color="#f59e0b"];
63
+ Blue -> Bus [color="#f59e0b"];
64
+ Recon -> Pmap [color="#f59e0b"];
65
+ Xpl -> Sess [color="#f59e0b"];
66
+
67
+ Spawn -> Agents [label="write", color="#f59e0b", constraint=false];
68
+ Bus -> Debate [label="tail → context", style=dashed, color="#fbbf24", constraint=false];
69
+ Bus -> Orchestrator [label="swarm_bus()", style=dashed, color="#38bdf8", constraint=false];
70
+ }