All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- VSX marketplace MCP deduplication:
vscode-extension/src/extension.tsnow detects when another installed VS Code extension already providesPubMed SearchorZotero KeeperMCP servers and skips both persistent tool installation and duplicate MCP registration, preventing doubled tool lists in Copilot Chat - VSX persistent tool upgrades:
vscode-extension/src/uvManager.tsnow runsuv tool upgradefor already-installed managed tools during activation, so older machine-level installs are refreshed on newer extension releases instead of staying pinned silently - VSX documentation alignment: Synced root
README.md,README.zh-TW.md, andvscode-extension/README.mdwith current MCP counts, 11-phase Auto Paper wording, persistent-install behavior, and external VSX deduplication notes - Cross-platform setup reproducibility:
scripts/setup.sh,scripts/setup.ps1, andvscode-extension/scripts/build.shno longer auto-track remote submodule HEAD during install/build; they now use repository-pinned submodule commits, generate the full repo.vscode/mcp.jsonshape consistently, and verify current MedPaper/CGU startup paths - JSONC mcp.json support:
scripts/migrate_mcp_json.pynow strips//comments from.vscode/mcp.jsonbefore parsing, preventing failures when VS Code leaves JSONC-style comments in the config - setup.sh heredoc template corruption: Rewrote the mcp.json heredoc block with consistent 2-space indentation and all 6 canonical servers, fixing structural corruption from overlapping patches
- CHANGELOG first-line corruption: Removed garbage prefix from
CHANGELOG.mdfirst line that would fail Prettier CI checks - Ruff lint/format compliance: Fixed E402 import ordering and formatting issues in new test files to pass CI checks
- MCP progress notifications for long-running tools: Audit/review pipeline tools now use FastMCP
Context.report_progress()when the client provides a progress token, covering phase validation, pipeline heartbeat, review-round start/submit, quality audit, meta-learning, data artifact validation, writing hooks, and review hooks - Cross-platform migration script (
scripts/migrate_mcp_json.py): Non-destructive mcp.json migration — detects missing servers, normalizes JSONC→JSON, creates timestamped backups; shared loader used bysmoke_test.py - Installation smoke test (
scripts/smoke_test.py): 13-check cross-platform verification covering environment, core imports, MCP server creation, CGU integration, mcp.json validation, git submodules, and migration dry-run
- Top 20 anesthesiology journal profiles: Added
templates/journal-profiles/with 20 ready-to-use journal YAML presets,_index.yaml, README, andscripts/generate_journal_profiles.pyto regenerate the catalog from source metadata - Paper pre-commit hook (P-series): New
scripts/hooks/paper_precommit.pyregistered in.pre-commit-config.yaml— runs P1/P2/P4/P5/P7 quality checks automatically ongit commit, blocking on CRITICAL issues - Embedded post-write hooks:
write_draftandpatch_draftnow auto-run A-series hooks (A1–A7, B9, B10, B15) after successful write — agent cannot skip, non-blocking advisory report appended to output - B2 protected content guard:
patch_draftnow blocks modification of 🔒-marked sections inconcept.md— prevents agent from altering NOVELTY STATEMENT or KEY SELLING POINTS without user approval - Weak-model guardrails expansion: Added Code-Enforced B2/C2/P6 coverage, deprecated
save_reference()warning + telemetry, and a dedicated weak-model regression suite intests/test_weak_model_guardrails.py - Domain constraint expansion: Added shared anti-AI vocabulary core and broader paper-type coverage for
meta-analysis,review-article,letter, andother, plus structural/temporal/evidential constraints such as methods-before-results, minimum references, and section-overlap detection
- Hook batch runner:
run_post_manuscript_hooks()now calls C10 (full manuscript validation), C11 (citation distribution), C12 (citation decision audit), C13 (figure/table quality) — previously defined in mixin but not wired into the batch runner - MCP hook aliases:
audit_hooks.pyALL set now includes A7 (reference sufficiency) and C7B (asset coverage); POST-WRITE +A7, POST-MANUSCRIPT +C7B; docstring corrected from 37→40 hooks - Hook effectiveness tracker:
HOOK_CATEGORIESnow tracks P (pre-commit) and G (git-hooks) event categories - Consistency checker accuracy:
scripts/check_consistency.pynow understands sub-hooks likeA3b, counts 78 hooks correctly, and validates P/G hook categories instead of misreporting false failures - Documentation alignment: AGENTS.md,
.github/copilot-instructions.md,vscode-extension/copilot-instructions.md, andvscode-extension/README.mdnow reflect 78 hooks / 55 Code-Enforced / 23 Agent-Driven and 88 MCP tools consistently - VSX bundled parity: Re-synced bundled Python sources and bundled skills with workspace source so local
vitestsync checks and packaged extension content match the repository state
-
Hook A3c: Voice Consistency Detector (Anti-AI 語體一致性偵測):
- New Code-Enforced hook
check_voice_consistency()in_post_write.py— detects paragraph-level style breaks via z-score outlier analysis - Per-paragraph metrics: avg_sent_len, avg_word_len, type_token_ratio, punct_complexity
- Document baseline computation (mean + std per metric)
- Outlier detection (z-score > 1.8) + vocabulary sophistication gap (max−min avg_word_len > 1.2)
- Catches the #1 human-reviewer signal: ESL paragraphs suddenly switching to polished corporate-academic prose
- Registered in WritingHooksEngine batch runner (
run_post_write_hooks) and pre-commit P2c delegation - Integrated into R5 post-review anti-AI gate (now runs A3 + A3b + A3c)
- MCP dispatch:
run_writing_hooks(hooks="A3C")available in ALL and POST-WRITE hook sets - 18 new tests covering uniform text, mixed voice detection, sophistication gap, custom thresholds, markdown handling, and batch integration
- Hook count: 77 → 78 (36 Code-Enforced / 42 Agent-Driven)
- New Code-Enforced hook
-
Dual-Subagent Anti-AI Cross-Audit Protocol (Stage C3):
- SKILL.md Stage C3 rewritten: three-layer code scan (A3+A3B+A3C) → agent self-review (6 criteria incl. voice breaks) → dual-subagent cross-audit → verification
- Concept-Challenger: new Anti-AI Surface Scanner role (blacklist + structural signals + GPTZero risk assessment)
- Domain-Reviewer: new Voice Analyst role (per-paragraph AI probability scoring 1-5, ESL baseline analysis, TOP 5 suspicious sentences)
- Cross-comparison protocol: 🔴 both flag → must rewrite,
⚠️ one flags → judge, ✅ both safe → pass
-
Asset Review Receipt Hard Gate for Figures/Tables:
- New analysis tool
review_asset_for_insertion()records auditable review receipts in.audit/data-artifacts.yaml insert_figure()/insert_table()now BLOCK caption registration unless a matching review receipt exists first- Phase 5 gate now validates planned figure/table captions are backed by review receipts
- Hook F /
validate_data_artifacts()now report missing or incomplete asset review receipts as gate-blocking issues - 1 new targeted tool test file + expanded Phase 5 / Hook F coverage
- New analysis tool
-
Paper-Type-Aware Reference Minimum Enforcement (Hook A7 + Phase 2 Gate):
- New Hook A7
check_reference_sufficiency()— Code-Enforced pre-write gate that blocks writing when reference library is insufficient - Phase 2 Gate now paper-type-aware: reads
paper.typefromjournal-profile.yaml, resolves minimum via 3-tier chain - Per-type minimums: original-research (20), review-article (30), systematic-review (40), meta-analysis (40), case-report (8), letter (5), fallback (15)
journal-profile.template.yaml: newminimum_reference_limitsfield for per-project overrideDomainConstraintEngine: B003minimum_referencesBOUNDARY constraint added to all 3 paper types- Phase 3+ prerequisite checks also paper-type-aware (can't bypass by skipping Phase 2)
- 8 new A7 hook tests + 7 new Phase 2 gate tests (839 tests total)
- Hook count: 76 → 77 (35 Code-Enforced / 42 Agent-Driven)
- New Hook A7
-
Humanizer Anti-AI Enhancement:
ANTI_AI_PHRASES: 76 → 133 phrases across 12 semantic categories (overly_formal, unnecessary_hedging, ai_conclusions, filler_boosters, generic_linking, hollow_emphasis, ai_structuring, inflated_academic, ai_discourse, passive_deflectors, nominalised_verbs, hollow_intensifiers)AI_TRANSITION_WORDS: 25 → 33 (added: Nevertheless, Conversely, Correspondingly, Notably, Importantly, Significantly, Fundamentally, Substantially)- 4 new A3b structural pattern checks: #6 negative parallelism, #7 copula avoidance, #8 em dash overuse, #9 false ranges (X to Y)
- 12 new tests for anti-AI detection (826 Python tests total)
-
VS Code Copilot Lifecycle Hooks:
- 7 hook scripts:
session-init.sh,prompt-analyzer.sh,pre-tool-guard.sh,post-tool-check.sh,pre-compact-save.sh,subagent-init.sh,session-stop.sh .github/hooks/mdpaper-lifecycle.jsonconfiguration- Design doc:
docs/design/copilot-lifecycle-hooks.md - State communication via
.github/hooks/_state/(gitignored) - Graceful degradation when jq is not installed
- 7 hook scripts:
- Asset Review Receipt — Caption Normalization & Auto-Review:
- Caption comparison now uses
_normalize_caption()— strips trailing punctuation, whitespace, and lowercases before matching (fixes brittle exact-match failures) insert_table()with inlinetable_contentnow auto-records review receipt (agent has full content access), eliminating redundantreview_asset_for_insertion()call- File-based tables (no
table_content) still require explicit review receipt (hard gate preserved) - 5 new tests:
TestCaptionNormalization(4 unit tests) + auto-review integration test
- Caption comparison now uses
- MCP Instructions: Removed ghost tool
save_diagram_standalone(merged intosave_diagram), added missinginsert_figure/insert_table/list_assetsto DATA ANALYSIS section, updated DIAGRAM WORKFLOW - Tool count drift: 85 → 86 tools (review/ 21 → 22), synced across 5 files via
sync_repo_counts.py --fix
- Tool count: 86 → 88 tools (analysis/ 9 → 10:
review_asset_for_insertion, review/ 22 → 23:approve_concept_review) - Hook count: 76 → 78 (34 → 36 Code-Enforced): added A3c Voice Consistency + A7 Reference Sufficiency
- VSX Extension: Synced
copilot-instructions.md+auto-paper/SKILL.md, added 3 research skills (memory-checkpoint,memory-updater,project-init)
- VSX Zero-Config Marketplace Mode:
uvManager.ts— cross-platform uv auto-detection + headless installation (Windows PowerShell / Unix curl)ensureUvReady()— auto-install uv on activation with VS Code progress notification- Marketplace mode uses
uvx med-paper-assistantfrom PyPI (complete isolation, no PYTHONPATH contamination) - CGU marketplace mode uses
uvx creativity-generation-unit
- VSX Testability Refactor:
extensionHelpers.ts— 6 pure functions extracted fromextension.ts(no vscode API dependency):shouldSkipMcpRegistration,isDevWorkspace,isMedPaperProject,determinePythonPath,countMissingBundledItems,buildDevPythonPathextensionHelpers.test.ts— 30 tests covering all extracted helperspackaging.test.ts— 21 tests for manifest schema,.vscodeignore, module structure, version consistencyuvManager.test.ts— 20 tests (expanded from 17) including asyncfindUvPathtests
- Critical:
shouldSkipMcpRegistration()now checks both"mdpaper"server name ANDmed_paper_assistantmodule path — prevents skipping when user has unrelatedmcp.jsonentries - Critical:
determinePythonPath()only returns'uv'fallback formed-paper-assistantpyproject.toml — prevents wrongly treating anypyproject.tomlas a valid Python path
- VSX vitest: 52 → 106 passed (+54 new tests across 4 test files)
- CGU bundled tools updated to latest version
- Critical:
_strip_references_section()greedy regex (.*withre.DOTALL) deleted all content after## References— any sections like## Appendixor## Supplementary Materialswere silently lost during export. Fixed to non-greedy.*?(?=\n## |\Z)with lookahead. - 2 regression tests added for post-References content preservation
- Pre-export citation gate (C5 HARD GATE):
export_docx()andexport_pdf()now run Hook C5 (Wikilink Resolvable) as a blocking gate — export is refused if any[[wikilink]]citations cannot be resolved to saved references - Strict mode for
prepare_for_pandoc(): Newstrict=Trueparameter raisesValueErroron unresolved citation keys (used byexport_docx/pdfinternally as second defense layer) - Word export residual wikilink warning:
save_document()scans the final Word document for any remaining[[...]]patterns and warns the user - 9 new tests covering all three defense layers
- Critical: MCP server now uses
MEDPAPER_BASE_DIRenv var (set by VSX extension to workspace folder) instead of CWD forprojects/andlogs/paths — fixes end-user issue where output went to extension install directory instead of workspace
- CI: Add
# nosec B110tocheckpoint.py— bandit false positive on intentional try/except/pass causing CI failure
- Dashboard ThemeProvider: Replace
setState-in-effect withuseSyncExternalStorefor hydration detection (ESLintreact-hooks/set-state-in-effect) - Dashboard DrawioEditor: Fix
ExportFormatstype mismatch (xml→xmlsvg), remove unsupportedstyleprop - Dashboard stats/route.ts: Next.js 16
paramstype changed toPromise<>withawait - sync_repo_counts.py: Remove unused
warningsvariable (ruff F841) - Bundled Python sync: Fix rsync target to correct
bundled/tool/path
- VSX Extension Completeness:
agents/directory with 9 bundled.agent.mdfiles (concept-challenger, domain-reviewer, literature-searcher, meta-learner, methodology-reviewer, paper-reviewer, reference-analyzer, review-orchestrator, statistics-reviewer)autoScaffoldIfNeeded()— auto-detect missing skills/agents/prompts and prompt userbuild.shstep 2d — agent bundle copyvalidate-build.shV3c — agent sync validationvalidateBundledAgents()utility functionmdpaper.auditbundled prompt- Agent sync tests (vitest)
- macOS / VS Code Insiders Compatibility:
- MCP environment inherits
PATH,HOME,SHELL,LANG,USERPROFILE— fixes homebrewuv/uvx/gitdiscovery on macOS getPythonArgssupports versioned Python names (python3.12,python3.11) via regex- New test: versioned Python (homebrew/macOS) path matching
- MCP environment inherits
- Dynamic Count Sync Script (
scripts/sync_repo_counts.py): AST-based counting of all repo metrics, auto-sync into 7 docs, 43 stale counts auto-fixed - ReviewHooksEngine (
R1-R6): Review report depth, author response completeness, EQUATOR compliance, review-fix traceability, post-review anti-AI, citation budget - EXPECTED_HOOKS: 40→58 (added B9-B16, C10-C13, R1-R6)
reset_review_loopMCP tool: Stuck review state recoveryciteproc-py: Moved to core dependencies (previously optional)
- Bug 1 (Critical):
_compute_manuscript_hash()now hashes ALL.mdfiles indrafts/via sorted glob — resolves review pipeline deadlock when using multi-file drafts - Bug 2 (Critical):
citeproc-pyimport failure crashes — added try/except lazy import with_CITEPROC_AVAILABLEflag at all 3 usage points - Bug 3 (Medium):
start_document_sessionrequiredtemplate_nameeven when no templates available — now optional, creates blank document when omitted - Bug 4 (Medium): Writing Hooks false positives:
- A1: Added
_strip_frontmatter()to exclude YAML frontmatter from word counts - A6: Added statistical notation regex exclusion (F-tests, p-values, η²p, CI, OR/HR/RR, β, SD/SE) from n-gram overlap detection
- A1: Added
- Bug 5 (Minor):
export_pdfciteproc crash chain — covered by Bug 2 lazy import guards - MCP server env: Child processes (uv/uvx/git) now inherit system PATH on macOS — prevents "command not found" errors
- Hash mismatch error messages: Added diagnostic info showing current vs expected hashes
- MCP tools: 85 (review/ 20→21 with reset_review_loop)
- Hook architecture: 76 checks (34 Code-Enforced / 42 Agent-Driven)
- Python tests: 698 → 730 passed (excl. external-dep tests)
- VSX vitest: 34 → 35 passed
- VSIX package:
medpaper-assistant-0.4.0.vsix(615 KB, 224 files, 9 agents) - 4 outdated bundled skills synced from source
- B9-B16 Section-Specific Writing Quality Hooks (8 new Code-Enforced):
- B9 Tense consistency — validates verb tense per section (past for Methods/Results, present for Discussion)
- B10 Paragraph quality — minimum sentences, max length, transition word density
- B11 Results objectivity — flags interpretive language in Results section
- B12 Introduction structure — validates funnel structure (broad → specific → gap → aim)
- B13 Discussion structure — validates interpretation → comparison → limitations → implications
- B14 Ethical statements — checks for IRB/ethics approval and consent statements
- B15 Hedging density — flags over-hedging (>15%) or under-hedging (<3%)
- B16 Effect size reporting — checks for effect sizes alongside p-values
- Self-Evolution Infrastructure (L2 complete):
ToolInvocationStore— tool telemetry persistence to.audit/tool-telemetry.yamlPendingEvolutionStore— cross-conversation evolution persistence to.audit/pending-evolutions.yamlguidance.py—build_guidance_hint+build_startup_guidance(auto-prompt pending evolutions on new conversations)tool_health.py—diagnose_tool_health+ flush health alerts to PendingEvolutionStore
- Pipeline Flexibility (4 new MCP tools):
request_section_rewrite— Phase rollback with regression count guardpause_pipeline/resume_pipeline— Pipeline suspend/resume with draft hash trackingapprove_section— Section-level approval gate (autopilot or manual)
- Autonomous Audit Loop:
autonomous_audit_loop.py— structured audit loop execution - CheckpointManager enhancements: Section approval tracking, pause/resume state, rollback history
- WritingHooksEngine expansion: +1120 lines — Anti-AI pattern detection, data claim alignment, supplementary crossref, language consistency, overlap detection, data artifact validation
- MetaLearningEngine: pending evolution flush (
_flush_meta_learning_evolutions) for cross-conversation persistence - GitHub Actions:
evolution-health.ymlweekly health check workflow - Tool Logging:
tool_logging.py— automatic tool invocation telemetry via decorator - New MCP tools:
apply_pending_evolutions,diagnose_tool_health,run_autonomous_audit,get_tool_telemetry+ 5 pipeline flexibility tools - CONSTITUTION v1.6.0: 新增第九章「核心哲學 — 逐步多輪演進」(§25-26)
- Tests: +163 tests (test_writing_hooks +636 lines, test_meta_learning +191 lines, test_guidance, test_pending_evolution_store, test_pipeline_flexibility, test_tool_health, test_tool_invocation_store)
- C6 Word Count (ICMJE Convention): Body-only counting — excludes Abstract, References, Tables (markdown
| |rows), Figure legends, Acknowledgments, Author info. New helpers:BODY_SECTIONSconstant (12 sections),_strip_markdown_tables(),_extract_body_word_count(). Journal profile override viacounts_toward_totalflag. - count_words MCP tool: Rewritten to show Body? column (✅/—), ICMJE-labeled manuscript total
- Deep review round 2: Defensive guards, assert removal, input validation
- Code review: Input validation, regex robustness, safety guards across 6 files
- Writing hooks: Word boundary regex for supplementary file matching,
rglobfor dir traversal, code block state tracking, wikilink stripping - Pipeline gate validator: Reference counting by PMID subdirs
- MCP tools: 77 → 81 (pipeline flexibility + self-evolution tools)
- Hook architecture: 23 Code-Enforced / 42 Agent-Driven (65 total)
- Three-tier evolution: L1 Event-Driven Hooks
⚠️ / L2 Code-Level Enforcement ✅ / L3 Autonomous Self-Evolution⚠️ - Test count: 525 → 738 passed (42 test files)
- AGENTS.md, copilot-instructions.md: complete rewrite reflecting actual implementation status
- Journal Support: medRxiv, JAMIA, JBI added to
JOURNAL_REQUIREMENTS(total: 11 journals) - Pipeline Gate Validator:
pipeline_gate_validator.pyfor phase-gate validation with reference counting fix (PMID subdirs) - Audit Hooks MCP Tool:
audit_hooks.pyfor Hook D meta-learning integration
check_formattingcrash:'Drafter' object has no attribute 'read_draft'— replaced with direct file reading viaget_drafts_dir()- Pipeline gate: Added
Pathimport, fixed_get_or_create_loopsignature, removed unused variables - Pipeline gate: 29 API mismatches resolved in
pipeline_gate.py - Gate validator: Count PMID subdirs instead of flat
.mdfor reference counting
- DRY refactor: Extracted 7 duplicate helper functions into
_shared/project_context.py(get_project_path,get_drafts_dir,get_concept_path,validate_project_for_tool) - VSX bundled code: Full rsync from
src/— 38 files updated, 5 new files added - Auto-paper SKILL.md: Synced to VSX extension
- Author Info System:
Authorfrozen dataclass value object with structured affiliations, ORCID, corresponding author flaggenerate_author_block()produces markdown with superscript affiliations + corresponding author notationupdate_authorsMCP tool for managing project author metadatacreate_projectnow acceptsauthors_jsonparameter for structured author inputget_current_projectdisplays formatted author informationdraft_sectionauto-injects author block for Title Page sectionsjournal-profile.template.yamlupdated withauthors:section template
- Data Artifact Provenance:
DataArtifactTrackerpersistence class for tracing data analysis artifactsvalidate_data_artifactsMCP tool for cross-referencing data artifacts against drafts- All 4 analysis MCP tools (
run_statistical_test,analyze_dataset,create_plot,generate_table_one) record provenance automatically - Phase 5/6 gate validators check data artifact completeness
- CONSTITUTION §23.2 數據產出物溯源與交叉驗證 (v1.5.0)
- Hook F1-F4: Data artifact validation hooks (溯源追蹤、manifest↔檔案一致、draft↔manifest 交叉引用、統計宣稱驗證)
- Full project ruff lint cleanup: 60 errors → 0 (unused imports, f-string placeholders, ambiguous variable names, import ordering, unused assignments, duplicate dict keys)
- Pre-existing duplicate
project_pathkey inget_project_info()dict literal (F601)
- Hook count: 48 → 52 checks (added F1-F4 data-artifacts)
- Multi-Stage Review Architecture: 設計文件
docs/design/multi-stage-review-architecture.md,記錄 4 層審查機制(Prompt 15 + Skill 26 + Hook 42 + Agent Mode) - 42 Hooks 完整實作: Hook 系統從 38 → 42 checks
- Hook C8 (Temporal Consistency Pass): post-manuscript 時間一致性檢查
- Hook B5 (Methodology Audit): 方法學驗證
- Hook B6 (Writing Order): 寫作順序強制
- Hook B7 (Section Brief Compliance): Section Brief 合規
- Hook D7 (Review Retrospective): 自我改進回顧
- 11-Phase Pipeline (Phase 0-10): auto-paper 從 9-Phase 升級至 11-Phase
- Auto-Paper Guide:
docs/auto-paper-guide.md完整操作手冊 - VSX Template Bundling:
journal-profile.template.yaml打包進 VSX extensionsetupWorkspace自動複製 templates(含內容比對 auto-update)mdpaper.autoPaperruntime safeguard(template 缺失時警告 + 一鍵修復)validateBundledTemplates()驗證函式 + 2 個新 unit tests
- Citation Section: README.md + README.zh-TW.md 加入 BibTeX 引用區塊
- Bash Arithmetic Bug:
build.sh/validate-build.sh中((VAR++))在set -e下 VAR=0 時回傳 exit code 1 → 改用VAR=$((VAR + 1)) - V6 Vitest Detection:
validate-build.sh測試結果擷取修復(vitest v4 輸出格式變更) - Integration Test Async: 6 個 integration tests 修正為
async def+await(searcher.search()已改為 async) - Integration Test CWD:
test_drafter/test_insertion改用tmp_pathfixture 避免 CWD 相依路徑問題 - CI VSX Template Sync:
ci.yml+release.yml的 VSX sync step 加入 templates 同步 - project_path resolution bug:
get_project_info()返回值缺少project_pathkey
- pytest default config:
addopts = "-m 'not integration and not slow'"— 本地pytest預設只跑 unit tests(與 CI 行為一致) - VSX autopaper 描述: "9-Phase Pipeline + Hooks" → "11-Phase Pipeline + 42 Hooks"
- Hook C7 (Temporal Consistency): 新增 post-manuscript hook 修正過時引用
- Lazy Import:
matplotlib、seaborn、scipy改為方法內 lazy import,修復uvx安裝時ModuleNotFoundError: No module named 'matplotlib'(這些是可選依賴,核心 MCP server 啟動不應依賴)
- PyPI Entry Point: 加入
[project.scripts]讓uvx med-paper-assistant正確啟動 MCP server(v0.3.6 缺少 CLI entry point 導致Package does not provide any executables錯誤)
MedPaper: Setup Workspace命令 ✅- 一鍵將 bundled skills (14)、prompts (12)、copilot-instructions.md 複製到 workspace
- 只複製不存在的檔案(不覆寫已客製化的內容)
- 完成後提示「重新載入」以啟用全部功能
- Marketplace 安裝後執行一次即可獲得完整 Agent Mode 體驗
- CI Pipeline: test-vsx / publish-vsx 加入 skills/prompts/copilot-instructions.md 同步步驟
- PyPI 重複發佈: publish-pypi 加入
skip-existing: true(v0.3.5 已上 PyPI)
- Dead Code 清理: 移除
MDPAPER_INSTRUCTIONS、MDPAPER_EXTENSION_PATH環境變數(Python MCP server 從未讀取) - Dead Code 清理: 移除
registerMcpServerProvider中的loadSkillsAsInstructions()呼叫
0.3.5 - 2026-02-20
- Figure/Table Archive + Insert Tools ✅
- Hook:
_check_figure_table_archive一致性驗證 - 3 個新工具:
insert_figure,insert_table,list_assets(54 → 57 tools)
- Hook:
- GitHub Repo Metadata + Doc-Update Hook (G8) ✅
- Repo description, 15 topics, 9 custom labels
scripts/check-doc-updates.py: 13 條規則映射檔案變更至文檔依賴- Pre-commit hook #15: doc-update-reminder (warn-only)
- Hook 計數: 37 → 38 checks (G1-G8)
- Prettier Markdown Formatter ✅
- Pre-commit hook #14:
mirrors-prettier v3.1.0 - 格式化所有 121 個 .md 檔案
- Pre-commit hook #14:
- CI/CD Pipeline Upgrade ✅
- CI: 2 → 5 jobs (python-lint, python-test, vsx, dashboard, markdown)
- Release: 5-stage pipeline (validate → test → publish-pypi + publish-vsx → github-release)
- Branch protection: 5 required CI checks, strict mode
- 移除 Dependabot 配置
- README Submodule Links: 子模組相對路徑 404 → 改用 GitHub 絕對連結
- VSX One-Click Install ✅
- 移除
extensionDependencies硬依賴(vscode-zotero-mcp未上架會阻擋安裝) - Python fallback 改為
uvx(PyPI 已發布即可自動下載執行) - CGU MCP server 改為條件註冊(偵測到才啟用,避免錯誤訊息)
- 移除
- README/README.zh-TW: 更新所有工具/Hook 計數(20 處:57 tools, ~107 total, 15 hooks)
- Placeholder Tools Implementation (Phase 8) ✅
- 9 個佔位工具升級為完整實作(74→83 tools)
- Analysis:
analyze_dataset,detect_variable_types,list_data_files,create_plot,run_statistical_test,generate_table_one - Review:
check_manuscript_consistency,create_reviewer_response,format_revision_changes
- Tool Layer Architecture Audit (Phase 9) ✅
- 7 個模板型工具(debate, critique, idea-validation)轉為 3 個 Skill 檔案
- 新增
.claude/skills/academic-debate/SKILL.md - 新增
.claude/skills/idea-validation/SKILL.md - 新增
.claude/skills/manuscript-review/SKILL.md - 工具數量:83→76
- Comprehensive Tool Consolidation (Phase 10) ✅
- 6 大策略精簡 76→53 tools(-30%)
- Strategy A: 移除無用工具 —
close_other_project_files,export_word(legacy) - Strategy B: 簡單合併 —
validate_for_section,get_project_paths,check_reference_exists併入現有工具 - Strategy C: 參數合併 — 6 組工具對合併(validate_concept +structure_only, get_current_project +include_files, update_project_settings +status/citation_style, save_diagram +output_dir, sync_workspace_state +clear, suggest_citations +claim_type/max_results, verify_document +limits_json)
- Strategy D: 功能吸收 — consistency 檢查 + submission checklist 併入
check_formatting - Strategy E+F: Skill 轉換 — 7 個工具轉為 skill 知識(get_section_template, generate_cover_letter, list_supported_journals, generate_highlights, check_submission_checklist, create_reviewer_response, format_revision_changes)
- 新增
.claude/skills/submission-preparation/SKILL.md(cover letter、highlights、journal requirements、reviewer response 模板) - 更新
draft-writing/SKILL.md、project-management/SKILL.md反映工具變更 - 測試驗證:35 passed / 21 pre-existing failures / 0 regressions
- Citation-Aware Editing Tools (Layer 1+2) ✅
get_available_citations()— 列出所有可用[[citation_key]],含 PMID/作者/年份/標題表格patch_draft(filename, old_text, new_text)— 部分編輯草稿,自動驗證所有 wikilinks- 唯一匹配檢查(防止模糊替換)
- Wikilink 格式自動修復(
[[12345678]]→[[author2024_12345678]]) - 引用存在驗證(拒絕 hallucinated citations)
- 解決 Agent 使用
replace_string_in_file繞過 MCP 驗證管線的核心問題 - 14 個測試(3 test classes: GetAvailableCitations, PatchDraft, EditingIntegration)
- SKILL.md 新增 Flow D: Citation-Aware 部分編輯
- copilot-instructions.md 新增草稿編輯引用規則
- Infrastructure & Quality Cleanup (Phase 3.5) ✅
- Pre-commit hooks: 13 hooks(ruff, ruff-format, mypy, bandit, pytest, whitespace, yaml, json, toml, large files, merge conflicts, debug statements)全部通過
- DDD Import 遷移:19 個測試檔從
core.*遷移至 DDD 路徑 - Test Isolation:所有測試改用
tmp_pathfixture,不再污染專案根目錄 - ARCHITECTURE.md 重寫:從 448 行過時文檔重寫為 ~240 行精確 DDD 架構文檔
- Legacy Cleanup:刪除空的
core/目錄、多餘腳本、散落檔案 - Copilot Hook 修復:AGENTS.md 補齊 7 skills + 8 prompts,修正 capability index
- Coverage Baseline:32 passed / 1 skipped / 26 integration-deselected
- 架構方向決策:選定 Direction C: Full VSX + Foam + Pandoc
- Prompt Files 機制
- 新增
.github/prompts/目錄,包含 9 個 prompt files /mdpaper.project- 專案設置與切換/mdpaper.concept- 研究概念發展(含 novelty 驗證)/mdpaper.search- 智能文獻搜尋(情境 A/B 判斷)/mdpaper.draft- 草稿撰寫(需先通過 concept 驗證)/mdpaper.strategy- 搜尋策略配置/mdpaper.analysis- 資料分析與 Table 1/mdpaper.clarify- 內容改進與潤飾/mdpaper.format- Word 匯出/mdpaper.help- 指令說明- 參考 copilot-capability-manager 架構設計
- 新增
- 犀利回饋模式 (Sharp Reviewer Feedback)
concept_validator.py: 新增_generate_novelty_feedback()方法- 回饋格式:verdict / critical_issues / questions / actionable_fixes
- CGU 創意工具整合建議
- 像頂尖期刊 Reviewer 一樣審查:直指問題、用證據說話
- 檔案保護模式 (File Protection)
.copilot-mode.json: 新增protected_paths設定- Normal/Research 模式下禁止修改開發檔案
- 受保護路徑:
.claude/,.github/,src/,tests/,integrations/
- Session 檢視工具
scripts/view_session.py: 顯示 pubmed-search 搜尋紀錄- 可供人工驗證 Agent 確實執行了搜尋
- 已知問題追蹤 (Known Issues)
- ROADMAP.md 新增 4 個 Critical Issues
- 新增 Phase 3.5: 學術品質保證系統
- Novelty Check 改為 Advisory(不阻擋)
writing.py:_enforce_concept_validation()改為建議性質- 用戶可選擇:直接寫 / 修正問題 / 用 CGU 發想
- 仍然檢查結構完整性(NOVELTY STATEMENT, KEY SELLING POINTS)
- concept-development SKILL 大幅更新
- 新增犀利回饋原則和模板
- 新增 CGU 工具使用指南
- 新增危險信號處理流程
- Pydantic V2 遷移
SearchCriteria:class Config→model_config = ConfigDict(frozen=True)- 消除
PydanticDeprecatedSince20警告
- wikilink_validator.py: 移除未使用的
match.group(1)呼叫 - list_drafts / read_draft: 路徑解析改用
_get_drafts_dir()取得專案路徑,與patch_draft一致
- AGENTS.md: 新增 Novelty Check 規則和 CGU 整合
- copilot-instructions.md: 新增犀利回饋做法
- pubmed-search-mcp ROADMAP.md: 新增 Phase 5.5 搜尋紀錄驗證機制
0.2.2 - 2025-12-18 (Previous)
- 完整靜態分析工具鏈
- Ruff linter/formatter: 修復 1839 個錯誤
- Mypy 類型檢查: 修復 49 個類型錯誤
- Bandit 安全掃描: 7 個 Low severity 已加
# nosec註解 - Vulture 死代碼檢測: 0 個問題
- 開發模式切換功能 (
.copilot-mode.json)development: 完整功能(所有 skills、Memory Bank 同步、靜態分析)normal: 一般使用(僅研究技能)research: 專注寫作(只同步專案 .memory/)
- test-generator SKILL 擴展
- 新增 Bandit/Vulture 工具文檔
- 新增
# nosec註解使用指南 - 完整執行流程說明
- 代碼品質改進
- 所有
import *改為明確導入 - 所有
except:改為except Exception: - 統一使用 ruff format 風格
- 修復所有 Optional type hints
- 所有
- pyproject.toml - 新增 dev 依賴:
bandit>=1.9.2,vulture>=2.14
- 類型錯誤修復
concept_validator.py: 修正result變數衝突project_context.py: 使用get_project_info()替代get_current_project()writing.py: 修正Optional[str]回傳類型- 多處
dict/list變數加入明確類型註解
- MCP-to-MCP Direct Communication Architecture ✅ 已實作
- pubmed-search 新增 HTTP API endpoints:
GET /api/cached_article/{pmid}- 取得單一文章GET /api/cached_articles?pmids=...- 批量取得GET /api/session/summary- Session 狀態
- mdpaper 新增
PubMedAPIClientHTTP 客戶端 - 新工具
save_reference_mcp(pmid, agent_notes):- Agent 只傳 PMID,無法修改書目資料
- mdpaper 直接從 pubmed-search API 取得驗證資料
- 防止 Agent 幻覺(hallucination)書目資訊
- 分層信任 (Layered Trust) 參考檔案格式:
🔒 VERIFIED: PubMed 資料(不可修改)🤖 AGENT: AI 筆記(AI 可更新)✏️ USER: 人類筆記(AI 絕不碰觸)
- pubmed-search 新增 HTTP API endpoints:
- stdio + HTTP API 同時啟動
- pubmed-search 在 stdio MCP 模式下自動啟動背景 HTTP API
start_http_api_background()在 daemon thread 運行- 解決 VS Code MCP (stdio) 無法同時提供 HTTP API 的問題
- Skill 文檔完整更新
literature-review/SKILL.md完整重寫,含完整工具列表和 PICO 工作流parallel-search/SKILL.md新增工具表格和 Session 管理說明concept-development/SKILL.md擴展工具列表和 FAQ- 所有 skill 明確標示
save_reference_mcp為 PRIMARY 方法
- Reference 內容順序優化 - Abstract 移到 Citation Formats 之前
- Foam hover preview 現在優先顯示 Abstract(更實用)
- Foam settings 更新 -
foam.files.ignore改為foam.files.exclude - sync_references Tool - Markdown 引用管理器
- 掃描
[[wikilinks]]自動生成 References 區塊 - 可逆格式:
[1]<!-- [[citation_key]] -->,支援重複同步 - 按出現順序編號,支援 Vancouver/APA 等格式
- 掃描
- Foam Project Isolation - 專案隔離功能
FoamSettingsManager服務:動態更新foam.files.ignoreswitch_project()整合:切換專案時自動排除其他專案- Whitelist 邏輯:只顯示當前專案的
references/
- Reference Title Display - Foam 自動完成顯示文章標題
- frontmatter 加入
title欄位 foam.completion.label: "title"設定
- frontmatter 加入
- MCP Tool Logging System - 統一的工具日誌記錄
tool_logging.py: log_tool_call, log_tool_result, log_agent_misuse, log_tool_error- 日誌存放在專案目錄
logs/YYYYMMDD.log(跨平台支援) - 已整合至 draft/writing.py, project/crud.py, validation/concept.py, reference/manager.py
- ReferenceConverter Domain Service - 支援多來源參考文獻
- 支援 PubMed, Zotero, DOI 來源
- ReferenceId Value Object 確保唯一識別符
- Foam [[wikilink]] 整合
- Reference Entity 更新 - 新增多來源識別符欄位
- unique_id, citation_key, source 欄位
from_standardized()類別方法
- 授權變更 - 從 MIT 改為 Apache License 2.0
- 日誌位置遷移 - 從系統 temp 目錄改為專案目錄
logs/ - README.md - 新增 MCP 協調架構說明、更新工具列表
- ARCHITECTURE.md - 新增 MCP Orchestration 架構圖
- Prompts 更新 -
/mdpaper.concept和/mdpaper.search增加 MCP 協調流程說明 - copilot-instructions.md - 簡化為參照 AGENTS.md,避免重複
- save_reference JSON 解析 - 處理 MCP 傳遞 JSON 字串的情況
- 新增
Union[dict, str]型別支援 - 自動偵測並解析 JSON 字串輸入
- 新增
save_reference_by_pmid- 改用save_reference(article=metadata)
0.2.0 - 2025-12-17
- MCP 解耦架構:mdpaper 不再直接依賴 pubmed-search
- 多 MCP 協調模式:Agent 協調 mdpaper + pubmed-search + drawio
- 文獻探索工作區:
start_exploration()/convert_exploration_to_project() - Concept 驗證系統:novelty scoring (3 rounds, 75+ threshold)
- Paper type 支援:original-research, systematic-review, meta-analysis 等
- Python 版本需求升級至 3.11+
- ReferenceManager 重構:接受 article metadata dict 而非 PMID
- 專案結構採用 DDD (Domain-Driven Design)
infrastructure/external/entrez/- 文獻搜尋移至 pubmed-search MCPinfrastructure/external/pubmed/- 同上services/strategy_manager.py- 搜尋策略移至 pubmed-search MCPtools/search/- 搜尋工具改為 facade 委派
0.1.0 - 2025-12-01
- 初始版本
- MCP Server 框架 (FastMCP)
- 46 個 MCP 工具
- Word 匯出功能
- 參考文獻管理
- 草稿撰寫流程