Hokmah
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"hokmah": {
"url": "https://hokmah.dev/mcp"
}
}
}遠端端點
https://hokmah.dev/mcpstreamable-http它能做什麼
工具清單
工具(8)
🟢hokmah_analyze(repo_url, query, branch)
Estimates the impact of a described code change on an imported public GitHub repository. `repo_url` is https://github.com/<owner>/<repository> and `query` describes the change in plain language; `branch` is accepted for compatibility, the analysis uses the history imported from the default branch. Returns a risk assessment with the files, symbols and modules likely to be affected and related commits, computed from the repository graph without a language model.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"query": {
"type": "string"
},
"branch": {
"default": "main",
"type": "string"
}
},
"required": [
"repo_url",
"query"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟡hokmah_connect_project(repo_url, branch)
Imports a public GitHub repository so it can be analyzed: indexes its source files (.py .js .ts .jsx .tsx .vue .mjs .mts .rs .go .java) and its latest commits (up to 500) from the default branch into a dependency and change-history graph. `repo_url` is https://github.com/<owner>/<repository>; `branch` is accepted for compatibility. A repository already imported is not imported again. Returns the project id and the number of commits and files ingested.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"branch": {
"default": "main",
"type": "string"
}
},
"required": [
"repo_url"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟢hokmah_zone_health(repo_url, zone)
Says how well a part of an imported repository is doing and what to do about it. `zone` is a path prefix (packages/cli/src/webhooks) or a few words ("MFA recovery codes"). Returns, from the last 12 months of history and the current code: a verdict (stable, active, growing, maintenance, fragile), fixes per feature and per 1000 lines, the recurring fix themes specific to the zone, giant files and functions, files often changed without tests, coupled areas, parallel implementations, and recommendations with the numbers behind each one. No language model is involved.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"zone": {
"type": "string"
}
},
"required": [
"repo_url",
"zone"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟢hokmah_compare(repo_url, zones)
Ranks 2 to 8 zones of an imported repository from the one that works worst to the one that works best, with the reasons: fixes per feature, fixes per 1000 lines and tests, over the last 12 months. Each zone is a path prefix or a few words.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"zones": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"repo_url",
"zones"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟢hokmah_similar_fixes(repo_url, query)
Finds past fixes of a kind of bug ("null run data guard", "prototype pollution", "race condition on resume") in an imported repository, and the current files where the same defect may still exist: files of the same kind next to the fixed ones, files that usually change with them but were left out, and files that contain the identifiers the fix changed. Read each candidate with the fix in mind; a candidate is not a confirmed bug.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"query": {
"type": "string"
}
},
"required": [
"repo_url",
"query"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟢hokmah_risky_code(repo_url, zone, kind)
Lists current code of an imported repository that lacks a protection the project's own fixes keep adding, learned from the diffs of its past fixes: unguarded access to structures fixes had to guard, including an entry checked to exist but read at [0] without checking it has an element, or passed to a function that dereferences it (R1); results of functions that fixes had to null-check, called the way the fixes checked them and declared nullable, used unchecked (R7); plain objects used as dictionaries keyed by request input and written through the looked-up value, obj[k].x = v (R2, prototype pollution; a one-level write is only a hardening note); template variables inserted unescaped where another file sanitizes them (R3). Optional `zone` (path prefix or words) and `kind` (R1, R2, R3, R7). kind="UI" lists the interface instead: translation keys missing from the base locale or called without the values their text needs (U1), screens that await a request on opening without handling its failure (U4), and, not validated on history, accessibility notes (U5). Each site says why it was flagged; `measured_on_history` gives, per kind, how often such sites turned out to need a fix when the detectors were run on the code of a year earlier. Candidates are not confirmed bugs.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"zone": {
"default": "",
"type": "string"
},
"kind": {
"default": "",
"type": "string"
}
},
"required": [
"repo_url"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟢hokmah_overview(repo_url)
Overview of an imported repository: the most fragile areas (fixes per feature over 12 months), the fastest growing and the new ones, the busiest, the largest files, the most co-changed files, and how many internal imports could be resolved.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
}
},
"required": [
"repo_url"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}🟢hokmah_seams(repo_url, limit, scope, min_jaccard, zone)
Architecture seams of an imported repository: a DISTINCT axis from risk — not "where is the code fragile?" but "where does the code fight its own structure?". A seam is a source of truth split across module boundaries: files in different packages that keep being edited together over the history (e.g. the same list enumerated in two packages). Read from the co-change history alone, scored by near-inseparability (jaccard) with a hub penalty, so wanted shared contracts (api-types/dto/schema...) are listed apart, never counted as debt. Each seam carries its evidence (shared identifiers, co-commits, span) and a confidence; the tool proposes, it does not decide — a seam is not a bug and never appears in the risk axis. `scope` = actionable (default) | all | expected; `min_jaccard` filters weaker seams; `zone` (path prefix or words) narrows to seams touching that zone. Backed by a retrospective bench (backtest_coupling): on the reference repo a flagged seam predicts future co-change with a lift of several times over a random previously-coupled pair.
輸入結構描述
{
"type": "object",
"properties": {
"repo_url": {
"type": "string"
},
"limit": {
"default": 30,
"type": "integer"
},
"scope": {
"default": "actionable",
"type": "string"
},
"min_jaccard": {
"default": 0,
"type": "number"
},
"zone": {
"default": "",
"type": "string"
}
},
"required": [
"repo_url"
],
"additionalProperties": false
}輸出結構描述
{
"type": "object",
"additionalProperties": true
}社群
證據