Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
60cb33e
bump version to 0.1.4
lars20070 Mar 4, 2026
5421849
add recommendation for Claude extension in VSCode
lars20070 Mar 7, 2026
162dd28
remove deno from devcontainer
lars20070 Mar 8, 2026
82e7c98
lat.md initialization
lars20070 Mar 17, 2026
5b6f3eb
first rough version of the knowledge base for lat.md
lars20070 Mar 17, 2026
9d0636e
add backlinks from codebase to knowledge base
lars20070 Mar 17, 2026
94a2b5f
refactor knowledge base for tests
lars20070 Mar 17, 2026
2cc7d5b
Make knowledge graph conform with latest lat.md version
lars20070 Mar 17, 2026
d1f9cdc
update to lat.md 0.9.0, remove absolute paths
lars20070 Mar 18, 2026
2eecda9
do not track caches
lars20070 Mar 18, 2026
abf8035
describe individual config unit tests
lars20070 Mar 18, 2026
8d19714
describe individual logger unit tests
lars20070 Mar 18, 2026
85ddc69
plan for fixing knowledge base
lars20070 Mar 18, 2026
dbc2b43
describe individual plugin integration tests
lars20070 Mar 19, 2026
7911ced
code links for integration tests
lars20070 Mar 23, 2026
c4d806a
fix: update test links to include 'tests/' prefix for clarity
lars20070 Mar 23, 2026
7eee2aa
absolute path in MCP config (alias does not work)
lars20070 Mar 23, 2026
f63f7a1
additional links between md files
lars20070 Mar 23, 2026
71f2abe
fix links, remove plan
lars20070 Mar 23, 2026
f6fbb0c
plan for md improvements
lars20070 Mar 23, 2026
4e5f1f4
ignore Obsidian config
lars20070 Mar 23, 2026
a938021
Obsidian config
lars20070 Mar 23, 2026
a40440c
ignore Obsidian workspace file
lars20070 Mar 27, 2026
10a5558
remove inline title in Obsidian
lars20070 Mar 27, 2026
5a74e54
correct | for both VS Code and Obsidian
lars20070 Mar 27, 2026
77dc5f0
fix |
lars20070 Mar 27, 2026
8108b91
refactor markdown for evaluators
lars20070 Mar 27, 2026
01e58eb
re-initialize lat.md
lars20070 Mar 28, 2026
242dd42
remove legacy hooks
lars20070 Mar 28, 2026
b1d95dd
simplify gitignore
lars20070 Mar 28, 2026
1393d4d
bump version to 0.1.4
lars20070 Mar 28, 2026
ee562bd
minor tweaks on Bradley-Terry evaluator
lars20070 Mar 28, 2026
eab88e0
add Context7 config
lars20070 Mar 28, 2026
c02376b
add public key for Context7
lars20070 Mar 28, 2026
5c73b91
remove plans
lars20070 Mar 28, 2026
b693186
fix lat_check
lars20070 Mar 28, 2026
9de9a7b
expose further components
lars20070 Mar 29, 2026
520f1dd
improve Context7 rules
lars20070 Mar 29, 2026
b05e9e2
plan for new lat-check workflow file
lars20070 Mar 29, 2026
de59594
Add lat-check to CI.
lars20070 Mar 29, 2026
cb31961
test lat-check workflow
lars20070 Mar 29, 2026
acef618
revert
lars20070 Mar 29, 2026
2982d9a
add lat.md to dev container
lars20070 Mar 29, 2026
2e416a2
fix Context7 config
lars20070 Mar 29, 2026
08e68b5
bump version to 0.1.5
lars20070 Mar 29, 2026
ddbcad9
bump version to 0.1.6
lars20070 Mar 29, 2026
ce246ec
Merge branch 'master' into lars20070/morechanges
lars20070 Mar 29, 2026
32096c9
use globally installed lat
lars20070 Mar 30, 2026
9974400
point CodeRabbit to lat.md and Claude Code config
lars20070 Mar 30, 2026
5726ad1
single CLAUDE.md file
lars20070 Mar 30, 2026
b5ed190
allow lat.md MCP tools
lars20070 Mar 30, 2026
40a5d9c
read OLLAMA_BASE_URL instead of hard coded
lars20070 Mar 30, 2026
53a6fa2
refactor: streamline lat check workflow by using public GitHub Action
lars20070 Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,111 @@ See the rules files for detailed coding standards:

- `.claude/rules/python.md` - Python coding standards, type hints, async patterns
- `.claude/rules/python-testing.md` - Testing conventions, markers, coverage requirements

%% lat:begin %%
# Before starting work

- Run `lat search` to find sections relevant to your task. Read them to understand the design intent before writing code.
- Run `lat expand` on user prompts to expand any `[[refs]]` — this resolves section names to file locations and provides context.

# Post-task checklist (REQUIRED — do not skip)

After EVERY task, before responding to the user:

- [ ] Update `lat.md/` if you added or changed any functionality, architecture, tests, or behavior
- [ ] Run `lat check` — all wiki links and code refs must pass
- [ ] Do not skip these steps. Do not consider your task done until both are complete.

---

# What is lat.md?

This project uses [lat.md](https://www.npmjs.com/package/lat.md) to maintain a structured knowledge graph of its architecture, design decisions, and test specs in the `lat.md/` directory. It is a set of cross-linked markdown files that describe **what** this project does and **why** — the domain concepts, key design decisions, business logic, and test specifications. Use it to ground your work in the actual architecture rather than guessing.

# Commands

```bash
lat locate "Section Name" # find a section by name (exact, fuzzy)
lat refs "file#Section" # find what references a section
lat search "natural language" # semantic search across all sections
lat expand "user prompt text" # expand [[refs]] to resolved locations
lat check # validate all links and code refs
```

Run `lat --help` when in doubt about available commands or options.

If `lat search` fails because no API key is configured, explain to the user that semantic search requires a key provided via `LAT_LLM_KEY` (direct value), `LAT_LLM_KEY_FILE` (path to key file), or `LAT_LLM_KEY_HELPER` (command that prints the key). Supported key prefixes: `sk-...` (OpenAI) or `vck_...` (Vercel). If the user doesn't want to set it up, use `lat locate` for direct lookups instead.

# Syntax primer

- **Section ids**: `lat.md/path/to/file#Heading#SubHeading` — full form uses project-root-relative path (e.g. `lat.md/tests/search#RAG Replay Tests`). Short form uses bare file name when unique (e.g. `search#RAG Replay Tests`, `cli#search#Indexing`).
- **Wiki links**: `[[target]]` or `[[target|alias]]` — cross-references between sections. Can also reference source code: `[[src/foo.ts#myFunction]]`.
- **Source code links**: Wiki links in `lat.md/` files can reference functions, classes, constants, and methods in TypeScript/JavaScript/Python/Rust/Go/C files. Use the full path: `[[src/config.ts#getConfigDir]]`, `[[src/server.ts#App#listen]]` (class method), `[[lib/utils.py#parse_args]]`, `[[src/lib.rs#Greeter#greet]]` (Rust impl method), `[[src/app.go#Greeter#Greet]]` (Go method), `[[src/app.h#Greeter]]` (C struct). `lat check` validates these exist.
- **Code refs**: `// @lat: [[section-id]]` (JS/TS/Rust/Go/C) or `# @lat: [[section-id]]` (Python) — ties source code to concepts

# Test specs

Key tests can be described as sections in `lat.md/` files (e.g. `tests.md`). Add frontmatter to require that every leaf section is referenced by a `// @lat:` or `# @lat:` comment in test code:

```markdown
---
lat:
require-code-mention: true
---
# Tests

Authentication and authorization test specifications.

## User login

Verify credential validation and error handling for the login endpoint.

### Rejects expired tokens
Tokens past their expiry timestamp are rejected with 401, even if otherwise valid.

### Handles missing password
Login request without a password field returns 400 with a descriptive error.
```

Every section MUST have a description — at least one sentence explaining what the test verifies and why. Empty sections with just a heading are not acceptable. (This is a specific case of the general leading paragraph rule below.)

Each test in code should reference its spec with exactly one comment placed next to the relevant test — not at the top of the file:

```python
# @lat: [[tests#User login#Rejects expired tokens]]
def test_rejects_expired_tokens():
...

# @lat: [[tests#User login#Handles missing password]]
def test_handles_missing_password():
...
```

Do not duplicate refs. One `@lat:` comment per spec section, placed at the test that covers it. `lat check` will flag any spec section not covered by a code reference, and any code reference pointing to a nonexistent section.

# Section structure

Every section in `lat.md/` **must** have a leading paragraph — at least one sentence immediately after the heading, before any child headings or other block content. The first paragraph must be ≤250 characters (excluding `[[wiki link]]` content). This paragraph serves as the section's overview and is used in search results, command output, and RAG context — keeping it concise guarantees the section's essence is always captured.

```markdown
# Good Section

Brief overview of what this section documents and why it matters.

More detail can go in subsequent paragraphs, code blocks, or lists.

## Child heading

Details about this child topic.
```

```markdown
# Bad Section

## Child heading

Details about this child topic.
```

The second example is invalid because `Bad Section` has no leading paragraph. `lat check` validates this rule and reports errors for missing or overly long leading paragraphs.
%% lat:end %%
8 changes: 7 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@
"Bash(uv run ruff format:*)",
"Bash(uv run ruff check:*)",
"Bash(uv run pyright:*)",
"Bash(python -m pytest:*)"
"Bash(python -m pytest:*)",
"mcp__lat__lat_locate",
"mcp__lat__lat_section",
"mcp__lat__lat_search",
"mcp__lat__lat_expand",
"mcp__lat__lat_check",
"mcp__lat__lat_refs"
]
},
"enableAllProjectMcpServers": false,
Expand Down
4 changes: 4 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,13 @@ knowledge_base:
code_guidelines:
enabled: true
filePatterns:
- ".claude/rules/general.mdc"
- ".claude/rules/python.mdc"
- ".claude/rules/python-testing.mdc"
- ".cursor/rules/general.mdc"
- ".cursor/rules/python.mdc"
- ".cursor/rules/python-testing.mdc"
- "lat.md/**/*.md"
learnings:
scope: auto
issues:
Expand Down
5 changes: 1 addition & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
},
"ghcr.io/devcontainers/features/node:1": { // Required for local Context7 MCP server
"version": "lts"
},
"ghcr.io/devcontainers-community/features/deno:1": { // Required for https://github.com/pydantic/mcp-run-python
"version": "2.5.6"
}
},
// Port forwarding for local services
Expand Down Expand Up @@ -141,4 +138,4 @@
// ]
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
10 changes: 2 additions & 8 deletions .github/workflows/lat-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4.2.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install lat.md
run: npm install -g lat.md
uses: actions/checkout@v4
- name: Run lat check
run: lat check
uses: lars20070/lat-check-action@v1
3 changes: 1 addition & 2 deletions .mcp.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
},
"lat": {
"type": "stdio",
"command": "node",
"command": "lat",
"args": [
"/path/to/lat.md/dist/src/cli/index.js",
"mcp"
]
}
Expand Down
2 changes: 2 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"ms-vscode.vscode-copilot-data-analysis",
"AutomataLabs.copilot-mcp",
"CodeRabbit.coderabbit-vscode",
// Claude
"anthropic.claude-code",
// spell checker
"streetsidesoftware.code-spell-checker",
// logging
Expand Down
107 changes: 0 additions & 107 deletions CLAUDE.md

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pytest-assay"
version = "0.1.5"
version = "0.1.6"
description = "Evaluation framework for Pydantic AI agents"
keywords = [
"pytest", "pytest-plugin", "pydantic", "pydantic-ai",
Expand Down
4 changes: 3 additions & 1 deletion tests/_ollama.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
"""Shared Ollama constants for test configuration."""

OLLAMA_BASE_URL = "http://localhost:11434"
import os

OLLAMA_BASE_URL = os.environ.get("OLLAMA_HOST", "http://localhost:11434")
OLLAMA_MODEL = "qwen2.5:14b"
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading