mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
feat(skills): add /pf-log-reading and /pf-log-session slash commands
This commit is contained in:
parent
99ab29bc75
commit
babfe06bc3
2 changed files with 87 additions and 0 deletions
33
paperforge/command_files/pf-log-reading.md
Normal file
33
paperforge/command_files/pf-log-reading.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# /pf-log-reading — Record a reading note
|
||||
|
||||
> 读完当前段落或章节后自动记录到 paperforge.db 的 paper_events 表。
|
||||
|
||||
## Agent Workflow
|
||||
|
||||
1. 确定 zotero_key (从上下文或 formal note 中获取)
|
||||
2. 提取以下信息:
|
||||
- **section**: 文献中的位置 (e.g. "Discussion P12", "Results Fig.3")
|
||||
- **excerpt**: 逐字引用的原文关键句
|
||||
- **usage**: 这个信息支持当前写作的哪个论点
|
||||
- **note**: 任何交叉验证/矛盾/注意事项 (optional)
|
||||
|
||||
3. 执行:
|
||||
```bash
|
||||
paperforge reading-log --write <KEY> \
|
||||
--section "Discussion P12" \
|
||||
--excerpt "the fundamental disjunction between materials science and biology" \
|
||||
--usage "F 段 gap 论点" \
|
||||
--note "与 DDGMQ7RW 独立诊断同一问题"
|
||||
```
|
||||
|
||||
## Prompt Injection
|
||||
|
||||
After reading a section or paragraph from a paper:
|
||||
|
||||
**Record a reading note.** Determine the zotero_key of the paper you just read. Extract the section name (e.g. "Discussion P12", "Results Fig.3"), a verbatim excerpt of the key sentence, how this supports the current writing task, and any cross-validation notes. Then run:
|
||||
|
||||
```
|
||||
paperforge --vault {vault_path} reading-log --write KEY --section "..." --excerpt "..." --usage "..." --note "..."
|
||||
```
|
||||
|
||||
If the user's vault path is unknown, ask before running.
|
||||
54
paperforge/command_files/pf-log-session.md
Normal file
54
paperforge/command_files/pf-log-session.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# /pf-log-session — Summarize session decisions to working-log
|
||||
|
||||
> 会话结束时回顾本次所有决策节点,追加到 working-log.md。
|
||||
|
||||
## Agent Workflow
|
||||
|
||||
1. 回顾本次会话中所有关键节点:
|
||||
- 用户纠正了什么
|
||||
- 方案怎么变的
|
||||
- 有什么弯路和教训
|
||||
- 可复用的方法论
|
||||
|
||||
2. 按以下格式生成 markdown,追加到 working-log.md:
|
||||
|
||||
```markdown
|
||||
## <YYYY-MM-DD> — <小节名>
|
||||
|
||||
### 核心决策
|
||||
- 做了什么、为什么
|
||||
|
||||
### 弯路与修正
|
||||
- 错误方向 → 用户纠正 → 最终方案
|
||||
|
||||
### 可复用方法论
|
||||
- 本段的 pattern,后续段落能怎么用
|
||||
|
||||
### 待办
|
||||
- [ ] ...
|
||||
```
|
||||
|
||||
3. 询问用户确认,然后写入到 `Project/<project>/working-log.md`
|
||||
|
||||
## Prompt Injection
|
||||
|
||||
At the end of this session, before saying goodbye:
|
||||
|
||||
**Write the working-log entry.** Review all decision points, corrections, dead ends, and methodological insights from this session. Ask the user: "Should I write the working-log entry now?" If yes, generate the entry in the format below and append it to the appropriate working-log.md in the user's project directory. Ask the user to confirm the project path if unsure.
|
||||
|
||||
Format:
|
||||
```
|
||||
## YYYY-MM-DD — Section Name
|
||||
|
||||
### Core Decisions
|
||||
- What happened and why
|
||||
|
||||
### Dead Ends & Corrections
|
||||
- Wrong direction -> User correction -> Final approach
|
||||
|
||||
### Reusable Methodology
|
||||
- Patterns that apply to later sections
|
||||
|
||||
### TODO
|
||||
- [ ] ...
|
||||
```
|
||||
Loading…
Reference in a new issue