weavatrix 0.3.14 → 1.1.0
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.
- package/LICENSE +1 -0
- package/README.md +132 -200
- package/bin/native/darwin-arm64/weavatrix +0 -0
- package/bin/native/darwin-x64/weavatrix +0 -0
- package/bin/native/linux-arm64/weavatrix +0 -0
- package/bin/native/linux-x64/weavatrix +0 -0
- package/bin/native/win32-arm64/weavatrix.exe +0 -0
- package/bin/native/win32-x64/weavatrix.exe +0 -0
- package/bin/resolve-binary.mjs +73 -0
- package/bin/run-native.mjs +26 -0
- package/bin/weavatrix-mcp.mjs +7 -6
- package/bin/weavatrix.mjs +5 -0
- package/package.json +10 -67
- package/server.json +38 -0
- package/skill/SKILL.md +62 -374
- package/skill/agents/openai.yaml +4 -0
- package/skill/references/tool-routing.md +45 -0
- package/SECURITY.md +0 -101
- package/docs/adr/0001-v0.3-offline-online-split.md +0 -60
- package/docs/agent-task-benchmark.md +0 -58
- package/docs/releases/v0.2.19.md +0 -33
- package/docs/releases/v0.3.0.md +0 -43
- package/docs/releases/v0.3.1.md +0 -30
- package/docs/releases/v0.3.10.md +0 -76
- package/docs/releases/v0.3.11.md +0 -55
- package/docs/releases/v0.3.12.md +0 -44
- package/docs/releases/v0.3.13.md +0 -34
- package/docs/releases/v0.3.14.md +0 -37
- package/docs/releases/v0.3.2.md +0 -15
- package/docs/releases/v0.3.3.md +0 -25
- package/docs/releases/v0.3.4.md +0 -40
- package/docs/releases/v0.3.5.md +0 -50
- package/docs/releases/v0.3.6.md +0 -44
- package/docs/releases/v0.3.7.md +0 -37
- package/docs/releases/v0.3.8.md +0 -21
- package/docs/releases/v0.3.9.md +0 -36
- package/scripts/run-agent-task-benchmark.mjs +0 -118
- package/src/analysis/allowed-test-runner.js +0 -70
- package/src/analysis/architecture/contract-graph.js +0 -119
- package/src/analysis/architecture/contract-schema.js +0 -110
- package/src/analysis/architecture/contract-storage.js +0 -35
- package/src/analysis/architecture/contract-verification.js +0 -168
- package/src/analysis/architecture-contract.js +0 -16
- package/src/analysis/audit-debt.js +0 -94
- package/src/analysis/audit-extensions.js +0 -60
- package/src/analysis/cargo-dependency-evidence.js +0 -108
- package/src/analysis/cargo-manifests.js +0 -81
- package/src/analysis/change-classification/diff-parser.js +0 -103
- package/src/analysis/change-classification/options.js +0 -40
- package/src/analysis/change-classification/symbol-classifier.js +0 -177
- package/src/analysis/change-classification.js +0 -188
- package/src/analysis/coverage-reports-tarpaulin.js +0 -112
- package/src/analysis/coverage-reports.js +0 -246
- package/src/analysis/cycle-route.js +0 -14
- package/src/analysis/data-flow-evidence.js +0 -114
- package/src/analysis/dead-check.js +0 -300
- package/src/analysis/dead-code-review/candidates.js +0 -194
- package/src/analysis/dead-code-review/policy.js +0 -23
- package/src/analysis/dead-code-review.js +0 -119
- package/src/analysis/dep-check-ecosystems.js +0 -205
- package/src/analysis/dep-check.js +0 -290
- package/src/analysis/dep-rules.js +0 -10
- package/src/analysis/dependency/conventions.js +0 -16
- package/src/analysis/dependency/scoped-dependencies.js +0 -51
- package/src/analysis/dependency/source-references.js +0 -21
- package/src/analysis/duplicate-groups.js +0 -104
- package/src/analysis/duplicates-worker.js +0 -11
- package/src/analysis/duplicates.compute.js +0 -269
- package/src/analysis/duplicates.js +0 -15
- package/src/analysis/duplicates.run.js +0 -52
- package/src/analysis/duplicates.tokenize.js +0 -199
- package/src/analysis/endpoints/common.js +0 -79
- package/src/analysis/endpoints/extract.js +0 -120
- package/src/analysis/endpoints/inventory.js +0 -84
- package/src/analysis/endpoints/mounts.js +0 -129
- package/src/analysis/endpoints-java.js +0 -260
- package/src/analysis/endpoints-rust.js +0 -124
- package/src/analysis/endpoints.js +0 -3
- package/src/analysis/findings.js +0 -70
- package/src/analysis/git-history/analytics.js +0 -177
- package/src/analysis/git-history/collector.js +0 -67
- package/src/analysis/git-history/options.js +0 -66
- package/src/analysis/git-history.js +0 -143
- package/src/analysis/git-ref-graph.js +0 -76
- package/src/analysis/go-dependency-evidence.js +0 -62
- package/src/analysis/graph-analysis.aggregate.js +0 -296
- package/src/analysis/graph-analysis.edges.js +0 -24
- package/src/analysis/graph-analysis.js +0 -7
- package/src/analysis/graph-analysis.refs.js +0 -202
- package/src/analysis/graph-analysis.summaries.js +0 -65
- package/src/analysis/health-capabilities.js +0 -83
- package/src/analysis/hot-path-review.js +0 -266
- package/src/analysis/http-contract-wrappers.js +0 -241
- package/src/analysis/http-contracts/analysis.js +0 -179
- package/src/analysis/http-contracts/client-call-detection.js +0 -82
- package/src/analysis/http-contracts/client-call-parser.js +0 -273
- package/src/analysis/http-contracts/graph-context.js +0 -143
- package/src/analysis/http-contracts/matching.js +0 -61
- package/src/analysis/http-contracts/shared.js +0 -85
- package/src/analysis/http-contracts.js +0 -6
- package/src/analysis/internal-audit/dependency-health.js +0 -113
- package/src/analysis/internal-audit/python-manifests.js +0 -78
- package/src/analysis/internal-audit/repo-files.js +0 -50
- package/src/analysis/internal-audit/supply-chain.js +0 -149
- package/src/analysis/internal-audit.collect.js +0 -213
- package/src/analysis/internal-audit.js +0 -9
- package/src/analysis/internal-audit.reach.js +0 -201
- package/src/analysis/internal-audit.run.js +0 -256
- package/src/analysis/java-source.js +0 -36
- package/src/analysis/jvm-artifact-index.js +0 -87
- package/src/analysis/jvm-dependency-evidence.js +0 -138
- package/src/analysis/jvm-manifests.js +0 -114
- package/src/analysis/manifests.js +0 -123
- package/src/analysis/package-reachability.js +0 -39
- package/src/analysis/source-complexity.ast.js +0 -97
- package/src/analysis/source-complexity.constants.js +0 -55
- package/src/analysis/source-complexity.js +0 -14
- package/src/analysis/source-complexity.report.js +0 -81
- package/src/analysis/source-complexity.walk.js +0 -228
- package/src/analysis/source-correctness/retry-patterns.js +0 -93
- package/src/analysis/source-correctness.js +0 -222
- package/src/analysis/static-test-reachability.js +0 -150
- package/src/analysis/structure/dependency-graph.js +0 -151
- package/src/analysis/structure/findings.js +0 -162
- package/src/analysis/task-retrieval.js +0 -107
- package/src/analysis/transport-contracts.js +0 -224
- package/src/analysis/transport-runtime-evidence.js +0 -155
- package/src/analysis-kit.mjs +0 -17
- package/src/bounds.js +0 -4
- package/src/build-graph.js +0 -209
- package/src/child-env.js +0 -7
- package/src/config.js +0 -5
- package/src/extension/local-services.mjs +0 -75
- package/src/git-exec.js +0 -67
- package/src/graph/build-worker.js +0 -49
- package/src/graph/builder/go-receiver-resolution.js +0 -112
- package/src/graph/builder/js/dynamic-import.js +0 -26
- package/src/graph/builder/js/queries.js +0 -48
- package/src/graph/builder/lang-csharp.js +0 -40
- package/src/graph/builder/lang-css.js +0 -29
- package/src/graph/builder/lang-go.js +0 -140
- package/src/graph/builder/lang-html.js +0 -29
- package/src/graph/builder/lang-java-calls.js +0 -142
- package/src/graph/builder/lang-java.js +0 -215
- package/src/graph/builder/lang-js.js +0 -291
- package/src/graph/builder/lang-python.js +0 -235
- package/src/graph/builder/lang-rust-calls.js +0 -63
- package/src/graph/builder/lang-rust.js +0 -299
- package/src/graph/builder/lang-solidity.js +0 -126
- package/src/graph/builder/lang-sql.js +0 -263
- package/src/graph/builder/pass2-resolution.js +0 -81
- package/src/graph/builder/spec-pkg.js +0 -87
- package/src/graph/community.js +0 -27
- package/src/graph/edge-provenance.js +0 -31
- package/src/graph/file-lock.js +0 -69
- package/src/graph/freshness-probe.js +0 -142
- package/src/graph/graph-filter.js +0 -63
- package/src/graph/incremental-refresh.js +0 -235
- package/src/graph/internal-builder.barrels.js +0 -235
- package/src/graph/internal-builder.build.js +0 -300
- package/src/graph/internal-builder.java.js +0 -33
- package/src/graph/internal-builder.js +0 -12
- package/src/graph/internal-builder.langs.js +0 -157
- package/src/graph/internal-builder.pass2.js +0 -163
- package/src/graph/internal-builder.resolvers.js +0 -286
- package/src/graph/layout.js +0 -51
- package/src/graph/node-id.js +0 -7
- package/src/graph/parser-artifact-boundary.js +0 -55
- package/src/graph/relations.js +0 -4
- package/src/graph/repo-registry.js +0 -124
- package/src/graph/resolvers/rust.js +0 -117
- package/src/infra/infra-items.js +0 -255
- package/src/infra/infra-registry.js +0 -184
- package/src/infra/infra.detect.js +0 -119
- package/src/infra/infra.js +0 -38
- package/src/infra/infra.match.js +0 -102
- package/src/infra/infra.scan.js +0 -93
- package/src/mcp/actions/graph-lifecycle.mjs +0 -148
- package/src/mcp/architecture-bootstrap.mjs +0 -168
- package/src/mcp/architecture-starter.mjs +0 -234
- package/src/mcp/catalog.mjs +0 -233
- package/src/mcp/company-contract-page.mjs +0 -142
- package/src/mcp/company-contract-reconcile.mjs +0 -87
- package/src/mcp/company-contract-verdict.mjs +0 -42
- package/src/mcp/evidence/bun-lock-graph.mjs +0 -209
- package/src/mcp/evidence/duplicate-member-order.mjs +0 -8
- package/src/mcp/evidence/package-graph-common.mjs +0 -115
- package/src/mcp/evidence/package-lock-graph.mjs +0 -92
- package/src/mcp/evidence-snapshot.architecture.mjs +0 -80
- package/src/mcp/evidence-snapshot.common.mjs +0 -158
- package/src/mcp/evidence-snapshot.duplicates.mjs +0 -213
- package/src/mcp/evidence-snapshot.health.mjs +0 -102
- package/src/mcp/evidence-snapshot.inventory.mjs +0 -148
- package/src/mcp/evidence-snapshot.mjs +0 -50
- package/src/mcp/evidence-snapshot.package-graph.mjs +0 -34
- package/src/mcp/evidence-snapshot.structure.mjs +0 -84
- package/src/mcp/extension-api.mjs +0 -77
- package/src/mcp/git-output.mjs +0 -7
- package/src/mcp/graph/context-core.mjs +0 -111
- package/src/mcp/graph/context-seeds.mjs +0 -207
- package/src/mcp/graph/context-state.mjs +0 -85
- package/src/mcp/graph/reverse-reach.mjs +0 -42
- package/src/mcp/graph/tools-core.mjs +0 -143
- package/src/mcp/graph/tools-query.mjs +0 -276
- package/src/mcp/graph-context.mjs +0 -5
- package/src/mcp/graph-diff.mjs +0 -218
- package/src/mcp/health/audit-format.mjs +0 -199
- package/src/mcp/health/audit.mjs +0 -199
- package/src/mcp/health/dead-code.mjs +0 -110
- package/src/mcp/health/duplicates.mjs +0 -121
- package/src/mcp/health/endpoints.mjs +0 -71
- package/src/mcp/health/structure.mjs +0 -220
- package/src/mcp/runtime-version.mjs +0 -31
- package/src/mcp/server/auto-refresh.mjs +0 -66
- package/src/mcp/server/runtime-config.mjs +0 -43
- package/src/mcp/server/shutdown.mjs +0 -40
- package/src/mcp/staleness-notice.mjs +0 -20
- package/src/mcp/sync/evidence-architecture.mjs +0 -54
- package/src/mcp/sync/evidence-common.mjs +0 -88
- package/src/mcp/sync/evidence-duplicates.mjs +0 -97
- package/src/mcp/sync/evidence-health.mjs +0 -56
- package/src/mcp/sync/evidence-packages.mjs +0 -95
- package/src/mcp/sync/payload-common.mjs +0 -97
- package/src/mcp/sync/payload-v2.mjs +0 -54
- package/src/mcp/sync/payload-v3.mjs +0 -79
- package/src/mcp/sync-evidence.mjs +0 -23
- package/src/mcp/sync-payload.mjs +0 -70
- package/src/mcp/tool-result.mjs +0 -54
- package/src/mcp/tools-actions.mjs +0 -11
- package/src/mcp/tools-architecture.mjs +0 -177
- package/src/mcp/tools-company.mjs +0 -251
- package/src/mcp/tools-context.mjs +0 -222
- package/src/mcp/tools-endpoints.mjs +0 -207
- package/src/mcp/tools-graph-hubs.mjs +0 -78
- package/src/mcp/tools-graph.mjs +0 -17
- package/src/mcp/tools-health.mjs +0 -24
- package/src/mcp/tools-history.mjs +0 -28
- package/src/mcp/tools-impact-change.mjs +0 -220
- package/src/mcp/tools-impact-precision.mjs +0 -89
- package/src/mcp/tools-impact.mjs +0 -169
- package/src/mcp/tools-source.mjs +0 -238
- package/src/mcp/tools-verified-change.mjs +0 -200
- package/src/mcp-rg.mjs +0 -50
- package/src/mcp-runtime.mjs +0 -2
- package/src/mcp-server.mjs +0 -298
- package/src/mcp-source-tools.mjs +0 -163
- package/src/path-classification.js +0 -226
- package/src/path-ignore.js +0 -69
- package/src/precision/lsp-client/constants.js +0 -12
- package/src/precision/lsp-client/environment.js +0 -20
- package/src/precision/lsp-client/errors.js +0 -15
- package/src/precision/lsp-client/lifecycle.js +0 -114
- package/src/precision/lsp-client/message-parser.js +0 -81
- package/src/precision/lsp-client/protocol.js +0 -212
- package/src/precision/lsp-client/registry.js +0 -59
- package/src/precision/lsp-client/repo-uri.js +0 -60
- package/src/precision/lsp-client/stdio-client.js +0 -140
- package/src/precision/lsp-client.js +0 -10
- package/src/precision/lsp-overlay/budget-policy.js +0 -78
- package/src/precision/lsp-overlay/build.js +0 -261
- package/src/precision/lsp-overlay/contract.js +0 -61
- package/src/precision/lsp-overlay/reference-results.js +0 -108
- package/src/precision/lsp-overlay/semantic-inputs.js +0 -62
- package/src/precision/lsp-overlay/source-session.js +0 -142
- package/src/precision/lsp-overlay/store.js +0 -150
- package/src/precision/lsp-overlay/target-index.js +0 -152
- package/src/precision/lsp-overlay/target-query.js +0 -55
- package/src/precision/lsp-overlay.js +0 -11
- package/src/precision/symbol-query.js +0 -224
- package/src/precision/typescript-lsp-provider.js +0 -12
- package/src/precision/typescript-provider/client.js +0 -89
- package/src/precision/typescript-provider/discovery.js +0 -124
- package/src/precision/typescript-provider/isolated-runtime.js +0 -39
- package/src/precision/typescript-provider/project-host.js +0 -254
- package/src/precision/typescript-provider/project-safety.js +0 -166
- package/src/precision/typescript-provider/reference-usage.js +0 -53
- package/src/process.js +0 -95
- package/src/repo-path.js +0 -53
- package/src/scan/discover.inventory.js +0 -78
- package/src/scan/discover.js +0 -5
- package/src/scan/discover.list.js +0 -79
- package/src/scan/discover.stack.js +0 -227
- package/src/scan/search.core.js +0 -24
- package/src/scan/search.git.js +0 -102
- package/src/scan/search.js +0 -9
- package/src/scan/search.node.js +0 -83
- package/src/scan/search.preview.js +0 -49
- package/src/scan/search.rg.js +0 -145
- package/src/security/advisory-store.js +0 -172
- package/src/security/installed-jvm-rust.js +0 -46
- package/src/security/installed.js +0 -280
- package/src/security/malware-file-heuristics.js +0 -121
- package/src/security/malware-heuristics.exclusions.js +0 -134
- package/src/security/malware-heuristics.js +0 -15
- package/src/security/malware-heuristics.roots.js +0 -145
- package/src/security/malware-heuristics.scan.js +0 -89
- package/src/security/malware-heuristics.sweep.js +0 -122
- package/src/security/malware-scoring.js +0 -105
- package/src/security/match.js +0 -85
- package/src/security/registry-sig.classify.js +0 -137
- package/src/security/registry-sig.js +0 -18
- package/src/security/registry-sig.rules.js +0 -192
- package/src/security/rust-advisory-report.js +0 -60
- package/src/security/typosquat.js +0 -81
- package/src/util.js +0 -40
- package/src/version.js +0 -7
package/server.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.sergii-ziborov/weavatrix",
|
|
4
|
+
"title": "Weavatrix",
|
|
5
|
+
"description": "Native Weavatrix MCP: 39 read-only repository tools across 24 code and configuration surfaces.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/sergii-ziborov/weavatrix",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"version": "1.1.0",
|
|
11
|
+
"websiteUrl": "https://weavatrix.com",
|
|
12
|
+
"packages": [
|
|
13
|
+
{
|
|
14
|
+
"registryType": "npm",
|
|
15
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
16
|
+
"identifier": "weavatrix",
|
|
17
|
+
"version": "1.1.0",
|
|
18
|
+
"runtimeHint": "npx",
|
|
19
|
+
"transport": {
|
|
20
|
+
"type": "stdio"
|
|
21
|
+
},
|
|
22
|
+
"packageArguments": [
|
|
23
|
+
{
|
|
24
|
+
"type": "positional",
|
|
25
|
+
"value": "mcp"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "positional",
|
|
29
|
+
"valueHint": "repoRoot",
|
|
30
|
+
"description": "Absolute path to the initial local repository; defaults to the current directory",
|
|
31
|
+
"format": "filepath",
|
|
32
|
+
"default": ".",
|
|
33
|
+
"isRequired": false
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
package/skill/SKILL.md
CHANGED
|
@@ -1,378 +1,66 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: weavatrix
|
|
3
|
-
description:
|
|
3
|
+
description: Use the native Weavatrix MCP for local repository intelligence across Rust, JavaScript, TypeScript, Python, Go, Java, C, C++, C#, SQL, GraphQL, Protobuf, infrastructure, and event transports. Trigger for codebase orientation, source search, dependency and call graphs, endpoint or transport tracing, cross-repository impact, dead-code and duplicate review, Health audits, architecture checks, Git history, coverage, vector or semantic search, SEO links, and temporal memory.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
a backend change may affect registered clients, and inspect each graph reconciliation state before
|
|
68
|
-
using the verdict.
|
|
69
|
-
- **Measure one symbol's transitive blast radius**: `get_dependents`.
|
|
70
|
-
- **Review the current branch, diff, or external patch**: `change_impact`; its explicit baseline
|
|
71
|
-
parameter is `base`, not the `base_ref` used by audit/diff/verification tools. It distinguishes
|
|
72
|
-
additive exports from signature/body/removal risk and separates runtime/type-only radius plus
|
|
73
|
-
available measured coverage or explicitly static reachability.
|
|
74
|
-
- **Compare structural graph revisions**: `graph_diff base_ref=<merge-base>` for module edges, cycles,
|
|
75
|
-
orphans and lost callers; without `base_ref`, compare the last rebuild snapshots.
|
|
76
|
-
- **Use behavioral history**: `git_history` for churn x connectivity, hidden co-change and expected
|
|
77
|
-
test/source coupling from bounded local Git numstat evidence.
|
|
78
|
-
- **Plan and verify a serious change or pre-commit gate**:
|
|
79
|
-
`verified_change task=<same-task> phase=plan base_ref=<merge-base>` -> edit ->
|
|
80
|
-
`verified_change task=<same-task> phase=verify base_ref=<same-ref>`. It composes exact context, impact, graph,
|
|
81
|
-
architecture, duplicate, optional API and test proof into one PASS/BLOCKED/UNKNOWN envelope. It is
|
|
82
|
-
a proof layer around an agent's edit, not a source editor or hidden auto-fix.
|
|
83
|
-
|
|
84
|
-
### Health, debt and testing scenarios
|
|
85
|
-
|
|
86
|
-
- **Run a whole-repository Health review**: `run_audit debt=all`, then read its capability matrix.
|
|
87
|
-
`STRUCTURE CHECKED` and `DEPENDENCIES CHECKED` do not imply runtime or concurrency correctness.
|
|
88
|
-
- **Gate only newly introduced branch debt**: `run_audit base_ref=<merge-base> debt=new`; old debt in
|
|
89
|
-
a changed file remains existing.
|
|
90
|
-
- **Review dependency declarations/imports**: `run_audit category=dependencies`; it includes missing,
|
|
91
|
-
unused, duplicate, unresolved-import and lockfile-drift evidence without relabelling identities.
|
|
92
|
-
Maven/Gradle imports are mapped to exact artifact ownership when the referenced class is present in
|
|
93
|
-
an already installed local JAR. Missing artifacts, ambiguous class owners, version catalogs or
|
|
94
|
-
dynamic build logic remain `PARTIAL`/`NOT_SUPPORTED`, never a false clean `0 declared / 0 external`.
|
|
95
|
-
- **Review vulnerability evidence**: `run_audit category=vulnerability`. `NOT_CHECKED` is unknown,
|
|
96
|
-
never clean; remote refresh is an explicit `weavatrix-online` workflow.
|
|
97
|
-
- **Review dead files, functions, methods and symbols**: `find_dead_code`; every result remains a
|
|
98
|
-
review candidate with framework/dynamic/public-API caveats, never an auto-delete verdict.
|
|
99
|
-
- **Trace dynamic GraphQL/gRPC/Kafka contracts**: export a source-free
|
|
100
|
-
`weavatrix.transport-runtime.v1` JSON report (normalized observations or OTLP `resourceSpans`) to
|
|
101
|
-
`.weavatrix/transport-runtime.json`, rebuild the graph, and call `trace_api_contract`. Only a
|
|
102
|
-
fresh report whose `repositoryRevision` matches `graphRevision` and whose observation maps to the
|
|
103
|
-
dynamic file/line resolves that `UNKNOWN`; missing capture remains unknown.
|
|
104
|
-
- **Review clone families or same-name divergence**: `find_duplicates`; framework router boilerplate
|
|
105
|
-
and immutable declarative catalog shapes stay suppressed unless explicitly included.
|
|
106
|
-
- **Map measured coverage or honest static test reachability**: `coverage_map`; unavailable measured
|
|
107
|
-
coverage is not 0%.
|
|
108
|
-
- **Prioritize local performance-review candidates**: `hot_path_review`; confirm with a profiler or
|
|
109
|
-
benchmark before changing runtime behavior.
|
|
110
|
-
|
|
111
|
-
### Intended architecture
|
|
112
|
-
|
|
113
|
-
- **Read or establish intended architecture**: `get_architecture_contract`. A returned starter adapts
|
|
114
|
-
to Maven/Gradle source roots and monorepos and proposes product-code territories plus observed
|
|
115
|
-
dependency directions labelled `OBSERVED_NOT_ENFORCED`; oversized Java branches split only at real
|
|
116
|
-
child packages. Only runtime-cycle and 300-line file guards are active by default; generic
|
|
117
|
-
complexity/cohesion thresholds are `CANDIDATE_NOT_ENFORCED`. None becomes policy automatically.
|
|
118
|
-
- **Bootstrap local policy safely**: `get_architecture_contract action=preview` with an optional
|
|
119
|
-
reviewed `candidate_contract` and `baseline_mode=none|accept-current`; inspect the exact content,
|
|
120
|
-
verification and patch, then call `action=approve confirm_token=<exact-token>`. Approval creates
|
|
121
|
-
only a missing `.weavatrix/architecture.json`, rechecks graph identity, and never overwrites policy.
|
|
122
|
-
- **Select rules before editing**: `prepare_change`; **enforce the ratchet after editing**:
|
|
123
|
-
`verify_architecture`.
|
|
124
|
-
- **Understand or request an exception**: `explain_architecture_violation` ->
|
|
125
|
-
`propose_architecture_exception`; proposals never mutate policy automatically. After human approval,
|
|
126
|
-
the owner must add the returned proposal to the local contract's `exceptions`; remote governance
|
|
127
|
-
belongs to `weavatrix-online`.
|
|
128
|
-
|
|
129
|
-
Across every scenario, treat `PARTIAL`, `UNAVAILABLE`, `OFF`, `NOT_SUPPORTED`, `NOT_CHECKED`,
|
|
130
|
-
`ERROR`, or capped evidence as incomplete rather than success. Java and Rust exact language-server
|
|
131
|
-
providers are not bundled, so their edges never become `EXACT_LSP` even when a mixed repository has
|
|
132
|
-
a complete TypeScript/JavaScript overlay. Java and Go receiver-type call edges are parser-resolved
|
|
133
|
-
and explicitly `INFERRED`; Go resolution uses parameter, local, constructor-return, imported and
|
|
134
|
-
struct-field types. These edges improve cross-file flow without claiming compiler-exact overload,
|
|
135
|
-
interface dispatch, reflection, or runtime behavior.
|
|
136
|
-
|
|
137
|
-
## Ground rules
|
|
138
|
-
|
|
139
|
-
- **No hidden source mutation**: Weavatrix builds derived graph/cache artifacts and can run explicitly
|
|
140
|
-
authorized tests, but it does not edit repository source, auto-delete debt, merge clones, or rewrite
|
|
141
|
-
architecture policy. The coding agent remains responsible for the change and its tests.
|
|
142
|
-
- **Evidence, not verdicts**: treat audit, hub, orphan and duplicate output as hypotheses. Confirm a
|
|
143
|
-
finding in source and check framework/runtime conventions before deleting, merging or redesigning
|
|
144
|
-
code. A same-name/different-body pair is a divergence candidate, not proof of duplication.
|
|
145
|
-
- **Freshness**: the graph is always fresh at answer time — no watcher process and no manual refresh
|
|
146
|
-
step exists or is needed. Every graph/health call runs a debounced Git freshness probe and, when the
|
|
147
|
-
repository changed, refreshes before answering (bounded incremental reparse of changed files plus
|
|
148
|
-
reverse importers for JS/TS; full rebuild for config/export-surface/barrel changes and other
|
|
149
|
-
languages). Cross-repository tracing reconciles every selected registered graph the same way. Read
|
|
150
|
-
the structured `refresh` / `graphReconciliation` status: `none`, `incremental`, `full`, or
|
|
151
|
-
explicitly `PARTIAL`. Use `rebuild_graph` only when automatic reconciliation reports a
|
|
152
|
-
fallback/error or when intentionally changing build mode. A normal `open_repo` builds missing graphs
|
|
153
|
-
and upgrades legacy schemas; `build:false` deliberately refuses that upgrade.
|
|
154
|
-
- **Ambiguity**: `get_node`/`get_neighbors`/`get_dependents` disclose `matched N nodes; using the
|
|
155
|
-
best-connected` — read that note before trusting the answer; pass an exact node id to pin it.
|
|
156
|
-
- **Runtime versus compile time**: keep runtime cycles separate from TypeScript type-only and
|
|
157
|
-
language compile-only coupling (Rust `mod`/`use`/`pub use`, Java imports). `module_map`,
|
|
158
|
-
`change_impact` and `graph_diff` label the distinction; `god_nodes` ranks unique connectivity and
|
|
159
|
-
reports repeated references separately. Do not schedule a runtime-cycle refactor from
|
|
160
|
-
compile-time-only edges.
|
|
161
|
-
- **Edge provenance**: distinguish how an edge was established from legacy confidence. The parser
|
|
162
|
-
emits `EXTRACTED`, `RESOLVED`, and `INFERRED`; the bundled bounded TypeScript/JavaScript language
|
|
163
|
-
server emits `EXACT_LSP` only for references it confirms. `CONFLICT` means evidence disagrees.
|
|
164
|
-
Treat `INFERRED`, `CONFLICT`, `PARTIAL`, `UNAVAILABLE`, and `OFF` as review signals rather than
|
|
165
|
-
compiler-exact facts; an `UNKNOWN` count or revision-mismatched overlay in `graph_stats` requires
|
|
166
|
-
a rebuild before precision-sensitive work.
|
|
167
|
-
- **Repository universe**: in Git repositories, graph and duplicate scans include tracked plus
|
|
168
|
-
non-ignored untracked files. If an old graph still contains packaged/generated output, rebuild it
|
|
169
|
-
before interpreting the result. Repository-root `.weavatrixignore` applies the same tracked-file
|
|
170
|
-
exclusions to graph, audit and duplicate passes; use it for generated/e2e fixtures that must stay
|
|
171
|
-
committed. `no-tests` also recognizes Cypress, Playwright, `test-e2e`, acceptance and integration
|
|
172
|
-
roots. Dead-code/clone/audit review also suppresses `benchmarks/**` and `**/__temp/**` as classified
|
|
173
|
-
non-production surfaces. A verified production benchmark can opt back in narrowly through
|
|
174
|
-
`.weavatrix.json` `classify.product`, for example `{"classify":{"product":["benchmarks/core/**"]}}`.
|
|
175
|
-
Rust inline tests (`#[cfg(test)]` modules, `#[test]`/`#[bench]` items) are classified per symbol via
|
|
176
|
-
the node-level `test_surface` flag even though they live in production `.rs` files; dead-code,
|
|
177
|
-
query, hot-path and hub tools treat them like path-classified tests (`include_tests` /
|
|
178
|
-
`include_classified` and a test-term question opt back in).
|
|
179
|
-
- **Architectural queries**: broad bootstrap/tool-execution/routing questions rank conventional
|
|
180
|
-
production and graph-declared entry points ahead of classified docs, sites, benchmarks and
|
|
181
|
-
fixtures. Production-first classification also applies during traversal. A class term in the
|
|
182
|
-
question enables only that class; `include_classified=true` enables all classified paths. Exact
|
|
183
|
-
non-product `seed_files` remain pinned. Unmatched unreferenced constant/field leaves are suppressed
|
|
184
|
-
unless `include_low_signal=true`. Inspect the returned seeds/policy before trusting the traversal.
|
|
185
|
-
- **Coverage**: `coverage_map` reads an existing report. `unavailable` means no supported report was
|
|
186
|
-
found, not 0% coverage; do not rank testing risk from that state.
|
|
187
|
-
- **Local hot paths**: `hot_path_review` ranks parser-derived local syntax cost and reports graph
|
|
188
|
-
fan-in/fan-out plus test evidence separately. `actualCoverage: NOT_AVAILABLE` is not zero coverage,
|
|
189
|
-
and the score is not profiler data or an interprocedural Big-O proof. The default queue uses
|
|
190
|
-
`min_score=85` plus a narrow strong-local fallback; use `min_score=0` only for full diagnostics.
|
|
191
|
-
Inspect its line evidence and measure runtime before scheduling a performance rewrite.
|
|
192
|
-
- **Audit completeness**: read the top-level Health capability matrix first: structure, dependencies,
|
|
193
|
-
runtime correctness, concurrency, advisories, malware and measured coverage each have independent
|
|
194
|
-
status/completeness. The bounded Go/Java correctness patterns can flag a fixed-index slice hazard,
|
|
195
|
-
discriminator mismatch, lost Java interrupt or unbounded retry candidate, but they are not a
|
|
196
|
-
compiler, race detector, runtime trace, CFG, or proof of race freedom. Then read
|
|
197
|
-
`dependencyReport.status`, ecosystem support, unused/missing counts, each npm finding's
|
|
198
|
-
`verification` (manifest, indexed source, scripts/config, unresolved dynamic usage), and
|
|
199
|
-
`checks.osv.status` / `checks.malware.status`. A dependency result from a partial or unsupported
|
|
200
|
-
ecosystem is not a repository-wide clean zero. For OSV, `OK` is
|
|
201
|
-
complete for the recorded dependency fingerprint; `PARTIAL` is incomplete or stale,
|
|
202
|
-
`NOT_CHECKED` has no repository-specific result, and `ERROR` means the local check failed. Treat
|
|
203
|
-
the same non-`OK` states as incomplete for malware scanning. Remote OSV refresh belongs to the
|
|
204
|
-
separate `weavatrix-online` package; this MIT core reads only its validated local cache.
|
|
205
|
-
- **Offline by design**: scans and graph queries use local files; the semantic overlay may launch
|
|
206
|
-
Weavatrix's bundled read-only TypeScript language-server child process, but it never runs repository
|
|
207
|
-
scripts or downloads a provider. Coverage tools read existing reports and never run tests. The
|
|
208
|
-
package contains no network-touching tool or network-enabled profile. Online/Cloud/Enterprise work
|
|
209
|
-
uses the separate `weavatrix-online` superset, which depends on this core and may add tools, skills
|
|
210
|
-
and local analyzer providers without replacing core implementations.
|
|
211
|
-
- **Repository boundary**: source reads and graph-derived paths are realpath-contained. `open_repo`
|
|
212
|
-
intentionally changes the active boundary through an explicit offline tool call. It is included in
|
|
213
|
-
`offline`, absent from `pinned`, and available in a custom registration only when `retarget` is
|
|
214
|
-
named. Concurrent non-mutating calls retain the graph/root snapshot with which they started.
|
|
215
|
-
|
|
216
|
-
- **Test execution is separately authorized**: `verified_change` only executes named
|
|
217
|
-
`package.json` test/check/verify scripts when the call has `run_tests:true` and the server was
|
|
218
|
-
started with `WEAVATRIX_ALLOW_TEST_RUNS=1`. It never accepts arbitrary shell commands. Without
|
|
219
|
-
both gates it returns a plan or `UNKNOWN` evidence state.
|
|
220
|
-
|
|
221
|
-
## Recipes
|
|
222
|
-
|
|
223
|
-
- **Proof-carrying refactor**: `verified_change task=<same-task> phase=plan base_ref=<merge-base>` -> edit ->
|
|
224
|
-
`verified_change task=<same-task> phase=verify base_ref=<same-ref> tests=[{"script":"test","args":[...]}]`.
|
|
225
|
-
Repeat `task` on both calls; it is required and is not retained between invocations.
|
|
226
|
-
Add `run_tests:true` only when test execution was authorized. `BLOCKED` means an evidenced ratchet
|
|
227
|
-
or test failure; `UNKNOWN` means at least one required proof is incomplete.
|
|
228
|
-
|
|
229
|
-
- **Orient in the configured repo**: `module_map` → `list_communities` → `god_nodes`. Hub ranking
|
|
230
|
-
is production-only by default; use `include_classified:true` only when tests/generated/build
|
|
231
|
-
surfaces are deliberately part of the question.
|
|
232
|
-
- **Refactor safety for one symbol**: `context_bundle` → optional `inspect_symbol` when raw LSP
|
|
233
|
-
occurrences, ambiguity details or the larger source window are needed → `get_dependents` →
|
|
234
|
-
`coverage_map` (low coverage × many dependents ⇒ write tests first) → edit →
|
|
235
|
-
`verified_change task=<task> phase=verify base_ref=<merge-base>`.
|
|
236
|
-
- **Performance review**: `hot_path_review` → inspect its local evidence with `read_source` → use
|
|
237
|
-
`get_dependents` for change risk → confirm with the repository's profiler/benchmark before editing.
|
|
238
|
-
- **Pre-PR review of your current changes**: `change_impact` (auto merge-base; includes uncommitted
|
|
239
|
-
and untracked work, coverage attached, untested hotspots called out) → drill with `get_dependents`.
|
|
240
|
-
- **Impact of a PR that is NOT checked out**: pass its changed-file list explicitly —
|
|
241
|
-
`change_impact files=[…]` — same blast-radius + coverage view, no checkout.
|
|
242
|
-
- **Validate a refactor structurally**: call `graph_diff base_ref=HEAD~1` (or `main` / `origin/main`)
|
|
243
|
-
to build an immutable baseline without checkout and compare it with the current graph. Alternatively,
|
|
244
|
-
edit → `rebuild_graph`, then use `graph_diff` without `base_ref` to compare `graph.prev.json` with
|
|
245
|
-
the rebuilt graph. Either route can be scoped by `path`; look for cycle, module-dependency and
|
|
246
|
-
orphan drift rather than raw edge counts.
|
|
247
|
-
- **Health sweep**: for a branch/PR review prefer
|
|
248
|
-
`run_audit base_ref=<merge-base> debt=new changed_files=[…]`; for repository maintenance use
|
|
249
|
-
`run_audit debt=all`. Then call `find_dead_code`, `find_duplicates`, `coverage_map` and
|
|
250
|
-
`hot_path_review`. A changed-file-only audit is
|
|
251
|
-
scope, not proof of new debt. Inspect the source behind shortlisted findings before proposing edits.
|
|
252
|
-
- **Dead-code and dead-method review**: call `find_dead_code` for a bounded production-code queue of
|
|
253
|
-
files, functions, methods and symbols. Narrow with `path` or `kinds=["method"]`; keep the default
|
|
254
|
-
`min_confidence=medium` for actionable internal candidates. Use `min_confidence=low` only when the
|
|
255
|
-
task explicitly needs public/exported, framework, dynamic-loading or reflection-sensitive review,
|
|
256
|
-
and carry each returned caveat into the recommendation. Pair it with
|
|
257
|
-
`run_audit category=unused debt=all` (or `base_ref=<merge-base> debt=new`) for unused exports and
|
|
258
|
-
dependencies. Before deletion, run `read_source`, `get_dependents`, exact `search_code`, inspect
|
|
259
|
-
framework discovery/annotations, package scripts, CLI/Docker/manifests, generated consumers and
|
|
260
|
-
test-only use, then run the repository tests. Use `evidenceTier` and `remainingChecks` to order the
|
|
261
|
-
review; even `STRONG_STATIC_EVIDENCE` is exact zero-reference evidence, not deletion permission.
|
|
262
|
-
`REVIEW_REQUIRED` and `autoDelete:false` are hard
|
|
263
|
-
safety semantics, not boilerplate. Use `.weavatrix-deps.json` entrypoints/nonRuntimeRoots only for
|
|
264
|
-
verified conventions.
|
|
265
|
-
- **API inventory**: `list_endpoints` (including mount provenance, Next.js App Router, Rust axum and
|
|
266
|
-
actix-web). Spring endpoint rows also expose conditional activation and whether the controller is
|
|
267
|
-
inactive by default. When one exact route is known, use `trace_endpoint` for its composed mount
|
|
268
|
-
chain, handler and bounded production call graph instead of broad natural-language traversal.
|
|
269
|
-
- **CLI, worker, queue, cron or event flow**: identify the exact listener/handler/registration symbol,
|
|
270
|
-
then call `query_graph seed_symbols=[...] relation_filter=["calls","references"]
|
|
271
|
-
flow_direction="both"`; use `context_bundle` for production-first inbound/outbound containers and
|
|
272
|
-
diverse call-site excerpts, then `get_dependents` / `read_source` for decisive evidence. If the
|
|
273
|
-
symbol is unknown, use a narrow `search_code` registration check once and pin what it finds. Do not
|
|
274
|
-
force a non-HTTP flow through endpoint tools or begin with an unconstrained natural-language seed.
|
|
275
|
-
- **Cross-repository API impact**: ensure both repositories are in `list_known_repos`, then call
|
|
276
|
-
`trace_api_contract backend=<uuid-or-label> clients=[<uuid-or-label>]`; narrow with `method`, `path`,
|
|
277
|
-
or backend `changed_files`. `path` may be a segment-aligned fragment (`/query` can select
|
|
278
|
-
`/edgeAnalytics/query/...`), and bounded constant prefixes in template URLs are resolved. The tool
|
|
279
|
-
recognizes configured and conservatively auto-discovered HTTP wrappers; use per-repository
|
|
280
|
-
`.weavatrix.json` `httpContracts` configuration for durable custom client names/wrappers, or
|
|
281
|
-
`client_names` / `client_wrappers` for one trace. `NOT_DEAD_EXTERNAL_USE` requires medium/high
|
|
282
|
-
confidence; only an unambiguously resolved handler node can suppress a dead-method candidate.
|
|
283
|
-
`POSSIBLE_EXTERNAL_USE`, `UNKNOWN`, and remaining unresolved/dynamic URLs are incomplete evidence,
|
|
284
|
-
never proof that a method is dead.
|
|
285
|
-
- **Release regression gate**: for a Weavatrix source checkout, use `npm test` for the full
|
|
286
|
-
unit/integration suite, `npm run benchmark:quick` for the quick six-language golden corpus, and
|
|
287
|
-
`npm run benchmark` before release for the golden corpus plus the real MCP
|
|
288
|
-
`full -> incremental -> none -> reconnect/none` lifecycle, bounded output and active-target checks.
|
|
289
|
-
Use `npm run benchmark:real` for available manifest repositories and
|
|
290
|
-
`npm run benchmark:real:release` only when all six source checkouts are present; `MISSING`,
|
|
291
|
-
`UNBASELINED` and `STALE` are explicit incomplete states, not green results.
|
|
292
|
-
A green Java/Rust fixture proves only its declared representative signals, not compiler-exact
|
|
293
|
-
coverage of arbitrary repositories.
|
|
294
|
-
- **Target architecture before editing**: if no contract exists, call
|
|
295
|
-
`get_architecture_contract action=preview baseline_mode=none` and inspect the adaptive product
|
|
296
|
-
territories, observed-but-not-enforced directions and verification. Pass a reviewed
|
|
297
|
-
`candidate_contract` when the desired target differs. Only after explicit owner approval call
|
|
298
|
-
`get_architecture_contract action=approve confirm_token=<exact-token>`. Use
|
|
299
|
-
`baseline_mode=accept-current` only when the owner intentionally accepts current deterministic
|
|
300
|
-
debt into the ratchet. Then run `prepare_change` with intended files → edit/rebuild →
|
|
301
|
-
`verify_architecture`. An approved exception is still applied by adding the exact returned proposal
|
|
302
|
-
to `exceptions` and verifying again. Existing contracts are never overwritten; Hosted contracts
|
|
303
|
-
are pulled only after explicit opt-in. No tool silently changes an active policy.
|
|
304
|
-
- **Behavioral architecture**: `git_history` ranks churn × connectivity hotspots and hidden
|
|
305
|
-
co-change coupling from bounded local numstat history. Always set `top_n`; it is enforced across
|
|
306
|
-
every returned structured collection and JSON reports per-collection truncation. Use it as review
|
|
307
|
-
evidence, not proof that two files must be merged.
|
|
308
|
-
- **Machine output**: keep the default `output_format:"text"` for concise agent conversations; opt
|
|
309
|
-
into `output_format:"json"` only when a workflow consumes the full `weavatrix.tool.v1` envelope.
|
|
310
|
-
- **Find code**: `search_code` (regex + glob) →
|
|
311
|
-
`read_source path=<match-path> start_line=<match-line>`; add `get_node` / `get_neighbors` only after
|
|
312
|
-
identifying an exact graph symbol.
|
|
313
|
-
- **Another repo**: `list_known_repos` → `open_repo <path>`
|
|
314
|
-
(builds or upgrades the graph when needed; `build:false` probes without building).
|
|
315
|
-
|
|
316
|
-
## Repository-specific conventions
|
|
317
|
-
|
|
318
|
-
Weavatrix understands nearest workspace manifests, nested `tsconfig`/`jsconfig` aliases,
|
|
319
|
-
framework-owned runtime peers such as Next.js + `react-dom`, generated NAPI-RS platform loaders,
|
|
320
|
-
and Next.js App Router route exports. Use repository-root `.weavatrix.json` to correct ambiguous
|
|
321
|
-
production classification without deleting graph evidence:
|
|
322
|
-
|
|
323
|
-
```json
|
|
324
|
-
{
|
|
325
|
-
"classify": {
|
|
326
|
-
"generated": ["src/generated/**"],
|
|
327
|
-
"test": ["qa/**"],
|
|
328
|
-
"product": ["benchmarks/core/**"]
|
|
329
|
-
},
|
|
330
|
-
"exclude": ["resources/snapshots/**"]
|
|
331
|
-
}
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
Use `generated` / `test` (or `e2e`, `mock`, `story`, `docs`, `benchmark`, `temp`) for non-production
|
|
335
|
-
code, top-level `exclude` for resource/catalog roots that should stay visible in the graph but not
|
|
336
|
-
drive production-first Health/query ranking, and `product` only to opt a verified benchmark/temp path
|
|
337
|
-
back into production review. `product` does not override an explicit generated/test classification or
|
|
338
|
-
`exclude`. Use `.weavatrixignore` instead only when a path must be removed consistently from graph,
|
|
339
|
-
audit and duplicate scans.
|
|
340
|
-
|
|
341
|
-
For project-specific entry points, reusable template catalogs, or Python dependencies supplied by an
|
|
342
|
-
external runtime, add `.weavatrix-deps.json` at the repository root:
|
|
343
|
-
|
|
344
|
-
```json
|
|
345
|
-
{
|
|
346
|
-
"entrypoints": ["scripts/publish-release.mjs"],
|
|
347
|
-
"nonRuntimeRoots": ["library", "catalogs/examples"],
|
|
348
|
-
"python": {
|
|
349
|
-
"managedDependencies": ["numpy", "openvino-genai"],
|
|
350
|
-
"ignoreDependencies": ["vendor-sdk"]
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
Keep exceptions narrow. `nonRuntimeRoots` (alias `templateRoots`) marks reusable examples that are
|
|
356
|
-
not one deployed application. It suppresses orphan/dead/unused-export noise and missing/unresolved
|
|
357
|
-
dependency findings when every use is inside those roots; graph edges, cycles and boundaries remain
|
|
358
|
-
visible. `managedDependencies` documents modules provided outside the repo's Python manifest;
|
|
359
|
-
`ignoreDependencies` suppresses intentionally unresolved imports.
|
|
360
|
-
|
|
361
|
-
## Online extensions
|
|
362
|
-
|
|
363
|
-
This package is the MIT, network-free core. If `refresh_advisories`, `online_status`, `preview_sync`,
|
|
364
|
-
`pull_architecture_contract` or `sync_graph` is required, use the separately installed
|
|
365
|
-
`weavatrix-online` MCP and follow its skill. Do not attempt to enable a legacy profile here: the
|
|
366
|
-
`online`, `osv`, `hosted` and `full` names fail loudly and cannot add network code to this artifact.
|
|
367
|
-
|
|
368
|
-
## Troubleshooting
|
|
369
|
-
|
|
370
|
-
- `Graph unavailable` → `rebuild_graph`; normal graph/health calls automatically refresh an existing
|
|
371
|
-
graph and report `none`, `incremental`, or `full`. `open_repo` can select another valid repository path unless
|
|
372
|
-
the registration deliberately omitted `retarget`.
|
|
373
|
-
- An Online-only tool is unavailable → keep this core registration network-free and configure the
|
|
374
|
-
separate `weavatrix-online` MCP only when the user actually wants Cloud or Enterprise integration.
|
|
375
|
-
- `No coverage report` → run the repo's own tests with coverage (`vitest run --coverage`,
|
|
376
|
-
`jest --coverage`, `pytest --cov --cov-report=json`, `go test -coverprofile=coverage.out`),
|
|
377
|
-
then re-call.
|
|
378
|
-
- `change_impact` says files are "not in the graph" → they're new/renamed; `rebuild_graph` and retry.
|
|
6
|
+
# Weavatrix
|
|
7
|
+
|
|
8
|
+
Use Weavatrix as the evidence layer for repository work. Start with the
|
|
9
|
+
smallest graph query that answers the task, inspect decisive source spans, and
|
|
10
|
+
then use repository-native tests or benchmarks for behavioral proof.
|
|
11
|
+
|
|
12
|
+
## Start
|
|
13
|
+
|
|
14
|
+
1. Call `graph_stats` to confirm the active repository and graph revision.
|
|
15
|
+
2. Use `module_map` for orientation or `search_code` for a known literal.
|
|
16
|
+
3. Pin an exact symbol with `inspect_symbol` or `context_bundle`.
|
|
17
|
+
4. Expand only with `get_neighbors`, `get_dependents`, `query_graph`, or
|
|
18
|
+
`shortest_path` when the task needs relationship evidence.
|
|
19
|
+
|
|
20
|
+
Call `rebuild_graph` only when the active repository changed before the
|
|
21
|
+
server's refresh completed or when deliberately changing graph mode.
|
|
22
|
+
|
|
23
|
+
## Route the task
|
|
24
|
+
|
|
25
|
+
- API inventory: `list_endpoints`; one request path: `trace_endpoint`.
|
|
26
|
+
- GraphQL, gRPC/Protobuf, Kafka, RabbitMQ/AMQP, NATS, SNS/SQS, or JMS across
|
|
27
|
+
repositories: `list_known_repos`, then `trace_api_contract` with an explicit
|
|
28
|
+
backend, clients, and transport.
|
|
29
|
+
- Cross-repository Git evidence: `cross_repo_git`.
|
|
30
|
+
- Branch or patch impact: `change_impact`; transitive symbol risk:
|
|
31
|
+
`get_dependents`; structural drift: `graph_diff`.
|
|
32
|
+
- Repository health: `run_audit`, then targeted `find_dead_code`,
|
|
33
|
+
`find_duplicates`, `coverage_map`, and `hot_path_review`.
|
|
34
|
+
- Intended architecture: `get_architecture_contract`, `prepare_change`, then
|
|
35
|
+
`verify_architecture`; explain or propose an exception only for a concrete
|
|
36
|
+
violation fingerprint.
|
|
37
|
+
- Change gate: use `verified_change` with the same task and base revision in
|
|
38
|
+
plan and verify phases.
|
|
39
|
+
- Vector, semantic, SEO, and temporal context: `vector_search`,
|
|
40
|
+
`semantic_link`, `seo_link_suggestions`, and `memory_context`.
|
|
41
|
+
|
|
42
|
+
Read [references/tool-routing.md](references/tool-routing.md) when selecting
|
|
43
|
+
among similar tools or reviewing transport evidence.
|
|
44
|
+
|
|
45
|
+
## Evidence rules
|
|
46
|
+
|
|
47
|
+
- Treat source spans, extractor identity, graph revision, relation type, and
|
|
48
|
+
confidence as part of every finding.
|
|
49
|
+
- Distinguish static reachability from measured coverage.
|
|
50
|
+
- Confirm dead-code and clone candidates in source and framework registration
|
|
51
|
+
points before editing.
|
|
52
|
+
- Preserve exact transport identity. Do not merge AMQP, RabbitMQ, NATS, Kafka,
|
|
53
|
+
SNS/SQS, JMS, GraphQL, or gRPC evidence merely because operations share
|
|
54
|
+
names such as `publish`, `send`, or `subscribe`.
|
|
55
|
+
- For dynamic JavaScript or Python dispatch, narrow with repository
|
|
56
|
+
configuration, imports, call receivers, literals, runtime evidence, and
|
|
57
|
+
source spans. Never guess a transport or call target.
|
|
58
|
+
- Use `output_format:"text"` for compact interaction and JSON for automation
|
|
59
|
+
or retained evidence.
|
|
60
|
+
|
|
61
|
+
## Safety
|
|
62
|
+
|
|
63
|
+
The core is read-only and offline: it may read local source, Git objects,
|
|
64
|
+
coverage, and derived graph state, but it does not edit source or perform
|
|
65
|
+
network security scans. Use `weavatrix-refactor` only for explicitly approved
|
|
66
|
+
write plans and `weavatrix-online` only for explicitly approved network work.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Tool routing
|
|
2
|
+
|
|
3
|
+
## Graph and source
|
|
4
|
+
|
|
5
|
+
- `graph_stats`: repository identity, freshness, counts, and evidence.
|
|
6
|
+
- `module_map`, `list_communities`, `get_community`, `god_nodes`: topology.
|
|
7
|
+
- `get_node`, `get_neighbors`, `inspect_symbol`, `context_bundle`: exact
|
|
8
|
+
entities and local evidence.
|
|
9
|
+
- `query_graph`, `shortest_path`, `get_dependents`: bounded traversal.
|
|
10
|
+
- `search_code`, `read_source`: lexical and source confirmation.
|
|
11
|
+
|
|
12
|
+
## Change and history
|
|
13
|
+
|
|
14
|
+
- `change_impact`: current diff, explicit files, or supplied patch.
|
|
15
|
+
- `graph_diff`: structural comparison with an immutable Git revision.
|
|
16
|
+
- `git_history`: churn and co-change in one repository.
|
|
17
|
+
- `cross_repo_git`: histories, shared commits, or diffs across repositories.
|
|
18
|
+
- `verified_change`: composite plan/verify evidence envelope.
|
|
19
|
+
|
|
20
|
+
## Runtime contracts
|
|
21
|
+
|
|
22
|
+
- `list_endpoints` and `trace_endpoint`: HTTP routes and handlers.
|
|
23
|
+
- `trace_api_contract`: HTTP, GraphQL, Protobuf/gRPC, and event transports
|
|
24
|
+
across registered repositories.
|
|
25
|
+
- Select `transport:"event"` for Kafka, RabbitMQ/AMQP, NATS, SNS/SQS, and JMS;
|
|
26
|
+
retain the concrete transport, topic/queue/subject, operation, source span,
|
|
27
|
+
and producer/consumer direction from each evidence row.
|
|
28
|
+
|
|
29
|
+
## Quality and architecture
|
|
30
|
+
|
|
31
|
+
- `run_audit`: repository Health and evidence completeness.
|
|
32
|
+
- `find_dead_code`: conservative production-symbol review queue.
|
|
33
|
+
- `find_duplicates`: Type-1, Type-2, and Type-3 clone families.
|
|
34
|
+
- `coverage_map`: measured reports and separately labeled static reachability.
|
|
35
|
+
- `hot_path_review`: static performance-review candidates.
|
|
36
|
+
- `get_architecture_contract`, `prepare_change`, `verify_architecture`,
|
|
37
|
+
`explain_architecture_violation`, `propose_architecture_exception`:
|
|
38
|
+
architecture workflow.
|
|
39
|
+
|
|
40
|
+
## Repository and optional analysis
|
|
41
|
+
|
|
42
|
+
- `open_repo`, `list_known_repos`: local retargeting and cross-repository set.
|
|
43
|
+
- `rebuild_graph`: explicit graph refresh or mode change.
|
|
44
|
+
- `vector_search`, `semantic_link`, `seo_link_suggestions`, `memory_context`:
|
|
45
|
+
supplied-vector and supplied-event workflows.
|