Skip to main content

mtkit — AI Full-Stack Test Engineer

Plan-first generation of standard XMind test cases (quality-gated), health checks and repair of test case assets, interactive test consulting and issue diagnosis guidance. It learns with every use and matures over time.

Pipeline

flowchart LR
    IN[Input: plan.docx + sample.xmind + backend repo + custom docs] --> READ[Read & document health check]
    READ --> FACTS[Code facts scan<br/>9 languages / SQL]
    FACTS --> PLAN[Test case output plan<br/>design methods + builder advice]
    PLAN --> AUTH{Authorization}
    AUTH -->|confirm| CONTRACT[Contract JSON]
    CONTRACT --> GATE[Quality gate<br/>review + AI audit]
    GATE --> RENDER[Render XMind]
    RENDER --> CHECK[Validate + gap comparison]
    CHECK --> OUT[Delivery: XMind + defect summary + work traces]
    OUT -.feedback.-> MEM[(Project memory<br/>.mtkit-work/memory.db)]
    MEM -.recall/reuse.-> PLAN

Cognitive Loop (v1.19+)

Beyond the linear pipeline, mtkit keeps a closed loop so it stops behaving like a dumb workflow runner:

flowchart LR
    PLAN[plan.json<br/>risk + test points] --> GEN[generate]
    GEN --> CRITIC[critique<br/>rules + probes + semantic]
    CRITIC -->|issues + fix hints| REPAIR[targeted repair]
    REPAIR --> CRITIC
    CRITIC --> OUT[delivery]
    OUT --> LEARN[feedback / diff / defects]
    LEARN --> MEM[(memory.db)]
    MEM --> GEN
    MEM --> EVAL[golden-set metrics]
    EVAL -->|regression gate| CI[CI]
Capability Command What it adds
Tool protocol any command --json/--trace-id/--ai One envelope (ok/data/issues/next_actions/open_questions) + graded exit codes (0/1/2/3/4/5)
Memory mtkit memory ... stdlib SQLite (WAL) storing patterns, corrections, defects, insights, case index
Retrieval automatic Chinese 2-gram TF-IDF + URL normalization + adoption re-ranking (no deps)
Plan & drift mtkit plan build/authorize/check Risk-weighted test points, sha256 fingerprint, PLAN_DRIFT checks
Critique loop mtkit review, mtkit gen-doc --rounds N Deterministic probes (VAGUE_EXPECT/NO_ERROR_PATH/...) + targeted repair with budget
Learning & evaluation mtkit eval -d dir --gate, mtkit memory ingest Golden-set regression metrics, CI gate, defect/correction feedback

Use mtkit capabilities for the machine-readable manifest (inputs, side effects, network cost).

Quick Start (Zero Dependencies)

# 1. Generate XMind (pure standard library, no installation required)
cd d:\mtkit
mtkit gen -i examples/sample.json -o cases.xmind

# 2. Validate & inspect
mtkit validate -i cases.xmind
mtkit info -i cases.xmind

Optional dependencies (install only when used): .docx parsing pip install python-docx; .pdf parsing pip install pypdf; .xlsx parsing pip install openpyxl; direct DB access pip install pymysql.

One-Click Install (with Qoder plugin registration & optional deps)

# Option 1 (recommended, zero setup on new machines): CLI + bundled skill assets from PyPI
pip install mtkit
mtkit install            # copies bundled skills to ~/.mtkit/plugin and registers the Qoder plugin

# Option 2: run in the repo root (editable install, optional deps installed automatically)
python install.py        # or double-click install.bat

# Option 3: provide a git URL to fetch and install automatically
python install.py --git <git-url> [--dir target-dir]

After installation, restart Qoder; typing / lists the mtkit plugin (Qoder groups plugin skills under the plugin name). Type /skills to confirm mtkit-gen-xmind is loaded, or just trigger it with natural language.

Upgrading after a PyPI release: pip install -U mtkit && mtkit install refreshes both the CLI and the skill files (~/.mtkit/plugin). Plugin registration writes both Qoder registries (installed_plugins.json v1 + installed_plugins_v2.json). mtkit install --git <git-url> remains available for repo-based installs and fast-forward pulls the clone first.

Commands

Command Purpose Example
gen Contract/data → .xmind mtkit gen -i contract.json -o cases.xmind
gather Plan + samples + code → context mtkit gather -i plan.docx --hist sample.xmind -r backend -o ctx.json
facts 9-language code facts scan mtkit facts -r backend -o facts.json
review Contract quality gate mtkit review -i contract.json -f facts.json
audit Test asset health check (find unfit cases) mtkit audit -i legacy.xmind -f facts.json
db Read-only DB access: auto-detect (10 dialects), on-demand driver install, multi-DB check/schema/verify mtkit db detect -r backend -o db-detect.json
redis Read-only Redis cache access: usage + local instance auto-detect, on-demand client install, key snapshot mtkit redis keys -c redis.json -o redis-cache.json
validate / info Validate / inspect .xmind mtkit validate -i cases.xmind
diff Missed-test gap comparison mtkit diff -i cases.xmind -f facts.json -d plan.docx
contract / tree Cases ↔ contract conversion / restore tree mtkit contract -i cases.xmind -o contract.json
track Test management: execution records/reports/trends mtkit track record --case case --result pass
bug Defect library: add/list/close/stats mtkit bug add --title defect --severity P1
evolve Self-evolution: backup/restore/list/cleanup mtkit evolve backup file
asset Test asset aging detection (governance) mtkit asset --dir output-dir --days 30
plan Test plan artifact: build / authorize / check / show mtkit plan build -i plan.docx -f facts.json
eval Golden-set regression metrics + CI gate mtkit eval -d assets --gate
memory Project memory: stats/recall/explain/forget/ingest/feedback/runs/proposals mtkit memory recall -q bill status
capabilities Machine-readable self description mtkit capabilities --json

Contract format (the single input convention):

{"chapters":[{"t":"Chapter","cases":[{"t":"tc-P0-Functional: case name",
  "pc":["preconditions"],"steps":["steps"],"expects":["expected"],
  "sql":["SELECT ..."],"method":"equivalence class","risk":"high"}]}]}

mtkit contract --spec prints the authoritative schema (single source: mtkit/contract.py).

Database Access (Optional, Strictly Read-Only)

Four data sources in db.json (via the type field):

{"type":"cli","connect":{"cmd":"mysql -h{host} -u{user} -p{pass} {db} -N -e \"{sql}\"","host":"10.0.0.1","user":"ro","pass":"${DB_PASS}","db":"bill_db"}}
{"type":"driver","driver":"pymysql","host":"10.0.0.1","user":"ro","password":"${DB_PASS}","db":"bill_db"}
{"type":"http","url":"https://gw.example.com/query","token":"${DB_TOKEN}"}
{"type":"file","path":"schema.json"}

Only SELECT/EXPLAIN/DESC/SHOW are allowed; all write operations are rejected. Passwords use ${ENV_VAR} environment variables.

Qoder Integration (2 Steps)

  1. Qoder plugin manager → local plugin → select d:\mtkit
  2. Chat prompts:
    • Generate cases: "Use mtkit to generate XMind test cases: plan xxx.docx, sample xxx.xmind, backend repo xxx"
    • Test consulting: "How should I test this feature?" / "The production error, help me look into it" / "Is this a bug?"

Skill Sequence

sequenceDiagram
    participant U as User
    participant A as AI (test builder)
    U->>A: Provide the three inputs + optional docs/db
    A->>U: Document health check (defects + advice, confirm item by item)
    A->>A: gather + facts + experience library loading
    A->>U: Test case output plan (design methods + builder advice)
    U->>A: Authorization (can add/remove/adjust)
    A->>A: Generate contract → quality gate → fix loop
    A->>U: Case adjustment suggestions (confirm item by item)
    A->>A: Render XMind → validate → gap comparison
    A->>U: Delivery (XMind / defect summary / work traces) + training

Iterative Updates (Editable Install, No Reinstall Needed)

pip install --force-reinstall --no-deps -e d:\mtkit   # only when needed
python -m unittest                                     # self-check
  • Plugin side: repo file updates take effect immediately; only plugin.json version changes require a Qoder restart
  • Self-iteration: improvements discovered by the AI during use are written to .mtkit-work/improvements.json; with auto_improve enabled in .mtkit.json and authorization granted, the AI can optimize itself and self-verify (see skills docs)
  • Details: see CHANGELOG.md and skills/mtkit-gen-xmind/ (skills & conventions)

PyPI Release (Maintainer Guide)

# 1. Build
python -m pip install build twine
python -m build                    # produces dist/mtkit-<version>.tar.gz + .whl

# 2. Recommended: verify on TestPyPI first
python -m twine upload --repository testpypi dist/*
pip install -i https://test.pypi.org/simple/ mtkit
mtkit --help                       # verify the CLI

# 3. Publish officially after verification (requires project-level API token + PyPI account 2FA)
python -m twine upload dist/*      # enter API token

Installation flow for new teammates after release (final form):

pip install mtkit            # CLI + bundled skill assets (pure stdlib, installs in seconds)
mtkit install                # copies bundled skills to ~/.mtkit/plugin and registers the Qoder plugin
# restart Qoder → / lists the mtkit plugin; /skills shows mtkit-gen-xmind

# upgrade later
pip install -U mtkit && mtkit install

Metadata

Release files for mtkit 1.20.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mtkit 1.20.1
File Size Uploaded Provenance Actions
mtkit-1.20.1.tar.gz 189.0 kB Without provenance Details for mtkit-1.20.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mtkit 1.20.1
File Interpreter ABI Platform Actions
mtkit-1.20.1-py3-none-any.whl Python 3 none any Details for mtkit-1.20.1-py3-none-any.whl

Total release size: 405.4 kB

Release files / mtkit-1.20.1.tar.gz

Download URL mtkit-1.20.1.tar.gz
Size 189.0 kB
Tags Source
SHA-256 checksum
How to use checksums
84358336b823b92d8f12733d75f836bc6777f6cedd2e7724c2299b5c0e4c03a5
BLAKE2b-256 checksum
How to use checksums
92387d490dc2f6745461509355b738c0aff863734ea596fdbd7b6f2a053963ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.7

Release files / mtkit-1.20.1-py3-none-any.whl

Download URL mtkit-1.20.1-py3-none-any.whl
Size 216.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47f3fa19f38ca16c2dc578b1bee32c4cf523f35cd7ebc497b220f150c6831047
BLAKE2b-256 checksum
How to use checksums
5c439e5b95c2caad9aea4fecb4024c3a28eadac421a3d9b283e6bee722bfa39e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.7

Security for mtkit 1.20.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page