Iter log — 2026-09-14 (PhD journey reshape)

One-pager for the next iteration. Captures what changed, what didn't, what's next. Detailed deliverables live in their respective docs.


What shipped this iteration

1. Multi-dimensional library inclusion standard (the foundation)

Doc: docs/library/inclusion-standard.md Code: astro-src/lib/library/audience-profiles.ts Types: added audienceProfile?: 'novice' | 'expert' | 'reviewer' | 'practitioner' to LibraryDefinition

Four personas, each with:

  • 5–7 weighted axes (sum to 1.0)
  • Default threshold
  • LLM prompt addendum (injected into scorePaperRelevance)
  • Anti-patterns list

Threshold resolution order (new):

opts.threshold > library.definition.relevanceThreshold >
profile.defaultThreshold > 0.5

Verified by: tests/test_library_audience_feedback.mjs (11/11 pass).

2. User feedback collection system

Code: astro-src/lib/library/feedback.ts Events: new dpr:library-feedback event in the 3-file ritual (names/types/bus) Doc: docs/feedback/README.md Calibration log: docs/feedback/library-inclusion-log.md

11 event kinds (library_created/deleted/profile_changed/threshold_changed/ paper_included/excluded/marked_irrelevant/candidate_score_too_low/too_high/ paper_reading_status_changed/feedback_note).

Storage: localStorage['dpr_library_feedback_v1'], FIFO 5000 entries, no PII.

Wired into:

  • user-libraries/store.ts:createLibrary → logs library_created
  • user-libraries/store.ts:updateLibraryDefinition → logs library_profile_changed + library_threshold_changed
  • user-libraries/store.ts:bulkSetPaperStatus → logs paper_included / paper_excluded (with relevanceScore + audienceProfile snapshot)

3. PhD journey docs (the folder reshape)

Additive — didn't move any existing files, all old links still work.

New top-level:

  • docs/onboarding/ — PhD journey map + 4 phase docs + 10-min jump-in
  • docs/research-skills/ — 6 primers (read paper, lit review, experiment design, writing paper, writing review, + TODO writing-rebuttal, reviewer-mindset)
  • docs/library/ — the inclusion standard
  • docs/feedback/ — feedback system + calibration log

Updated:

  • docs/README.md — reorganized as a navigation hub with "按你是谁 / 按主题" two axes

4. Code wiring (the actual integration)

  • astro-src/lib/library/relevance.ts: scorePaperRelevance now accepts audienceProfile, injects addendum into system prompt, parses axes field back out
  • astro-src/scripts/library-ingest.ts: runIngest uses resolveLibraryThreshold; LLM prompt gets profile addendum; new opts.audienceProfile override for testing
  • astro-src/lib/user-libraries/types.ts: new audienceProfile field on LibraryDefinition

What did NOT ship (next iteration candidates)

1. UI surface for audience profile

  • Where: astro-src/components/NewLibraryModal.astro (step 2 after name)
  • What: 4 cards explaining each profile, default threshold shown, sets audienceProfile on LibraryDefinition
  • Effort: low — pure UI, type is already wired

2. UI surface for feedback log

  • Where: astro-src/pages/settings.astro (new section at bottom)
  • What: count-by-kind table, "导出 JSON" button, "清空所有反馈" button
  • Effort: low — feedback.ts already exports the data

3. Radar chart for axes scores

  • Where: candidate review panel in library workbench
  • What: when LLM returns axes, render as a small radar/spider chart per candidate
  • Effort: medium — needs SVG/Canvas component + data wiring

4. Writing rebuttal + reviewer-mindset primers

  • Status: referenced in PhD journey docs but not yet written
  • Effort: low (each ~150 lines, follow the pattern of writing-review.md)

5. Calibration data analysis

  • Where: docs/feedback/library-inclusion-log.md
  • What: when ≥30 user feedback dumps are shared, run the calibration script (sketched in the log)
  • Effort: medium — needs a small script + decision rules

6. Migrate existing user libraries

  • What: when a library is loaded without audienceProfile, suggest one based on statement keyword matching (e.g., "review" → reviewer, "production" → practitioner)
  • Effort: medium — needs keyword taxonomy + UI nudge

Open questions for the user

  1. Default threshold for expert (0.75) — too strict? It excludes a lot of useful mid-tier papers. Maybe 0.65 default for expert?
  2. Should feedback.ts automatically export on every N entries? Could be opt-in via settings.
  3. PhD journey map — should each phase have a separate /onboarding/phase-N/ page in the live site? Currently docs-only.
  4. The 5 research-skills primers — should they live as in-app /help/ pages or stay as docs? The latter is faster to ship.

File diff summary

docs/
├── README.md                          [modified — new nav hub]
├── library/
│   └── inclusion-standard.md          [new]
├── onboarding/
│   ├── phd-journey.md                 [new]
│   ├── jump-in.md                     [new]
│   ├── phase-1-orientation.md         [new]
│   ├── phase-2-foundation.md          [new]
│   ├── phase-3-depth.md               [new]
│   └── phase-4-contribution.md        [new]
├── research-skills/
│   ├── how-to-read-paper.md           [new]
│   ├── how-to-lit-review.md           [new]
│   ├── experiment-design.md           [new]
│   ├── writing-paper.md               [new]
│   ├── writing-review.md              [new]
│   ├── writing-rebuttal.md            [new — 2026-09-14]
│   └── reviewer-mindset.md            [new — 2026-09-14]
└── feedback/
    ├── README.md                      [new]
    └── library-inclusion-log.md       [new]

astro-src/
├── lib/library/
│   ├── audience-profiles.ts           [new]
│   └── feedback.ts                    [new]
├── lib/events/
│   ├── names.ts                       [modified — new event]
│   ├── types.ts                       [modified — new detail type]
│   └── bus.ts                         [modified — new emit/on]
├── lib/user-libraries/
│   └── types.ts                       [modified — new field]
│   └── store.ts                       [modified — feedback hooks]
├── lib/library/
│   └── relevance.ts                   [modified — profile addendum]
└── scripts/
    └── library-ingest.ts              [modified — uses resolveLibraryThreshold]

tests/
└── test_library_audience_feedback.mjs [new — 11 tests, all pass]

Verification done this iteration

  • ✅ node tests/test_library_audience_feedback.mjs → 11/11 pass
  • ✅ npx astro check → no new errors introduced (only pre-existing libId in library-ingest.ts:281)
  • ✅ Backwards-compatible: audienceProfile is optional; legacy libraries work unchanged
  • ✅ No circular imports: feedback → events → bus; user-libraries → feedback; audience-profiles → nothing

TODO (deferred to next iteration)

  • Wire UI: NewLibraryModal profile picker (done 2026-09-14)
  • Wire UI: settings page feedback log section (done 2026-09-14)
  • Write writing-rebuttal.md + reviewer-mindset.md (done 2026-09-14)
  • Radar chart for axes scores in candidate review
  • Calibration data analysis (needs ≥30 user feedback dumps)
  • Migrate existing user libraries to audienceProfile (keyword taxonomy + UI nudge)
  • Commit this iteration's changes (current branch: main, changes uncommitted)