Commit graph

473 commits

Author SHA1 Message Date
Research Assistant
c601cdc250 fix: move Zotero data auto-detection before junction creation
Auto-detection was running in Phase 3, after the junction
creation block in Phase 2 had already been skipped.
2026-05-07 22:25:04 +08:00
Research Assistant
63a6cfb539 fix: use file.ext instead of file.extension in Base view filters (Obsidian syntax) 2026-05-07 22:23:07 +08:00
Research Assistant
1275a34ed1 docs: add v1.4.17rc1 changelog entry 2026-05-07 22:13:41 +08:00
Research Assistant
95563e1492 docs: update README Python requirement to 3.10+, remove textual from acknowledgments 2026-05-07 22:13:00 +08:00
Research Assistant
315abdcc3a chore: bump version to 1.4.17rc1 2026-05-07 21:54:35 +08:00
Research Assistant
5f2941bf56 merge: milestone/v1.6-ai-ready-asset-foundation into master
Consolidates v1.6 through v1.11 milestone work with merge-gate remediation:
- v1.6: AI-ready literature asset foundation
- v1.7: Context-aware dashboard
- v1.8: AI discussion & deep-reading dashboard
- v1.9: Frontmatter rationalization & library-record deprecation
- v1.10: Dependency cleanup
- v1.11: Merge gate — index path resolution, library-records cleanup,
         TUI removal, module hardening, repair blind spots,
         upgrade migration safeguards, index path integrity
2026-05-07 21:54:00 +08:00
Research Assistant
76df98a63d docs(merge-gate): update planning state, roadmap, and agent documentation for milestone completion 2026-05-07 21:52:31 +08:00
Research Assistant
7eeaebdd81 test(merge-gate): add upgrade migration and index path integrity tests
- test OCR state machine: isolate runtime (no ambient tokens), fix retry exhaustion and full cycle tests
- test migration: verify no-index flat note migration, legacy flag promotion including false overrides
- test migration: verify non-canonical filename migration via frontmatter title
- test migration: verify already-migrated workspace reconciliation from legacy records
- test asset_index: verify fulltext/deep-reading paths only advertised when files exist
2026-05-07 21:52:16 +08:00
Research Assistant
e742df7888 fix(merge-gate): upgrade migration safeguards, index path integrity, and Python version alignment
- migrate_to_workspace: preserve legacy flat notes even without canonical index
- migrate_to_workspace: reconcile legacy library-record do_ocr/analyze flags including false overrides
- migrate_to_workspace: handle non-canonical legacy filenames via frontmatter title
- asset_index: only advertise fulltext_path/deep_reading_path when files exist
- asset_index: prefer note frontmatter over legacy library-records, fall back to legacy
- setup_wizard: require Python >=3.10 instead of >=3.8
- plugin main.js: align Python version messaging to 3.10+
- ocr.py: auto_analyze_after_ocr reads from formal note paths, not library-records
2026-05-07 21:51:58 +08:00
Research Assistant
4aa3216201 docs(50-repair-blind-spots): complete phase 50 - add summary, verification, state update 2026-05-07 20:22:31 +08:00
Research Assistant
76632a56e5 fix(50-repair-blind-spots): replace bare except:pass + add --fix else clause (REPAIR-02/03)
- Replaced 5 bare except Exception: pass blocks with logger.warning() calls
  (4 per plan at lines 223, 306, 347, 355 + 1 auto-detected at line 315 via Rule 2)
- Added else clause printing [WARNING] for unhandled --fix divergence types
- Added 6 new tests: 4 caplog tests for logger.warning, 1 capsys test for [WARNING],
  1 index load failure test
- All 37 repair tests pass
2026-05-07 20:20:25 +08:00
Research Assistant
f2198041ed fix(50-repair-blind-spots): repair condition 4 detection + dead code removal (REPAIR-01/04)
- Removed dead import of load_domain_config and orphaned dict comprehension
- Replaced note_ocr_status != pending guard with combined logic catching note=pending vs meta=done/failed
- Added 5 new tests (3 for condition 4 detection, 2 for dead code verification)
2026-05-07 20:16:38 +08:00
Research Assistant
1315bbdde1 docs(49-module-hardening): complete phase 49 — add summary, verification, state update 2026-05-07 20:07:58 +08:00
Research Assistant
377c8c7b44 feat(49-module-hardening): asset_state.py + status.py hardening — reorder checks, empty dicts
- HARDEN-06: Reorder next_step checks so workspace integrity (note_path, workspace_paths) comes before /pf-deep recommendation
- HARDEN-07: Initialize lifecycle_level_counts, health_aggregate, maturity_distribution as {} (not None) in status.py
- Update tests: 2 new test methods, 1 updated existing test, 1 updated assertion
2026-05-07 20:06:24 +08:00
Research Assistant
53ad7ac74c feat(49-module-hardening): main.js hardening — env-based API key, createEl() DOM
- HARDEN-04: Pass PADDLEOCR_API_TOKEN via env var instead of CLI --paddleocr-key
- HARDEN-05: Replace innerHTML with createEl() DOM API for directory tree rendering
2026-05-07 20:06:21 +08:00
Research Assistant
284f074389 feat(49-module-hardening): discussion.py hardening — UTC timestamps, MD escaping, file locking
- Replace CST (UTC+8) with UTC timezone using timezone.utc
- Add _escape_md() helper to escape markdown special chars in QA fields
- Wrap JSON+MD read-modify-write in filelock.FileLock with 10s timeout
- Add 5 new tests: UTC timestamp, MD escaping, CJK escaping, lock release, lock timeout
2026-05-07 20:06:16 +08:00
Research Assistant
39bdcd8650 docs(49-module-hardening): create 3 wave-1 plans covering all 7 HARDEN requirements 2026-05-07 19:56:48 +08:00
Research Assistant
3331676c5d chore(48-textual-tui-removal): update ROADMAP.md, add per-plan summary aliases 2026-05-07 19:46:16 +08:00
Research Assistant
74ff9286df docs(48-textual-tui-removal): complete phase 48 — add summary, verification, state update
- Add 48-SUMMARY.md with full execution report
- Add 48-VERIFICATION.md with all success criteria verified
- Add deferred-items.md for 2 pre-existing OCR test failures
- Update STATE.md for phase completion
2026-05-07 19:45:26 +08:00
Research Assistant
8447867f88 docs(48-textual-tui-removal): update docs for headless-only setup
- Replace all bare 'paperforge setup' with 'paperforge setup --headless'
- Rewrite Section 3 of setup-guide.md to describe headless-only workflow
- Update command reference table at Section 7.1 to use --headless
- Update INSTALLATION.md setup command and Better BibTeX section
2026-05-07 19:42:45 +08:00
Research Assistant
68e888a010 feat(48-textual-tui-removal): update CLI help and remove textual dependency
- Update setup parser help text (remove 'Textual-based' reference)
- Remove textual>=0.47.0 from pyproject.toml dependencies
- Remove textual from scripts/validate_setup.py required dict
2026-05-07 19:41:51 +08:00
Research Assistant
37b527586c feat(48-textual-tui-removal): remove Textual TUI code from setup_wizard.py
- Remove all 'from textual' imports (BLOCK A)
- Remove all TUI step classes, custom messages, and SetupWizardApp (BLOCK B)
- Replace main() with help-message redirecting to --headless (BLOCK C)
- Preserve: headless_setup(), EnvChecker, AGENT_CONFIGS, _find_vault, _copy_file_incremental, _merge_env_incremental
- All preserved items verified importable and functional
2026-05-07 19:41:10 +08:00
Research Assistant
01d48134cc docs(47-library-records): add SUMMARY, VERIFICATION, state updates for completed phase 2026-05-07 19:25:04 +08:00
Research Assistant
901e8cceb6 test(47-library-records): update ld_deep tests for removed records key
- Removed 'records' from expected keys in test_paperforge_paths_returns_expected_keys
- Removed 'records' assertion in test_paperforge_paths_values_match_shared_resolver
- Updated docstrings to reflect that _paperforge_paths no longer returns records key
2026-05-07 19:22:51 +08:00
Research Assistant
d676017fe9 docs(47-library-records): purge library-records from all 10 command file copies
- command/pf-sync.md: removed two-phase workflow, library-records output references
- command/pf-ocr.md: replaced library-records with formal-notes workflow references
- command/pf-status.md: removed library-records path and count from output
- command/pf-paper.md: removed library-record prerequisite reference
- command/pf-deep.md: replaced library-record with formal-note frontmatter references
- paperforge/command_files/*: identical changes to mirror copies
2026-05-07 19:21:19 +08:00
Research Assistant
5ff4f19f3f docs(47-library-records): update setup_wizard.py post-install to single-command workflow
- Removed two-phase --selection/--index code block
- Describes single paperforge sync workflow
- No library-records references in post-install text
2026-05-07 19:18:31 +08:00
Research Assistant
15b6637899 fix(47-library-records): remove dead parse_existing_library_record and fix hardcoded Literature/ docstrings
- Removed dead parse_existing_library_record() function (no callers)
- Removed dead record_path construction and function call from run_selection_sync()
- migrate_to_workspace() docstring uses <literature_dir>/ variable references
- Print label uses generic 'literature' instead of hardcoded 'Literature/'
2026-05-07 19:17:26 +08:00
Research Assistant
2970e2706e fix(47-library-records): purge stale-records references from status.py, repair.py, ld_deep.py, discussion.py
- status.py: stale-record detection now scans control dir (not library-records)
- status.py: output label changed from library_records to formal_notes
- repair.py: docstring reads 'Scan formal literature notes'
- ld_deep.py: removed unused 'records' key from _paperforge_paths return dict
- discussion.py: docstring uses {literature_dir}/ variable reference instead of hardcoded Literature/
2026-05-07 19:16:44 +08:00
Research Assistant
608392cfb4 docs(47-library-records-deprecation-cleanup): create phase plans (2 plans, 4 tasks) 2026-05-07 19:13:58 +08:00
Research Assistant
c3455451ce docs(46-index-path-resolution): complete Phase 46 execution summary and state updates
- Create 46-SUMMARY.md with detailed execution report
- Create 46-VERIFICATION.md with automated verification results
- Create 46-deferred-items.md for pre-existing OCR test failures
- Update STATE.md: phase complete, progress at 20%
- Update ROADMAP.md: Phase 46 marked complete
2026-05-07 19:05:28 +08:00
Research Assistant
a9c5534bfa fix(46-index-path-resolution): update tests for removed LIBRARY_RECORDS and config-resolved paths
- test_base_views.py: Replace LIBRARY_RECORDS placeholder tests with LITERATURE/CONTROL_DIR
- test_migration.py: Use config-resolved lit_rel instead of hardcoded 'Literature/' prefix
2026-05-07 19:03:04 +08:00
Research Assistant
3e8817efef fix(46-index-path-resolution): remove unnecessary Windows backslash replace in discussion.py (PATH-06)
- ai_path_str from canonical index already uses forward slashes (per PATH-01)
- pathlib.Path on Windows handles forward slashes natively
- os.name conditional and replace('/','\\') were unnecessary noise
2026-05-07 19:01:01 +08:00
Research Assistant
e050a1de49 fix(46-index-path-resolution): remove orphan LIBRARY_RECORDS placeholder from base_views.py (PATH-05)
- No shipping .base template references this token; the substitution was dead code
- LITERATURE and CONTROL_DIR substitutions preserved
2026-05-07 19:00:57 +08:00
Research Assistant
98daf1e779 fix(46-index-path-resolution): fix config env var typo, library_records path, and CONFIG_PATH_KEYS (PATH-02, PATH-03, PATH-04)
- PATH-03: Fix env var name from paperforgeRATURE_DIR to PAPERFORGE_LITERATURE_DIR
- PATH-02: library_records now returns control / 'library-records' matching its docstring
- PATH-04: Add skill_dir and command_dir to CONFIG_PATH_KEYS for migration coverage
- Update test_config.py assertion to use corrected env var name
2026-05-07 19:00:04 +08:00
Research Assistant
d529726334 fix(46-index-path-resolution): replace 5 hardcoded Literature/ paths with config-resolved relative paths (PATH-01)
- paper_root, main_note_path, fulltext_path, deep_reading_path, ai_path
  now use workspace_dir.relative_to(vault) instead of f'Literature/...'
- Forward-slash normalized with .replace('\\\\', '/') for Windows portability
2026-05-07 18:58:42 +08:00
Research Assistant
97619d374d chore: complete v1.8 milestone + fix discussion tests
v1.8 (Phases 31-36): deep-reading mode detection + rendering,
AI discussion recorder, bug fixes, integration verification, jump button
v1.9 (Phases 37-41): frontmatter rationalization, workspace stabilization,
Base view fix, library-record deprecation, plugin dashboard sync

Test fixes: discussion.py _find_paper_metadata uses paperforge_paths
index resolution; test fixtures create canonical index
2026-05-07 10:20:16 +08:00
Research Assistant
db042cd6dd chore: complete v1.9 Frontmatter Rationalization & Library-Record Deprecation
Milestone v1.9 — 5 phases, 28 requirements, 188 tests passing.

Key changes:
- Frontmatter rationalization: slimmed formal note frontmatter (28→16 fields), created per-workspace paper-meta.json
- Library-record deprecation: removed library_record_markdown(), sync no longer creates library-records
- Workspace stabilization: unconditional workspace creation, fulltext bridge, discussion.py reads canonical index
- Base view fix: removed ghost lifecycle fields, restored workflow flags, Literature/ folder filter
- Plugin sync: version badge reads paperforge_version from index envelope

Archived: .planning/milestones/v1.9-ROADMAP.md, .planning/milestones/v1.9-REQUIREMENTS.md
2026-05-07 10:11:42 +08:00
Research Assistant
969a89f4af docs(35-01): complete AI Discussion Recorder plan 2026-05-06 23:30:52 +08:00
Research Assistant
9f89548929 chore(35-01): remove temp verification script 2026-05-06 23:28:44 +08:00
Research Assistant
fce6c4de68 feat(35-01): update pf-paper.md with discussion recording step
- Add step 8 (保存讨论记录) with Q&A accumulation and CLI invocation
- Add prerequisite check for discussion.py module
- Add output mention of automatic recording
- Per D-05: explicitly exclude pf-deep from recording
2026-05-06 23:28:34 +08:00
Research Assistant
fa47b416ba feat(35-01): implement record_session() with atomic append-only writes
- record_session() creates ai/discussion.json (canonical) and ai/discussion.md (human-readable)
- Atomic writes via tempfile.NamedTemporaryFile + os.replace() for both files
- Append-only: reading existing sessions, appending new, writing back
- Paper lookup via library-records frontmatter scanning with rglob
- CLI subcommand: python -m paperforge.worker.discussion record
- CJK support via ensure_ascii=False, utf-8 encoding
- stdlib only (json, pathlib, datetime, tempfile, os, uuid, argparse, sys, re, logging)
2026-05-06 23:26:31 +08:00
Research Assistant
cff049682f test(35-01): add failing tests for discussion recorder
- 7 tests covering record_session() creation, append, error handling, CJK encoding, atomic writes, and CLI invocation
2026-05-06 23:26:20 +08:00
Research Assistant
11a5a2b1dd fix: add root manifest.json to version bump/sync tooling 2026-05-06 23:03:38 +08:00
Research Assistant
ddeb0cfea2 fix: validate setup_complete against paperforge.json; broaden BBT detection with recursive scan 2026-05-06 22:47:21 +08:00
Research Assistant
29edb2d811 fix: overhaul install flow clarity and non-destructive incremental setup
- Move Better BibTeX auto-export to post-install step (exports dir created by setup)
- Clarify wizard overview: show resources_dir/literature_dir/control_dir hierarchy
- Fix post-install flow order: BBT export → enable plugin → dashboard → sync
- Split do_ocr and analyze marks into separate steps (OCR before deep-reading)
- Mark all literature flags via Base views, not manual file editing
- Make installer incremental: preserve existing files, only create missing ones
- Remove destructive junction/link deletion in TUI wizard
- Merge .env instead of overwriting; skip overwrite for AGENTS.md, docs, plugin
- Update TUI, headless, and plugin completion output to match corrected flow
- Add regression test for non-destructive setup behavior
2026-05-06 22:47:07 +08:00
Research Assistant
1d52d94445 fix: plugin pip bootstrap install and setup_cli non-fatal; add regression tests 2026-05-06 22:46:56 +08:00
Research Assistant
f8fccf70de fix: support pip-installed setup asset deployment and optional AGENTS guide 2026-05-06 22:46:06 +08:00
Research Assistant
d1e8090c21 fix: honor user-provided zotero path in setup informational checks 2026-05-06 22:45:23 +08:00
Research Assistant
c926b734c0 fix: unify setup wizard version output with package __version__ 2026-05-06 22:44:53 +08:00
Research Assistant
f47df7b8c2 chore: merge pyproject.toml packaging fix and upstream setup_wizard tests from release/v1.6-core-slice 2026-05-06 22:23:06 +08:00