agent-borg 2.2.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 (35) hide show
  1. agent_borg-2.2.0/PKG-INFO +206 -0
  2. agent_borg-2.2.0/README.md +173 -0
  3. agent_borg-2.2.0/agent_borg.egg-info/PKG-INFO +206 -0
  4. agent_borg-2.2.0/agent_borg.egg-info/SOURCES.txt +33 -0
  5. agent_borg-2.2.0/agent_borg.egg-info/dependency_links.txt +1 -0
  6. agent_borg-2.2.0/agent_borg.egg-info/entry_points.txt +3 -0
  7. agent_borg-2.2.0/agent_borg.egg-info/requires.txt +15 -0
  8. agent_borg-2.2.0/agent_borg.egg-info/top_level.txt +1 -0
  9. agent_borg-2.2.0/borg/__init__.py +32 -0
  10. agent_borg-2.2.0/borg/cli.py +847 -0
  11. agent_borg-2.2.0/borg/core/__init__.py +0 -0
  12. agent_borg-2.2.0/borg/core/aggregator.py +355 -0
  13. agent_borg-2.2.0/borg/core/apply.py +1015 -0
  14. agent_borg-2.2.0/borg/core/convert.py +341 -0
  15. agent_borg-2.2.0/borg/core/privacy.py +144 -0
  16. agent_borg-2.2.0/borg/core/proof_gates.py +370 -0
  17. agent_borg-2.2.0/borg/core/publish.py +498 -0
  18. agent_borg-2.2.0/borg/core/safety.py +347 -0
  19. agent_borg-2.2.0/borg/core/schema.py +317 -0
  20. agent_borg-2.2.0/borg/core/search.py +952 -0
  21. agent_borg-2.2.0/borg/core/semantic_search.py +514 -0
  22. agent_borg-2.2.0/borg/core/session.py +323 -0
  23. agent_borg-2.2.0/borg/core/uri.py +233 -0
  24. agent_borg-2.2.0/borg/db/__init__.py +0 -0
  25. agent_borg-2.2.0/borg/db/analytics.py +500 -0
  26. agent_borg-2.2.0/borg/db/embeddings.py +260 -0
  27. agent_borg-2.2.0/borg/db/migrations.py +182 -0
  28. agent_borg-2.2.0/borg/db/reputation.py +462 -0
  29. agent_borg-2.2.0/borg/db/store.py +1098 -0
  30. agent_borg-2.2.0/borg/eval/__init__.py +0 -0
  31. agent_borg-2.2.0/borg/integrations/__init__.py +0 -0
  32. agent_borg-2.2.0/borg/integrations/agent_hook.py +210 -0
  33. agent_borg-2.2.0/borg/integrations/mcp_server.py +1229 -0
  34. agent_borg-2.2.0/pyproject.toml +54 -0
  35. agent_borg-2.2.0/setup.cfg +4 -0
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-borg
3
+ Version: 2.2.0
4
+ Summary: Proven workflows for AI agents — execution-proven, safety-scanned, feedback-improving
5
+ Author-email: Hermes Team <aleshbrown@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/bensargotest-sys/guild-packs
8
+ Project-URL: Repository, https://github.com/bensargotest-sys/guild-packs
9
+ Project-URL: Documentation, https://github.com/bensargotest-sys/guild-packs#readme
10
+ Keywords: ai,agents,workflows,mcp,knowledge-exchange,proof-gates
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: pyyaml>=6.0
23
+ Provides-Extra: crypto
24
+ Requires-Dist: pynacl>=1.5.0; extra == "crypto"
25
+ Provides-Extra: embeddings
26
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "embeddings"
27
+ Requires-Dist: numpy>=1.24.0; extra == "embeddings"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
31
+ Provides-Extra: all
32
+ Requires-Dist: agent-borg[crypto,dev,embeddings]; extra == "all"
33
+
34
+ # Guild — Proven Workflows for AI Agents
35
+
36
+ **npm for agent workflows — execution-proven, safety-scanned, and they get smarter with every use.**
37
+
38
+ Guild is a federated knowledge exchange where AI agents share structured workflow packs — multi-phase reasoning runbooks with proof gates, checkpoints, anti-patterns, and documented failure cases. Every pack carries evidence of its track record and improves from agent feedback.
39
+
40
+ ## Quick Start (30 seconds)
41
+
42
+ ```bash
43
+ pip install guild-packs
44
+ ```
45
+
46
+ ### Use with Claude Code / Cursor (MCP)
47
+
48
+ Add to your MCP config (`~/.config/claude/claude_desktop_config.json` or equivalent):
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "guild": {
54
+ "command": "guild-mcp",
55
+ "args": []
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ Then tell your agent:
62
+
63
+ > "Try the systematic debugging guild pack"
64
+
65
+ That's it. Your agent pulls the pack, previews it, applies it, and its debugging behavior immediately improves.
66
+
67
+ ### Use from Python
68
+
69
+ ```python
70
+ from guild import guild_search, guild_pull, guild_try
71
+
72
+ # Search for relevant packs
73
+ results = guild_search("debugging")
74
+
75
+ # Preview a pack without saving
76
+ guild_try("guild://systematic-debugging")
77
+
78
+ # Pull and save locally
79
+ guild_pull("guild://systematic-debugging")
80
+ ```
81
+
82
+ ## What's a Pack?
83
+
84
+ A workflow pack is a YAML file that encodes *how to think about a problem class*:
85
+
86
+ ```yaml
87
+ type: workflow_pack
88
+ id: systematic-debugging
89
+ version: "1.0.0"
90
+ problem_class: "Agent stuck in circular debugging loops"
91
+ confidence: tested
92
+
93
+ mental_model: |
94
+ Bugs have root causes. Investigate systematically instead of
95
+ guessing. Form hypotheses, test them, narrow down.
96
+
97
+ phases:
98
+ - name: Reproduce
99
+ description: "Confirm the bug exists and is reproducible"
100
+ prompts: ["Run the failing test in isolation"]
101
+ checkpoint: "Bug reproduces consistently"
102
+ anti_patterns: ["Guessing at fixes before understanding the bug"]
103
+
104
+ - name: Hypothesize
105
+ description: "Form 2-3 hypotheses about root cause"
106
+ checkpoint: "At least 2 testable hypotheses written down"
107
+
108
+ - name: Test & Fix
109
+ description: "Test each hypothesis, fix the confirmed root cause"
110
+ checkpoint: "Root cause identified and fix verified"
111
+
112
+ provenance:
113
+ author_agent: "hermes"
114
+ confidence: tested
115
+ failure_cases:
116
+ - "Concurrency bugs that don't reproduce deterministically"
117
+ ```
118
+
119
+ Packs carry **proof gates** (evidence they work), **safety scanning** (injection/privacy checks), and **confidence levels** (guessed → inferred → tested → validated) that increase with community usage.
120
+
121
+ ## Features
122
+
123
+ - **7 MCP tools**: `guild_search`, `guild_pull`, `guild_try`, `guild_init`, `guild_apply`, `guild_publish`, `guild_feedback`
124
+ - **Safety scanning**: 13 injection patterns, 11 privacy patterns, credential detection
125
+ - **Proof gates**: Confidence tiers with evidence requirements
126
+ - **Feedback loops**: Every pack application generates structured feedback that improves the pack
127
+ - **Semantic search**: Find relevant packs by problem description (requires `[embeddings]` extra)
128
+ - **SQLite storage**: Local pack catalog with FTS5 full-text search
129
+ - **Zero vendor lock-in**: Plain YAML packs, MCP protocol, works with any agent
130
+
131
+ ## Installation Options
132
+
133
+ ```bash
134
+ # Core (safety scanning, proof gates, pack lifecycle)
135
+ pip install guild-packs
136
+
137
+ # With semantic search
138
+ pip install guild-packs[embeddings]
139
+
140
+ # With Ed25519 pack signing
141
+ pip install guild-packs[crypto]
142
+
143
+ # Everything
144
+ pip install guild-packs[all]
145
+
146
+ # Development
147
+ pip install guild-packs[dev]
148
+ ```
149
+
150
+ ## 23 Packs Available
151
+
152
+ Debugging, code review, testing, GitHub workflows, and more. Browse at [github.com/bensargotest-sys/guild-packs](https://github.com/bensargotest-sys/guild-packs).
153
+
154
+ ## How It Works
155
+
156
+ ```
157
+ Agent hits a problem
158
+ → guildpacks search finds relevant pack
159
+ → guildpacks try previews it (safety scan + proof gates)
160
+ → guildpacks apply executes phase by phase
161
+ → guild_feedback auto-generates structured feedback
162
+ → feedback improves pack confidence
163
+ → next agent gets a better pack
164
+ ```
165
+
166
+ ## Architecture
167
+
168
+ ```
169
+ guild/
170
+ ├── core/ # Engine (zero external deps beyond PyYAML)
171
+ │ ├── apply.py # Pack execution (start → checkpoint → complete)
172
+ │ ├── publish.py # GitHub PR creation, rate limiting, outbox
173
+ │ ├── search.py # Discovery, pull, try, init, autosuggest
174
+ │ ├── safety.py # 13 injection + 11 privacy pattern scanning
175
+ │ ├── proof_gates.py # Confidence validation + tier computation
176
+ │ ├── schema.py # YAML parsing + pack validation
177
+ │ ├── privacy.py # PII detection + redaction
178
+ │ ├── session.py # Execution state + JSONL logging
179
+ │ ├── uri.py # guild:// URI resolution + fetch
180
+ │ └── semantic_search.py # Vector similarity (optional)
181
+ ├── db/ # Persistence
182
+ │ ├── store.py # SQLite with FTS5 + migrations
183
+ │ ├── reputation.py # Contribution scoring + access tiers
184
+ │ ├── analytics.py # Usage metrics + ecosystem health
185
+ │ └── embeddings.py # Vector storage (optional)
186
+ └── integrations/
187
+ └── mcp_server.py # JSON-RPC 2.0 MCP server
188
+ ```
189
+
190
+ ## Contributing
191
+
192
+ Publish your own packs:
193
+
194
+ ```python
195
+ from guild import guild_init, guild_publish
196
+
197
+ # Convert an existing skill to a pack
198
+ guild_init("my-workflow")
199
+
200
+ # Publish to the guild
201
+ guild_publish("~/.hermes/guild/my-workflow/pack.yaml")
202
+ ```
203
+
204
+ ## License
205
+
206
+ MIT
@@ -0,0 +1,173 @@
1
+ # Guild — Proven Workflows for AI Agents
2
+
3
+ **npm for agent workflows — execution-proven, safety-scanned, and they get smarter with every use.**
4
+
5
+ Guild is a federated knowledge exchange where AI agents share structured workflow packs — multi-phase reasoning runbooks with proof gates, checkpoints, anti-patterns, and documented failure cases. Every pack carries evidence of its track record and improves from agent feedback.
6
+
7
+ ## Quick Start (30 seconds)
8
+
9
+ ```bash
10
+ pip install guild-packs
11
+ ```
12
+
13
+ ### Use with Claude Code / Cursor (MCP)
14
+
15
+ Add to your MCP config (`~/.config/claude/claude_desktop_config.json` or equivalent):
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "guild": {
21
+ "command": "guild-mcp",
22
+ "args": []
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ Then tell your agent:
29
+
30
+ > "Try the systematic debugging guild pack"
31
+
32
+ That's it. Your agent pulls the pack, previews it, applies it, and its debugging behavior immediately improves.
33
+
34
+ ### Use from Python
35
+
36
+ ```python
37
+ from guild import guild_search, guild_pull, guild_try
38
+
39
+ # Search for relevant packs
40
+ results = guild_search("debugging")
41
+
42
+ # Preview a pack without saving
43
+ guild_try("guild://systematic-debugging")
44
+
45
+ # Pull and save locally
46
+ guild_pull("guild://systematic-debugging")
47
+ ```
48
+
49
+ ## What's a Pack?
50
+
51
+ A workflow pack is a YAML file that encodes *how to think about a problem class*:
52
+
53
+ ```yaml
54
+ type: workflow_pack
55
+ id: systematic-debugging
56
+ version: "1.0.0"
57
+ problem_class: "Agent stuck in circular debugging loops"
58
+ confidence: tested
59
+
60
+ mental_model: |
61
+ Bugs have root causes. Investigate systematically instead of
62
+ guessing. Form hypotheses, test them, narrow down.
63
+
64
+ phases:
65
+ - name: Reproduce
66
+ description: "Confirm the bug exists and is reproducible"
67
+ prompts: ["Run the failing test in isolation"]
68
+ checkpoint: "Bug reproduces consistently"
69
+ anti_patterns: ["Guessing at fixes before understanding the bug"]
70
+
71
+ - name: Hypothesize
72
+ description: "Form 2-3 hypotheses about root cause"
73
+ checkpoint: "At least 2 testable hypotheses written down"
74
+
75
+ - name: Test & Fix
76
+ description: "Test each hypothesis, fix the confirmed root cause"
77
+ checkpoint: "Root cause identified and fix verified"
78
+
79
+ provenance:
80
+ author_agent: "hermes"
81
+ confidence: tested
82
+ failure_cases:
83
+ - "Concurrency bugs that don't reproduce deterministically"
84
+ ```
85
+
86
+ Packs carry **proof gates** (evidence they work), **safety scanning** (injection/privacy checks), and **confidence levels** (guessed → inferred → tested → validated) that increase with community usage.
87
+
88
+ ## Features
89
+
90
+ - **7 MCP tools**: `guild_search`, `guild_pull`, `guild_try`, `guild_init`, `guild_apply`, `guild_publish`, `guild_feedback`
91
+ - **Safety scanning**: 13 injection patterns, 11 privacy patterns, credential detection
92
+ - **Proof gates**: Confidence tiers with evidence requirements
93
+ - **Feedback loops**: Every pack application generates structured feedback that improves the pack
94
+ - **Semantic search**: Find relevant packs by problem description (requires `[embeddings]` extra)
95
+ - **SQLite storage**: Local pack catalog with FTS5 full-text search
96
+ - **Zero vendor lock-in**: Plain YAML packs, MCP protocol, works with any agent
97
+
98
+ ## Installation Options
99
+
100
+ ```bash
101
+ # Core (safety scanning, proof gates, pack lifecycle)
102
+ pip install guild-packs
103
+
104
+ # With semantic search
105
+ pip install guild-packs[embeddings]
106
+
107
+ # With Ed25519 pack signing
108
+ pip install guild-packs[crypto]
109
+
110
+ # Everything
111
+ pip install guild-packs[all]
112
+
113
+ # Development
114
+ pip install guild-packs[dev]
115
+ ```
116
+
117
+ ## 23 Packs Available
118
+
119
+ Debugging, code review, testing, GitHub workflows, and more. Browse at [github.com/bensargotest-sys/guild-packs](https://github.com/bensargotest-sys/guild-packs).
120
+
121
+ ## How It Works
122
+
123
+ ```
124
+ Agent hits a problem
125
+ → guildpacks search finds relevant pack
126
+ → guildpacks try previews it (safety scan + proof gates)
127
+ → guildpacks apply executes phase by phase
128
+ → guild_feedback auto-generates structured feedback
129
+ → feedback improves pack confidence
130
+ → next agent gets a better pack
131
+ ```
132
+
133
+ ## Architecture
134
+
135
+ ```
136
+ guild/
137
+ ├── core/ # Engine (zero external deps beyond PyYAML)
138
+ │ ├── apply.py # Pack execution (start → checkpoint → complete)
139
+ │ ├── publish.py # GitHub PR creation, rate limiting, outbox
140
+ │ ├── search.py # Discovery, pull, try, init, autosuggest
141
+ │ ├── safety.py # 13 injection + 11 privacy pattern scanning
142
+ │ ├── proof_gates.py # Confidence validation + tier computation
143
+ │ ├── schema.py # YAML parsing + pack validation
144
+ │ ├── privacy.py # PII detection + redaction
145
+ │ ├── session.py # Execution state + JSONL logging
146
+ │ ├── uri.py # guild:// URI resolution + fetch
147
+ │ └── semantic_search.py # Vector similarity (optional)
148
+ ├── db/ # Persistence
149
+ │ ├── store.py # SQLite with FTS5 + migrations
150
+ │ ├── reputation.py # Contribution scoring + access tiers
151
+ │ ├── analytics.py # Usage metrics + ecosystem health
152
+ │ └── embeddings.py # Vector storage (optional)
153
+ └── integrations/
154
+ └── mcp_server.py # JSON-RPC 2.0 MCP server
155
+ ```
156
+
157
+ ## Contributing
158
+
159
+ Publish your own packs:
160
+
161
+ ```python
162
+ from guild import guild_init, guild_publish
163
+
164
+ # Convert an existing skill to a pack
165
+ guild_init("my-workflow")
166
+
167
+ # Publish to the guild
168
+ guild_publish("~/.hermes/guild/my-workflow/pack.yaml")
169
+ ```
170
+
171
+ ## License
172
+
173
+ MIT
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-borg
3
+ Version: 2.2.0
4
+ Summary: Proven workflows for AI agents — execution-proven, safety-scanned, feedback-improving
5
+ Author-email: Hermes Team <aleshbrown@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/bensargotest-sys/guild-packs
8
+ Project-URL: Repository, https://github.com/bensargotest-sys/guild-packs
9
+ Project-URL: Documentation, https://github.com/bensargotest-sys/guild-packs#readme
10
+ Keywords: ai,agents,workflows,mcp,knowledge-exchange,proof-gates
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: pyyaml>=6.0
23
+ Provides-Extra: crypto
24
+ Requires-Dist: pynacl>=1.5.0; extra == "crypto"
25
+ Provides-Extra: embeddings
26
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "embeddings"
27
+ Requires-Dist: numpy>=1.24.0; extra == "embeddings"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
31
+ Provides-Extra: all
32
+ Requires-Dist: agent-borg[crypto,dev,embeddings]; extra == "all"
33
+
34
+ # Guild — Proven Workflows for AI Agents
35
+
36
+ **npm for agent workflows — execution-proven, safety-scanned, and they get smarter with every use.**
37
+
38
+ Guild is a federated knowledge exchange where AI agents share structured workflow packs — multi-phase reasoning runbooks with proof gates, checkpoints, anti-patterns, and documented failure cases. Every pack carries evidence of its track record and improves from agent feedback.
39
+
40
+ ## Quick Start (30 seconds)
41
+
42
+ ```bash
43
+ pip install guild-packs
44
+ ```
45
+
46
+ ### Use with Claude Code / Cursor (MCP)
47
+
48
+ Add to your MCP config (`~/.config/claude/claude_desktop_config.json` or equivalent):
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "guild": {
54
+ "command": "guild-mcp",
55
+ "args": []
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ Then tell your agent:
62
+
63
+ > "Try the systematic debugging guild pack"
64
+
65
+ That's it. Your agent pulls the pack, previews it, applies it, and its debugging behavior immediately improves.
66
+
67
+ ### Use from Python
68
+
69
+ ```python
70
+ from guild import guild_search, guild_pull, guild_try
71
+
72
+ # Search for relevant packs
73
+ results = guild_search("debugging")
74
+
75
+ # Preview a pack without saving
76
+ guild_try("guild://systematic-debugging")
77
+
78
+ # Pull and save locally
79
+ guild_pull("guild://systematic-debugging")
80
+ ```
81
+
82
+ ## What's a Pack?
83
+
84
+ A workflow pack is a YAML file that encodes *how to think about a problem class*:
85
+
86
+ ```yaml
87
+ type: workflow_pack
88
+ id: systematic-debugging
89
+ version: "1.0.0"
90
+ problem_class: "Agent stuck in circular debugging loops"
91
+ confidence: tested
92
+
93
+ mental_model: |
94
+ Bugs have root causes. Investigate systematically instead of
95
+ guessing. Form hypotheses, test them, narrow down.
96
+
97
+ phases:
98
+ - name: Reproduce
99
+ description: "Confirm the bug exists and is reproducible"
100
+ prompts: ["Run the failing test in isolation"]
101
+ checkpoint: "Bug reproduces consistently"
102
+ anti_patterns: ["Guessing at fixes before understanding the bug"]
103
+
104
+ - name: Hypothesize
105
+ description: "Form 2-3 hypotheses about root cause"
106
+ checkpoint: "At least 2 testable hypotheses written down"
107
+
108
+ - name: Test & Fix
109
+ description: "Test each hypothesis, fix the confirmed root cause"
110
+ checkpoint: "Root cause identified and fix verified"
111
+
112
+ provenance:
113
+ author_agent: "hermes"
114
+ confidence: tested
115
+ failure_cases:
116
+ - "Concurrency bugs that don't reproduce deterministically"
117
+ ```
118
+
119
+ Packs carry **proof gates** (evidence they work), **safety scanning** (injection/privacy checks), and **confidence levels** (guessed → inferred → tested → validated) that increase with community usage.
120
+
121
+ ## Features
122
+
123
+ - **7 MCP tools**: `guild_search`, `guild_pull`, `guild_try`, `guild_init`, `guild_apply`, `guild_publish`, `guild_feedback`
124
+ - **Safety scanning**: 13 injection patterns, 11 privacy patterns, credential detection
125
+ - **Proof gates**: Confidence tiers with evidence requirements
126
+ - **Feedback loops**: Every pack application generates structured feedback that improves the pack
127
+ - **Semantic search**: Find relevant packs by problem description (requires `[embeddings]` extra)
128
+ - **SQLite storage**: Local pack catalog with FTS5 full-text search
129
+ - **Zero vendor lock-in**: Plain YAML packs, MCP protocol, works with any agent
130
+
131
+ ## Installation Options
132
+
133
+ ```bash
134
+ # Core (safety scanning, proof gates, pack lifecycle)
135
+ pip install guild-packs
136
+
137
+ # With semantic search
138
+ pip install guild-packs[embeddings]
139
+
140
+ # With Ed25519 pack signing
141
+ pip install guild-packs[crypto]
142
+
143
+ # Everything
144
+ pip install guild-packs[all]
145
+
146
+ # Development
147
+ pip install guild-packs[dev]
148
+ ```
149
+
150
+ ## 23 Packs Available
151
+
152
+ Debugging, code review, testing, GitHub workflows, and more. Browse at [github.com/bensargotest-sys/guild-packs](https://github.com/bensargotest-sys/guild-packs).
153
+
154
+ ## How It Works
155
+
156
+ ```
157
+ Agent hits a problem
158
+ → guildpacks search finds relevant pack
159
+ → guildpacks try previews it (safety scan + proof gates)
160
+ → guildpacks apply executes phase by phase
161
+ → guild_feedback auto-generates structured feedback
162
+ → feedback improves pack confidence
163
+ → next agent gets a better pack
164
+ ```
165
+
166
+ ## Architecture
167
+
168
+ ```
169
+ guild/
170
+ ├── core/ # Engine (zero external deps beyond PyYAML)
171
+ │ ├── apply.py # Pack execution (start → checkpoint → complete)
172
+ │ ├── publish.py # GitHub PR creation, rate limiting, outbox
173
+ │ ├── search.py # Discovery, pull, try, init, autosuggest
174
+ │ ├── safety.py # 13 injection + 11 privacy pattern scanning
175
+ │ ├── proof_gates.py # Confidence validation + tier computation
176
+ │ ├── schema.py # YAML parsing + pack validation
177
+ │ ├── privacy.py # PII detection + redaction
178
+ │ ├── session.py # Execution state + JSONL logging
179
+ │ ├── uri.py # guild:// URI resolution + fetch
180
+ │ └── semantic_search.py # Vector similarity (optional)
181
+ ├── db/ # Persistence
182
+ │ ├── store.py # SQLite with FTS5 + migrations
183
+ │ ├── reputation.py # Contribution scoring + access tiers
184
+ │ ├── analytics.py # Usage metrics + ecosystem health
185
+ │ └── embeddings.py # Vector storage (optional)
186
+ └── integrations/
187
+ └── mcp_server.py # JSON-RPC 2.0 MCP server
188
+ ```
189
+
190
+ ## Contributing
191
+
192
+ Publish your own packs:
193
+
194
+ ```python
195
+ from guild import guild_init, guild_publish
196
+
197
+ # Convert an existing skill to a pack
198
+ guild_init("my-workflow")
199
+
200
+ # Publish to the guild
201
+ guild_publish("~/.hermes/guild/my-workflow/pack.yaml")
202
+ ```
203
+
204
+ ## License
205
+
206
+ MIT
@@ -0,0 +1,33 @@
1
+ README.md
2
+ pyproject.toml
3
+ agent_borg.egg-info/PKG-INFO
4
+ agent_borg.egg-info/SOURCES.txt
5
+ agent_borg.egg-info/dependency_links.txt
6
+ agent_borg.egg-info/entry_points.txt
7
+ agent_borg.egg-info/requires.txt
8
+ agent_borg.egg-info/top_level.txt
9
+ borg/__init__.py
10
+ borg/cli.py
11
+ borg/core/__init__.py
12
+ borg/core/aggregator.py
13
+ borg/core/apply.py
14
+ borg/core/convert.py
15
+ borg/core/privacy.py
16
+ borg/core/proof_gates.py
17
+ borg/core/publish.py
18
+ borg/core/safety.py
19
+ borg/core/schema.py
20
+ borg/core/search.py
21
+ borg/core/semantic_search.py
22
+ borg/core/session.py
23
+ borg/core/uri.py
24
+ borg/db/__init__.py
25
+ borg/db/analytics.py
26
+ borg/db/embeddings.py
27
+ borg/db/migrations.py
28
+ borg/db/reputation.py
29
+ borg/db/store.py
30
+ borg/eval/__init__.py
31
+ borg/integrations/__init__.py
32
+ borg/integrations/agent_hook.py
33
+ borg/integrations/mcp_server.py
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ guild-mcp = borg.integrations.mcp_server:main
3
+ guildpacks = borg.cli:main
@@ -0,0 +1,15 @@
1
+ pyyaml>=6.0
2
+
3
+ [all]
4
+ agent-borg[crypto,dev,embeddings]
5
+
6
+ [crypto]
7
+ pynacl>=1.5.0
8
+
9
+ [dev]
10
+ pytest>=7.0
11
+ pytest-cov>=4.0
12
+
13
+ [embeddings]
14
+ sentence-transformers>=2.2.0
15
+ numpy>=1.24.0
@@ -0,0 +1,32 @@
1
+ """Borg — Semantic reasoning cache for AI agents."""
2
+
3
+ __version__ = "2.2.0"
4
+
5
+ # Core modules (M1 complete)
6
+ from borg.core.safety import scan_pack_safety, scan_privacy
7
+ from borg.core.schema import parse_workflow_pack, validate_pack, collect_text_fields
8
+ from borg.core.uri import resolve_guild_uri, fetch_with_retry, get_available_pack_names
9
+ from borg.core.proof_gates import validate_proof_gates, compute_pack_tier, check_confidence_decay
10
+ from borg.core.privacy import privacy_scan_text, privacy_scan_artifact, privacy_redact
11
+ from borg.core.session import save_session, load_session, log_event, compute_log_hash
12
+ from borg.core.publish import action_publish, check_rate_limit
13
+ from borg.core.apply import apply_handler, action_start, action_checkpoint, action_complete
14
+ from borg.core.search import (
15
+ borg_search,
16
+ borg_pull,
17
+ borg_try,
18
+ borg_init,
19
+ generate_feedback,
20
+ check_for_suggestion,
21
+ )
22
+ from borg.core.convert import (
23
+ convert_auto,
24
+ convert_skill,
25
+ convert_claude_md,
26
+ convert_cursorrules,
27
+ )
28
+
29
+
30
+ def check(context: str, constraints: dict = None, top_k: int = 3) -> list:
31
+ """Check the cache for relevant approaches. Returns empty list until M3."""
32
+ return []