mirdan 0.0.1__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.
- mirdan-0.0.1/.github/workflows/ci.yml +123 -0
- mirdan-0.0.1/.github/workflows/publish.yml +115 -0
- mirdan-0.0.1/.gitignore +83 -0
- mirdan-0.0.1/.python-version +1 -0
- mirdan-0.0.1/PKG-INFO +126 -0
- mirdan-0.0.1/README.md +100 -0
- mirdan-0.0.1/pyproject.toml +64 -0
- mirdan-0.0.1/src/mirdan/__init__.py +8 -0
- mirdan-0.0.1/src/mirdan/config.py +114 -0
- mirdan-0.0.1/src/mirdan/core/__init__.py +15 -0
- mirdan-0.0.1/src/mirdan/core/client_registry.py +431 -0
- mirdan-0.0.1/src/mirdan/core/code_validator.py +414 -0
- mirdan-0.0.1/src/mirdan/core/context_aggregator.py +210 -0
- mirdan-0.0.1/src/mirdan/core/entity_extractor.py +413 -0
- mirdan-0.0.1/src/mirdan/core/gatherers/__init__.py +16 -0
- mirdan-0.0.1/src/mirdan/core/gatherers/base.py +69 -0
- mirdan-0.0.1/src/mirdan/core/gatherers/context7.py +232 -0
- mirdan-0.0.1/src/mirdan/core/gatherers/enyal.py +205 -0
- mirdan-0.0.1/src/mirdan/core/gatherers/filesystem.py +269 -0
- mirdan-0.0.1/src/mirdan/core/gatherers/github.py +276 -0
- mirdan-0.0.1/src/mirdan/core/intent_analyzer.py +262 -0
- mirdan-0.0.1/src/mirdan/core/language_detector.py +117 -0
- mirdan-0.0.1/src/mirdan/core/orchestrator.py +172 -0
- mirdan-0.0.1/src/mirdan/core/prompt_composer.py +215 -0
- mirdan-0.0.1/src/mirdan/core/quality_standards.py +210 -0
- mirdan-0.0.1/src/mirdan/models.py +289 -0
- mirdan-0.0.1/src/mirdan/server.py +249 -0
- mirdan-0.0.1/src/mirdan/standards/__init__.py +1 -0
- mirdan-0.0.1/src/mirdan/standards/architecture.yaml +14 -0
- mirdan-0.0.1/src/mirdan/standards/frameworks/fastapi.yaml +16 -0
- mirdan-0.0.1/src/mirdan/standards/frameworks/nextjs.yaml +16 -0
- mirdan-0.0.1/src/mirdan/standards/frameworks/react.yaml +16 -0
- mirdan-0.0.1/src/mirdan/standards/languages/go.yaml +13 -0
- mirdan-0.0.1/src/mirdan/standards/languages/javascript.yaml +14 -0
- mirdan-0.0.1/src/mirdan/standards/languages/python.yaml +14 -0
- mirdan-0.0.1/src/mirdan/standards/languages/rust.yaml +13 -0
- mirdan-0.0.1/src/mirdan/standards/languages/typescript.yaml +15 -0
- mirdan-0.0.1/src/mirdan/standards/security.yaml +21 -0
- mirdan-0.0.1/tests/__init__.py +1 -0
- mirdan-0.0.1/tests/test_client_registry.py +640 -0
- mirdan-0.0.1/tests/test_code_validator.py +331 -0
- mirdan-0.0.1/tests/test_config_wiring.py +317 -0
- mirdan-0.0.1/tests/test_context_aggregator.py +317 -0
- mirdan-0.0.1/tests/test_entity_extractor.py +283 -0
- mirdan-0.0.1/tests/test_gatherers.py +370 -0
- mirdan-0.0.1/tests/test_integration.py +238 -0
- mirdan-0.0.1/tests/test_intent_analyzer.py +230 -0
- mirdan-0.0.1/tests/test_orchestrator.py +215 -0
- mirdan-0.0.1/tests/test_prompt_composer.py +298 -0
- mirdan-0.0.1/tests/test_quality_standards.py +503 -0
- mirdan-0.0.1/uv.lock +2005 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
name: Lint
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v4.2.0
|
|
23
|
+
with:
|
|
24
|
+
enable-cache: true
|
|
25
|
+
cache-dependency-glob: "uv.lock"
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
run: uv python install 3.13
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: uv sync --all-extras --all-groups
|
|
32
|
+
|
|
33
|
+
- name: Run ruff check
|
|
34
|
+
run: uv run ruff check src/mirdan tests
|
|
35
|
+
|
|
36
|
+
- name: Run ruff format check
|
|
37
|
+
run: uv run ruff format --check src/mirdan tests
|
|
38
|
+
|
|
39
|
+
typecheck:
|
|
40
|
+
name: Type Check
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- name: Checkout code
|
|
44
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
45
|
+
|
|
46
|
+
- name: Install uv
|
|
47
|
+
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v4.2.0
|
|
48
|
+
with:
|
|
49
|
+
enable-cache: true
|
|
50
|
+
cache-dependency-glob: "uv.lock"
|
|
51
|
+
|
|
52
|
+
- name: Set up Python
|
|
53
|
+
run: uv python install 3.13
|
|
54
|
+
|
|
55
|
+
- name: Install dependencies
|
|
56
|
+
run: uv sync --all-extras --all-groups
|
|
57
|
+
|
|
58
|
+
- name: Run mypy
|
|
59
|
+
run: uv run mypy src/mirdan
|
|
60
|
+
|
|
61
|
+
test:
|
|
62
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
strategy:
|
|
65
|
+
fail-fast: false
|
|
66
|
+
matrix:
|
|
67
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
68
|
+
steps:
|
|
69
|
+
- name: Checkout code
|
|
70
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
71
|
+
|
|
72
|
+
- name: Install uv
|
|
73
|
+
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v4.2.0
|
|
74
|
+
with:
|
|
75
|
+
enable-cache: true
|
|
76
|
+
cache-dependency-glob: "uv.lock"
|
|
77
|
+
|
|
78
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
79
|
+
run: uv python install ${{ matrix.python-version }}
|
|
80
|
+
|
|
81
|
+
- name: Install dependencies
|
|
82
|
+
run: uv sync --all-extras --all-groups
|
|
83
|
+
|
|
84
|
+
- name: Run tests
|
|
85
|
+
run: uv run pytest --cov=mirdan --cov-report=xml
|
|
86
|
+
|
|
87
|
+
- name: Upload coverage to Codecov
|
|
88
|
+
if: matrix.python-version == '3.13'
|
|
89
|
+
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
|
|
90
|
+
with:
|
|
91
|
+
files: ./coverage.xml
|
|
92
|
+
fail_ci_if_error: false
|
|
93
|
+
|
|
94
|
+
build:
|
|
95
|
+
name: Build
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
steps:
|
|
98
|
+
- name: Checkout code
|
|
99
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
100
|
+
|
|
101
|
+
- name: Install uv
|
|
102
|
+
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v4.2.0
|
|
103
|
+
with:
|
|
104
|
+
enable-cache: true
|
|
105
|
+
cache-dependency-glob: "uv.lock"
|
|
106
|
+
|
|
107
|
+
- name: Set up Python
|
|
108
|
+
run: uv python install 3.13
|
|
109
|
+
|
|
110
|
+
- name: Build package
|
|
111
|
+
run: uv build
|
|
112
|
+
|
|
113
|
+
- name: Verify wheel contents
|
|
114
|
+
run: |
|
|
115
|
+
pip install dist/*.whl --target /tmp/verify
|
|
116
|
+
python -c "import sys; sys.path.insert(0, '/tmp/verify'); from mirdan.server import mcp; print('Import successful')"
|
|
117
|
+
|
|
118
|
+
- name: Upload build artifacts
|
|
119
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
120
|
+
with:
|
|
121
|
+
name: dist
|
|
122
|
+
path: dist/
|
|
123
|
+
retention-days: 7
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
name: Build distribution
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Validate release tag format
|
|
13
|
+
run: |
|
|
14
|
+
TAG="${{ github.ref_name }}"
|
|
15
|
+
if [[ ! "$TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then
|
|
16
|
+
echo "Error: Release tag '$TAG' does not follow semantic versioning (e.g., 0.1.0, 1.0.0-beta.1)"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
echo "Valid semantic version: $TAG"
|
|
20
|
+
|
|
21
|
+
- name: Checkout code
|
|
22
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v4.2.0
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
cache-dependency-glob: "uv.lock"
|
|
29
|
+
|
|
30
|
+
- name: Set up Python
|
|
31
|
+
run: uv python install 3.13
|
|
32
|
+
|
|
33
|
+
- name: Create virtual environment and install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
uv venv
|
|
36
|
+
uv pip install build twine
|
|
37
|
+
|
|
38
|
+
- name: Build sdist and wheel
|
|
39
|
+
run: uv run python -m build
|
|
40
|
+
|
|
41
|
+
- name: Check distribution with twine
|
|
42
|
+
run: uv run twine check dist/*
|
|
43
|
+
|
|
44
|
+
- name: Upload distribution artifacts
|
|
45
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
46
|
+
with:
|
|
47
|
+
name: dist
|
|
48
|
+
path: dist/
|
|
49
|
+
if-no-files-found: error
|
|
50
|
+
|
|
51
|
+
test-publish:
|
|
52
|
+
name: Publish to TestPyPI
|
|
53
|
+
needs: build
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
environment:
|
|
56
|
+
name: testpypi
|
|
57
|
+
url: https://test.pypi.org/p/mirdan
|
|
58
|
+
permissions:
|
|
59
|
+
id-token: write
|
|
60
|
+
steps:
|
|
61
|
+
- name: Download distribution artifacts
|
|
62
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
63
|
+
with:
|
|
64
|
+
name: dist
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- name: Publish to TestPyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
|
69
|
+
with:
|
|
70
|
+
repository-url: https://test.pypi.org/legacy/
|
|
71
|
+
attestations: true
|
|
72
|
+
|
|
73
|
+
verify-testpypi:
|
|
74
|
+
name: Verify TestPyPI installation
|
|
75
|
+
needs: test-publish
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
steps:
|
|
78
|
+
- name: Set up Python
|
|
79
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
80
|
+
with:
|
|
81
|
+
python-version: "3.13"
|
|
82
|
+
|
|
83
|
+
- name: Wait for TestPyPI to update
|
|
84
|
+
run: sleep 30
|
|
85
|
+
|
|
86
|
+
- name: Install from TestPyPI
|
|
87
|
+
run: |
|
|
88
|
+
pip install --index-url https://test.pypi.org/simple/ \
|
|
89
|
+
--extra-index-url https://pypi.org/simple/ \
|
|
90
|
+
mirdan
|
|
91
|
+
|
|
92
|
+
- name: Verify installation
|
|
93
|
+
run: |
|
|
94
|
+
python -c "import mirdan; print(f'Successfully imported mirdan version: {mirdan.__version__}')"
|
|
95
|
+
|
|
96
|
+
publish:
|
|
97
|
+
name: Publish to PyPI
|
|
98
|
+
needs: verify-testpypi
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
environment:
|
|
101
|
+
name: pypi
|
|
102
|
+
url: https://pypi.org/p/mirdan
|
|
103
|
+
permissions:
|
|
104
|
+
id-token: write
|
|
105
|
+
steps:
|
|
106
|
+
- name: Download distribution artifacts
|
|
107
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
108
|
+
with:
|
|
109
|
+
name: dist
|
|
110
|
+
path: dist/
|
|
111
|
+
|
|
112
|
+
- name: Publish to PyPI
|
|
113
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
|
114
|
+
with:
|
|
115
|
+
attestations: true
|
mirdan-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
|
|
27
|
+
# PyInstaller
|
|
28
|
+
*.manifest
|
|
29
|
+
*.spec
|
|
30
|
+
|
|
31
|
+
# Installer logs
|
|
32
|
+
pip-log.txt
|
|
33
|
+
pip-delete-this-directory.txt
|
|
34
|
+
|
|
35
|
+
# Unit test / coverage reports
|
|
36
|
+
htmlcov/
|
|
37
|
+
.tox/
|
|
38
|
+
.nox/
|
|
39
|
+
.coverage
|
|
40
|
+
.coverage.*
|
|
41
|
+
.cache
|
|
42
|
+
nosetests.xml
|
|
43
|
+
coverage.xml
|
|
44
|
+
*.cover
|
|
45
|
+
*.py,cover
|
|
46
|
+
.hypothesis/
|
|
47
|
+
.pytest_cache/
|
|
48
|
+
|
|
49
|
+
# Translations
|
|
50
|
+
*.mo
|
|
51
|
+
*.pot
|
|
52
|
+
|
|
53
|
+
# Environments
|
|
54
|
+
.env
|
|
55
|
+
.venv
|
|
56
|
+
env/
|
|
57
|
+
venv/
|
|
58
|
+
ENV/
|
|
59
|
+
env.bak/
|
|
60
|
+
venv.bak/
|
|
61
|
+
|
|
62
|
+
# IDEs
|
|
63
|
+
.idea/
|
|
64
|
+
.vscode/
|
|
65
|
+
*.swp
|
|
66
|
+
*.swo
|
|
67
|
+
*~
|
|
68
|
+
|
|
69
|
+
# mypy
|
|
70
|
+
.mypy_cache/
|
|
71
|
+
.dmypy.json
|
|
72
|
+
dmypy.json
|
|
73
|
+
|
|
74
|
+
# ruff
|
|
75
|
+
.ruff_cache/
|
|
76
|
+
|
|
77
|
+
# OS
|
|
78
|
+
.DS_Store
|
|
79
|
+
Thumbs.db
|
|
80
|
+
|
|
81
|
+
# Project specific
|
|
82
|
+
.mirdan/
|
|
83
|
+
*.local.yaml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
mirdan-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mirdan
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: AI Code Quality Orchestrator - Automatically transforms developer prompts into high-quality, structured requests
|
|
5
|
+
Author: Sean Corkum
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: ai,code-quality,llm,mcp,prompt-engineering
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: fastmcp>=2.0.0
|
|
17
|
+
Requires-Dist: pydantic>=2.0
|
|
18
|
+
Requires-Dist: pyyaml>=6.0
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: mypy>=1.13; extra == 'dev'
|
|
21
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
22
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
23
|
+
Requires-Dist: ruff>=0.8; extra == 'dev'
|
|
24
|
+
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# Mirdan
|
|
28
|
+
|
|
29
|
+
AI Code Quality Orchestrator - Automatically transforms developer prompts into high-quality, structured requests that maximize AI coding assistant capabilities.
|
|
30
|
+
|
|
31
|
+
## The Problem
|
|
32
|
+
|
|
33
|
+
AI coding assistants produce "slop" not because the models are incapable, but because developers provide prompts that lack context, structure, and quality constraints. Research shows properly structured prompts achieve 15-74% better results.
|
|
34
|
+
|
|
35
|
+
## The Solution
|
|
36
|
+
|
|
37
|
+
Mirdan is an MCP server that intercepts prompts, automatically enhances them with quality requirements, codebase context, and architectural patterns, then intelligently orchestrates other available MCPs to ground the AI in reality.
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- **Intent Analysis**: Classifies task type (generation, refactor, debug, review, test)
|
|
42
|
+
- **Quality Injection**: Applies language-specific coding standards and security requirements
|
|
43
|
+
- **Prompt Composition**: Structures prompts using proven frameworks (Role/Goal/Constraints)
|
|
44
|
+
- **MCP Orchestration**: Recommends which tools to use for context gathering
|
|
45
|
+
- **Verification Checklists**: Generates task-specific verification steps
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Using uv
|
|
51
|
+
uv add mirdan
|
|
52
|
+
|
|
53
|
+
# Or with pip
|
|
54
|
+
pip install mirdan
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Quick Start
|
|
58
|
+
|
|
59
|
+
### As an MCP Server
|
|
60
|
+
|
|
61
|
+
Add to your Claude Code configuration:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"mirdan": {
|
|
67
|
+
"command": "uv",
|
|
68
|
+
"args": ["run", "mirdan"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Available Tools
|
|
75
|
+
|
|
76
|
+
#### enhance_prompt
|
|
77
|
+
|
|
78
|
+
Automatically enhance a coding prompt with quality requirements and tool recommendations.
|
|
79
|
+
|
|
80
|
+
#### analyze_intent
|
|
81
|
+
|
|
82
|
+
Analyze a prompt without enhancement to understand the detected intent.
|
|
83
|
+
|
|
84
|
+
#### get_quality_standards
|
|
85
|
+
|
|
86
|
+
Retrieve quality standards for a language/framework combination.
|
|
87
|
+
|
|
88
|
+
#### suggest_tools
|
|
89
|
+
|
|
90
|
+
Get recommendations for which MCP tools to use.
|
|
91
|
+
|
|
92
|
+
## Configuration
|
|
93
|
+
|
|
94
|
+
Create a `.mirdan/config.yaml` in your project:
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
version: "1.0"
|
|
98
|
+
|
|
99
|
+
project:
|
|
100
|
+
name: "MyApp"
|
|
101
|
+
primary_language: "typescript"
|
|
102
|
+
frameworks: ["next.js", "prisma"]
|
|
103
|
+
|
|
104
|
+
quality:
|
|
105
|
+
security: "strict"
|
|
106
|
+
architecture: "moderate"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Development
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Clone and install
|
|
113
|
+
git clone https://github.com/S-Corkum/mirdan.git
|
|
114
|
+
cd mirdan
|
|
115
|
+
uv sync --all-extras
|
|
116
|
+
|
|
117
|
+
# Run tests
|
|
118
|
+
uv run pytest
|
|
119
|
+
|
|
120
|
+
# Run the server locally
|
|
121
|
+
uv run mirdan
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT
|
mirdan-0.0.1/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Mirdan
|
|
2
|
+
|
|
3
|
+
AI Code Quality Orchestrator - Automatically transforms developer prompts into high-quality, structured requests that maximize AI coding assistant capabilities.
|
|
4
|
+
|
|
5
|
+
## The Problem
|
|
6
|
+
|
|
7
|
+
AI coding assistants produce "slop" not because the models are incapable, but because developers provide prompts that lack context, structure, and quality constraints. Research shows properly structured prompts achieve 15-74% better results.
|
|
8
|
+
|
|
9
|
+
## The Solution
|
|
10
|
+
|
|
11
|
+
Mirdan is an MCP server that intercepts prompts, automatically enhances them with quality requirements, codebase context, and architectural patterns, then intelligently orchestrates other available MCPs to ground the AI in reality.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Intent Analysis**: Classifies task type (generation, refactor, debug, review, test)
|
|
16
|
+
- **Quality Injection**: Applies language-specific coding standards and security requirements
|
|
17
|
+
- **Prompt Composition**: Structures prompts using proven frameworks (Role/Goal/Constraints)
|
|
18
|
+
- **MCP Orchestration**: Recommends which tools to use for context gathering
|
|
19
|
+
- **Verification Checklists**: Generates task-specific verification steps
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Using uv
|
|
25
|
+
uv add mirdan
|
|
26
|
+
|
|
27
|
+
# Or with pip
|
|
28
|
+
pip install mirdan
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### As an MCP Server
|
|
34
|
+
|
|
35
|
+
Add to your Claude Code configuration:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"mcpServers": {
|
|
40
|
+
"mirdan": {
|
|
41
|
+
"command": "uv",
|
|
42
|
+
"args": ["run", "mirdan"]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Available Tools
|
|
49
|
+
|
|
50
|
+
#### enhance_prompt
|
|
51
|
+
|
|
52
|
+
Automatically enhance a coding prompt with quality requirements and tool recommendations.
|
|
53
|
+
|
|
54
|
+
#### analyze_intent
|
|
55
|
+
|
|
56
|
+
Analyze a prompt without enhancement to understand the detected intent.
|
|
57
|
+
|
|
58
|
+
#### get_quality_standards
|
|
59
|
+
|
|
60
|
+
Retrieve quality standards for a language/framework combination.
|
|
61
|
+
|
|
62
|
+
#### suggest_tools
|
|
63
|
+
|
|
64
|
+
Get recommendations for which MCP tools to use.
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
Create a `.mirdan/config.yaml` in your project:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
version: "1.0"
|
|
72
|
+
|
|
73
|
+
project:
|
|
74
|
+
name: "MyApp"
|
|
75
|
+
primary_language: "typescript"
|
|
76
|
+
frameworks: ["next.js", "prisma"]
|
|
77
|
+
|
|
78
|
+
quality:
|
|
79
|
+
security: "strict"
|
|
80
|
+
architecture: "moderate"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Development
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Clone and install
|
|
87
|
+
git clone https://github.com/S-Corkum/mirdan.git
|
|
88
|
+
cd mirdan
|
|
89
|
+
uv sync --all-extras
|
|
90
|
+
|
|
91
|
+
# Run tests
|
|
92
|
+
uv run pytest
|
|
93
|
+
|
|
94
|
+
# Run the server locally
|
|
95
|
+
uv run mirdan
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "mirdan"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "AI Code Quality Orchestrator - Automatically transforms developer prompts into high-quality, structured requests"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Sean Corkum" }
|
|
10
|
+
]
|
|
11
|
+
keywords = ["mcp", "ai", "code-quality", "prompt-engineering", "llm"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Programming Language :: Python :: 3.13",
|
|
19
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"fastmcp>=2.0.0",
|
|
23
|
+
"pyyaml>=6.0",
|
|
24
|
+
"pydantic>=2.0",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
dev = [
|
|
29
|
+
"pytest>=8.0",
|
|
30
|
+
"pytest-asyncio>=0.24",
|
|
31
|
+
"ruff>=0.8",
|
|
32
|
+
"mypy>=1.13",
|
|
33
|
+
"types-PyYAML>=6.0",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
mirdan = "mirdan.server:main"
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["hatchling"]
|
|
41
|
+
build-backend = "hatchling.build"
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.wheel]
|
|
44
|
+
packages = ["src/mirdan"]
|
|
45
|
+
|
|
46
|
+
[tool.ruff]
|
|
47
|
+
line-length = 100
|
|
48
|
+
target-version = "py311"
|
|
49
|
+
|
|
50
|
+
[tool.ruff.lint]
|
|
51
|
+
select = ["E", "F", "I", "N", "W", "UP"]
|
|
52
|
+
|
|
53
|
+
[tool.mypy]
|
|
54
|
+
python_version = "3.11"
|
|
55
|
+
strict = true
|
|
56
|
+
|
|
57
|
+
[tool.pytest.ini_options]
|
|
58
|
+
asyncio_mode = "auto"
|
|
59
|
+
testpaths = ["tests"]
|
|
60
|
+
|
|
61
|
+
[dependency-groups]
|
|
62
|
+
dev = [
|
|
63
|
+
"pytest-cov>=7.0.0",
|
|
64
|
+
]
|