Commands, architecture conventions, known gotchas, and testing patterns for working in the vault-memory Python daemon repository (FastAPI + Click + Postgres/Weaviate, pytest with mocked heavy deps).
55
63%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/vault-memory-workflow/SKILL.mdPython 3.11+ FastAPI daemon (daemon/) + Click CLI (cli/) providing a semantic
memory layer for Obsidian vaults. Postgres + Weaviate in full mode, SQLite-only
in Lite Mode. Tests use pytest with heavy deps (sentence_transformers, psycopg2)
mocked in tests/conftest.py.
python3 -m py_compile daemon/main.py cli/mcp_adapter.py # quick syntax check
pytest tests/ -q --basetemp .pytest_tmp # full unit suite
pytest tests/test_<file>.py -q --basetemp .pytest_tmp # targetedpython may not exist on PATH; use python3.deps: Dependencies = Depends(get_dependencies)
and access services via typed properties (deps.postgres, deps.watcher,
deps.settings). Never reach for module globals in endpoint code. The CLI
has its own mirror container in cli/dependencies.py.daemon/routes/<domain>.py exporting a <domain>_router;
daemon/main.py imports and includes them. Health lives in daemon/health.py.daemon/helpers/responses.py (bad_request,
server_error). error_response HIDES detail for all 5xx — never leak
technical error text in server-error paths._safe_vault_path(vault_root, rel) from daemon/helpers/validation.py
(rejects absolute paths, .. traversal, and symlink escapes via
os.path.commonpath). _canonicalize_vault_root resolves the root.with deps.postgres.cursor() as cursor: context
managers; never leak cursors._cleanup_task in daemon/routes/bulk.py) — see
_spawn_cleanup_if_idle for the loop-safe check-then-assign idiom.init_db.sql uses id as PK for sessions, not session_id.daemon/config.py.started_at/last_ping_at, never registered_at.pyproject.toml and daemon/version.py
(enforced by tests/test_version_alignment.py).Dependencies with MagicMock(spec=Dependencies) (see
tests/conftest.py::mock_dependencies).app.dependency_overrides[get_dependencies] = lambda: deps, wrap
TestClient(app, raise_server_exceptions=False) in
with patch("daemon.main.lifespan", MagicMock()):, and clear overrides in
finally. Delete VAULT_MEMORY_API_KEY via monkeypatch for dev-mode auth.asyncio.run(handler(req, deps=deps, _auth=None))
for focused unit tests without the full app.@pytest.mark.skipif(os.name == "nt", ...) — Windows CI may lack symlink
privileges.8171052
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.