mdx-code 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mdx_code-0.1.0/LICENSE +21 -0
- mdx_code-0.1.0/PKG-INFO +316 -0
- mdx_code-0.1.0/README.md +268 -0
- mdx_code-0.1.0/mdx_code.egg-info/PKG-INFO +316 -0
- mdx_code-0.1.0/mdx_code.egg-info/SOURCES.txt +24 -0
- mdx_code-0.1.0/mdx_code.egg-info/dependency_links.txt +1 -0
- mdx_code-0.1.0/mdx_code.egg-info/entry_points.txt +2 -0
- mdx_code-0.1.0/mdx_code.egg-info/requires.txt +24 -0
- mdx_code-0.1.0/mdx_code.egg-info/top_level.txt +1 -0
- mdx_code-0.1.0/mdxcode/__init__.py +11 -0
- mdx_code-0.1.0/mdxcode/cli.py +269 -0
- mdx_code-0.1.0/mdxcode/core/__init__.py +26 -0
- mdx_code-0.1.0/mdxcode/core/agent_loop.py +308 -0
- mdx_code-0.1.0/mdxcode/core/context_loader.py +209 -0
- mdx_code-0.1.0/mdxcode/core/session.py +80 -0
- mdx_code-0.1.0/mdxcode/governance/__init__.py +26 -0
- mdx_code-0.1.0/mdxcode/governance/audit.py +200 -0
- mdx_code-0.1.0/mdxcode/governance/permissions.py +299 -0
- mdx_code-0.1.0/mdxcode/governance/security_agent.py +363 -0
- mdx_code-0.1.0/mdxcode/models/__init__.py +28 -0
- mdx_code-0.1.0/mdxcode/models/auth.py +232 -0
- mdx_code-0.1.0/mdxcode/models/router.py +202 -0
- mdx_code-0.1.0/mdxcode/tools/__init__.py +18 -0
- mdx_code-0.1.0/mdxcode/tools/registry.py +417 -0
- mdx_code-0.1.0/pyproject.toml +90 -0
- mdx_code-0.1.0/setup.cfg +4 -0
mdx_code-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MD
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
mdx_code-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mdx-code
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AI-Native Engineering Companion. Built for builders. Designed for regulated environments.
|
|
5
|
+
Author: MD
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/dhotherm/mdx-code
|
|
8
|
+
Project-URL: Documentation, https://github.com/dhotherm/mdx-code#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/dhotherm/mdx-code
|
|
10
|
+
Project-URL: Issues, https://github.com/dhotherm/mdx-code/issues
|
|
11
|
+
Keywords: ai,llm,claude,developer-tools,agents,agentic-ai,code-assistant
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Software Development
|
|
23
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: anthropic>=0.40.0
|
|
28
|
+
Requires-Dist: httpx>=0.27.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0.0
|
|
30
|
+
Requires-Dist: typer>=0.12.0
|
|
31
|
+
Requires-Dist: rich>=13.0.0
|
|
32
|
+
Requires-Dist: pyyaml>=6.0
|
|
33
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
37
|
+
Requires-Dist: black>=24.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: mypy>=1.8.0; extra == "dev"
|
|
39
|
+
Provides-Extra: openai
|
|
40
|
+
Requires-Dist: openai>=1.0.0; extra == "openai"
|
|
41
|
+
Provides-Extra: bedrock
|
|
42
|
+
Requires-Dist: boto3>=1.34.0; extra == "bedrock"
|
|
43
|
+
Provides-Extra: all
|
|
44
|
+
Requires-Dist: openai>=1.0.0; extra == "all"
|
|
45
|
+
Requires-Dist: boto3>=1.34.0; extra == "all"
|
|
46
|
+
Requires-Dist: google-cloud-aiplatform>=1.0.0; extra == "all"
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
|
|
49
|
+
# MDx Code
|
|
50
|
+
|
|
51
|
+
**AI-Native Engineering Companion**
|
|
52
|
+
|
|
53
|
+
Built for builders. Designed for regulated environments.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## The Story
|
|
58
|
+
|
|
59
|
+
I've been thinking about AI-powered development tools for over a year. Then I read an article that broke down Claude Code from first principles and realized something: the core architecture is embarrassingly simple.
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
while task_not_complete:
|
|
63
|
+
response = ask_llm(conversation)
|
|
64
|
+
if response.wants_tool:
|
|
65
|
+
result = execute_tool(response.tool)
|
|
66
|
+
conversation.append(result)
|
|
67
|
+
if response.done:
|
|
68
|
+
break
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
That's it. AI thinks → acts → observes → repeats.
|
|
72
|
+
|
|
73
|
+
Everything else is just tooling and governance wrapped around this loop.
|
|
74
|
+
|
|
75
|
+
So I built my own. Not because Claude Code isn't good... it's excellent. But because I needed something that:
|
|
76
|
+
|
|
77
|
+
- **Works in regulated environments** → Financial services, healthcare, government
|
|
78
|
+
- **Owns the orchestration layer** → Swap models without rewriting everything
|
|
79
|
+
- **Respects governance rules** → Audit trails, permission controls, compliance profiles
|
|
80
|
+
- **Learns over time** → The security agent gets smarter with use
|
|
81
|
+
|
|
82
|
+
MDx Code is that tool.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
**Option 1: Install directly from GitHub (recommended)**
|
|
89
|
+
```bash
|
|
90
|
+
pip install git+https://github.com/dhotherm/mdx-code.git
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Option 2: Clone and install locally**
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/dhotherm/mdx-code.git
|
|
96
|
+
cd mdx-code
|
|
97
|
+
pip install -e .
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Then authenticate and run:**
|
|
101
|
+
```bash
|
|
102
|
+
# Authenticate with Claude
|
|
103
|
+
mdxcode auth claude
|
|
104
|
+
|
|
105
|
+
# Initialize in your project
|
|
106
|
+
cd your-project
|
|
107
|
+
mdxcode init
|
|
108
|
+
|
|
109
|
+
# Run it
|
|
110
|
+
mdxcode main "Fix the bug in auth.py"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## What It Does
|
|
116
|
+
|
|
117
|
+
**Give it a task. Watch it work.**
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
mdxcode "Add input validation to the user registration endpoint"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
MDx Code will:
|
|
124
|
+
1. Read your MDXCODE.md for project context
|
|
125
|
+
2. Find the relevant files
|
|
126
|
+
3. Understand the existing patterns
|
|
127
|
+
4. Make changes incrementally
|
|
128
|
+
5. Run tests to verify
|
|
129
|
+
6. Log everything for audit
|
|
130
|
+
|
|
131
|
+
**Scan for vulnerabilities:**
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
mdxcode security scan
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Auto-fix issues:**
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
mdxcode security fix --auto-fix
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## MDXCODE.md
|
|
146
|
+
|
|
147
|
+
Every project gets a context file. This is how MDx Code understands your project before touching anything.
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
# MDXCODE.md
|
|
151
|
+
|
|
152
|
+
## Project
|
|
153
|
+
- **Name:** Claims Processing API
|
|
154
|
+
- **Domain:** Health
|
|
155
|
+
- **Team:** Health Platform
|
|
156
|
+
|
|
157
|
+
## Conventions
|
|
158
|
+
- All endpoints require JWT auth
|
|
159
|
+
- Use Pydantic for request/response models
|
|
160
|
+
- Event sourcing for state changes
|
|
161
|
+
|
|
162
|
+
## Compliance
|
|
163
|
+
- PHI fields use SL-encrypt utility
|
|
164
|
+
- Never log PHI in plain text
|
|
165
|
+
|
|
166
|
+
## Guardrails
|
|
167
|
+
- ❌ Never commit directly to main
|
|
168
|
+
- ❌ Never modify production configs
|
|
169
|
+
- ⚠️ Schema changes require approval
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Different domains, different rules. The context file captures all of that.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Regulatory Profiles
|
|
177
|
+
|
|
178
|
+
MDx Code ships with profiles for regulated industries:
|
|
179
|
+
|
|
180
|
+
| Profile | Description |
|
|
181
|
+
|---------|-------------|
|
|
182
|
+
| `standard` | Default. Sensible permissions for most projects. |
|
|
183
|
+
| `financial_services` | Stricter controls for OSFI/SOX compliance. |
|
|
184
|
+
| `healthcare` | HIPAA-aware. Extra protection for PHI. |
|
|
185
|
+
| `government` | Maximum restrictions. Minimal auto-approval. |
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
mdxcode "Update the API" --profile financial_services
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Multi-Model Support
|
|
194
|
+
|
|
195
|
+
Own the orchestration. Swap the models.
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
mdxcode "Fix the bug" --model claude # Default
|
|
199
|
+
mdxcode "Fix the bug" --model gpt # OpenAI
|
|
200
|
+
mdxcode "Fix the bug" --model bedrock # AWS Bedrock
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Today it's Claude. Tomorrow it could be anything. Your choice.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Security Agent
|
|
208
|
+
|
|
209
|
+
Not just a linter. An AI that understands context.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Scan for vulnerabilities
|
|
213
|
+
mdxcode security scan
|
|
214
|
+
|
|
215
|
+
# Scan specific path
|
|
216
|
+
mdxcode security scan --path src/
|
|
217
|
+
|
|
218
|
+
# Auto-fix what can be fixed
|
|
219
|
+
mdxcode security fix --auto-fix
|
|
220
|
+
|
|
221
|
+
# Teach it new patterns
|
|
222
|
+
mdxcode security learn
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The knowledge base grows as you use it. Every fix teaches it something new.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Audit Trail
|
|
230
|
+
|
|
231
|
+
Every action. Every decision. Logged.
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
~/.mdxcode/audit/2026-01-09_abc123.jsonl
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"timestamp": "2026-01-09T14:32:15Z",
|
|
240
|
+
"event": "tool_use",
|
|
241
|
+
"tool": "write_file",
|
|
242
|
+
"input": {"path": "src/api.py", "content": "..."},
|
|
243
|
+
"approved_by": "user",
|
|
244
|
+
"session_id": "abc123"
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Essential for compliance. Essential for trust.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Project Structure
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
mdx-code/
|
|
256
|
+
├── mdxcode.py # CLI entry point
|
|
257
|
+
├── core/
|
|
258
|
+
│ ├── agent_loop.py # The heart of it
|
|
259
|
+
│ ├── context_loader.py
|
|
260
|
+
│ └── session.py
|
|
261
|
+
├── tools/
|
|
262
|
+
│ └── registry.py # read, write, edit, bash, grep, glob
|
|
263
|
+
├── models/
|
|
264
|
+
│ ├── router.py # Multi-model support
|
|
265
|
+
│ └── auth.py # Credential management
|
|
266
|
+
├── governance/
|
|
267
|
+
│ ├── permissions.py # What's allowed
|
|
268
|
+
│ ├── audit.py # Logging everything
|
|
269
|
+
│ └── security_agent.py
|
|
270
|
+
├── knowledge/
|
|
271
|
+
│ └── vulnerabilities/
|
|
272
|
+
└── examples/
|
|
273
|
+
└── demo_project/
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Philosophy
|
|
279
|
+
|
|
280
|
+
**Own the orchestration layer.**
|
|
281
|
+
|
|
282
|
+
Models will come and go. Vendors will compete on capability and cost. But the orchestration... the context engineering, the governance, the institutional knowledge... that's yours.
|
|
283
|
+
|
|
284
|
+
**Built for regulated environments.**
|
|
285
|
+
|
|
286
|
+
This isn't a toy. It's designed for environments where compliance matters, where audit trails are required, where "move fast and break things" gets you fired.
|
|
287
|
+
|
|
288
|
+
**Learn over time.**
|
|
289
|
+
|
|
290
|
+
The security agent grows smarter. The patterns library expands. Every project teaches it something new.
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Contributing
|
|
295
|
+
|
|
296
|
+
Found a bug? Want to add a feature? PRs welcome.
|
|
297
|
+
|
|
298
|
+
The code is intentionally readable. If you can't understand it in an afternoon, I've failed.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## License
|
|
303
|
+
|
|
304
|
+
MIT. Use it. Modify it. Build on it.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Author
|
|
309
|
+
|
|
310
|
+
Built by MD.
|
|
311
|
+
|
|
312
|
+
Not because I had to. Because I couldn't stop thinking about it.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
*"The future of software development is agents that can actually do things. Now we know how they work."*
|
mdx_code-0.1.0/README.md
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# MDx Code
|
|
2
|
+
|
|
3
|
+
**AI-Native Engineering Companion**
|
|
4
|
+
|
|
5
|
+
Built for builders. Designed for regulated environments.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## The Story
|
|
10
|
+
|
|
11
|
+
I've been thinking about AI-powered development tools for over a year. Then I read an article that broke down Claude Code from first principles and realized something: the core architecture is embarrassingly simple.
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
while task_not_complete:
|
|
15
|
+
response = ask_llm(conversation)
|
|
16
|
+
if response.wants_tool:
|
|
17
|
+
result = execute_tool(response.tool)
|
|
18
|
+
conversation.append(result)
|
|
19
|
+
if response.done:
|
|
20
|
+
break
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
That's it. AI thinks → acts → observes → repeats.
|
|
24
|
+
|
|
25
|
+
Everything else is just tooling and governance wrapped around this loop.
|
|
26
|
+
|
|
27
|
+
So I built my own. Not because Claude Code isn't good... it's excellent. But because I needed something that:
|
|
28
|
+
|
|
29
|
+
- **Works in regulated environments** → Financial services, healthcare, government
|
|
30
|
+
- **Owns the orchestration layer** → Swap models without rewriting everything
|
|
31
|
+
- **Respects governance rules** → Audit trails, permission controls, compliance profiles
|
|
32
|
+
- **Learns over time** → The security agent gets smarter with use
|
|
33
|
+
|
|
34
|
+
MDx Code is that tool.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
**Option 1: Install directly from GitHub (recommended)**
|
|
41
|
+
```bash
|
|
42
|
+
pip install git+https://github.com/dhotherm/mdx-code.git
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Option 2: Clone and install locally**
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/dhotherm/mdx-code.git
|
|
48
|
+
cd mdx-code
|
|
49
|
+
pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Then authenticate and run:**
|
|
53
|
+
```bash
|
|
54
|
+
# Authenticate with Claude
|
|
55
|
+
mdxcode auth claude
|
|
56
|
+
|
|
57
|
+
# Initialize in your project
|
|
58
|
+
cd your-project
|
|
59
|
+
mdxcode init
|
|
60
|
+
|
|
61
|
+
# Run it
|
|
62
|
+
mdxcode main "Fix the bug in auth.py"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## What It Does
|
|
68
|
+
|
|
69
|
+
**Give it a task. Watch it work.**
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
mdxcode "Add input validation to the user registration endpoint"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
MDx Code will:
|
|
76
|
+
1. Read your MDXCODE.md for project context
|
|
77
|
+
2. Find the relevant files
|
|
78
|
+
3. Understand the existing patterns
|
|
79
|
+
4. Make changes incrementally
|
|
80
|
+
5. Run tests to verify
|
|
81
|
+
6. Log everything for audit
|
|
82
|
+
|
|
83
|
+
**Scan for vulnerabilities:**
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
mdxcode security scan
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Auto-fix issues:**
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
mdxcode security fix --auto-fix
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## MDXCODE.md
|
|
98
|
+
|
|
99
|
+
Every project gets a context file. This is how MDx Code understands your project before touching anything.
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
# MDXCODE.md
|
|
103
|
+
|
|
104
|
+
## Project
|
|
105
|
+
- **Name:** Claims Processing API
|
|
106
|
+
- **Domain:** Health
|
|
107
|
+
- **Team:** Health Platform
|
|
108
|
+
|
|
109
|
+
## Conventions
|
|
110
|
+
- All endpoints require JWT auth
|
|
111
|
+
- Use Pydantic for request/response models
|
|
112
|
+
- Event sourcing for state changes
|
|
113
|
+
|
|
114
|
+
## Compliance
|
|
115
|
+
- PHI fields use SL-encrypt utility
|
|
116
|
+
- Never log PHI in plain text
|
|
117
|
+
|
|
118
|
+
## Guardrails
|
|
119
|
+
- ❌ Never commit directly to main
|
|
120
|
+
- ❌ Never modify production configs
|
|
121
|
+
- ⚠️ Schema changes require approval
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Different domains, different rules. The context file captures all of that.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Regulatory Profiles
|
|
129
|
+
|
|
130
|
+
MDx Code ships with profiles for regulated industries:
|
|
131
|
+
|
|
132
|
+
| Profile | Description |
|
|
133
|
+
|---------|-------------|
|
|
134
|
+
| `standard` | Default. Sensible permissions for most projects. |
|
|
135
|
+
| `financial_services` | Stricter controls for OSFI/SOX compliance. |
|
|
136
|
+
| `healthcare` | HIPAA-aware. Extra protection for PHI. |
|
|
137
|
+
| `government` | Maximum restrictions. Minimal auto-approval. |
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
mdxcode "Update the API" --profile financial_services
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Multi-Model Support
|
|
146
|
+
|
|
147
|
+
Own the orchestration. Swap the models.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
mdxcode "Fix the bug" --model claude # Default
|
|
151
|
+
mdxcode "Fix the bug" --model gpt # OpenAI
|
|
152
|
+
mdxcode "Fix the bug" --model bedrock # AWS Bedrock
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Today it's Claude. Tomorrow it could be anything. Your choice.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Security Agent
|
|
160
|
+
|
|
161
|
+
Not just a linter. An AI that understands context.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Scan for vulnerabilities
|
|
165
|
+
mdxcode security scan
|
|
166
|
+
|
|
167
|
+
# Scan specific path
|
|
168
|
+
mdxcode security scan --path src/
|
|
169
|
+
|
|
170
|
+
# Auto-fix what can be fixed
|
|
171
|
+
mdxcode security fix --auto-fix
|
|
172
|
+
|
|
173
|
+
# Teach it new patterns
|
|
174
|
+
mdxcode security learn
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The knowledge base grows as you use it. Every fix teaches it something new.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Audit Trail
|
|
182
|
+
|
|
183
|
+
Every action. Every decision. Logged.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
~/.mdxcode/audit/2026-01-09_abc123.jsonl
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"timestamp": "2026-01-09T14:32:15Z",
|
|
192
|
+
"event": "tool_use",
|
|
193
|
+
"tool": "write_file",
|
|
194
|
+
"input": {"path": "src/api.py", "content": "..."},
|
|
195
|
+
"approved_by": "user",
|
|
196
|
+
"session_id": "abc123"
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Essential for compliance. Essential for trust.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Project Structure
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
mdx-code/
|
|
208
|
+
├── mdxcode.py # CLI entry point
|
|
209
|
+
├── core/
|
|
210
|
+
│ ├── agent_loop.py # The heart of it
|
|
211
|
+
│ ├── context_loader.py
|
|
212
|
+
│ └── session.py
|
|
213
|
+
├── tools/
|
|
214
|
+
│ └── registry.py # read, write, edit, bash, grep, glob
|
|
215
|
+
├── models/
|
|
216
|
+
│ ├── router.py # Multi-model support
|
|
217
|
+
│ └── auth.py # Credential management
|
|
218
|
+
├── governance/
|
|
219
|
+
│ ├── permissions.py # What's allowed
|
|
220
|
+
│ ├── audit.py # Logging everything
|
|
221
|
+
│ └── security_agent.py
|
|
222
|
+
├── knowledge/
|
|
223
|
+
│ └── vulnerabilities/
|
|
224
|
+
└── examples/
|
|
225
|
+
└── demo_project/
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Philosophy
|
|
231
|
+
|
|
232
|
+
**Own the orchestration layer.**
|
|
233
|
+
|
|
234
|
+
Models will come and go. Vendors will compete on capability and cost. But the orchestration... the context engineering, the governance, the institutional knowledge... that's yours.
|
|
235
|
+
|
|
236
|
+
**Built for regulated environments.**
|
|
237
|
+
|
|
238
|
+
This isn't a toy. It's designed for environments where compliance matters, where audit trails are required, where "move fast and break things" gets you fired.
|
|
239
|
+
|
|
240
|
+
**Learn over time.**
|
|
241
|
+
|
|
242
|
+
The security agent grows smarter. The patterns library expands. Every project teaches it something new.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Contributing
|
|
247
|
+
|
|
248
|
+
Found a bug? Want to add a feature? PRs welcome.
|
|
249
|
+
|
|
250
|
+
The code is intentionally readable. If you can't understand it in an afternoon, I've failed.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## License
|
|
255
|
+
|
|
256
|
+
MIT. Use it. Modify it. Build on it.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Author
|
|
261
|
+
|
|
262
|
+
Built by MD.
|
|
263
|
+
|
|
264
|
+
Not because I had to. Because I couldn't stop thinking about it.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
*"The future of software development is agents that can actually do things. Now we know how they work."*
|