frontmatter-mcp 0.2.0__tar.gz
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.
- frontmatter_mcp-0.2.0/.adr-dir +1 -0
- frontmatter_mcp-0.2.0/.claude/settings.json +22 -0
- frontmatter_mcp-0.2.0/.github/workflows/ci.yml +31 -0
- frontmatter_mcp-0.2.0/.github/workflows/publish.yml +79 -0
- frontmatter_mcp-0.2.0/.github/workflows/release-please.yml +18 -0
- frontmatter_mcp-0.2.0/.gitignore +28 -0
- frontmatter_mcp-0.2.0/.python-version +1 -0
- frontmatter_mcp-0.2.0/.release-please-manifest.json +3 -0
- frontmatter_mcp-0.2.0/.serena/.gitignore +1 -0
- frontmatter_mcp-0.2.0/.serena/memories/code_style.md +51 -0
- frontmatter_mcp-0.2.0/.serena/memories/project_overview.md +48 -0
- frontmatter_mcp-0.2.0/.serena/memories/suggested_commands.md +56 -0
- frontmatter_mcp-0.2.0/.serena/memories/task_completion.md +34 -0
- frontmatter_mcp-0.2.0/.serena/project.yml +84 -0
- frontmatter_mcp-0.2.0/CHANGELOG.md +39 -0
- frontmatter_mcp-0.2.0/CLAUDE.md +89 -0
- frontmatter_mcp-0.2.0/LICENSE +21 -0
- frontmatter_mcp-0.2.0/Makefile +17 -0
- frontmatter_mcp-0.2.0/PKG-INFO +264 -0
- frontmatter_mcp-0.2.0/README.md +228 -0
- frontmatter_mcp-0.2.0/docs/SETUP.md +34 -0
- frontmatter_mcp-0.2.0/docs/adr/0001-record-architecture-decisions.md +19 -0
- frontmatter_mcp-0.2.0/docs/adr/0002-use-fastmcp-framework.md +50 -0
- frontmatter_mcp-0.2.0/docs/adr/0003-use-duckdb-for-sql-queries.md +29 -0
- frontmatter_mcp-0.2.0/docs/adr/0004-use-pyarrow-for-data-passing.md +28 -0
- frontmatter_mcp-0.2.0/docs/adr/0005-pass-all-values-as-strings-to-duckdb.md +42 -0
- frontmatter_mcp-0.2.0/docs/adr/0006-json-encode-arrays.md +36 -0
- frontmatter_mcp-0.2.0/docs/adr/0007-use-relative-paths-from-base-directory.md +30 -0
- frontmatter_mcp-0.2.0/pyproject.toml +38 -0
- frontmatter_mcp-0.2.0/release-please-config.json +10 -0
- frontmatter_mcp-0.2.0/src/frontmatter_mcp/__init__.py +1 -0
- frontmatter_mcp-0.2.0/src/frontmatter_mcp/frontmatter.py +97 -0
- frontmatter_mcp-0.2.0/src/frontmatter_mcp/query.py +74 -0
- frontmatter_mcp-0.2.0/src/frontmatter_mcp/schema.py +58 -0
- frontmatter_mcp-0.2.0/src/frontmatter_mcp/server.py +512 -0
- frontmatter_mcp-0.2.0/tests/__init__.py +1 -0
- frontmatter_mcp-0.2.0/tests/test_frontmatter.py +246 -0
- frontmatter_mcp-0.2.0/tests/test_query.py +191 -0
- frontmatter_mcp-0.2.0/tests/test_schema.py +59 -0
- frontmatter_mcp-0.2.0/tests/test_server.py +387 -0
- frontmatter_mcp-0.2.0/uv.lock +952 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
docs/adr
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "make lint 2>&1 || true"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"permissions": {
|
|
16
|
+
"allow": [
|
|
17
|
+
"mcp__serena"
|
|
18
|
+
],
|
|
19
|
+
"deny": [],
|
|
20
|
+
"ask": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: astral-sh/ruff-action@v3
|
|
15
|
+
with:
|
|
16
|
+
args: check
|
|
17
|
+
- uses: astral-sh/ruff-action@v3
|
|
18
|
+
with:
|
|
19
|
+
args: format --check
|
|
20
|
+
|
|
21
|
+
test:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: astral-sh/setup-uv@v5
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
run: uv python install 3.11
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv sync --group dev
|
|
30
|
+
- name: Run tests
|
|
31
|
+
run: uv run python -m pytest
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.11"
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: uv build
|
|
24
|
+
|
|
25
|
+
- name: Upload dist
|
|
26
|
+
uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: dist
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
publish-testpypi:
|
|
32
|
+
needs: build
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
environment: testpypi
|
|
35
|
+
permissions:
|
|
36
|
+
id-token: write
|
|
37
|
+
steps:
|
|
38
|
+
- name: Download dist
|
|
39
|
+
uses: actions/download-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
|
|
44
|
+
- name: Publish to TestPyPI
|
|
45
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
46
|
+
with:
|
|
47
|
+
repository-url: https://test.pypi.org/legacy/
|
|
48
|
+
|
|
49
|
+
- name: Set up Python
|
|
50
|
+
uses: actions/setup-python@v5
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.11"
|
|
53
|
+
|
|
54
|
+
- name: Extract version from tag
|
|
55
|
+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
|
56
|
+
|
|
57
|
+
- name: Wait for TestPyPI propagation
|
|
58
|
+
run: sleep 30
|
|
59
|
+
|
|
60
|
+
- name: Test install from TestPyPI
|
|
61
|
+
run: |
|
|
62
|
+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ frontmatter-mcp==${VERSION}
|
|
63
|
+
pip show frontmatter-mcp
|
|
64
|
+
|
|
65
|
+
publish-pypi:
|
|
66
|
+
needs: publish-testpypi
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
environment: pypi
|
|
69
|
+
permissions:
|
|
70
|
+
id-token: write
|
|
71
|
+
steps:
|
|
72
|
+
- name: Download dist
|
|
73
|
+
uses: actions/download-artifact@v4
|
|
74
|
+
with:
|
|
75
|
+
name: dist
|
|
76
|
+
path: dist/
|
|
77
|
+
|
|
78
|
+
- name: Publish to PyPI
|
|
79
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: googleapis/release-please-action@v4
|
|
17
|
+
with:
|
|
18
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# IDE
|
|
2
|
+
.vscode/
|
|
3
|
+
.idea/
|
|
4
|
+
*.swp
|
|
5
|
+
*.swo
|
|
6
|
+
*~
|
|
7
|
+
|
|
8
|
+
# Claude Code
|
|
9
|
+
CLAUDE.local.md
|
|
10
|
+
settings.local.json
|
|
11
|
+
docs/workspace/
|
|
12
|
+
|
|
13
|
+
# OS
|
|
14
|
+
.DS_Store
|
|
15
|
+
Thumbs.db
|
|
16
|
+
|
|
17
|
+
# Python
|
|
18
|
+
__pycache__/
|
|
19
|
+
*.py[cod]
|
|
20
|
+
*.pyo
|
|
21
|
+
*.pyd
|
|
22
|
+
.venv/
|
|
23
|
+
venv/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
dist/
|
|
26
|
+
build/
|
|
27
|
+
.ruff_cache/
|
|
28
|
+
.pytest_cache/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/cache
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Code Style and Conventions
|
|
2
|
+
|
|
3
|
+
## Python Style
|
|
4
|
+
|
|
5
|
+
- Formatter/Linter: Ruff
|
|
6
|
+
- Quote style: Double quotes
|
|
7
|
+
- Indent style: Spaces
|
|
8
|
+
- Rules: E, F, I (isort), B (bugbear)
|
|
9
|
+
|
|
10
|
+
## Type Hints
|
|
11
|
+
|
|
12
|
+
- Use type hints for function signatures
|
|
13
|
+
- Use `dict[str, Any]` style (Python 3.9+ syntax)
|
|
14
|
+
- Use `list[str]` instead of `List[str]`
|
|
15
|
+
|
|
16
|
+
## Docstrings
|
|
17
|
+
|
|
18
|
+
- Use docstrings for public functions
|
|
19
|
+
- Google-style format:
|
|
20
|
+
- Args:
|
|
21
|
+
- Returns:
|
|
22
|
+
- Notes:
|
|
23
|
+
|
|
24
|
+
## Naming
|
|
25
|
+
|
|
26
|
+
- Functions: snake_case
|
|
27
|
+
- Classes: PascalCase
|
|
28
|
+
- Constants: UPPER_SNAKE_CASE
|
|
29
|
+
|
|
30
|
+
## Git Conventions
|
|
31
|
+
|
|
32
|
+
### Commit Messages (Conventional Commits)
|
|
33
|
+
|
|
34
|
+
| Type | Usage |
|
|
35
|
+
|------|-------|
|
|
36
|
+
| feat | New feature |
|
|
37
|
+
| fix | Bug fix |
|
|
38
|
+
| docs | Documentation only |
|
|
39
|
+
| style | Code style changes |
|
|
40
|
+
| refactor | Code refactoring |
|
|
41
|
+
| test | Test additions/changes |
|
|
42
|
+
| chore | Build/tool changes |
|
|
43
|
+
|
|
44
|
+
### Branch Naming
|
|
45
|
+
|
|
46
|
+
Pattern: `{type}/{description}`
|
|
47
|
+
|
|
48
|
+
Examples:
|
|
49
|
+
- `feat/rename-tools`
|
|
50
|
+
- `fix/json-encoding`
|
|
51
|
+
- `docs/update-readme`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Project Overview
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
frontmatter-mcp is an MCP (Model Context Protocol) server for querying and manipulating Markdown frontmatter using DuckDB SQL.
|
|
6
|
+
|
|
7
|
+
## Tech Stack
|
|
8
|
+
|
|
9
|
+
- Python 3.11+
|
|
10
|
+
- FastMCP (MCP server framework)
|
|
11
|
+
- DuckDB (SQL query engine)
|
|
12
|
+
- python-frontmatter (YAML frontmatter parsing)
|
|
13
|
+
- pyarrow (data interchange)
|
|
14
|
+
- Hatchling (build backend)
|
|
15
|
+
- Ruff (linting/formatting)
|
|
16
|
+
- pytest (testing)
|
|
17
|
+
- uv (package manager)
|
|
18
|
+
|
|
19
|
+
## Codebase Structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
src/frontmatter_mcp/
|
|
23
|
+
__init__.py
|
|
24
|
+
server.py # Main MCP server and tool definitions
|
|
25
|
+
frontmatter.py # Frontmatter parsing utilities
|
|
26
|
+
query.py # DuckDB query execution
|
|
27
|
+
schema.py # Schema inspection
|
|
28
|
+
|
|
29
|
+
tests/
|
|
30
|
+
test_server.py # Integration tests
|
|
31
|
+
|
|
32
|
+
docs/
|
|
33
|
+
workspace/ # Branch-specific work documents (gitignored)
|
|
34
|
+
adr/ # Architecture Decision Records
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Available Tools
|
|
38
|
+
|
|
39
|
+
| Tool | Description |
|
|
40
|
+
|------|-------------|
|
|
41
|
+
| query_inspect | Get schema from frontmatter |
|
|
42
|
+
| query | SQL query with DuckDB |
|
|
43
|
+
| update | Update single file |
|
|
44
|
+
| batch_update | Update multiple files |
|
|
45
|
+
| batch_array_add | Add value to array property |
|
|
46
|
+
| batch_array_remove | Remove value from array property |
|
|
47
|
+
| batch_array_replace | Replace value in array property |
|
|
48
|
+
| batch_array_sort | Sort array property |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Suggested Commands
|
|
2
|
+
|
|
3
|
+
## Development
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# Install dependencies
|
|
7
|
+
uv sync
|
|
8
|
+
|
|
9
|
+
# Run the MCP server
|
|
10
|
+
uv run frontmatter-mcp --base-dir /path/to/markdown
|
|
11
|
+
|
|
12
|
+
# Run tests
|
|
13
|
+
make test
|
|
14
|
+
# or
|
|
15
|
+
uv run pytest tests -v
|
|
16
|
+
|
|
17
|
+
# Lint
|
|
18
|
+
make lint
|
|
19
|
+
# or
|
|
20
|
+
uv run ruff check src tests
|
|
21
|
+
uv run ruff format --check src tests
|
|
22
|
+
|
|
23
|
+
# Auto-fix lint issues
|
|
24
|
+
make fix
|
|
25
|
+
# or
|
|
26
|
+
uv run ruff check --fix src tests
|
|
27
|
+
uv run ruff format src tests
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Build & Publish
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Build package
|
|
34
|
+
uv build
|
|
35
|
+
|
|
36
|
+
# Publish to PyPI
|
|
37
|
+
uv publish
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Git
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Branch naming: {type}/{description}
|
|
44
|
+
# Types: feat, fix, docs, style, refactor, test, chore
|
|
45
|
+
|
|
46
|
+
# Example
|
|
47
|
+
git checkout -b feat/new-feature
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## ADR (Architecture Decision Records)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
adr new <title>
|
|
54
|
+
adr list
|
|
55
|
+
adr new -s <number> <title> # Supersede existing ADR
|
|
56
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Task Completion Checklist
|
|
2
|
+
|
|
3
|
+
## Before Committing
|
|
4
|
+
|
|
5
|
+
1. Run linter and fix issues:
|
|
6
|
+
```bash
|
|
7
|
+
make fix
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
2. Run tests:
|
|
11
|
+
```bash
|
|
12
|
+
make test
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
3. Verify lint passes:
|
|
16
|
+
```bash
|
|
17
|
+
make lint
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
1. Create branch: `{type}/{description}`
|
|
23
|
+
2. Create plan: `docs/workspace/{branch}/PLAN.md`
|
|
24
|
+
3. Implement changes
|
|
25
|
+
4. Create notes if needed: `docs/workspace/{branch}/NOTES_{YYYYMMDD_HHMMSS}.md`
|
|
26
|
+
5. Create PR and merge
|
|
27
|
+
|
|
28
|
+
## Documentation Rules
|
|
29
|
+
|
|
30
|
+
- No emojis
|
|
31
|
+
- No horizontal rules (`---`)
|
|
32
|
+
- Keep concise, use lists/tables
|
|
33
|
+
- No secrets/credentials in docs
|
|
34
|
+
- No local paths (e.g., `/Users/username/`)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# list of languages for which language servers are started; choose from:
|
|
2
|
+
# al bash clojure cpp csharp csharp_omnisharp
|
|
3
|
+
# dart elixir elm erlang fortran go
|
|
4
|
+
# haskell java julia kotlin lua markdown
|
|
5
|
+
# nix perl php python python_jedi r
|
|
6
|
+
# rego ruby ruby_solargraph rust scala swift
|
|
7
|
+
# terraform typescript typescript_vts yaml zig
|
|
8
|
+
# Note:
|
|
9
|
+
# - For C, use cpp
|
|
10
|
+
# - For JavaScript, use typescript
|
|
11
|
+
# Special requirements:
|
|
12
|
+
# - csharp: Requires the presence of a .sln file in the project folder.
|
|
13
|
+
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
14
|
+
# The first language is the default language and the respective language server will be used as a fallback.
|
|
15
|
+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
16
|
+
languages:
|
|
17
|
+
- python
|
|
18
|
+
|
|
19
|
+
# the encoding used by text files in the project
|
|
20
|
+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
21
|
+
encoding: "utf-8"
|
|
22
|
+
|
|
23
|
+
# whether to use the project's gitignore file to ignore files
|
|
24
|
+
# Added on 2025-04-07
|
|
25
|
+
ignore_all_files_in_gitignore: true
|
|
26
|
+
|
|
27
|
+
# list of additional paths to ignore
|
|
28
|
+
# same syntax as gitignore, so you can use * and **
|
|
29
|
+
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
|
30
|
+
# Added (renamed) on 2025-04-07
|
|
31
|
+
ignored_paths: []
|
|
32
|
+
|
|
33
|
+
# whether the project is in read-only mode
|
|
34
|
+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
35
|
+
# Added on 2025-04-18
|
|
36
|
+
read_only: false
|
|
37
|
+
|
|
38
|
+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
|
39
|
+
# Below is the complete list of tools for convenience.
|
|
40
|
+
# To make sure you have the latest list of tools, and to view their descriptions,
|
|
41
|
+
# execute `uv run scripts/print_tool_overview.py`.
|
|
42
|
+
#
|
|
43
|
+
# * `activate_project`: Activates a project by name.
|
|
44
|
+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
|
45
|
+
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
|
46
|
+
# * `delete_lines`: Deletes a range of lines within a file.
|
|
47
|
+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
|
48
|
+
# * `execute_shell_command`: Executes a shell command.
|
|
49
|
+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
|
50
|
+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
|
51
|
+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
|
52
|
+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
|
53
|
+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
|
54
|
+
# * `initial_instructions`: Gets the initial instructions for the current project.
|
|
55
|
+
# Should only be used in settings where the system prompt cannot be set,
|
|
56
|
+
# e.g. in clients you have no control over, like Claude Desktop.
|
|
57
|
+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
|
58
|
+
# * `insert_at_line`: Inserts content at a given line in a file.
|
|
59
|
+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
|
60
|
+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
|
61
|
+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
|
62
|
+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
|
63
|
+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
|
64
|
+
# * `read_file`: Reads a file within the project directory.
|
|
65
|
+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
|
66
|
+
# * `remove_project`: Removes a project from the Serena configuration.
|
|
67
|
+
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
|
68
|
+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
|
69
|
+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
|
70
|
+
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
|
71
|
+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
|
72
|
+
# * `switch_modes`: Activates modes by providing a list of their names
|
|
73
|
+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
|
74
|
+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
|
75
|
+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
|
76
|
+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
|
77
|
+
excluded_tools: []
|
|
78
|
+
|
|
79
|
+
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
80
|
+
# (contrary to the memories, which are loaded on demand).
|
|
81
|
+
initial_prompt: ""
|
|
82
|
+
|
|
83
|
+
project_name: "frontmatter-mcp"
|
|
84
|
+
included_optional_tools: []
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.0](https://github.com/kzmshx/frontmatter-mcp/compare/v0.1.0...v0.2.0) (2025-11-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* Tool names have changed
|
|
9
|
+
- inspect_frontmatter -> query_inspect
|
|
10
|
+
- query_frontmatter -> query
|
|
11
|
+
- update_frontmatter -> update
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add batch array tools for array property operations ([#6](https://github.com/kzmshx/frontmatter-mcp/issues/6)) ([04d46a9](https://github.com/kzmshx/frontmatter-mcp/commit/04d46a988400b58c5776728454f17a19a3ed976b))
|
|
16
|
+
* add batch_update tool ([#5](https://github.com/kzmshx/frontmatter-mcp/issues/5)) ([a5b2bcf](https://github.com/kzmshx/frontmatter-mcp/commit/a5b2bcfb6b637444766518c1ac355c8531703f40))
|
|
17
|
+
* add MIT License to the project ([4618791](https://github.com/kzmshx/frontmatter-mcp/commit/4618791cdae128494000d856eac90d4cad3fd353))
|
|
18
|
+
* add update_frontmatter tool ([#1](https://github.com/kzmshx/frontmatter-mcp/issues/1)) ([d53b16b](https://github.com/kzmshx/frontmatter-mcp/commit/d53b16b376d9e49664e543701bd3491baec30af1))
|
|
19
|
+
* implement MCP server with inspect and query tools ([c64a5cb](https://github.com/kzmshx/frontmatter-mcp/commit/c64a5cb438a9b4c5f5fcea14380a57f9f1eab7b0))
|
|
20
|
+
* rename tools for better naming convention ([#4](https://github.com/kzmshx/frontmatter-mcp/issues/4)) ([1458c5f](https://github.com/kzmshx/frontmatter-mcp/commit/1458c5f57fcf90f9d72aff22d6e971b99d8a47d1))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* output Unicode directly instead of escape sequences ([56c96d2](https://github.com/kzmshx/frontmatter-mcp/commit/56c96d298655fd30bd73535dccf0952870fde14b))
|
|
26
|
+
* return dict instead of JSON string from tools ([#3](https://github.com/kzmshx/frontmatter-mcp/issues/3)) ([c34b399](https://github.com/kzmshx/frontmatter-mcp/commit/c34b3996e6b434b769127e65fc01cf3290a06238))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
30
|
+
|
|
31
|
+
* add architecture decision records ([50c1809](https://github.com/kzmshx/frontmatter-mcp/commit/50c1809db4645de11c3be71a9d5e1a4b89a99cab))
|
|
32
|
+
* add PR review commands to CLAUDE.md ([#10](https://github.com/kzmshx/frontmatter-mcp/issues/10)) ([1df3391](https://github.com/kzmshx/frontmatter-mcp/commit/1df33918dc70d0b233c36058946f43527e33e3e1))
|
|
33
|
+
* add README with installation and usage guide ([790a313](https://github.com/kzmshx/frontmatter-mcp/commit/790a3138e207f7c906e98541d2516b52266a3c41))
|
|
34
|
+
* add shared documentation rules to CLAUDE.md ([3aac2bb](https://github.com/kzmshx/frontmatter-mcp/commit/3aac2bb5fc93630baaaeeb05866eefc4c71c0dd1))
|
|
35
|
+
* improve README with clear tool documentation ([40202c1](https://github.com/kzmshx/frontmatter-mcp/commit/40202c1f3400ecd31df11f114e0262e9940b6457))
|
|
36
|
+
* translate all documentation to English ([1a24138](https://github.com/kzmshx/frontmatter-mcp/commit/1a241384b1e8da81aecec8a9fe859d0d13142b77))
|
|
37
|
+
* update README with new tool names and batch tools ([#7](https://github.com/kzmshx/frontmatter-mcp/issues/7)) ([08c5ce7](https://github.com/kzmshx/frontmatter-mcp/commit/08c5ce7c8dd68462628912e4962cb53063f85323))
|
|
38
|
+
|
|
39
|
+
## Changelog
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Conventional Commits / ブランチ命名
|
|
4
|
+
|
|
5
|
+
| type | 用途 |
|
|
6
|
+
| ---------- | ---------------------------------------------------- |
|
|
7
|
+
| `feat` | 新機能 |
|
|
8
|
+
| `fix` | バグ修正 |
|
|
9
|
+
| `docs` | ドキュメントのみ |
|
|
10
|
+
| `style` | コードの意味に影響しない変更(空白、フォーマット等) |
|
|
11
|
+
| `refactor` | バグ修正でも機能追加でもないコード変更 |
|
|
12
|
+
| `test` | テストの追加・修正 |
|
|
13
|
+
| `chore` | ビルドプロセスやツールの変更 |
|
|
14
|
+
|
|
15
|
+
ブランチ名: `{type}/{description}` (例: `feat/rename-tools`, `fix/json-encoding`)
|
|
16
|
+
|
|
17
|
+
## 開発ワークフロー
|
|
18
|
+
|
|
19
|
+
1. ブランチを作成 (`{type}/{description}`)
|
|
20
|
+
2. `docs/workspace/{branch}/PLAN.md` を作成
|
|
21
|
+
3. ユーザーと PLAN.md の内容を確認・吟味してから実装開始
|
|
22
|
+
4. 実装
|
|
23
|
+
5. 作業一段落ごとに `NOTES_{YYYYMMDD_HHMMSS}.md` を作成
|
|
24
|
+
6. PR 作成・マージ
|
|
25
|
+
|
|
26
|
+
## PR レビュー対応
|
|
27
|
+
|
|
28
|
+
| 操作 | コマンド |
|
|
29
|
+
| ---------------- | ------------------------------------------------------------------------------------------- |
|
|
30
|
+
| CI 状態確認 | `gh pr checks {n}` |
|
|
31
|
+
| コメント取得 | `gh api repos/{owner}/{repo}/pulls/{n}/comments` |
|
|
32
|
+
| コメントへの返信 | `gh api repos/{owner}/{repo}/pulls/{n}/comments/{comment_id}/replies -X POST -f body="..."` |
|
|
33
|
+
|
|
34
|
+
修正後はコミットハッシュ付きでコメントに返信する。
|
|
35
|
+
|
|
36
|
+
## ドキュメント構成
|
|
37
|
+
|
|
38
|
+
### docs/workspace/{branch}/
|
|
39
|
+
|
|
40
|
+
ブランチごとの作業ドキュメント。`.gitignore` に登録済み。
|
|
41
|
+
|
|
42
|
+
構成:
|
|
43
|
+
|
|
44
|
+
- `PLAN.md`: 機能仕様と実装タスク
|
|
45
|
+
- `NOTES_{YYYYMMDD_HHMMSS}.md`: 作業ログ(発見、問題、解決策)。作業一段落ごとに作成
|
|
46
|
+
|
|
47
|
+
### docs/adr/
|
|
48
|
+
|
|
49
|
+
`adr` CLI(adr-tools)で管理する。Git 管理対象。
|
|
50
|
+
|
|
51
|
+
- 新規作成: `adr new <タイトル>`
|
|
52
|
+
- 一覧表示: `adr list`
|
|
53
|
+
- 既存 ADR の置換: `adr new -s <番号> <タイトル>`
|
|
54
|
+
|
|
55
|
+
## ドキュメント作成ルール
|
|
56
|
+
|
|
57
|
+
### 共通ルール
|
|
58
|
+
|
|
59
|
+
- 絵文字使用禁止
|
|
60
|
+
- 区切り線 (`---`) 使用禁止
|
|
61
|
+
|
|
62
|
+
### 共通記述スタイル
|
|
63
|
+
|
|
64
|
+
- 簡潔に事実を記載
|
|
65
|
+
- 不要な装飾や冗長な説明を避ける(可読性を重視しリストやテーブルは使って良い)
|
|
66
|
+
- コードや設定は具体例を示す
|
|
67
|
+
|
|
68
|
+
### セキュリティルール(重要)
|
|
69
|
+
|
|
70
|
+
`docs/` 以下のドキュメントは Git 管理されるため、以下の情報は記載禁止:
|
|
71
|
+
|
|
72
|
+
- 秘密鍵、トークン、パスワード
|
|
73
|
+
- API キー、認証情報
|
|
74
|
+
- 個人を特定可能な情報(氏名、メールアドレス、ユーザー名)
|
|
75
|
+
- ローカル環境固有のパス(`/Users/username/` など)
|
|
76
|
+
- プロジェクト ID やリソース名は記載可(例: `exp-batch-predictions`)
|
|
77
|
+
- 具体的な設定値が必要な場合は `.env.example` などのテンプレートファイルを参照する
|
|
78
|
+
- ローカル環境固有の情報は `CLAUDE.local.md` に記載する
|
|
79
|
+
|
|
80
|
+
### docs/workspace/{branch}/PLAN.md ルール
|
|
81
|
+
|
|
82
|
+
- h1 見出しは `# PLAN` とする
|
|
83
|
+
- h2、h3、h4 は使用してよい(ただし過度な階層化は避ける)
|
|
84
|
+
|
|
85
|
+
### docs/workspace/{branch}/NOTES_{YYYYMMDD_HHMMSS}.md ルール
|
|
86
|
+
|
|
87
|
+
- h1 見出しはファイル名と同じにする(例: `# NOTES_20251129_094500`)
|
|
88
|
+
- h3 以下は使わず、h2 見出し直下に要点を簡潔に記載
|
|
89
|
+
- 参照リンクは各見出し内に記載
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 kzmshx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.PHONY: help
|
|
2
|
+
help: ## Show help
|
|
3
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
4
|
+
|
|
5
|
+
.PHONY: lint
|
|
6
|
+
lint: ## Run linter
|
|
7
|
+
uv run ruff check src tests
|
|
8
|
+
uv run ruff format --check src tests
|
|
9
|
+
|
|
10
|
+
.PHONY: fix
|
|
11
|
+
fix: ## Auto-fix lint issues
|
|
12
|
+
uv run ruff check --fix src tests
|
|
13
|
+
uv run ruff format src tests
|
|
14
|
+
|
|
15
|
+
.PHONY: test
|
|
16
|
+
test: ## Run tests
|
|
17
|
+
uv run pytest tests -v
|