forked from dgenio/contextweaver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
164 lines (126 loc) · 5.16 KB
/
Copy pathMakefile
File metadata and controls
164 lines (126 loc) · 5.16 KB
1
2
3
4
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
.PHONY: fmt lint type test example demo ci docs docs-serve benchmark benchmark-matrix benchmark-gateway token-calibration smoke-eval e2e-quality scorecard scorecard-check sweep-scoring architectures llms llms-check weaver-conformance schemas schemas-check context-rot context-rot-check readme-version-check drift drift-check api api-check module-size-check module-size-update doc-snippets-check
fmt:
ruff format src/ tests/ examples/ scripts/
lint:
ruff check src/ tests/ examples/ scripts/
type:
mypy src/ examples/ scripts/
test:
python -m pytest --cov=contextweaver --cov-report=term-missing -q
example:
python examples/minimal_loop.py
python examples/full_agent_loop.py
python examples/tool_wrapping.py
python examples/routing_demo.py
python examples/before_after.py
python examples/hydrate_call_demo.py
python examples/mcp_adapter_demo.py
python examples/mcp_gateway_demo.py
python examples/mcp_proxy_demo.py
python examples/a2a_adapter_demo.py
python examples/crewai_adapter_demo.py
python examples/pydantic_ai_adapter_demo.py
python examples/smolagents_adapter_demo.py
python examples/agno_adapter_demo.py
python examples/fastmcp_discovery_demo.py
python examples/langchain_memory_demo.py
python examples/cookbook/byot_recipe.py
python examples/cookbook/firewall_drilldown_recipe.py
$(MAKE) architectures
architectures:
python examples/architectures/catalog_showcase/main.py
python examples/architectures/mcp_context_gateway/main.py
python examples/architectures/mcp_context_gateway/main_live.py
python examples/architectures/mcp_context_gateway/main_multi.py
python examples/architectures/mcp_context_gateway/main_real.py
python examples/architectures/slack_ops_bot/main.py
python examples/architectures/code_review_bot/main.py
python examples/architectures/voice_agent/main.py
python examples/architectures/langgraph_agent_loop/main.py
python examples/architectures/eval_artifact_profile/main.py
python examples/architectures/contextweaver_to_chainweaver/main.py
demo:
python -m contextweaver demo
docs:
mkdocs build --clean
docs-serve:
mkdocs serve
benchmark:
python benchmarks/benchmark.py
token-calibration:
python benchmarks/token_calibration.py
benchmark-matrix:
python benchmarks/benchmark.py --matrix
benchmark-gateway:
python benchmarks/gateway_benchmark.py
smoke-eval:
python benchmarks/smoke_eval.py
e2e-quality:
python benchmarks/e2e_quality.py
scorecard:
python scripts/render_scorecard.py
scorecard-check:
python scripts/render_scorecard.py --check
gateway-scorecard:
python scripts/render_gateway_scorecard.py
gateway-scorecard-check:
python scripts/render_gateway_scorecard.py --check
record-demos:
python scripts/record_demo.py
record-demos-check:
python scripts/record_demo.py --check
sweep-scoring:
python scripts/sweep_scoring.py
context-rot:
python scripts/context_rot_demo.py
context-rot-check:
python scripts/context_rot_demo.py --check
readme-version-check:
python scripts/check_readme_version.py
# The local pass bar. Mirrors the gating CI checks a contributor can run
# offline (issue #474): the consolidated generated-artifact drift gate
# (issue #522) plus the module-size (#456), doc-snippet (#526), and README
# version gates. Weaver-spec conformance and the benchmarks stay CI-only —
# they fetch remote schemas / are heavy — and are documented as such.
ci: fmt lint type test drift-check module-size-check doc-snippets-check readme-version-check example demo
# Unified generated-artifact drift gate (issue #522). `drift` regenerates every
# registered artifact; `drift-check` is the gate. Both compose the per-artifact
# generators (schemas, scorecards, recorded demos, llms.txt, context-rot SVG,
# public-API manifest) so adding the next artifact is one registry entry.
drift:
python scripts/drift_check.py
drift-check:
python scripts/drift_check.py --check
# Public-API manifest (issue #518): committed signature-level snapshot of the
# public surface; `api-check` fails when the surface changes without a regen.
api:
python scripts/gen_api_manifest.py
api-check:
python scripts/gen_api_manifest.py --check
# Module-size convention gate (issue #456): enforces ≤300 lines for new modules
# and freezes grandfathered violators at their current size. `module-size-update`
# re-snapshots the frozen baseline (run only when intentionally decomposing).
module-size-check:
python scripts/check_module_size.py
module-size-update:
python scripts/check_module_size.py --update
# Doc-snippet execution gate (issue #526): runs the Python blocks in README and
# the curated docs allowlist so the first code an adopter copies is guaranteed
# to run against the current API.
doc-snippets-check:
python scripts/check_doc_snippets.py
llms:
python scripts/gen_llms.py
llms-check:
python scripts/gen_llms.py --check
schemas:
python scripts/gen_schemas.py
schemas-check:
python scripts/gen_schemas.py --check
weaver-conformance:
@mkdir -p .weaver-schemas
@for s in routing_decision choice_card selectable_item frame; do \
curl -fsSL "https://raw.githubusercontent.com/dgenio/weaver-spec/main/contracts/json/$$s.schema.json" \
-o ".weaver-schemas/$$s.schema.json"; \
done
python scripts/weaver_spec_conformance.py --schemas-dir .weaver-schemas