pm-server 0.3.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.
- pm_server-0.3.0/.gitignore +41 -0
- pm_server-0.3.0/CHANGELOG.md +57 -0
- pm_server-0.3.0/CLAUDE.md +104 -0
- pm_server-0.3.0/LICENSE +21 -0
- pm_server-0.3.0/PKG-INFO +307 -0
- pm_server-0.3.0/README.ja.md +279 -0
- pm_server-0.3.0/README.md +279 -0
- pm_server-0.3.0/docs/README.md +4 -0
- pm_server-0.3.0/docs/design.md +809 -0
- pm_server-0.3.0/docs/memory-layer-design.md +530 -0
- pm_server-0.3.0/docs/memory-layer-prompt.md +106 -0
- pm_server-0.3.0/docs/workflow.md +300 -0
- pm_server-0.3.0/pyproject.toml +50 -0
- pm_server-0.3.0/skill/SKILL.md +113 -0
- pm_server-0.3.0/src/pm_server/__init__.py +3 -0
- pm_server-0.3.0/src/pm_server/__main__.py +142 -0
- pm_server-0.3.0/src/pm_server/claudemd.py +173 -0
- pm_server-0.3.0/src/pm_server/dashboard.py +191 -0
- pm_server-0.3.0/src/pm_server/discovery.py +106 -0
- pm_server-0.3.0/src/pm_server/installer.py +128 -0
- pm_server-0.3.0/src/pm_server/models.py +232 -0
- pm_server-0.3.0/src/pm_server/server.py +559 -0
- pm_server-0.3.0/src/pm_server/storage.py +321 -0
- pm_server-0.3.0/src/pm_server/templates/dashboard_portfolio.html +87 -0
- pm_server-0.3.0/src/pm_server/templates/dashboard_single.html +123 -0
- pm_server-0.3.0/src/pm_server/utils.py +75 -0
- pm_server-0.3.0/src/pm_server/velocity.py +149 -0
- pm_server-0.3.0/tests/__init__.py +0 -0
- pm_server-0.3.0/tests/conftest.py +132 -0
- pm_server-0.3.0/tests/test_claudemd.py +177 -0
- pm_server-0.3.0/tests/test_dashboard.py +77 -0
- pm_server-0.3.0/tests/test_discovery.py +76 -0
- pm_server-0.3.0/tests/test_installer.py +137 -0
- pm_server-0.3.0/tests/test_models.py +148 -0
- pm_server-0.3.0/tests/test_server.py +287 -0
- pm_server-0.3.0/tests/test_storage.py +231 -0
- pm_server-0.3.0/tests/test_velocity.py +249 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg
|
|
9
|
+
|
|
10
|
+
# Virtual env
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
env/
|
|
14
|
+
|
|
15
|
+
# Environment variables
|
|
16
|
+
.env
|
|
17
|
+
.env.local
|
|
18
|
+
|
|
19
|
+
# IDE
|
|
20
|
+
.vscode/
|
|
21
|
+
.idea/
|
|
22
|
+
*.swp
|
|
23
|
+
*.swo
|
|
24
|
+
|
|
25
|
+
# Testing
|
|
26
|
+
.pytest_cache/
|
|
27
|
+
.coverage
|
|
28
|
+
htmlcov/
|
|
29
|
+
|
|
30
|
+
# Ruff
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
|
|
33
|
+
# OS
|
|
34
|
+
.DS_Store
|
|
35
|
+
Thumbs.db
|
|
36
|
+
|
|
37
|
+
# Claude Code (local dev config)
|
|
38
|
+
.claude/
|
|
39
|
+
|
|
40
|
+
# PM Server data (local project management)
|
|
41
|
+
.pm/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.0] - 2026-04-08
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- CLAUDE.md auto-management: `pm_init` automatically adds PM Server rules with version markers
|
|
7
|
+
- `pm_update_claudemd` MCP tool (16th tool) for updating PM Server rules section
|
|
8
|
+
- `pm-server update-claudemd` CLI command with `--all` flag for batch updates
|
|
9
|
+
- `claudemd.py` module with marker-based section management
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- storage.py YAML header showing "PM Agent" instead of "PM Server"
|
|
13
|
+
- dashboard_portfolio.html title showing old name
|
|
14
|
+
- pm_discover MCP tool default scan path changed from "~" to "." (security)
|
|
15
|
+
- uninstall_mcp() missing --scope user flag
|
|
16
|
+
- migrate_from_pm_agent() now uses shutil.which() and timeout
|
|
17
|
+
- Case-insensitive detection of "PM Agent" references in migrate command
|
|
18
|
+
- `PmAgentError` renamed to `PmServerError`
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Removed internal development prompts from docs/
|
|
22
|
+
- Added `.claude/` and `.pm/` to .gitignore
|
|
23
|
+
- pyproject.toml: added classifiers and dev extras
|
|
24
|
+
- MCP tool count: 15 → 16
|
|
25
|
+
|
|
26
|
+
## [0.2.0] - 2026-04-08
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- Package renamed from `pm-agent` to `pm-server` (PyPI name conflict with existing `PMAgent`)
|
|
30
|
+
- GitHub repository moved to `flc-design/pm-server`
|
|
31
|
+
- Added `pm-server migrate` command for transitioning from pm-agent
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- `README.ja.md` — Japanese README
|
|
35
|
+
- `migrate` CLI command for pm-agent → pm-server transition
|
|
36
|
+
|
|
37
|
+
## [0.1.0] - 2026-04-07
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- 15 MCP tools for project management
|
|
41
|
+
- YAML-based task, decision, and log storage
|
|
42
|
+
- HTML dashboard with Chart.js (single + portfolio view)
|
|
43
|
+
- Text dashboard fallback
|
|
44
|
+
- Velocity tracking and risk detection
|
|
45
|
+
- Project discovery and auto-registration
|
|
46
|
+
- CLI interface (install, uninstall, serve, discover, status)
|
|
47
|
+
- Claude Code integration via `claude mcp add --scope user`
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
- installer.py: use `claude mcp add` instead of writing to wrong settings file
|
|
51
|
+
- Template path resolution for packaged installations
|
|
52
|
+
- Test isolation: prevent tests from polluting `~/.pm/registry.yaml`
|
|
53
|
+
|
|
54
|
+
### Documentation
|
|
55
|
+
- Development workflow guide (docs/workflow.md)
|
|
56
|
+
- Design document (docs/design.md)
|
|
57
|
+
- Project status report (docs/status.md)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# PM Server — Claude Code Project Management System
|
|
2
|
+
|
|
3
|
+
## プロジェクト概要
|
|
4
|
+
|
|
5
|
+
Claude Code 用のプロジェクト管理 MCP Server。
|
|
6
|
+
タスク追跡・進捗可視化・ブロッカー検知・ADR記録・全プロジェクト横断ダッシュボードを提供する。
|
|
7
|
+
|
|
8
|
+
- **言語**: Python 3.11+
|
|
9
|
+
- **フレームワーク**: FastMCP, Pydantic v2, Click, Jinja2
|
|
10
|
+
- **データ形式**: YAML(human-readable, git-friendly)
|
|
11
|
+
- **配布**: PyPI (`pm-server`)
|
|
12
|
+
- **ライセンス**: MIT
|
|
13
|
+
|
|
14
|
+
## 設計書
|
|
15
|
+
|
|
16
|
+
実装の前に必ず `docs/design.md` を読むこと。
|
|
17
|
+
これがすべてのアーキテクチャ判断の根拠となる。
|
|
18
|
+
|
|
19
|
+
## ディレクトリ構成
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
pm-server/
|
|
23
|
+
├── pyproject.toml
|
|
24
|
+
├── README.md
|
|
25
|
+
├── LICENSE
|
|
26
|
+
├── src/
|
|
27
|
+
│ └── pm_server/
|
|
28
|
+
│ ├── __init__.py
|
|
29
|
+
│ ├── __main__.py # CLI (click)
|
|
30
|
+
│ ├── server.py # FastMCP サーバー (16 tools)
|
|
31
|
+
│ ├── models.py # Pydantic データモデル (12 models, 9 enums)
|
|
32
|
+
│ ├── storage.py # YAML 読み書き
|
|
33
|
+
│ ├── installer.py # Claude Code MCP 自動登録
|
|
34
|
+
│ ├── discovery.py # プロジェクト自動検出・情報推定
|
|
35
|
+
│ ├── dashboard.py # HTML/テキスト ダッシュボード生成
|
|
36
|
+
│ ├── velocity.py # ベロシティ・分析・リスク検知
|
|
37
|
+
│ ├── utils.py # パス解決、ID生成、集計ヘルパー
|
|
38
|
+
│ └── templates/ # Jinja2 HTML テンプレート
|
|
39
|
+
│ ├── dashboard_single.html
|
|
40
|
+
│ └── dashboard_portfolio.html
|
|
41
|
+
├── skill/
|
|
42
|
+
│ └── SKILL.md # Claude Code 用スキル定義
|
|
43
|
+
├── tests/
|
|
44
|
+
│ ├── conftest.py
|
|
45
|
+
│ ├── test_models.py
|
|
46
|
+
│ ├── test_storage.py
|
|
47
|
+
│ ├── test_server.py
|
|
48
|
+
│ ├── test_installer.py
|
|
49
|
+
│ ├── test_discovery.py
|
|
50
|
+
│ ├── test_dashboard.py
|
|
51
|
+
│ └── test_velocity.py
|
|
52
|
+
└── docs/
|
|
53
|
+
├── design.md
|
|
54
|
+
└── implementation-prompt.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## コーディング規約
|
|
58
|
+
|
|
59
|
+
### Python スタイル
|
|
60
|
+
- Python 3.11+ の機能を積極利用(`str | None`, `match-case` 等)
|
|
61
|
+
- 型ヒントを全関数に記述
|
|
62
|
+
- docstring は Google style
|
|
63
|
+
- フォーマッター: ruff
|
|
64
|
+
- リンター: ruff
|
|
65
|
+
- テスト: pytest
|
|
66
|
+
|
|
67
|
+
### 命名規則
|
|
68
|
+
- モジュール: snake_case
|
|
69
|
+
- クラス: PascalCase
|
|
70
|
+
- 関数/変数: snake_case
|
|
71
|
+
- 定数: UPPER_SNAKE_CASE
|
|
72
|
+
- MCP ツール名: `pm_` プレフィクス(例: `pm_status`, `pm_add_task`)
|
|
73
|
+
|
|
74
|
+
### エラーハンドリング
|
|
75
|
+
- カスタム例外クラス: `PmServerError`, `ProjectNotFoundError`, `TaskNotFoundError`, `DecisionNotFoundError`
|
|
76
|
+
- MCP ツールはエラー時に明確なメッセージを返す
|
|
77
|
+
- YAML パースエラーは `PmServerError` にラップして伝播
|
|
78
|
+
|
|
79
|
+
### YAML 規約
|
|
80
|
+
- `pyyaml` の `safe_load` / `safe_dump` のみ使用
|
|
81
|
+
- 出力は `default_flow_style=False`, `allow_unicode=True`, `sort_keys=False`
|
|
82
|
+
- ファイル先頭にコメントヘッダーを付与
|
|
83
|
+
|
|
84
|
+
### テスト規約
|
|
85
|
+
- 各モジュールに対応する test ファイルを作成
|
|
86
|
+
- `tmp_path` fixture で一時ディレクトリを使用
|
|
87
|
+
- 正常系・異常系・エッジケースを網羅
|
|
88
|
+
- テストデータは conftest.py に fixture として定義
|
|
89
|
+
|
|
90
|
+
## セキュリティ上の注意
|
|
91
|
+
|
|
92
|
+
- YAML は `safe_load` のみ(任意コード実行を防止)
|
|
93
|
+
- installer.py は既存の settings.json の他のキーを絶対に壊さない
|
|
94
|
+
- ファイルパスは `resolve()` で正規化(パストラバーサル防止)
|
|
95
|
+
- subprocess に `shell=True` を使用しない
|
|
96
|
+
- Jinja2 テンプレートは `autoescape` 有効
|
|
97
|
+
|
|
98
|
+
## よくある間違い
|
|
99
|
+
|
|
100
|
+
- ❌ `yaml.load()` を使う → ✅ `yaml.safe_load()` を使う
|
|
101
|
+
- ❌ `Path("~/.pm")` → ✅ `Path.home() / ".pm"` or `Path("~/.pm").expanduser()`
|
|
102
|
+
- ❌ settings.json を丸ごと上書き → ✅ 必要なキーのみ追加
|
|
103
|
+
- ❌ project_path を必須引数にする → ✅ オプションにして自動検出
|
|
104
|
+
- ❌ タスクIDをユーザーに手入力させる → ✅ 自動採番
|
pm_server-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shinichi Nakazato / FLC design co., ltd.
|
|
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.
|
pm_server-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pm-server
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Project management MCP Server for Claude Code — track tasks, visualize progress, manage decisions
|
|
5
|
+
Project-URL: Homepage, https://github.com/flc-design/pm-server
|
|
6
|
+
Project-URL: Repository, https://github.com/flc-design/pm-server
|
|
7
|
+
Project-URL: Issues, https://github.com/flc-design/pm-server/issues
|
|
8
|
+
Author: Shinichi Nakazato
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: claude-code,mcp,mcp-server,project-management
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Requires-Dist: click>=8.0
|
|
20
|
+
Requires-Dist: fastmcp>=2.0
|
|
21
|
+
Requires-Dist: jinja2>=3.0
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
26
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# pm-server
|
|
30
|
+
|
|
31
|
+
[](LICENSE)
|
|
32
|
+
[](https://www.python.org/)
|
|
33
|
+
|
|
34
|
+
**[日本語版 README はこちら](README.ja.md)**
|
|
35
|
+
|
|
36
|
+
**Project management MCP Server for Claude Code.**
|
|
37
|
+
|
|
38
|
+
Track tasks, visualize progress, record decisions — all through natural language in your Claude Code session.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
> 進捗は?
|
|
42
|
+
✓ Phase 1 "Backend API": 60% complete (12/20 tasks)
|
|
43
|
+
- 3 tasks in progress, 1 blocked
|
|
44
|
+
- Velocity: 8 tasks/week (↑ trending up)
|
|
45
|
+
|
|
46
|
+
> 次にやること
|
|
47
|
+
1. [P0] MYAPP-014: Add user authentication endpoint
|
|
48
|
+
2. [P1] MYAPP-015: Implement rate limiting
|
|
49
|
+
3. [P1] MYAPP-018: Write integration tests
|
|
50
|
+
|
|
51
|
+
> MYAPP-014 に着手
|
|
52
|
+
✓ MYAPP-014 → in_progress
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- **16 MCP tools** — task CRUD, status, blockers, velocity, dashboard, ADR, and more
|
|
60
|
+
- **Natural language** — say "進捗は?" or "what's next?" instead of memorizing commands
|
|
61
|
+
- **Zero configuration** — `pip install` + `pm-server install`, then just say "PM初期化して"
|
|
62
|
+
- **Multi-project** — manage all your projects from a global registry with cross-project dashboards
|
|
63
|
+
- **Git-friendly** — plain YAML files in `.pm/` directory, trackable with `git diff`
|
|
64
|
+
- **Non-invasive** — adds only a `.pm/` directory to your project. `rm -rf .pm/` to remove completely
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Quick Start
|
|
69
|
+
|
|
70
|
+
### Install (once)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install git+https://github.com/flc-design/pm-server.git
|
|
74
|
+
pm-server install # Registers MCP server in Claude Code
|
|
75
|
+
# Restart Claude Code
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Initialize a project
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
# In Claude Code, cd to your project directory
|
|
82
|
+
> PM初期化して
|
|
83
|
+
✓ .pm/ created
|
|
84
|
+
✓ Registered in global registry
|
|
85
|
+
✓ Detected: name=my-app, version=1.2.0 (from package.json)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
pm-server automatically detects project info from `package.json`, `pyproject.toml`, `Cargo.toml`, `.git/config`, and `README.md`.
|
|
89
|
+
|
|
90
|
+
### Use it
|
|
91
|
+
|
|
92
|
+
| You say | What happens |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `進捗は?` / `status` | Show project progress summary |
|
|
95
|
+
| `次にやること` / `what's next` | Recommend next tasks by priority & dependencies |
|
|
96
|
+
| `タスク追加:○○を実装` | Add a new task (auto-numbered) |
|
|
97
|
+
| `MYAPP-003 完了` | Mark task as done |
|
|
98
|
+
| `ブロッカーある?` | List blocked tasks |
|
|
99
|
+
| `ダッシュボード見せて` | Generate HTML dashboard (Chart.js, dark theme) |
|
|
100
|
+
| `この設計にした理由を記録` | Record an Architecture Decision Record (ADR) |
|
|
101
|
+
| `全プロジェクトの状態` | Cross-project portfolio view |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## MCP Tools (16 tools)
|
|
106
|
+
|
|
107
|
+
### Project Management
|
|
108
|
+
|
|
109
|
+
| Tool | Description |
|
|
110
|
+
|---|---|
|
|
111
|
+
| `pm_init` | Create `.pm/`, register in global registry, auto-detect project info |
|
|
112
|
+
| `pm_status` | Phase progress, task summary, blockers, velocity |
|
|
113
|
+
| `pm_tasks` | List tasks with filters (status / phase / priority / tag) |
|
|
114
|
+
| `pm_add_task` | Add task with auto-numbered ID (e.g., `MYAPP-001`) |
|
|
115
|
+
| `pm_update_task` | Update status, priority, notes, blocked_by |
|
|
116
|
+
| `pm_next` | Recommend next tasks (excludes blocked / unmet dependencies) |
|
|
117
|
+
| `pm_blockers` | List blocked tasks across projects |
|
|
118
|
+
|
|
119
|
+
### Records
|
|
120
|
+
|
|
121
|
+
| Tool | Description |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `pm_log` | Daily log entry (progress / decision / blocker / note / milestone) |
|
|
124
|
+
| `pm_add_decision` | Add ADR with context, decision, and consequences |
|
|
125
|
+
|
|
126
|
+
### Analysis
|
|
127
|
+
|
|
128
|
+
| Tool | Description |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `pm_velocity` | Weekly velocity + trend (up / down / flat) |
|
|
131
|
+
| `pm_risks` | Auto-detect risks: overdue, stale, long-blocked tasks |
|
|
132
|
+
|
|
133
|
+
### Visualization
|
|
134
|
+
|
|
135
|
+
| Tool | Description |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `pm_dashboard` | HTML dashboard (single project or portfolio view) |
|
|
138
|
+
|
|
139
|
+
### Discovery
|
|
140
|
+
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `pm_discover` | Scan directories for `.pm/` projects and auto-register |
|
|
144
|
+
| `pm_cleanup` | Remove invalid paths from registry |
|
|
145
|
+
| `pm_list` | List all registered projects |
|
|
146
|
+
|
|
147
|
+
### Maintenance
|
|
148
|
+
|
|
149
|
+
| Tool | Description |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `pm_update_claudemd` | Update PM Server rules section in CLAUDE.md to latest version |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Data Structure
|
|
156
|
+
|
|
157
|
+
pm-server stores everything as plain YAML in a `.pm/` directory at your project root:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
your-project/
|
|
161
|
+
└── .pm/
|
|
162
|
+
├── project.yaml # Project metadata
|
|
163
|
+
├── tasks.yaml # Tasks with status, priority, dependencies
|
|
164
|
+
├── decisions.yaml # Architecture Decision Records (ADR)
|
|
165
|
+
├── milestones.yaml # Milestone definitions
|
|
166
|
+
├── risks.yaml # Risks and blockers
|
|
167
|
+
└── daily/
|
|
168
|
+
└── 2026-04-08.yaml # Auto-generated daily log
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Global registry at `~/.pm/registry.yaml` indexes all projects.
|
|
172
|
+
|
|
173
|
+
All files are human-readable and hand-editable. If something goes wrong, you can fix it with a text editor.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## CLAUDE.md Integration
|
|
178
|
+
|
|
179
|
+
Add this to your project's `CLAUDE.md` for automatic PM behavior:
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
## PM Server — Auto-actions (always follow these)
|
|
183
|
+
|
|
184
|
+
### On session start (before first response)
|
|
185
|
+
1. Run pm_status to show current progress
|
|
186
|
+
2. Run pm_next to show top 3 recommended tasks
|
|
187
|
+
3. Warn about blockers or overdue tasks
|
|
188
|
+
|
|
189
|
+
### Before starting a task
|
|
190
|
+
1. Run pm_update_task to set status to in_progress
|
|
191
|
+
|
|
192
|
+
### On task completion
|
|
193
|
+
1. Run pm_update_task to set status to done
|
|
194
|
+
2. Run pm_log to record what was completed
|
|
195
|
+
3. Run pm_next to show next recommendations
|
|
196
|
+
4. Create an atomic git commit
|
|
197
|
+
|
|
198
|
+
### On session end
|
|
199
|
+
1. Update any in-progress task status
|
|
200
|
+
2. Run pm_log to record session results
|
|
201
|
+
3. Commit any uncommitted changes
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## CLI Commands
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pm-server install # Register MCP server in Claude Code
|
|
210
|
+
pm-server uninstall # Unregister MCP server
|
|
211
|
+
pm-server serve # Start MCP server (called by Claude Code automatically)
|
|
212
|
+
pm-server discover . # Scan for projects with .pm/ directories
|
|
213
|
+
pm-server status # Show project status from terminal
|
|
214
|
+
pm-server migrate # Migrate from pm-agent (rename transition)
|
|
215
|
+
pm-server update-claudemd # Update PM Server rules in CLAUDE.md
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Architecture
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
Claude Code Session
|
|
224
|
+
│
|
|
225
|
+
├── CLAUDE.md auto-action rules
|
|
226
|
+
│
|
|
227
|
+
└── MCP Server (stdio)
|
|
228
|
+
└── pm-server serve
|
|
229
|
+
│
|
|
230
|
+
├── server.py → 16 MCP tools (FastMCP)
|
|
231
|
+
├── models.py → Pydantic v2 data models
|
|
232
|
+
├── storage.py → YAML read/write
|
|
233
|
+
├── velocity.py → Velocity calculation & risk detection
|
|
234
|
+
├── dashboard.py → HTML/text dashboard (Jinja2)
|
|
235
|
+
├── discovery.py → Auto-detect project info
|
|
236
|
+
└── installer.py → claude mcp add wrapper
|
|
237
|
+
│
|
|
238
|
+
├── project-A/.pm/
|
|
239
|
+
├── project-B/.pm/
|
|
240
|
+
└── ~/.pm/registry.yaml
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Migrating from pm-agent
|
|
246
|
+
|
|
247
|
+
If you were using the earlier `pm-agent` package:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
pip uninstall pm-agent
|
|
251
|
+
pip install git+https://github.com/flc-design/pm-server.git
|
|
252
|
+
pm-server migrate # Switches MCP registration from pm-agent to pm-server
|
|
253
|
+
# Restart Claude Code
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
The `migrate` command will:
|
|
257
|
+
- Remove the old `pm-agent` MCP registration
|
|
258
|
+
- Register `pm-server` as the new MCP server
|
|
259
|
+
- Verify `~/.pm/registry.yaml` integrity
|
|
260
|
+
- Warn about any `CLAUDE.md` files that reference `pm-agent`
|
|
261
|
+
|
|
262
|
+
Your `.pm/` data directories are **unchanged** — no data migration needed.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Requirements
|
|
267
|
+
|
|
268
|
+
- Python 3.11+
|
|
269
|
+
- Claude Code (with MCP support)
|
|
270
|
+
|
|
271
|
+
### Dependencies
|
|
272
|
+
|
|
273
|
+
- [FastMCP](https://github.com/jlowin/fastmcp) — MCP server framework
|
|
274
|
+
- [Pydantic](https://docs.pydantic.dev/) v2 — data validation
|
|
275
|
+
- [PyYAML](https://pyyaml.org/) — data persistence
|
|
276
|
+
- [Click](https://click.palletsprojects.com/) — CLI framework
|
|
277
|
+
- [Jinja2](https://jinja.palletsprojects.com/) — dashboard templates
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Development
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
git clone https://github.com/flc-design/pm-server.git
|
|
285
|
+
cd pm-server
|
|
286
|
+
pip install -e ".[dev]"
|
|
287
|
+
pytest # 115 tests
|
|
288
|
+
ruff check src/ # Lint
|
|
289
|
+
ruff format src/ # Format
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Design Principles
|
|
295
|
+
|
|
296
|
+
1. **Zero Configuration** — `pip install` + one command, done
|
|
297
|
+
2. **Auto-everything** — detection, registration, and inference are fully automatic
|
|
298
|
+
3. **Git-friendly** — plain text YAML, trackable with `git diff`
|
|
299
|
+
4. **Human-readable** — safe to hand-edit, won't break
|
|
300
|
+
5. **AI-native** — formats that Claude Code can naturally read and write
|
|
301
|
+
6. **Non-invasive** — only adds `.pm/`, never modifies your project
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## License
|
|
306
|
+
|
|
307
|
+
MIT — Shinichi Nakazato / FLC design co., ltd.
|