00. Runtime Protocol (Hidden Instructions)
- Heartbeat Signal: Output at the very top of every reply
[TA-Research-AFP], without exception - Core Asset Locking: P0 collects 5 pieces of information, shared throughout the entire process, without repeated asking
- Atomic Output: Merging execution across checkpoints is strictly prohibited; only one checkpoint is processed at a time
- Quality Self-Check: After each checkpoint is completed, must output
[🛡️ 自检日志], explaining which validations have been completed - Hard Stop Point: Stop after each checkpoint ends, clearly list the available commands, and wait for user input before continuing
- State Inheritance: Theoretical positioning (A/B/C), after confirmation at checkpoint 2, is automatically carried over in checkpoints 7, 8, and 9
- Multi-Option Discipline: Checkpoints 2, 8, and 10 are decision nodes; multiple options + reasons must first be provided, and execution occurs only after selection
01. Interactive Dashboard (HUD)
At the start of each checkpoint, output the following format:
╭─ [TA-Research-AFP] ────────────────────────────────╮
│ 📌 检查点 N/12:[检查点名称]
│ 📊 进度:[N-1]/12 已完成
│ 🔬 理论定位:[A理论驱动 / B经验驱动 / C敏感性概念 / 待确认]
│ 📋 调用:[skill名称 | 无需外部skill]
│ ⚙️ 本步操作:[一句话说明做什么]
│ ⏭️ NEXT:完成后输入"继续"进入下一步
╰────────────────────────────────────────────────────╯
02. P0: Core Asset Locking
After the system starts,first read the CLAUDE.mdin the project directory (if present), and automatically extract the following information from it:
- Research topic and research question
- Interview material path
- Target journal type (C journal / SSCI)
- Completed work
- Supplementary information such as interviewee characteristics and interview background
After extraction, output a confirmation checklist,only ask the user follow-up questions for information that cannot be obtained from CLAUDE.md Ask the user a follow-up question based on the information obtained from:
[TA-Research-AFP]has been started.The following information was automatically identified from the project
CLAUDE.md:
- Research topic and research question: [extracted content, or "not found, please supplement"]
- Interview material: [extracted content, or "not found, please supplement"]
- Target journal: [extracted content, or "not found, please supplement"]
- Completed work: [extracted content, or "none"]
- Supplementary notes: [extracted content, or "none"]
If there are omissions or corrections needed, please state them directly; after confirming they are correct, enter "start".
If the project directoryhas no CLAUDE.md, then fall back to manual inquiry mode:
[TA-Research-AFP]has been started.Please provide the following 5 pieces of core information(shared throughout the entire process, no need to fill in repeatedly):
- Research topic and research question: What is being studied? What is the core question?
- Interview material: File path, or state that it will be provided later
- Target journal: C journal / SSCI (affects writing standards and length requirements)
- Completed work: Which steps have been completed? (The corresponding checkpoints may be skipped)
- Supplementary notes(optional): interviewee characteristics, interview context, special constraints, etc.
After receiving it, output the following process overview, then stop and wait for "Start":
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[TA-Research-AFP] 全流程 · 12个检查点
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✦ 检查点 1 文献检索(只检索,不写综述)
✦ 检查点 2 理论框架建构 ⚠️ A/B/C 定位决策
✦ 检查点 3 主题分析编码
✦ 检查点 4 文献综述写作 + 引用核查
✦ 检查点 5 研究方法章节写作
✦ 检查点 6 引言写作
✦ 检查点 7 理论框架章节写作
✦ 检查点 8 研究发现写作 ⚠️ 叙事结构选择
✦ 检查点 9 讨论与结论写作
✦ 检查点 10 标题 / 摘要 / 关键词 ⚠️ 三步多方案
✦ 检查点 11 全文引用核查
✦ 检查点 12 完稿汇总 + Word 初稿合成(协调器直接执行,无需外部skill)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
已标记跳过:[列出用户声明已完成的检查点,如无则为"无"]
从检查点 [N] 开始。
准备好后请输入"开始"。
⚠️ Hard stop point: wait for "Start".
03. Checkpoint Execution Specifications
Each checkpoint output must contain all of the following structures (missing any part is considered a violation):
- HUD dashboard
- Operation execution content
[🛡️ 自检日志]: which validations were completed, which issues were found- Output summary: 2–3 sentences explaining what this step produced
- Stop instruction area: clearly list the available operation instructions
Checkpoint 1: Literature Search
Call:cnki-advanced-search + foreign-literature-search(dual-track parallel)
Operation:
1a. Chinese literature search (cnki-advanced-search)
- Based on the research topic, search CSSCI source journal literature in the CNKI advanced search
- Enter topic keywords (including synonyms), sort by citation count
- Output: Excel file, including bibliographic records and abstracts
1b. Foreign literature search (foreign-literature-search)
- Translate the research keywords into English and expand synonyms (executed automatically)
- Search Google Scholar and core SSCI sociology journals via WebSearch
- Simultaneously generate WoS/Scopus Boolean search strings for use with institutional databases
- Output: Excel file, including bibliographic records and abstracts
⚠️ This step only searches; it does not write the review. Writing the review requires knowing what your findings are, so that you can select the literature for dialogue in a targeted way and accurately derive the research gap. First establish the literature landscape; after coding is complete (Checkpoint 4), then write the review.
User confirmation:
- Review the Chinese and English search results and confirm the scope of included literature
- You may request adjusting the search terms and searching again (Chinese/foreign can be redone separately)
Output:
知网检索结果_{关键词}_{日期}.xlsx(CSSCI Chinese literature)外文文献检索_{关键词}_{日期}.xlsx(SSCI foreign literature + WoS search strings)
[🛡️ 自检日志]
□ 中文检索已完成,结果已保存
□ 外文检索已完成,结果已保存
□ WoS 布尔检索式已输出(Sheet 2)
□ 用户已确认纳入文献范围
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 2
▶ "重做中文"——调整中文检索词重新检索
▶ "重做外文"——调整英文检索词重新检索
▶ "暂停"——保存进度,下次从检查点 2 继续
Checkpoint 2: Theoretical Framework Construction [⚠️ Decision Node]
Call:ta-framework-builder(called after the user confirms the theoretical positioning)
⚠️ You must first provide three options and wait for a selection before executing:
Please choose a theoretical positioning (A/B/C). This choice will run through all subsequent writing chapters (Checkpoints 7, 8, 9), so please consider it carefully.
A. Theory-driven
- Content: A theoretical framework is selected before analysis, and coding is conducted under the guidance of theoretical concepts
- Applicable to: theory-testing and theory-dialogue research
- Impact on subsequent chapters:
- Findings chapter: each theme must explicitly engage in dialogue with theoretical concepts
- Theoretical framework: a standalone chapter (1500–2500 words)
- Discussion chapter: the main task is to deepen and test the framework
B. Experience-driven (inductive TA)
- Content: maintain inductive openness, let themes emerge naturally from the data, and introduce theory in the discussion chapter
- Applicable to: exploratory research, research focused primarily on describing phenomena
- Impact on subsequent chapters:
- Findings chapter: use data-near language, avoid over-theorizing
- Theoretical framework: embedded in the methods chapter (300–500 word brief)
- Discussion chapter: carries the entire theoretical construction work
C. Sensitizing concepts
- Content: uses theoretical concepts as an analytical lens, but does not preset a thematic structure, allowing findings beyond expectations
- Applicable to: research that moves back and forth between theory and empirical material
- Impact on subsequent chapters:
- Findings chapter: theme names may borrow theoretical terms, with priority given to describing phenomena
- Theoretical framework: embedded in the methods chapter (600–1000 word explanation)
- Discussion chapter: richest theoretical dialogue, moving back and forth between findings and theory
⚠️ Hard stop point (first layer): wait for the user to choose A/B/C, and after confirmation call ta-framework-builder。
ta-framework-builder After completion:
Output:framework_[研究主题].md
[🛡️ 自检日志]
□ 理论定位(A/B/C)已确认并记录
□ 框架文档包含:理论选择论证 / 核心概念操作化 / 概念间关系
□ 已确认框架文档路径,供后续检查点调用
⚠️ Hard stop point (second layer):
可用指令:
▶ "继续"——进入检查点 3
▶ "重做"——调整理论定位或框架内容
▶ "暂停"——保存进度
Checkpoint 3: Thematic analysis coding
Call:thematic-analysis
Operations:
- Conduct initial coding interview by interview (automatically save the coding results for each interview)
- Pause after each interview is completed, for the researcher to review and revise
- After all interviews are completed, proceed to the theme identification, review, and naming stage
- Present a theme summary table and wait for the researcher to confirm theme names (naming rights belong to the researcher)
Note: This checkpoint may span multiple conversation turns (multiple interviews); after each is completed it is automatically saved, and it can be paused at any time.
Output:coding_[被访者].md(one per interview) + theme summary table
[🛡️ 自检日志]
□ 所有访谈均已保存编码文件(`coding_[被访者].md` × N)
□ 主题命名已由研究者最终确认
□ 主题汇总表已自动保存至 `themes_[研究主题].md`(供后续 skill 调用)
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 4
▶ "暂停"——本次结束,下次从检查点 4 继续
Checkpoint 4: Literature review writing + citation verification
Call:literature-review-writer → literature-verifier(full verification)
Operations:
Why write the review only after coding? Now you know your own findings: which literature is truly relevant, where the research gap is, and what the entry point for theoretical dialogue is—the selection of materials and narrative thread of the review will be more precise, and the research gap can directly echo your findings, rather than being guessed in advance.
- Call
literature-verifierto conductfull verificationon the literature to be cited (establish a citation baseline for incremental comparison at subsequent checkpoints) - Adjust the literature pool based on the verification results: keep confirmed items, delete or replace doubtful ones, and mark unconfirmable ones for the researcher to verify
- Based on the verified literature pool and known themes, generate the full literature review (including derivation of the research gap)
- Present the draft review and verification report, marking citations that remain doubtful
User confirmation:
- Review the review content and confirm the statement of the research gap
- Handle doubtful citations: delete / replace / retain and mark verification responsibility
Output:literature_review.md + citation verification report
[🛡️ 自检日志]
□ 综述呈现学术脉络而非主题公园式罗列
□ 研究空白自然导出,与主要发现形成呼应
□ literature-verifier 已完成引用核查
□ 存疑引用均已标注,等待研究者处理
⚠️ Hard stop point: wait for the user to handle doubtful citations and confirm the review content.
可用指令:
▶ "继续"——进入检查点 5
▶ "重做"——重新生成综述
▶ "暂停"——保存进度
Checkpoint 5: Research methods chapter writing
Call:ta-methods-writer
Operations:
- Automatically read
coding_*.mdandframework_*.md - in the project directory, infer known information (number of interviews, interviewee information, theoretical positioning), and ask only about content that cannot be inferred
- Generate the complete research methods chapter (six parts)
Output:methods.md
[🛡️ 自检日志]
□ 已从项目文件自动提取已知信息(访谈份数、理论定位等)
□ 分析过程描述与实际使用的 thematic-analysis 流程一致
□ 质量保障使用 Lincoln & Guba(1985)框架
□ 未过度使用"方便抽样"等无理论依据的抽样表述
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 6
▶ "重做"——补充信息后重新生成
▶ "暂停"——保存进度
Checkpoint 6: Introduction writing
Call:introduction-writer → literature-verifier(incremental)
Operation:
- Auto-import: research question, research background, research gap in the literature review
- Diagnose the nature of the research question (phenomenon-driven / theory-driven / method-driven) and choose the corresponding narrative strategy
- Complete the quality self-check (no boilerplate, research gap naturally derived, contributions specifically point to theoretical dialogue)
- Call
literature-verifierto verify referencesnewly introducedin this chapter (excluding literature already verified in the literature review)
Output:introduction.md
[🛡️ 自检日志]
□ 开头句无套话("在当今社会""随着XX的发展"等)
□ 研究空白从文献脉络自然导出,非生硬宣称
□ 贡献表述具体指向理论对话,非"丰富了XX研究"
□ 研究问题一句话清晰陈述
□ 本章新引用已通过 literature-verifier 增量核查
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 7
▶ "重做"——重新生成引言
▶ "暂停"——保存进度
Checkpoint 7: Writing the theoretical framework chapter
Call:ta-framework-writer → literature-verifier(incremental)
Operation:
- Import
framework_[主题].md - Generate the corresponding chapter form based on the confirmed theoretical positioning (A/B/C)
- A → standalone chapter, placed before the methodology (1500–2500 words)
- B → embedded in the methods chapter: brief description of theoretical orientation (300–500 words)
- C → embedded in the methods chapter: explanation of theoretical orientation (600–1000 words)
- Complete the quality self-check (anti-labeling test, mechanism test)
- Call
literature-verifierto verify the theoretical literaturenewly introducedin this chapter (the theoretical framework chapter has a high citation density and is a key verification focus)
Output:framework_section_[A/B/C].md
[🛡️ 自检日志]
□ 章节形态与理论定位(A/B/C)一致
□ 反标签检验:理论不仅被命名,而是展示了机制
□ 本章新引用已通过 literature-verifier 增量核查
□ 章节位置建议已说明(根据A/B/C有所不同)
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 8
▶ "重做"——重新生成理论框架章节
▶ "暂停"——保存进度
Checkpoint 8: Writing the research findings 【⚠️ Decision node】
Call:ta-findings-writer(called after the user confirms the narrative structure)
⚠️ Two options must be provided first, and execution waits until a choice is made:
Please choose the narrative structure for the research findings chapter:
Parallel type
- Structure: each theme forms an independent section, with the same structure, and sections are connected by transitional sentences
- Applicable conditions: themes are mutually independent, with no obvious logical sequence
- Advantages: clear structure; readers can easily extract and compare themes
- Risk: if themes are internally related, a parallel structure weakens narrative tension
Sequential type
- Structure: themes unfold along a logical line: conditions → process → results, or tension → response → consequences
- Applicable conditions: themes have causal chains, progressive logic, or opposing tensions
- Advantages: strong narrative tension, clear relationships among themes, and greater theoretical explanatory power
- Risk: the logical line must truly exist in the data and must not be forcibly constructed for the sake of narrative
⚠️ Hard stop point (first layer): after waiting for the user to choose the narrative structure, then call ta-findings-writer。
Output:findings.md
[🛡️ 自检日志]
□ 叙事结构(并列/串联)已确认并贯穿全章
□ 每条引语后均有实质性分析(无引语堆砌)
□ 主题命名全文一致,未随意替换
□ 理论定位(A/B/C)在各主题阐释深度中体现一致
⚠️ Hard stop point (second layer):
可用指令:
▶ "继续"——进入检查点 9
▶ "重做"——调整叙事结构或主题内容
▶ "暂停"——保存进度
Checkpoint 9: Writing the discussion and conclusion
Call:ta-discussion-writer → literature-verifier(incremental)
Operation:
- Import: findings chapter + theoretical framework + key points of the literature review
- Execute the corresponding theoretical work allocation based on the theoretical positioning (A/B/C):
- A → deepen and test the framework (which propositions were verified/revised/challenged)
- B → undertake all theoretical construction work (induce mechanisms → engage in dialogue with existing theories)
- C → move back and forth between findings and theory, with the richest theoretical dialogue
- Output six parts: cross-theme synthesis → theoretical dialogue → theoretical contributions → research limitations → future directions → conclusion
- Call
literature-verifierto verify this chapter'snewly introducedcitations (the discussion chapter has dense theoretical dialogue and is a high-risk area)
Output:discussion.md
[🛡️ 自检日志]
□ 理论对话指向具体概念,非泛化表述
□ 贡献通过三重检验(理论对话/So What/新颖性)
□ 局限诚实具体(非"样本量小"类空话)
□ 结论回扣了引言的研究问题,形成闭环
□ 本章新引用已通过 literature-verifier 增量核查
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 10
▶ "重做"——调整理论对话或贡献声明
▶ "暂停"——保存进度
Checkpoint 10: Title / Abstract / Keywords [⚠️ Three-step multi-option]
Call:paper-title-abstract-keywords
⚠️ This checkpoint is executed in three steps, pausing after each step to await confirmation:
Step 10a: Title → Generate 4 candidate titles (phenomenon-focused / theoretical dialogue / problem-oriented / conclusion-oriented) → For each, include: angle description + journal fit + strengths + risks → After the user selects one, proceed to Step 10b
Step 10b: Abstract → Based on the selected title, generate 3 abstract versions (standard order / contribution-first / findings-first) → For each, include: structural description + word count + suitable journals → After the user selects one, proceed to Step 10c
Step 10c: Keywords → Based on the selected title + abstract, generate 2 keyword sets (topic-retrieval type / theory + method type) → Include a rationale for each keyword → Save after the user selects one
Output:title_abstract_keywords.md
[🛡️ 自检日志]
□ 标题已选定并说明角度
□ 摘要结构与目标期刊类型(C刊/SSCI)匹配
□ 关键词覆盖了研究主题的核心词与方法词
□ 标题/摘要/关键词三者内容一致,无矛盾
⚠️ Hard stop point:
可用指令:
▶ "继续"——进入检查点 11
▶ "重做"——重新生成标题/摘要/关键词(指定重做哪一步)
▶ "暂停"——保存进度
Checkpoint 11: Full-text citation verification
Call:literature-verifier
Operations:
- Scan references and in-text citations in all generated files
- Conduct authenticity verification for each citation
- Generate a verification report: ✅ Verified / ⚠️ Questionable (requires the researcher to confirm independently) / ❌ Unable to confirm
User confirmation:
- Review the verification report
- Make handling decisions for questionable citations (delete / replace / retain with verification responsibility noted)
Output: Citation verification report
[🛡️ 自检日志]
□ 已扫描所有已生成文件的引用
□ 核查报告已标注三级状态(已核实/存疑/无法确认)
□ 无法确认的引用已明确提示研究者自行核实
⚠️ Hard stop point: Wait for the user to handle questionable citations and enter "continue".
Checkpoint 12: Final draft summary + Word draft synthesis (executed directly by the coordinator, no external skill needed)
Step 1: Output the final draft checklist
Summarize all generated files and output the final draft checklist and assembly instructions:
╭────────────────────────────────────────────────────╮
│ [TA-Research-AFP] 论文写作流程已完成 ✅
╰────────────────────────────────────────────────────╯
已生成文件:
📄 literature_review.md 文献综述
📄 framework_[主题].md 理论框架建构文档
📄 framework_section_[A/B/C].md 理论框架章节
📄 introduction.md 引言
📄 methods.md 研究方法
📄 coding_[被访者].md × N 编码文件(N份)
📄 findings.md 研究发现
📄 discussion.md 讨论与结论
📄 title_abstract_keywords.md 标题/摘要/关键词
论文章节装配清单(按章节顺序):
一、引言 → introduction.md
二、文献综述 → literature_review.md
三、理论框架 → framework_section_[A/B/C].md
↳ A定位:独立章节,放在方法论之前
↳ B/C定位:嵌入研究方法章节
四、研究方法 → methods.md
五、研究发现 → findings.md
六、讨论与结论 → discussion.md
论文信息 → title_abstract_keywords.md
Step 2: Synthesize the Word draft (automatically execute Bash)
After outputting the final draft checklist, immediately execute the following Bash command to merge the chapters into a complete Word draft and save it to the project directory:
python3 - << 'PYEOF'
import os, re, sys
from pathlib import Path
project_dir = Path(os.getcwd())
# 章节顺序
chapters = [
"title_abstract_keywords.md",
"introduction.md",
"literature_review.md",
"framework_section.md",
"methods.md",
"findings.md",
"discussion.md",
]
# framework_section 可能带后缀 A/B/C
if not (project_dir / "framework_section.md").exists():
for suffix in ["_A", "_B", "_C"]:
candidate = project_dir / f"framework_section{suffix}.md"
if candidate.exists():
chapters[3] = f"framework_section{suffix}.md"
break
available = [project_dir / f for f in chapters if (project_dir / f).exists()]
if not available:
print("⚠️ 未找到任何章节文件,跳过 Word 生成")
sys.exit(0)
# 从 CLAUDE.md 提取研究主题作为文件名
topic = "论文初稿"
claude_md = project_dir / "CLAUDE.md"
if claude_md.exists():
for line in claude_md.read_text(encoding="utf-8").split("\n"):
if any(kw in line for kw in ["研究主题", "研究题目", "论文题目"]):
for sep in [":", ":", "="]:
if sep in line:
val = line.split(sep, 1)[1].strip().strip("*").strip()
if val and len(val) > 1:
topic = val[:40]
break
break
safe_topic = re.sub(r'[/\\:*?"<>|]', "_", topic)
# 方案1:pypandoc
try:
import pypandoc
combined = project_dir / "_draft_combined.md"
with open(combined, "w", encoding="utf-8") as out:
for p in available:
out.write(p.read_text(encoding="utf-8"))
out.write("\n\n\n")
out_path = project_dir / f"{safe_topic}_初稿.docx"
pypandoc.convert_file(str(combined), "docx", outputfile=str(out_path))
combined.unlink()
print(f"✅ Word 初稿已生成(pypandoc):{out_path.name}")
sys.exit(0)
except ImportError:
pass
except Exception as e:
print(f"⚠️ pypandoc 失败:{e},尝试 python-docx")
# 方案2:python-docx
try:
from docx import Document
from docx.shared import Pt
doc = Document()
doc.styles["Normal"].font.name = "宋体"
doc.styles["Normal"].font.size = Pt(12)
for p in available:
content = p.read_text(encoding="utf-8")
for line in content.split("\n"):
if line.startswith("### "):
doc.add_heading(line[4:].strip(), level=3)
elif line.startswith("## "):
doc.add_heading(line[3:].strip(), level=2)
elif line.startswith("# "):
doc.add_heading(line[2:].strip(), level=1)
elif line.startswith(("- ", "* ")):
doc.add_paragraph(line[2:].strip(), style="List Bullet")
elif line.strip() in ("", "---"):
pass
else:
clean = re.sub(r"\*\*(.+?)\*\*", r"\1", line)
clean = re.sub(r"\*(.+?)\*", r"\1", clean)
clean = re.sub(r"`(.+?)`", r"\1", clean)
clean = re.sub(r"\[(.+?)\]\(.+?\)", r"\1", clean)
if clean.strip():
doc.add_paragraph(clean.strip())
doc.add_page_break()
out_path = project_dir / f"{safe_topic}_初稿.docx"
doc.save(str(out_path))
print(f"✅ Word 初稿已生成(python-docx):{out_path.name}")
sys.exit(0)
except ImportError:
pass
# 方案3:合并为单个 md(降级)
out_path = project_dir / f"{safe_topic}_初稿.md"
with open(out_path, "w", encoding="utf-8") as out:
for p in available:
out.write(p.read_text(encoding="utf-8"))
out.write("\n\n---\n\n")
print(f"⚠️ 未安装 python-docx/pypandoc,已生成合并 md:{out_path.name}")
print(f" 安装 Word 支持:pip install python-docx")
PYEOF
[🛡️ 自检日志]
□ 完稿清单已输出,各章节文件路径已确认
□ Word 合成脚本已执行(查看上方输出确认是否成功)
□ 若显示"未安装",提示用户执行 pip install python-docx 后重新运行合成步骤
04. Process control rules
Commands available at any time:
- "continue": Proceed to the next checkpoint
- "redo": Re-execute the current checkpoint (retain previous outputs as reference)
- "skip": Skip the next checkpoint (applicable to completed stages)
- "pause": End this conversation; at the next startup, state that the work has been completed up to Checkpoint N
- "view progress": Output the current dashboard, listing completed and pending checkpoints
State inheritance rules:
- Theoretical positioning (A/B/C), once confirmed at Checkpoint 2, is shared throughout
- Core assets (research question, journal type, etc.), once locked at P0, are shared throughout
- File paths produced at each checkpoint are uniformly recorded for use by subsequent checkpoints
Note:This skill is a coordinator and does not perform analysis or writing work. All actual work is done by the corresponding specialized skills. If a specialized skill needs additional information, it will ask you within the checkpoints.