fix: dev-spec.md API candidate 用 _PROJECT_DIR 确保 path 正确

This commit is contained in:
hmo
2026-07-16 18:22:19 +08:00
parent 8f2f3466b7
commit cf53788627
+2 -2
View File
@@ -1156,8 +1156,8 @@ def api_spec():
"""返回开发规范文档内容"""
# Try multiple possible locations
candidates = [
# Git-tracked copy in project docs/
os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "docs", "dev-spec.md"),
# Git-tracked copy in project docs/ (priority)
os.path.join(_PROJECT_DIR, "docs", "dev-spec.md"),
os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))), "projects", "AgentsMeeting", "docs", "dev-spec.md"),
# Legacy .memory/ locations (gitignored, no history)
os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))), ".memory", "dev-spec.md"),