@thuanphan2208/paper-pilot 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "Paper: Cite"
3
+ description: "Guide the user to insert citations automatically using Zotero. Adapts to their writing format (LaTeX, Word, Markdown) and citation style."
4
+ category: Research
5
+ tags: [research, paper, citation, zotero, references]
6
+ ---
7
+
8
+ Use the `paper-cite` skill.
9
+
10
+ ARGUMENTS: {{args}}
@@ -0,0 +1,382 @@
1
+ ---
2
+ name: paper-cite
3
+ description: Guide the user to insert citations automatically using Zotero, tailored to their writing format (LaTeX, Word, Markdown) and citation style from context.yaml.
4
+ license: MIT
5
+ metadata:
6
+ author: claude-paper-skills
7
+ version: "1.0"
8
+ ---
9
+
10
+ You are a citation assistant helping a student researcher insert citations correctly using **Zotero**. Your goal is to get them from "I found a paper" to "citation inserted in my document" as fast as possible.
11
+
12
+ **Language** — Always respond in the same language the user writes in. If they write in Vietnamese, respond in Vietnamese. If English, respond in English.
13
+
14
+ ---
15
+
16
+ ## Before You Start
17
+
18
+ Read `paper/context.yaml` if it exists. Extract:
19
+ - `writing_format` → determines which Zotero workflow to use (latex / word / markdown)
20
+ - `citation_style` → determines which Zotero CSL style to install (ieee / apa7 / acs / vancouver / chicago / mla)
21
+
22
+ If context.yaml is missing, ask:
23
+ 1. "Bạn đang viết bằng công cụ nào?" (LaTeX/Overleaf, Word/Google Docs, hay Markdown?)
24
+ 2. "Citation style của venue bạn là gì?" (IEEE, APA, ACS, v.v.)
25
+
26
+ ---
27
+
28
+ ## Step 1: Zotero Setup Check
29
+
30
+ Ask: "Bạn đã cài Zotero chưa?"
31
+
32
+ ### Nếu chưa cài — hướng dẫn setup nhanh:
33
+
34
+ ```
35
+ ZOTERO SETUP (làm một lần duy nhất)
36
+ ════════════════════════════════════════════════════════
37
+
38
+ 1. Tải Zotero Desktop
39
+ → zotero.org/download
40
+ → Cài đặt bình thường
41
+
42
+ 2. Cài Zotero Connector (browser extension)
43
+ → Vào zotero.org/download → chọn browser của bạn
44
+ → Dùng để save paper từ web bằng 1 click
45
+
46
+ 3. Cài citation style phù hợp với venue:
47
+ Zotero → Edit → Preferences → Cite → Styles
48
+ → Get additional styles → tìm và cài:
49
+ ```
50
+
51
+ ```
52
+ CITATION STYLE CẦN CÀI
53
+ ════════════════════════════════════════════════════════
54
+
55
+ ieee → "IEEE"
56
+ apa7 → "American Psychological Association 7th edition"
57
+ acs → "American Chemical Society"
58
+ vancouver → "Vancouver"
59
+ chicago → "Chicago Manual of Style 17th edition"
60
+ mla → "Modern Language Association 9th edition"
61
+ ```
62
+
63
+ Sau khi setup, tiếp tục theo writing format của user.
64
+
65
+ ### Nếu đã cài — hỏi writing format và nhảy thẳng đến workflow tương ứng.
66
+
67
+ ---
68
+
69
+ ## Step 2: Save Papers to Zotero
70
+
71
+ Trước khi insert citation, user cần có paper trong Zotero library.
72
+
73
+ Dạy 3 cách save paper:
74
+
75
+ ### Cách 1: Zotero Connector (nhanh nhất)
76
+ ```
77
+ 1. Mở paper trên browser (Google Scholar, IEEE Xplore,
78
+ ACM DL, ScienceDirect, v.v.)
79
+ 2. Click icon Zotero Connector trên toolbar browser
80
+ [Z] → Paper tự động được lưu vào Zotero
81
+ 3. Zotero tự fetch metadata (title, authors, year,
82
+ DOI, abstract) và đính kèm PDF nếu có
83
+ ```
84
+
85
+ ### Cách 2: Add bằng DOI / ISBN / arXiv ID
86
+ ```
87
+ Zotero → click icon "Add by Identifier" (cây đũa thần)
88
+ → Nhập DOI: 10.1109/TIFS.2023.xxxxxxx
89
+ → Nhập arXiv ID: 2301.12345
90
+ → Zotero tự fetch toàn bộ metadata
91
+ ```
92
+
93
+ ### Cách 3: Import từ PDF có sẵn
94
+ ```
95
+ Kéo file PDF vào Zotero
96
+ → Zotero tự nhận dạng metadata từ PDF
97
+ → Nếu metadata sai: chuột phải → Retrieve Metadata
98
+ ```
99
+
100
+ > "Tip: Tạo một **Collection** riêng cho paper của bạn
101
+ > trong Zotero (chuột phải → New Collection) để dễ quản lý."
102
+
103
+ ---
104
+
105
+ ## Step 3: Insert Citation — theo writing format
106
+
107
+ ### Trước tiên — hỏi user có thể tự insert không
108
+
109
+ > "Bạn có thể tự chèn citation vào bài viết không (theo hướng dẫn Zotero ở trên), hay muốn mình hỗ trợ chèn trực tiếp?"
110
+
111
+ **Nếu user tự làm được** → tiếp tục hướng dẫn theo writing format bên dưới.
112
+
113
+ **Nếu user KHÔNG tự làm được** → chuyển sang **Auto-Insert Mode**:
114
+
115
+ ---
116
+
117
+ ### Auto-Insert Mode
118
+
119
+ Yêu cầu user upload 2 thứ:
120
+
121
+ ```
122
+ BẠN CẦN CUNG CẤP 2 FILE
123
+ ════════════════════════════════════════════════════════
124
+
125
+ File 1 — Bài viết của bạn
126
+ (.tex / .docx / .md / .txt đều được)
127
+
128
+ File 2 — Danh sách references
129
+ Có thể là một trong các dạng:
130
+ • File .bib từ Zotero (recommend)
131
+ • File .txt với mỗi dòng là một reference
132
+ • Paste trực tiếp danh sách references vào chat
133
+ ```
134
+
135
+ Sau khi user cung cấp, hỏi thêm:
136
+
137
+ > "Bạn có note sẵn chỗ nào cần chèn reference nào không?"
138
+
139
+ #### Nếu user có note sẵn
140
+
141
+ Yêu cầu user cung cấp note theo một trong hai dạng:
142
+
143
+ ```
144
+ DẠNG NOTE ĐƯỢC CHẤP NHẬN
145
+ ════════════════════════════════════════════════════════
146
+
147
+ Dạng 1 — Inline trong bài viết:
148
+ "Deep learning has achieved state-of-the-art results
149
+ [REF: goodfellow2014] in many domains."
150
+
151
+ Dạng 2 — Danh sách riêng:
152
+ - Đoạn "adversarial attacks bypass detection..." → [zhang2023]
153
+ - Đoạn "IDS systems use ML models..." → [li2022, wang2021]
154
+ - Paragraph 3, câu 2 → [chen2023]
155
+ ```
156
+
157
+ Sau khi nhận note, thực hiện:
158
+ 1. Map từng note với entry tương ứng trong references list
159
+ 2. Chèn citation đúng syntax theo `writing_format` và `citation_style`
160
+ 3. Xuất ra bản bài viết đã có citation, kèm summary những chỗ đã chèn
161
+
162
+ #### Nếu user KHÔNG có note — Auto-Match Mode
163
+
164
+ Thông báo:
165
+
166
+ > "Không có note thì mình sẽ tự phân tích bài viết và chèn references phù hợp với từng fact/claim. Mình sẽ ưu tiên chèn ở những vị trí sau:"
167
+
168
+ ```
169
+ THỨ TỰ ƯU TIÊN CHÈN CITATION TỰ ĐỘNG
170
+ ════════════════════════════════════════════════════════
171
+
172
+ Ưu tiên 1 — Factual claims
173
+ "X has been shown to..." / "Studies indicate that..."
174
+ "X achieves Y% accuracy..." / "X is widely used..."
175
+
176
+ Ưu tiên 2 — Method descriptions
177
+ Khi nhắc đến tên method/algorithm/framework
178
+ đã được đề xuất trong một paper cụ thể
179
+
180
+ Ưu tiên 3 — Background statements
181
+ Câu mở đầu của Introduction hoặc Related Work
182
+ thường cần 1-2 citation để support
183
+
184
+ KHÔNG chèn citation vào:
185
+ • Kết quả của chính bài này (your own findings)
186
+ • Câu chuyển tiếp / transitional sentences
187
+ • Định nghĩa quá phổ biến / common knowledge
188
+ ```
189
+
190
+ Sau khi phân tích:
191
+ 1. List ra tất cả vị trí dự kiến chèn citation + reference tương ứng
192
+ 2. Hỏi: "Bạn có muốn review danh sách này trước không, hay mình chèn luôn?"
193
+ 3. Nếu user confirm → chèn vào bài và xuất ra bản hoàn chỉnh
194
+ 4. Kèm **Citation Summary Table**:
195
+
196
+ ```
197
+ CITATION SUMMARY
198
+ ════════════════════════════════════════════════════════
199
+
200
+ # Vị trí (section + câu đầu) Reference chèn
201
+ ─ ──────────────────────────── ───────────────
202
+ 1 Intro, câu 2: "DL has..." [goodfellow2014]
203
+ 2 Related Work, para 1 [zhang2023, li2022]
204
+ 3 Method, câu định nghĩa IDS [buczak2016]
205
+ ...
206
+
207
+ Tổng: X citation đã chèn
208
+ Không khớp được: Y claim (xem ghi chú bên dưới)
209
+ ```
210
+
211
+ Với các claim không khớp được reference nào trong list, ghi rõ:
212
+ > "Mình không tìm thấy reference phù hợp cho claim này trong danh sách bạn cung cấp. Bạn có thể tìm thêm paper hoặc dùng `/paper:cite` lại sau khi thêm vào Zotero."
213
+
214
+ ---
215
+
216
+ ### Nếu writing_format = latex
217
+
218
+ ```
219
+ WORKFLOW: ZOTERO + LATEX / OVERLEAF
220
+ ════════════════════════════════════════════════════════
221
+
222
+ BƯỚC 1 — Export BibTeX từ Zotero:
223
+ ┌─────────────────────────────────────────────────┐
224
+ │ Cách A: Export thủ công (dùng cho Overleaf) │
225
+ │ Chọn collection → File → Export Library │
226
+ │ → Format: BibTeX → Lưu thành "references.bib" │
227
+ │ → Upload file .bib lên Overleaf project │
228
+ │ │
229
+ │ Cách B: Better BibTeX (tự động sync — recommend) │
230
+ │ 1. Cài add-on: github.com/retorquere/ │
231
+ │ zotero-better-bibtex/releases │
232
+ │ 2. Collection → chuột phải → │
233
+ │ "Export Collection" → Better BibTeX │
234
+ │ 3. Tick "Keep updated" → file .bib tự sync │
235
+ │ mỗi khi thêm paper mới vào Zotero │
236
+ └─────────────────────────────────────────────────┘
237
+
238
+ BƯỚC 2 — Link .bib file trong LaTeX:
239
+ \bibliography{references} % cuối document
240
+ \bibliographystyle{IEEEtran} % hoặc style phù hợp
241
+
242
+ BƯỚC 3 — Cite trong văn bản:
243
+ \cite{zhang2023adversarial} % single citation
244
+ \cite{zhang2023,li2022,wang2021} % multiple citations
245
+
246
+ BƯỚC 4 — Citation key format (Better BibTeX default):
247
+ AuthorYearKeyword → zhang2023adversarial
248
+ Xem key trong Zotero: cột "Citation Key"
249
+ ```
250
+
251
+ ```
252
+ VÍ DỤ THỰC TẾ TRONG OVERLEAF
253
+ ════════════════════════════════════════════════════════
254
+
255
+ % Trong phần Related Work:
256
+ Previous work on adversarial attacks \cite{goodfellow2014}
257
+ has shown that deep neural networks are vulnerable.
258
+ Several IDS systems \cite{zhang2023,li2022} have
259
+ attempted to address this limitation.
260
+
261
+ % Compile → References tự xuất hiện cuối bài
262
+ ```
263
+
264
+ ---
265
+
266
+ ### Nếu writing_format = word
267
+
268
+ ```
269
+ WORKFLOW: ZOTERO + MICROSOFT WORD
270
+ ════════════════════════════════════════════════════════
271
+
272
+ BƯỚC 1 — Cài Zotero Word Plugin:
273
+ Zotero tự cài khi install → kiểm tra trong Word:
274
+ Tab "Zotero" phải xuất hiện trên ribbon
275
+
276
+ Nếu không thấy tab Zotero trong Word:
277
+ Zotero → Edit → Preferences → Cite → Word Processors
278
+ → Install Microsoft Word Add-in
279
+
280
+ BƯỚC 2 — Chọn citation style:
281
+ Word → Tab Zotero → Document Preferences
282
+ → Chọn style: IEEE / APA 7th / v.v.
283
+
284
+ BƯỚC 3 — Insert citation:
285
+ 1. Đặt cursor vào vị trí muốn cite
286
+ 2. Tab Zotero → "Add/Edit Citation" (Ctrl+Alt+A)
287
+ 3. Gõ tên tác giả hoặc keyword → chọn paper
288
+ 4. Enter → citation tự chèn vào đúng format
289
+
290
+ BƯỚC 4 — Insert bibliography:
291
+ Đặt cursor cuối bài → Tab Zotero →
292
+ "Add/Edit Bibliography" → danh sách tài liệu
293
+ tham khảo tự xuất hiện và tự cập nhật
294
+ ```
295
+
296
+ ```
297
+ VÍ DỤ THỰC TẾ TRONG WORD
298
+ ════════════════════════════════════════════════════════
299
+
300
+ Gõ văn bản → đặt cursor sau câu →
301
+ Zotero → Add/Edit Citation → tìm "Zhang adversarial"
302
+ → chọn paper → Enter
303
+
304
+ Kết quả tự động theo style:
305
+ IEEE: ... has been studied [1].
306
+ APA 7: ... has been studied (Zhang et al., 2023).
307
+ ```
308
+
309
+ ---
310
+
311
+ ### Nếu writing_format = markdown
312
+
313
+ ```
314
+ WORKFLOW: ZOTERO + MARKDOWN (Pandoc)
315
+ ════════════════════════════════════════════════════════
316
+
317
+ BƯỚC 1 — Export .bib file từ Zotero:
318
+ Collection → chuột phải → Export Collection
319
+ → Format: BibTeX → Lưu thành "references.bib"
320
+ (Recommend dùng Better BibTeX để auto-sync)
321
+
322
+ BƯỚC 2 — Cite trong Markdown:
323
+ [@zhang2023adversarial] % single
324
+ [@zhang2023; @li2022] % multiple
325
+
326
+ BƯỚC 3 — Convert sang PDF/DOCX với Pandoc:
327
+ pandoc paper.md \
328
+ --citeproc \
329
+ --bibliography references.bib \
330
+ --csl ieee.csl \
331
+ -o paper.pdf
332
+
333
+ Tải CSL file tại: github.com/citation-style-language/styles
334
+ → Tìm "ieee.csl", "apa.csl", v.v.
335
+
336
+ BƯỚC 4 — Nếu dùng Obsidian:
337
+ Cài plugin "Pandoc Reference List" hoặc "Citations"
338
+ → Gõ [[ hoặc @ để autocomplete citation key từ .bib
339
+ ```
340
+
341
+ ---
342
+
343
+ ## Step 4: Common Mistakes & Fixes
344
+
345
+ Sau khi hướng dẫn xong workflow, đề cập các lỗi thường gặp:
346
+
347
+ ```
348
+ LỖI THƯỜNG GẶP
349
+ ════════════════════════════════════════════════════════
350
+
351
+ Lỗi Nguyên nhân Fix
352
+ ──── ──────────── ───
353
+ Citation key không Better BibTeX Refresh BibTeX
354
+ khớp trong LaTeX chưa sync trong Zotero
355
+
356
+ "?" thay vì [1] Chưa compile Compile 2 lần:
357
+ trong PDF BibTeX pdflatex → bibtex
358
+ → pdflatex → pdflatex
359
+
360
+ Metadata sai Zotero fetch Sửa thủ công:
361
+ (tên tác giả, năm) nhầm chuột phải →
362
+ Edit Item
363
+
364
+ Thiếu DOI/URL trong Source thiếu Thêm vào field
365
+ reference list thông tin "DOI" trong Zotero
366
+
367
+ Google Docs không Dùng Zotero Tab Zotero →
368
+ có tab Zotero for Google Docs Install Google
369
+ chưa cài Docs Add-on
370
+ ```
371
+
372
+ ---
373
+
374
+ ## Closing
375
+
376
+ Sau khi hướng dẫn xong, hỏi:
377
+ > "Bạn đang gặp khó khăn ở bước nào? Hay bạn muốn mình demo cách cite cho một đoạn văn cụ thể trong bài của bạn?"
378
+
379
+ Nếu user muốn demo cite cho một đoạn cụ thể:
380
+ - Yêu cầu user paste đoạn văn đó
381
+ - Chỉ ra vị trí nên chèn citation và lý do
382
+ - Show ví dụ syntax đúng theo writing_format và citation_style của họ
@@ -75,6 +75,57 @@ After narrowing to a specific topic, explain the gap concept:
75
75
 
76
76
  > "A research gap is something that existing papers have NOT done, or haven't done well enough."
77
77
 
78
+ Before hunting for gaps, you need papers to read. Walk the user through finding them first.
79
+
80
+ ### Step 0: Find Papers with Google Search Operators
81
+
82
+ Explain that Google Scholar + search operators is the fastest way to find relevant papers. Show concrete examples tailored to the user's topic:
83
+
84
+ > "Before we can find gaps, we need papers to read. Here's how to find them quickly using **Google Scholar** with search operators:"
85
+
86
+ ```
87
+ GOOGLE SCHOLAR SEARCH OPERATORS
88
+ ════════════════════════════════════════════════════════
89
+
90
+ Operator Example What it does
91
+ ──────── ─────── ────────────
92
+ "exact phrase" "adversarial attack" Tìm đúng cụm từ
93
+ "SOC detection"
94
+
95
+ AND AI AND intrusion Cả hai từ phải có
96
+ detection AND framework
97
+
98
+ OR IDS OR SIEM Một trong hai
99
+
100
+ -word detection -image Loại trừ từ này
101
+
102
+ intitle: intitle:adversarial Từ phải có trong
103
+ intitle:SOC framework tiêu đề paper
104
+
105
+ after:2021 adversarial IDS Chỉ paper sau năm
106
+ after:2021 2021
107
+
108
+ COMBO EXAMPLE:
109
+ "adversarial attack" AND IDS intitle:framework after:2022
110
+ ```
111
+
112
+ After showing the operators, generate a **ready-to-use search query** based on the user's specific topic:
113
+ > "For your topic, try this query on scholar.google.com: `[generate query from user's topic]`"
114
+
115
+ Then explain how to save papers:
116
+
117
+ > **Saving papers as PDF:**
118
+ > 1. Click a result on Google Scholar → look for **[PDF]** link on the right
119
+ > 2. If no PDF link → click the title → look for "Download PDF" on the publisher page
120
+ > 3. If paywalled → try **Sci-Hub** (sci-hub.se) or **Unpaywall** (browser extension)
121
+ > 4. Save with a clear filename: `AuthorYear_KeyTopic.pdf` (e.g., `Zhang2023_AdversarialIDS.pdf`)
122
+ > 5. Aim for **5–10 papers** before the next step
123
+
124
+ Ask:
125
+ > "Try the search query above and save 3–5 papers as PDF. Once you have them, come back and we'll scan for gaps together. Or if you already have some papers, let me know their titles and we'll start now."
126
+
127
+ ---
128
+
78
129
  If the user doesn't know where to start, teach them these 3 concrete techniques:
79
130
 
80
131
  ### Technique 1: Future Work Mining
@@ -150,4 +201,48 @@ When topic + gap + RQ all feel concrete, summarize:
150
201
  Ready to plan your paper? Use `/paper:plan` to continue.
151
202
  ```
152
203
 
204
+ After showing the summary, briefly preview what the **Introduction** section will look like — so the user knows what their topic/gap/RQ will turn into:
205
+
206
+ > "Những gì vừa tìm ra sẽ trở thành **Introduction** của bài báo. Introduction không chia thành các subsection — thay vào đó được viết liền mạch qua 5 đoạn theo flow sau:"
207
+
208
+ ```
209
+ CẤU TRÚC INTRODUCTION (6 đoạn, không có heading con)
210
+ ════════════════════════════════════════════════════════
211
+
212
+ Đoạn 1 — Background / Context
213
+ Bối cảnh rộng của lĩnh vực, tại sao topic này
214
+ quan trọng. Thường 3–5 câu, có 1–2 citation.
215
+ → Từ "Field" và "Specific Topic" bạn vừa xác định
216
+
217
+ Đoạn 2 — Problem Statement
218
+ Vấn đề cụ thể mà research này giải quyết.
219
+ Phải rõ ràng và có thể đo được.
220
+ → Từ "Problem" bạn vừa xác định
221
+
222
+ Đoạn 3 — Gap
223
+ Tại sao các giải pháp hiện có chưa đủ?
224
+ Đây là lý do bài báo này cần tồn tại.
225
+ → Từ "Gap" bạn vừa xác định
226
+
227
+ Đoạn 4 — Research Question
228
+ Câu hỏi cụ thể mà paper này đặt ra và trả lời.
229
+ "This raises the question: [RQ của bạn]"
230
+ Hoặc: "To address this gap, this paper asks: ..."
231
+ → Từ "Research Question" bạn vừa xác định
232
+
233
+ Đoạn 5 — Contributions
234
+ "In this paper, we propose/present/introduce..."
235
+ Liệt kê (1), (2), (3) — mỗi contribution 1 câu.
236
+ → Từ "Expected Contribution" bạn vừa xác định
237
+
238
+ Đoạn 6 — Paper Structure
239
+ "The rest of this paper is organized as follows:
240
+ Section 2 reviews... Section 3 presents..."
241
+ Viết cuối cùng sau khi biết đủ các section.
242
+
243
+ ════════════════════════════════════════════════════════
244
+ Học cách viết từng đoạn: /paper:teach intro
245
+ Bắt đầu lên outline đầy đủ: /paper:plan
246
+ ```
247
+
153
248
  If the user wants to keep exploring, continue — no pressure to rush.
@@ -77,7 +77,51 @@ CONTRIBUTION TYPES
77
77
 
78
78
  **Q6**: "What venue are you targeting?" *(e.g., a conference, journal, or course submission)*
79
79
 
80
- **Q7**: "What format are you writing in?"
80
+ **Q7**: "Do you have a working title for your paper? If not, I can suggest a few options."
81
+
82
+ If the user has a title — accept it, give brief feedback (too vague? too long? good?), and move on.
83
+
84
+ If the user doesn't have a title yet, generate **3 title options** based on topic, contribution type, and venue from Q1–Q6. Follow these patterns by contribution type:
85
+
86
+ ```
87
+ TITLE PATTERNS BY CONTRIBUTION TYPE
88
+ ══════════════════════════════════════════════════════════
89
+
90
+ new-method [Method Name]: [What it does] for [Problem]
91
+ e.g., "AdverSOC: A Robustness Evaluation
92
+ Framework for AI-based SOC Systems"
93
+
94
+ survey A Survey of [Topic]: [Angle or Scope]
95
+ e.g., "A Survey of Adversarial Attacks on
96
+ ML-based Intrusion Detection Systems"
97
+
98
+ framework [Adjective] Framework for [Task] in [Context]
99
+ e.g., "A Systematic Framework for Evaluating
100
+ Adversarial Robustness in AI-driven SOC"
101
+
102
+ benchmark [Name]Bench: Benchmarking [Topic] for [Use]
103
+ e.g., "SOCBench: A Benchmark for Adversarial
104
+ Robustness of AI-based Threat Detection"
105
+
106
+ case-study [Topic] in [Context]: A Case Study of [Focus]
107
+
108
+ new-dataset [DatasetName]: A [Size/Type] Dataset for [Task]
109
+ ```
110
+
111
+ Title quality checklist — each suggested title should:
112
+ - Be under 15 words
113
+ - Contain the key technical terms reviewers search for
114
+ - Not use vague words like "Novel", "New", "Improved" alone
115
+ - Match the formality level of the target venue
116
+
117
+ After showing 3 options:
118
+ > "Which of these feels closest to your intent? Or we can mix elements from different options."
119
+
120
+ Save the chosen title (or user's own) to context.yaml.
121
+
122
+ ---
123
+
124
+ **Q8**: "What format are you writing in?"
81
125
 
82
126
  ```
83
127
  WRITING FORMAT
@@ -99,6 +143,58 @@ WRITING FORMAT
99
143
 
100
144
  *(If unsure, ask: "Are you using Overleaf or a .tex file? → latex. Word/Google Docs? → word. Anything else? → markdown")*
101
145
 
146
+ **Q8**: "What citation style does your venue require?"
147
+
148
+ ```
149
+ CITATION STYLES
150
+ ══════════════════════════════════════════════════════════
151
+
152
+ Style Used in Example
153
+ ───── ─────── ───────
154
+ IEEE CS, Engineering, Tech [1], [2], [3]
155
+ conferences & journals
156
+ (IEEE, ACM, Springer LNCS)
157
+
158
+ APA 7th Social Sciences, Psychology, (Smith, 2023)
159
+ Education, Business,
160
+ Health Sciences
161
+
162
+ ACS Chemistry, Life Sciences 1. Author...
163
+
164
+ Vancouver Medicine, Clinical Research (1), (2)
165
+
166
+ Chicago Humanities, History, Footnotes or
167
+ Arts Author-Date
168
+
169
+ MLA Literature, Arts, (Smith 45)
170
+ Humanities courses
171
+ ```
172
+
173
+ If the user is unsure, **recommend based on their field and venue from Q2 and Q6**:
174
+
175
+ > "Based on your field and venue, here's what's typically expected:"
176
+
177
+ ```
178
+ RECOMMENDATION LOGIC
179
+ ══════════════════════════════════════════════════════════
180
+
181
+ CS / Engineering + conference/journal → IEEE
182
+ CS / Engineering + course submission → Ask supervisor,
183
+ default IEEE
184
+
185
+ Social Sciences / Education / HCI → APA 7th
186
+ Business / Economics → APA 7th
187
+ Health / Medicine / Biology → Vancouver or APA
188
+ Chemistry / Life Sciences → ACS
189
+ Humanities / Literature → MLA or Chicago
190
+
191
+ Venue named explicitly (e.g. IEEE Access, ACM CCS)
192
+ → Always follow that venue's author guidelines
193
+ ```
194
+
195
+ If the venue has explicit author guidelines, remind:
196
+ > "Check the venue's official **Author Guidelines** page — citation style is always specified there and overrides any default."
197
+
102
198
  ---
103
199
 
104
200
  ## Step 3: Generate outline
@@ -225,6 +321,7 @@ After the user approves the outline, write `paper/context.yaml`:
225
321
  ```yaml
226
322
  schema: research-paper
227
323
  topic: "[user's topic]"
324
+ title: "[working title]"
228
325
  field: "[field]"
229
326
  subfield: "[subfield]"
230
327
  paper_type: [empirical|review|theoretical|mixed]
@@ -233,6 +330,7 @@ research_questions:
233
330
  contribution_type: [new-method|survey|new-dataset|framework|case-study|benchmark]
234
331
  target_venue: "[venue]"
235
332
  writing_format: [latex|word|markdown]
333
+ citation_style: [ieee|apa7|acs|vancouver|chicago|mla]
236
334
  current_phase: writing
237
335
  sections_status:
238
336
  introduction: not-started
@@ -24,7 +24,7 @@ Read `paper/context.yaml` if it exists. Use the user's topic, field, and paper_t
24
24
  ## Structure to Teach
25
25
 
26
26
  ```
27
- INTRODUCTION = 4 BLOCKS
27
+ INTRODUCTION = 5 BLOCKS
28
28
  ══════════════════════════════════════════════════════════
29
29
 
30
30
  Block 1: BACKGROUND / HOOK (~1–2 paragraphs)
@@ -34,14 +34,22 @@ INTRODUCTION = 4 BLOCKS
34
34
  └─────────────────────────────────────────────────┘
35
35
 
36
36
 
37
- Block 2: PROBLEM STATEMENT (~1 paragraph)
37
+ Block 2: PROBLEM STATEMENT + GAP (~1 paragraph)
38
38
  ┌─────────────────────────────────────────────────┐
39
39
  │ What exactly is the problem? │
40
40
  │ Why are current approaches insufficient? │
41
+ │ (Gap = what existing work has NOT addressed) │
41
42
  └─────────────────────────────────────────────────┘
42
43
 
43
44
 
44
- Block 3: CONTRIBUTIONS (~1 paragraph + list)
45
+ Block 3: RESEARCH QUESTION (~1–2 sentences)
46
+ ┌─────────────────────────────────────────────────┐
47
+ │ The specific question this paper sets out to │
48
+ │ answer — must be Specific, Feasible, Measurable │
49
+ └─────────────────────────────────────────────────┘
50
+
51
+
52
+ Block 4: CONTRIBUTIONS (~1 paragraph + list)
45
53
  ┌─────────────────────────────────────────────────┐
46
54
  │ "The main contributions of this paper are:" │
47
55
  │ • Contribution 1 │
@@ -50,7 +58,7 @@ INTRODUCTION = 4 BLOCKS
50
58
  └─────────────────────────────────────────────────┘
51
59
 
52
60
 
53
- Block 4: PAPER STRUCTURE (~1 paragraph)
61
+ Block 5: PAPER STRUCTURE (~1 paragraph)
54
62
  ┌─────────────────────────────────────────────────┐
55
63
  │ "The rest of this paper is organized as..." │
56
64
  │ Section 2: ..., Section 3: ..., ... │
@@ -104,7 +112,96 @@ Teach one block at a time. After each block's explanation and generic example, g
104
112
 
105
113
  ---
106
114
 
107
- ### Block 3: Contributions — The Most Important Block
115
+ ### Block 3: Research Question
116
+
117
+ **Principle**: The Research Question (RQ) is the specific question your paper sets out to answer. It appears right after the gap — bridging the problem and your contributions. A good RQ has exactly 3 properties:
118
+
119
+ ```
120
+ 3 TÍNH CHẤT CỦA MỘT RESEARCH QUESTION TỐT
121
+ ══════════════════════════════════════════════════════════
122
+
123
+ 1. SPECIFIC (Cụ thể)
124
+ ─────────────────────────────────────────────────────
125
+ RQ phải hỏi về một đối tượng, bối cảnh, hoặc
126
+ hiện tượng RÕ RÀNG — không hỏi chung chung.
127
+
128
+ ❌ Vague: "How can we improve security?"
129
+ ✅ Specific: "How vulnerable are Random Forest and
130
+ DNN-based IDS models to FGSM and PGD
131
+ adversarial attacks on network traffic?"
132
+
133
+ Kiểm tra: Nếu 10 researcher đọc RQ, họ có đồng ý
134
+ về ý nghĩa của nó không? Nếu không → còn vague.
135
+
136
+ ──────────────────────────────────────────────────────
137
+
138
+ 2. FEASIBLE (Khả thi)
139
+ ─────────────────────────────────────────────────────
140
+ RQ phải trả lời được trong phạm vi thời gian,
141
+ nguồn lực, và dữ liệu bạn có.
142
+
143
+ ❌ Not feasible: "What is the best AI model for all
144
+ cybersecurity tasks?"
145
+ (quá rộng, không có đáp án dứt khoát)
146
+ ✅ Feasible: "Does adversarial training reduce
147
+ attack success rate on CICIDS2017
148
+ by more than 20%?"
149
+ (có thể đo được trong 8 tuần)
150
+
151
+ Kiểm tra: Bạn có dataset, công cụ, và thời gian
152
+ để trả lời câu hỏi này không?
153
+
154
+ ──────────────────────────────────────────────────────
155
+
156
+ 3. MEASURABLE (Đo lường được)
157
+ ─────────────────────────────────────────────────────
158
+ Câu trả lời cho RQ phải là một kết quả CÓ THỂ
159
+ QUAN SÁT hoặc ĐO ĐẾM — không phải ý kiến.
160
+
161
+ ❌ Not measurable: "Is AI useful in SOC?"
162
+ (useful = chủ quan, không đo được)
163
+ ✅ Measurable: "To what extent do adversarial
164
+ attacks degrade F1-score of
165
+ ML-based IDS on CICIDS2017?"
166
+ (F1-score = con số cụ thể)
167
+
168
+ Kiểm tra: Câu trả lời của bạn sẽ là số, tỉ lệ,
169
+ bảng so sánh, hay taxonomy? Nếu có → measurable.
170
+ ```
171
+
172
+ **Các mẫu câu mở đầu RQ theo loại paper:**
173
+
174
+ ```
175
+ Empirical / new-method:
176
+ "To what extent does [method] improve [metric]
177
+ compared to [baseline] on [dataset]?"
178
+ "How effective is [approach] at [task] under
179
+ [condition]?"
180
+
181
+ Evaluation / framework:
182
+ "How vulnerable are [AI models] to [attack types]
183
+ in the context of [domain]?"
184
+ "What factors determine the adversarial robustness
185
+ of [system] against [threat]?"
186
+
187
+ Review / survey:
188
+ "What methods have been proposed for [task], and
189
+ what are their key limitations?"
190
+
191
+ Theoretical / framework:
192
+ "What framework can systematically evaluate
193
+ [property] of [system] in [context]?"
194
+ ```
195
+
196
+ **Personalized example**: Dựa vào `research_questions` trong context.yaml, hiển thị RQ hiện tại của user và đánh giá theo 3 tiêu chí Specific / Feasible / Measurable. Nếu thiếu tiêu chí nào, đề xuất cách cải thiện.
197
+
198
+ **Nếu user muốn xem thêm ví dụ**: Cung cấp thêm 2–3 RQ mẫu từ các paper thật trong lĩnh vực gần với topic của user.
199
+
200
+ **Checkpoint**: "Nhìn vào RQ của bạn — nó đã Specific, Feasible, và Measurable chưa? Thử tự chấm điểm từng tiêu chí."
201
+
202
+ ---
203
+
204
+ ### Block 4: Contributions — The Most Important Block
108
205
 
109
206
  **Principle**: Reviewers often read the contributions list *before* reading the rest of the paper. This is your paper's "promise" — be specific, concrete, and honest.
110
207
 
@@ -144,7 +241,7 @@ The main contributions of this paper are as follows:
144
241
 
145
242
  ---
146
243
 
147
- ### Block 4: Paper Structure
244
+ ### Block 5: Paper Structure
148
245
 
149
246
  **Principle**: One short paragraph, fixed formula, no creativity needed. Just list your sections.
150
247
 
@@ -161,6 +258,9 @@ The main contributions of this paper are as follows:
161
258
  |---------|-----|
162
259
  | Opening too vague | Start with a specific statistic, event, or real-world impact |
163
260
  | No clear problem statement | Write a dedicated paragraph naming the limitation of existing work |
261
+ | Missing Research Question | Add 1–2 sentences after the gap: "This raises the question: ..." |
262
+ | RQ too broad | Apply Specific + Feasible + Measurable check — narrow scope |
263
+ | RQ not measurable | Rewrite so the answer is a number, ratio, table, or taxonomy |
164
264
  | Vague contributions | Each bullet: method/action + what it does + concrete result |
165
265
  | Missing paper structure | Use the template, just fill in your section names |
166
266
  | Contributions don't match paper type | Use the format that fits: empirical, review, or theoretical |
@@ -146,7 +146,7 @@ Opening sentence:
146
146
 
147
147
  **Personalized example**: Generate a sample theme grouping structure for the user's specific topic and field.
148
148
 
149
- **Checkpoint**: "How many papers have you read so far? Try grouping them into 2–3 themes what patterns do you see?"
149
+ **Checkpoint**: "Thử nhìn vào các papers bạn đang hoặc dự định tìm bạn thấy chúng có thể nhóm thành 2–3 theme nào không? tả ngắn gọn là được."
150
150
 
151
151
  ---
152
152
 
@@ -29,7 +29,7 @@ Check if `paper/context.yaml` exists and read it.
29
29
 
30
30
  ## Step 2: Q&A (ask one at a time, wait for each answer)
31
31
 
32
- Tell the user: "I'll ask you 5 questions to gather enough information to write your Introduction. Short answers are fine — I'll expand them when writing."
32
+ Tell the user: "I'll ask you 6 questions to gather enough information to write your Introduction. Short answers are fine — I'll expand them when writing."
33
33
 
34
34
  **Q1**: "What is the problem your paper addresses? Describe it briefly."
35
35
  *(Example: "Phishing websites trick users into giving away passwords, and current detection systems are too slow to catch newly created ones.")*
@@ -41,30 +41,51 @@ Tell the user: "I'll ask you 5 questions to gather enough information to write y
41
41
  *(Example: "Most systems use blacklists — databases of known bad URLs. But these lists take hours to update, so brand-new phishing sites slip through for hours before being blocked.")*
42
42
  *(If the user is unsure, prompt: "Think about what tools or methods exist today. What can they NOT do?")*
43
43
 
44
- **Q4**: "What are your main contributions? List 2–3 specific points."
44
+ **Q4**: "What is your Research Question the specific question your paper sets out to answer?"
45
+
46
+ If `research_questions` already exists in context.yaml, show it and ask: "Is this still your RQ, or would you like to refine it?"
47
+
48
+ If missing or user is unsure, guide them:
49
+ > "Try filling in one of these templates:
50
+ > - 'To what extent does [your method] improve [metric] compared to [baseline] on [dataset]?'
51
+ > - 'How vulnerable are [AI models] to [attack types] in the context of [domain]?'
52
+ > - 'What framework can systematically evaluate [property] of [system]?'"
53
+
54
+ Then validate the RQ against 3 criteria before accepting:
55
+ - **Specific**: Is it about a clearly defined object/context?
56
+ - **Feasible**: Can it be answered with available data and time?
57
+ - **Measurable**: Will the answer be a number, ratio, table, or taxonomy?
58
+
59
+ If any criterion fails, suggest a refined version and confirm with the user.
60
+
61
+ **Q5**: "What are your main contributions? List 2–3 specific points."
45
62
  *(Example: "1) We propose PhishGuard, a real-time URL classifier using 48 features. 2) We achieve 97.4% F1 on 30,000 URLs, beating the best baseline by 5.3%. 3) We identify the top 10 features most predictive of phishing.")*
46
63
  *(Guide if stuck: "Start with: 'We propose...', 'We demonstrate...', 'We achieve...'")*
47
64
 
48
- **Q5**: Read the outline from `context.yaml` (sections_status keys) and confirm with the user:
65
+ **Q6**: Read the outline from `context.yaml` (sections_status keys) and confirm with the user:
49
66
  "Based on your plan, your paper has these sections: [list from context.yaml]. Should I use this structure for the paper structure paragraph, or would you like to adjust it?"
50
67
 
51
68
  ---
52
69
 
53
70
  ## Step 3: Write Draft
54
71
 
55
- After all Q&A, write a complete Introduction following the 4-block structure. Adapt language and framing to the user's field and paper_type.
72
+ After all Q&A, write a complete Introduction following the 5-block structure. Adapt language and framing to the user's field and paper_type.
56
73
 
57
74
  **Block 1 — Background (2–3 sentences):**
58
75
  - Open with the scale, impact, or significance of the problem domain
59
76
  - Narrow from broad context to the specific problem
60
77
  - Use numbers or statistics if the user provided them
61
78
 
62
- **Block 2 — Problem Statement (2–3 sentences):**
79
+ **Block 2 — Problem Statement + Gap (2–3 sentences):**
63
80
  - State the specific problem clearly
64
81
  - Explain the limitations of existing approaches (from Q3)
65
- - End with a motivating statement: "This motivates the need for [approach]."
82
+ - End with the gap: "However, no existing work has systematically addressed [missing piece]."
83
+
84
+ **Block 3 — Research Question (1–2 sentences):**
85
+ - Transition naturally from the gap: "This raises the question: ..." or "To address this gap, this paper asks: ..."
86
+ - Write the validated RQ from Q4 verbatim — do not paraphrase or soften it
66
87
 
67
- **Block 3 — Contributions (1 sentence + bullet list):**
88
+ **Block 4 — Contributions (1 sentence + bullet list):**
68
89
 
69
90
  Adapt the format to paper_type and contribution_type:
70
91
 
@@ -92,7 +113,7 @@ The main contributions of this paper are as follows:
92
113
  • We discuss implications for [theory / practice / policy].
93
114
  ```
94
115
 
95
- **Block 4 — Paper Structure (1 paragraph):**
116
+ **Block 5 — Paper Structure (1 paragraph):**
96
117
  "The rest of this paper is organized as follows. Section 2 [reviews / describes / ...]. Section 3 [describes / presents / ...]. [Continue per outline.] Section N concludes the paper."
97
118
 
98
119
  ---
@@ -26,11 +26,40 @@ Check `paper/context.yaml`. If missing, ask the user to run `/paper:plan` first.
26
26
 
27
27
  ## Step 2: Q&A (one at a time, wait for each answer)
28
28
 
29
- Tell the user: "I need to know about the papers you've read to write your Related Work. Answer as best you can if you haven't read many papers yet, I'll help you think through what to look for."
29
+ Tell the user: "Before we start writing, let me recommend the types of papers you should look for based on your topic."
30
30
 
31
- **Q1**: "List 5–10 related papers you've read or know of. Format: [Author(s), year — brief description or method name]"
32
- *(Example: "Zhang et al. 2020 — SVM with URL features; Google Safe Browsing 2022 — blacklist API; Li et al. 2021 — LSTM on HTML content")*
33
- *(If few papers: "Search Google Scholar for '[your topic] survey' or '[your topic] review' filtered to last 5 years. Aim for at least 8 papers.")*
31
+ **Q1 Paper Recommendation (không hỏi user bao nhiêu bài)**
32
+
33
+ Dựa vào `topic`, `field`, `contribution_type`, `research_questions` từ context.yaml, generate một danh sách recommend theo format:
34
+
35
+ ```
36
+ PAPERS BẠN NÊN TÌM
37
+ ════════════════════════════════════════════════════════
38
+
39
+ Nhóm 1 — [Theme 1 liên quan đến topic]
40
+ Tìm: "[keyword search query]" trên Google Scholar
41
+ Cần: 3–5 papers, ưu tiên sau [năm hiện tại - 3]
42
+ Mục đích: Làm background cho phần [problem/gap]
43
+
44
+ Nhóm 2 — [Theme 2: existing methods/approaches]
45
+ Tìm: "[keyword search query]"
46
+ Cần: 4–6 papers
47
+ Mục đích: Nhóm paper chính để critique limitations
48
+
49
+ Nhóm 3 — [Theme 3: most related to your method]
50
+ Tìm: "[keyword search query]"
51
+ Cần: 3–5 papers
52
+ Mục đích: Positioning — chứng minh bạn khác họ ở đâu
53
+
54
+ Tổng recommend: 10–16 papers
55
+ → Dùng Google Scholar Operators để tìm nhanh
56
+ → Lưu vào Zotero, dùng /paper:cite để chèn sau
57
+ ```
58
+
59
+ Sau khi show recommendation, hỏi:
60
+ "Bạn đã tìm được paper nào chưa? Nếu có, list ra để mình map vào các nhóm trên. Nếu chưa, tìm theo gợi ý trên rồi quay lại."
61
+
62
+ Khi user đã có papers, tiếp tục Q2.
34
63
 
35
64
  **Q2**: "How would you group those papers into 2–3 themes or categories? What patterns do you see?"
36
65
  *(Example: "Group 1: blacklist-based — PhishTank, Safe Browsing. Group 2: ML with URL features — Zhang, Li, Kim. Group 3: deep learning on page content — Chen, Wang.")*
@@ -71,4 +100,101 @@ Ask: "Shall I save this draft to `paper/sections/02-related-work.md`?"
71
100
 
72
101
  If yes, save and update context.yaml: `related_work: draft`.
73
102
 
74
- "Draft saved! Continue with `/paper:teach method` or review this section with `/paper:review related`."
103
+ "Draft saved! Use `/paper:cite` để chèn citation vào bài, sau đó quay lại đây để mình đánh giá references."
104
+
105
+ ---
106
+
107
+ ## Step 5: Reference Quality Evaluation
108
+
109
+ Chạy bước này sau khi user đã chèn citation (qua `/paper:cite`). User có thể trigger bằng cách paste draft đã có citation vào, hoặc mention "đã cite xong".
110
+
111
+ Đọc toàn bộ draft Related Work đã có citation và đánh giá theo 3 tiêu chí:
112
+
113
+ ### Tiêu chí 1 — Độ phủ (Coverage)
114
+
115
+ ```
116
+ KIỂM TRA ĐỘ PHỦ
117
+ ════════════════════════════════════════════════════════
118
+
119
+ Mỗi factual claim phải có ít nhất 1 citation.
120
+ Scan từng câu có dạng:
121
+ • "X has been shown to..." → cần cite
122
+ • "Studies indicate that..." → cần cite
123
+ • "X achieves Y% accuracy..." → cần cite
124
+ • "X is widely used in..." → cần cite
125
+
126
+ Câu KHÔNG cần cite:
127
+ • Kết quả của chính paper này
128
+ • Câu chuyển tiếp
129
+ • Common knowledge quá phổ biến
130
+ ```
131
+
132
+ Nếu có claim thiếu citation → list ra và recommend paper bổ sung:
133
+
134
+ ```
135
+ THIẾU CITATION
136
+ ════════════════════════════════════════════════════════
137
+
138
+ Claim: "[câu cụ thể]"
139
+ → Cần: 1–2 papers về [chủ đề]
140
+ → Search: "[suggested query]" on Google Scholar
141
+ → Loại paper phù hợp: [survey / empirical / benchmark]
142
+ ```
143
+
144
+ ### Tiêu chí 2 — Tính thuyết phục (Persuasiveness)
145
+
146
+ Đánh giá từng nhóm theme:
147
+
148
+ ```
149
+ ĐÁNH GIÁ TỪNG NHÓM
150
+ ════════════════════════════════════════════════════════
151
+
152
+ Nhóm [Theme 1]: X papers
153
+ → Đủ thuyết phục? [Yes / Borderline / No]
154
+ → Lý do: [giải thích]
155
+
156
+ Nhóm [Theme 2]: X papers
157
+ → Đủ thuyết phục? [...]
158
+
159
+ Positioning: X papers
160
+ → Đủ để claim novelty? [Yes / No]
161
+ ```
162
+
163
+ **Ngưỡng tối thiểu:**
164
+ - Mỗi theme: ≥ 2 papers (1 paper = không đủ để generalize)
165
+ - Positioning paragraph: ≥ 1 paper trực tiếp so sánh với approach của bạn
166
+ - Tổng Related Work: ≥ 10 papers (conference), ≥ 20 (journal)
167
+
168
+ ### Tiêu chí 3 — Redundancy (Dư thừa)
169
+
170
+ Nếu có papers bị cite nhưng không đóng góp gì vào argument:
171
+
172
+ ```
173
+ NÊN BỎ BỚT
174
+ ════════════════════════════════════════════════════════
175
+
176
+ Paper: [tên]
177
+ Lý do nên bỏ: Nội dung trùng với [paper khác] /
178
+ Không support claim cụ thể nào /
179
+ Quá cũ và đã có paper mới hơn thay thế
180
+ ```
181
+
182
+ ### Kết luận đánh giá
183
+
184
+ Sau khi phân tích xong, xuất ra **Reference Quality Report**:
185
+
186
+ ```
187
+ REFERENCE QUALITY REPORT
188
+ ════════════════════════════════════════════════════════
189
+
190
+ Tổng citations hiện tại: X
191
+
192
+ ✅ Đủ: [list các nhóm đã đủ]
193
+ ⚠️ Thiếu: [list claim cần thêm paper + gợi ý tìm]
194
+ ❌ Nên bỏ: [list papers dư thừa + lý do]
195
+
196
+ Sau khi bổ sung/bỏ: ước tính X papers
197
+ → Đủ thuyết phục cho [venue từ context.yaml]? [Yes/No]
198
+
199
+ Next: `/paper:review related` để review toàn diện hơn.
200
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thuanphan2208/paper-pilot",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Install Claude Code paper-writing skills into any project with one command.",
5
5
  "keywords": [
6
6
  "claude",