clinical-trial-protocol-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Clinical Trial Protocol Skill

临床试验方案技能

⚠️ EXECUTION CONTROL - READ THIS FIRST

⚠️ 执行控制 - 请先阅读

CRITICAL: This orchestrator follows a SIMPLE START approach:
  1. Display the welcome message FIRST (shown in "Startup: Welcome and Confirmation" section below)
  2. Ask user to confirm they're ready to proceed - Wait for confirmation (yes/no)
  3. Jump directly into Full Workflow Logic - Automatically run subskills sequentially
  4. Do NOT pre-read subskill files - Subskills are loaded on-demand only when their step executes
Why this matters:
  • Pre-reading all subskills wastes context and memory
  • Subskills should only load when actually needed during execution
  • Workflow automatically handles resuming from existing waypoints
重要提示:本编排器采用简单启动方法:
  1. 首先显示欢迎消息(见下方“启动:欢迎与确认”部分)
  2. 询问用户是否准备好继续 - 等待确认(是/否)
  3. 直接进入完整工作流逻辑 - 自动按顺序运行子技能
  4. 请勿预读子技能文件 - 仅在执行对应步骤时才按需加载子技能
为何如此重要:
  • 预读所有子技能会浪费上下文和内存
  • 子技能应仅在实际需要执行时才加载
  • 工作流会自动处理从现有节点恢复的操作

Overview

概述

This skill generates clinical trial protocols for medical devices or drugs using a modular, waypoint-based architecture
本技能采用模块化、基于节点的架构,生成医疗器械或药物的临床试验方案

What This Skill Does

技能功能

Starting with an intervention idea (device or drug), this orchestrated workflow offers two modes:
🔬 Research Only Mode (Steps 0-1): 0. Initialize Intervention - Collect device or drug information
  1. Research Similar Protocols - Find similar trials, FDA guidance, and published protocols
    • Deliverable: Comprehensive research summary as formatted .md artifact
📄 Full Protocol Mode (Steps 0-5): 0. Initialize Intervention - Collect device or drug information
  1. Research Similar Protocols - Find similar trials, FDA guidance, and published protocols
  2. Protocol Foundation - Generate protocol sections 1-6 (foundation, design, population)
  3. Protocol Intervention - Generate protocol sections 7-8 (intervention details)
  4. Protocol Operations - Generate protocol sections 9-12 (assessments, statistics, operations)
  5. Generate Protocol - Create professional file ready for stakeholder review
从干预措施构想(器械或药物)出发,本编排工作流提供两种模式:
🔬 仅研究模式(步骤0-1): 0. 初始化干预措施 - 收集器械或药物信息
  1. 研究同类方案 - 查找同类试验、FDA指南及已发布方案
    • 交付物: 格式化为.md文件的综合研究摘要
📄 完整方案模式(步骤0-5): 0. 初始化干预措施 - 收集器械或药物信息
  1. 研究同类方案 - 查找同类试验、FDA指南及已发布方案
  2. 方案基础 - 生成方案第1-6部分(基础、设计、人群)
  3. 方案干预措施 - 生成方案第7-8部分(干预措施细节)
  4. 方案操作 - 生成方案第9-12部分(评估、统计、操作)
  5. 生成最终方案 - 创建可供利益相关方审阅的专业文件

Architecture

架构

Waypoint-Based Design

基于节点的设计

All analysis data is stored in
waypoints/
directory as JSON/markdown files:
waypoints/
├── intervention_metadata.json           # Intervention info, status, initial context
├── 01_clinical_research_summary.json   # Similar trials, FDA guidance, recommendations
├── 02_protocol_foundation.md            # Protocol sections 1-6 (Step 2)
├── 03_protocol_intervention.md          # Protocol sections 7-8 (Step 3)
├── 04_protocol_operations.md            # Protocol sections 9-12 (Step 4)
├── 02_protocol_draft.md                 # Complete protocol (concatenated in Step 4)
├── 02_protocol_metadata.json            # Protocol metadata
└── 02_sample_size_calculation.json      # Statistical sample size calculation
Rich Initial Context Support: Users can provide substantial documentation, technical specifications, or research data when initializing the intervention (Step 0). This is preserved in
intervention_metadata.json
under the
initial_context
field. Later steps reference this context for more informed protocol development.
所有分析数据以JSON/Markdown文件形式存储在
waypoints/
目录中:
waypoints/
├── intervention_metadata.json           # 干预措施信息、状态、初始上下文
├── 01_clinical_research_summary.json   # 同类试验、FDA指南、建议
├── 02_protocol_foundation.md            # 方案第1-6部分(步骤2)
├── 03_protocol_intervention.md          # 方案第7-8部分(步骤3)
├── 04_protocol_operations.md            # 方案第9-12部分(步骤4)
├── 02_protocol_draft.md                 # 完整方案草稿(步骤4中拼接)
├── 02_protocol_metadata.json            # 方案元数据
└── 02_sample_size_calculation.json      # 统计样本量计算
丰富的初始上下文支持: 用户在初始化干预措施(步骤0)时,可提供大量文档、技术规格或研究数据。这些信息会保存在
intervention_metadata.json
initial_context
字段中。后续步骤会参考此上下文,进行更合理的方案开发。

Modular Subskill Steps

模块化子技能步骤

Each step is an independent skill in
references/
directory:
references/
├── 00-initialize-intervention.md    # Collect device or drug information
├── 01-research-protocols.md         # Clinical trials research and FDA guidance
├── 02-protocol-foundation.md        # Protocol sections 1-6 (foundation, design, population)
├── 03-protocol-intervention.md      # Protocol sections 7-8 (intervention details)
├── 04-protocol-operations.md        # Protocol sections 9-12 (assessments, statistics, operations)
└── 05-generate-document.md          # NIH Protocol generation
每个步骤都是
references/
目录中的独立技能:
references/
├── 00-initialize-intervention.md    # 收集器械或药物信息
├── 01-research-protocols.md         # 临床试验研究与FDA指南
├── 02-protocol-foundation.md        # 方案第1-6部分(基础、设计、人群)
├── 03-protocol-intervention.md      # 方案第7-8部分(干预措施细节)
├── 04-protocol-operations.md        # 方案第9-12部分(评估、统计、操作)
└── 05-generate-document.md          # NIH方案生成

Utility Scripts

实用脚本

scripts/
└── sample_size_calculator.py   # Statistical power analysis (validated)
scripts/
└── sample_size_calculator.py   # 统计功效分析(已验证)

Prerequisites

前提条件

1. clinical trials MCP Server (Required)

1. 临床试验MCP服务器(必填)

Installation:
  • Install via drag-and-drop
    .mcpb
    file into Claude Desktop
  • Or configure manually in Claude Desktop settings
Available Tools:
search_clinical_trials
- Search by:
condition - Disease or condition (e.g., "pancreatic cancer") intervention - Drug, device, or treatment (e.g., "pembrolizumab", "CAR-T") sponsor - Sponsor or collaborator name (e.g., "Pfizer", "NIH") location - City, state, or country (e.g., "California", "Boston") status - "recruiting" (default), "active", "completed", "all" phase - Trial phase: "1", "2", "3", "4", "early_phase1" max_results - Default 25, max 100
get_trial_details
- Get comprehensive details for a specific trial using its nct_id (e.g., "NCT04267848"). Returns eligibility criteria, outcomes, study design, and contact information.
Verification: Step 1 will automatically test MCP connectivity at startup.
安装方法:
  • 通过将
    .mcpb
    文件拖放到Claude Desktop进行安装
  • 或在Claude Desktop设置中手动配置
可用工具:
search_clinical_trials
- 可按以下条件搜索:
condition - 疾病或病症(例如:"pancreatic cancer") intervention - 药物、器械或治疗方法(例如:"pembrolizumab", "CAR-T") sponsor - 申办者或合作者名称(例如:"Pfizer", "NIH") location - 城市、州或国家(例如:"California", "Boston") status - "recruiting"(默认)、"active"、"completed"、"all" phase - 试验阶段:"1", "2", "3", "4", "early_phase1" max_results - 默认25,最大100
get_trial_details
- 使用特定试验的nct_id(例如:"NCT04267848")获取全面详情。返回入选标准、结局指标、研究设计及联系信息。
验证: 步骤1会在启动时自动测试MCP连接性。

2. FDA Database Access (Built-in)

2. FDA数据库访问(内置)

Purpose: FDA regulatory pathway research via explicit database URLs
Sources:
  • Step 1: FDA device/drug databases (510(k), PMA, De Novo, Drugs@FDA, Orange Book, Purple Book)
  • All sources use direct FDA database URLs - no generic web searches
用途: 通过明确的数据库URL研究FDA监管路径
来源:
  • 步骤1:FDA器械/药物数据库(510(k), PMA, De Novo, Drugs@FDA, Orange Book, Purple Book)
  • 所有来源均使用直接的FDA数据库URL - 不使用通用网页搜索

3. Clinical Protocol Template

3. 临床试验方案模板

Template Files: Any
.md
files in the
assets/
directory
Purpose: Reference template for protocol structure and content guidance. The system automatically detects available templates and uses them dynamically.
模板文件:
assets/
目录中的所有
.md
文件
用途: 为方案结构和内容提供参考模板。系统会自动检测可用模板并动态使用。

4. Python Dependencies (Required for Step 2)

4. Python依赖(步骤2必填)

Installation:
bash
pip install -r requirements.txt
Dependencies:
  • scipy >= 1.11.0 (statistical calculations)
  • numpy >= 1.24.0 (numerical operations)
Purpose: Accurate statistical sample size calculations for clinical protocols
安装方法:
bash
pip install -r requirements.txt
依赖项:
  • scipy >= 1.11.0(统计计算)
  • numpy >= 1.24.0(数值运算)
用途: 为临床试验方案提供准确的统计样本量计算

How to Use

使用方法

Simply invoke the skill and select your desired mode:
🔬 Research Only Mode:
  1. Select "Research Only" from the main menu
  2. Provide intervention information
  3. Receive comprehensive research summary as formatted .md artifact
  4. Option to continue with full protocol generation or exit
📄 Full Protocol Mode:
  1. Select "Full Protocol" from the main menu
  2. Guide you through all steps sequentially (Steps 0-5)
  3. Pause after Step 4 to review the draft protocol
  4. Generate the final protocol document when ready
Resume Capability: If interrupted, simply restart the skill and it will automatically resume from your last completed step.
只需调用本技能并选择所需模式:
🔬 仅研究模式:
  1. 从主菜单选择“仅研究”
  2. 提供干预措施信息
  3. 接收格式化为.md文件的综合研究摘要
  4. 可选择继续生成完整方案或退出
📄 完整方案模式:
  1. 从主菜单选择“完整方案”
  2. 系统会引导您按顺序完成所有步骤(步骤0-5)
  3. 步骤4完成后暂停,供您审阅方案草稿
  4. 准备就绪后生成最终方案文档
恢复功能: 如果被中断,只需重启技能,系统会自动从您上次完成的步骤恢复。

Execution Flow

执行流程

Startup: Welcome and Mode Selection

启动:欢迎与模式选择

When skill is invoked, display the following message:
🧬 CLINICAL TRIAL PROTOCOL

Welcome! This skill generates clinical trial protocols for medical devices or drugs.

[If waypoints/intervention_metadata.json exists:]
✓ Found existing protocol in progress: [Intervention Name]
  Type: [Device/Drug]
  Completed: [List of completed steps]
  Next: [Next step to execute]

📋 SELECT MODE:

1. 🔬 Research Only - Run clinical research analysis (Steps 0-1)
   • Collect intervention information
   • Research similar clinical trials
   • Find FDA guidance and regulatory pathways
   • Generate comprehensive research summary as .md artifact

2. 📄 Full Protocol - Generate complete clinical trial protocol (Steps 0-5)
   • Everything in Research Only, plus:
   • Generate all protocol sections
   • Create professional protocol document

3. ❌ Exit

Please select an option (1, 2, or 3):
🛑 STOP and WAIT for user selection (1, 2, or 3)
  • If 1 (Research Only): Set
    execution_mode = "research_only"
    and proceed to Research Only Workflow Logic
  • If 2 (Full Protocol): Set
    execution_mode = "full_protocol"
    and proceed to Full Workflow Logic
  • If 3 (Exit): Exit gracefully with "No problem! Restart the skill anytime to continue."

调用技能时,显示以下消息:
🧬 临床试验方案

欢迎使用!本技能可生成医疗器械或药物的临床试验方案。

[如果存在waypoints/intervention_metadata.json:]
✓ 发现正在进行的方案:[干预措施名称]
  类型:[器械/药物]
  已完成:[已完成步骤列表]
  下一步:[待执行的下一步骤]

📋 选择模式:

1. 🔬 仅研究 - 运行临床研究分析(步骤0-1)
   • 收集干预措施信息
   • 研究同类临床试验
   • 查找FDA指南及监管路径
   • 生成格式化为.md文件的综合研究摘要

2. 📄 完整方案 - 生成完整的临床试验方案(步骤0-5)
   • 包含仅研究模式的所有功能,另加:
   • 生成所有方案章节
   • 创建专业的方案文档

3. ❌ 退出

请选择一个选项(1、2或3):
🛑 停止并等待用户选择(1、2或3)
  • 如果选择1(仅研究):设置
    execution_mode = "research_only"
    并进入仅研究工作流逻辑
  • 如果选择2(完整方案):设置
    execution_mode = "full_protocol"
    并进入完整工作流逻辑
  • 如果选择3(退出):友好退出,提示“没问题!随时重启技能即可继续。”

Research Only Workflow Logic

仅研究工作流逻辑

This workflow executes only Steps 0 and 1, then generates a formatted research summary artifact.
Step 1: Check for Existing Waypoints
  • If
    waypoints/intervention_metadata.json
    exists: Load metadata, check if steps 0 and 1 are already complete
  • If no metadata exists: Start from Step 0
Step 2: Execute Research Steps (0 and 1)
For each step (0, 1):
  1. Check completion status: If step already completed in metadata, skip with "✓ Step [X] already complete"
  2. Execute step:
    • Display "▶ Executing Step [X]..."
    • Read and follow the corresponding subskill file instructions
    • Wait for completion
    • Display "✓ Step [X] complete"
    • Step execution method (ON-DEMAND LOADING): When a step is ready to execute (NOT before), read the subskill markdown file and execute ALL instructions within it
    • Step-to-file mapping:
      • Step 0:
        references/00-initialize-intervention.md
        (collect intervention info)
      • Step 1:
        references/01-research-protocols.md
        (clinical research and FDA guidance)
  3. Handle errors: If step fails, ask user to retry or exit. Save current state for resume capability.
Step 3: Generate Research Summary Artifact
After Step 1 completes successfully:
  1. Read waypoint files:
    • waypoints/intervention_metadata.json
      (intervention details)
    • waypoints/01_clinical_research_summary.json
      (research findings)
  2. Create formatted markdown summary: Generate a comprehensive, well-formatted research summary as a markdown artifact with the following structure:
markdown
undefined
本工作流仅执行步骤0和1,然后生成格式化的研究摘要文件。
步骤1:检查现有节点
  • 如果
    waypoints/intervention_metadata.json
    存在:加载元数据,检查步骤0和1是否已完成
  • 如果元数据不存在:从步骤0开始
步骤2:执行研究步骤(0和1)
对于每个步骤(0、1):
  1. 检查完成状态: 如果元数据中显示步骤已完成,跳过并提示“✓ 步骤[X]已完成”
  2. 执行步骤:
    • 显示“▶ 正在执行步骤[X]...”
    • 读取并遵循对应子技能文件中的说明
    • 等待完成
    • 显示“✓ 步骤[X]已完成”
    • 步骤执行方法(按需加载): 仅在准备执行步骤时(而非之前),读取子技能Markdown文件并执行其中所有说明
    • 步骤与文件映射:
      • 步骤0:
        references/00-initialize-intervention.md
        (收集干预措施信息)
      • 步骤1:
        references/01-research-protocols.md
        (临床研究与FDA指南)
  3. 错误处理: 如果步骤执行失败,询问用户是否重试或退出。保存当前状态以便恢复。
步骤3:生成研究摘要文件
步骤1成功完成后:
  1. 读取节点文件:
    • waypoints/intervention_metadata.json
      (干预措施详情)
    • waypoints/01_clinical_research_summary.json
      (研究结果)
  2. 创建格式化Markdown摘要: 生成结构清晰的综合研究摘要,格式如下:
markdown
undefined

Clinical Research Summary: [Intervention Name]

临床研究摘要:[干预措施名称]

Intervention Overview

干预措施概述

  • Type: [Device/Drug]
  • Indication: [Target condition/disease]
  • Description: [Brief intervention description]
  • Mechanism of Action: [How it works]
  • 类型: [器械/药物]
  • 适应症: [目标病症/疾病]
  • 描述: [干预措施简要说明]
  • 作用机制: [工作原理]

Similar Clinical Trials

同类临床试验

[List top 5-10 similar trials with NCT ID, title, phase, status, key findings]
[列出前5-10个同类试验,包含NCT ID、标题、阶段、状态、关键结果]

FDA Regulatory Pathway

FDA监管路径

  • Recommended Pathway: [510(k), PMA, De Novo, IND, NDA, BLA, etc.]
  • Regulatory Basis: [Rationale for pathway selection]
  • Key Requirements: [Major regulatory considerations]
  • 推荐路径: [510(k), PMA, De Novo, IND, NDA, BLA等]
  • 监管依据: 路径选择理由
  • 关键要求: 主要监管考量

FDA Guidance Documents

FDA指南文件

[List relevant FDA guidance documents with links and key excerpts]
[列出相关FDA指南文件,包含链接和关键摘录]

Study Design Recommendations

研究设计建议

  • Suggested Study Type: [RCT, single-arm, etc.]
  • Phase Recommendation: [Phase 1, 2, 3, etc.]
  • Primary Endpoint Suggestions: [Based on similar trials]
  • Sample Size Considerations: [Preliminary thoughts]
  • 建议研究类型: [随机对照试验、单臂试验等]
  • 阶段建议: [1期、2期、3期等]
  • 主要终点建议: 基于同类试验
  • 样本量考量: 初步思路

Key Insights and Recommendations

关键见解与建议

[Synthesized recommendations for protocol development]
[为方案开发提供综合建议]

Next Steps

下一步行动

[If user wants to proceed with full protocol development]

Generated by Clinical Trial Protocol Skill Date: [Current date]

3. **Save artifact:** Write the formatted summary to `waypoints/research_summary.md`

4. **Display completion message:**
✅ RESEARCH COMPLETE
Research Summary Generated: waypoints/research_summary.md
📊 Key Findings: • Similar Trials Found: [X trials] • Recommended Pathway: [Pathway name] • FDA Guidance Documents: [X documents identified] • Study Design: [Recommended design]
📄 The research summary has been saved as a formatted markdown artifact.
Would you like to:
  1. Continue with full protocol generation (steps 2-5)
  2. Exit and review research summary

**Option 1 Logic (Continue to Full Protocol):**
- Set `execution_mode = "full_protocol"`
- Continue to Full Workflow Logic starting from Step 2 (since 0 and 1 are complete)

**Option 2 Logic (Exit):**
- Display: "✓ Research summary saved. Restart the skill anytime to continue with protocol generation."
- Exit orchestrator gracefully

---
[如果用户希望继续生成完整方案]

由临床试验方案技能生成 日期:[当前日期]

3. **保存文件:** 将格式化摘要写入`waypoints/research_summary.md`

4. **显示完成消息:**
✅ 研究完成
已生成研究摘要:waypoints/research_summary.md
📊 关键结果: • 找到同类试验:[X个] • 推荐路径:[路径名称] • FDA指南文件:[识别出X个文件] • 研究设计:[推荐设计]
📄 研究摘要已保存为格式化Markdown文件。
您希望:
  1. 继续生成完整方案(步骤2-5)
  2. 退出并审阅研究摘要

**选项1逻辑(继续生成完整方案):**
- 设置`execution_mode = "full_protocol"`
- 从步骤2开始进入完整工作流逻辑(因为步骤0和1已完成)

**选项2逻辑(退出):**
- 显示:“✓ 研究摘要已保存。随时重启技能即可继续生成方案。”
- 友好退出编排器

---

Full Workflow Logic

完整工作流逻辑

Step 1: Check for Existing Waypoints
  • If
    waypoints/intervention_metadata.json
    exists: Load metadata, check
    completed_steps
    array, resume from next incomplete step
  • If no metadata exists: Start from Step 0
Step 2: Execute Steps in Order
For each step (0, 1, 2, 3, 4, 5):
  1. Check completion status: If step already completed in metadata, skip with "✓ Step [X] already complete"
  2. Execute step: Display "▶ Executing Step [X]...", read and follow the corresponding subskill file instructions, wait for completion, display "✓ Step [X] complete"
    • Step execution method (ON-DEMAND LOADING): When a step is ready to execute (NOT before), read the subskill markdown file and execute ALL instructions within it
    • IMPORTANT: Do NOT read subskill files in advance. Only read them at the moment of execution.
    • Step-to-file mapping:
      • Step 0:
        references/00-initialize-intervention.md
        (read when Step 0 executes)
      • Step 1:
        references/01-research-protocols.md
        (read when Step 1 executes)
      • Step 2:
        references/02-protocol-foundation.md
        (read when Step 2 executes - sections 1-6)
      • Step 3:
        references/03-protocol-intervention.md
        (read when Step 3 executes - sections 7-8)
      • Step 4:
        references/04-protocol-operations.md
        (read when Step 4 executes - sections 9-12)
      • Step 5:
        references/05-concatenate-protocol.md
        (read when Step 5 executes - final concatenation)
  3. Handle errors: If step fails, ask user to retry or exit. Save current state for resume capability.
  4. Display progress: "Progress: [X/6] steps complete", show estimated remaining time
  5. Step 4 Completion Pause: After Step 4 completes, pause and display the Protocol Completion Menu (see below). Wait for user selection before proceeding.
Step 2.5: Protocol Completion Menu
After Step 4 completes successfully, display the EXACT menu below (do not improvise or create alternative options):
✅ PROTOCOL COMPLETE: Protocol Draft Generated

Protocol Details:
  • Study Design: [Design from metadata]
  • Sample Size: [N subjects from metadata]
  • Primary Endpoint: [Endpoint from metadata]
  • Study Duration: [Duration from metadata]

Protocol file: waypoints/02_protocol_draft.md
File size: [Size in KB]

📋 WHAT WOULD YOU LIKE TO DO NEXT?

1. 📄 Review Protocol in Artifact - click on the .md file above

2. 📄 Concatenate Final Protocol (Step 5)

3. ⏸️  Exit and Review Later
Option 1 Logic (Review in Artifact): Pause, let user open the section files, wait for further instruction
Option 2 Logic (Concatenate Protocol):
  1. Execute Step 5 by reading and following
    references/05-concatenate-protocol.md
  2. Step 5 will concatenate all section files into final protocol document
  3. Continue to Step 3 (Final Summary) after Step 5 completes
Option 3 Logic (Exit):
  1. Display: "✓ Protocol sections saved. You can resume with Step 5 anytime to concatenate."
  2. Exit orchestrator gracefully
Step 3: Final Summary
Display completion message with:
  • Intervention name, type (device/drug), indication
  • Protocol details (design, sample size, endpoints, duration)
  • All completed steps list
  • Final deliverable: Complete protocol markdown file location (waypoints/protocol_complete.md)
  • Waypoint files list for reference
  • Important disclaimers (FDA Pre-Sub, biostatistician review, IRB approval required)
  • Thank you message
步骤1:检查现有节点
  • 如果
    waypoints/intervention_metadata.json
    存在:加载元数据,检查
    completed_steps
    数组,从下一个未完成的步骤恢复
  • 如果元数据不存在:从步骤0开始
步骤2:按顺序执行步骤
对于每个步骤(0、1、2、3、4、5):
  1. 检查完成状态: 如果元数据中显示步骤已完成,跳过并提示“✓ 步骤[X]已完成”
  2. 执行步骤: 显示“▶ 正在执行步骤[X]...”,读取并遵循对应子技能文件中的说明,等待完成,显示“✓ 步骤[X]已完成”
    • 步骤执行方法(按需加载): 仅在准备执行步骤时(而非之前),读取子技能Markdown文件并执行其中所有说明
    • 重要提示: 请勿提前读取子技能文件。仅在执行时刻才读取。
    • 步骤与文件映射:
      • 步骤0:
        references/00-initialize-intervention.md
        (步骤0执行时读取)
      • 步骤1:
        references/01-research-protocols.md
        (步骤1执行时读取)
      • 步骤2:
        references/02-protocol-foundation.md
        (步骤2执行时读取 - 第1-6部分)
      • 步骤3:
        references/03-protocol-intervention.md
        (步骤3执行时读取 - 第7-8部分)
      • 步骤4:
        references/04-protocol-operations.md
        (步骤4执行时读取 - 第9-12部分)
      • 步骤5:
        references/05-concatenate-protocol.md
        (步骤5执行时读取 - 最终拼接)
  3. 错误处理: 如果步骤执行失败,询问用户是否重试或退出。保存当前状态以便恢复。
  4. 显示进度: “进度:[X/6]步骤已完成”,显示预计剩余时间
  5. 步骤4完成暂停: 步骤4完成后,暂停并显示方案完成菜单(见下文)。等待用户选择后再继续。
步骤2.5:方案完成菜单
步骤4成功完成后,显示以下精确菜单(请勿即兴创作或添加其他选项):
✅ 方案完成:已生成方案草稿

方案详情:
  • 研究设计:[元数据中的设计]
  • 样本量:[元数据中的受试者数量N]
  • 主要终点:[元数据中的终点]
  • 研究持续时间:[元数据中的时长]

方案文件:waypoints/02_protocol_draft.md
文件大小:[KB为单位的大小]

📋 您接下来想做什么?

1. 📄 在文件中审阅方案 - 点击上方的.md文件

2. 📄 拼接最终方案(步骤5)

3. ⏸️ 退出并稍后审阅
选项1逻辑(在文件中审阅): 暂停,让用户打开章节文件,等待进一步指示
选项2逻辑(拼接方案):
  1. 通过读取并遵循
    references/05-concatenate-protocol.md
    执行步骤5
  2. 步骤5会将所有章节文件拼接成最终方案文档
  3. 步骤5完成后进入步骤3(最终摘要)
选项3逻辑(退出):
  1. 显示:“✓ 方案章节已保存。您可随时恢复步骤5进行拼接。”
  2. 友好退出编排器
步骤3:最终摘要
显示包含以下内容的完成消息:
  • 干预措施名称、类型(器械/药物)、适应症
  • 方案详情(设计、样本量、终点、时长)
  • 所有已完成步骤列表
  • 最终交付物:完整方案Markdown文件位置(waypoints/protocol_complete.md)
  • 供参考的节点文件列表
  • 重要免责声明(需FDA预提交、生物统计学家审阅、IRB批准)
  • 感谢语

Technical Details

技术细节

Waypoint File Formats

节点文件格式

JSON Waypoints (Steps 0, 1):
  • Structured data for programmatic access
  • Small file sizes (1-15KB)
  • Easy to parse and reference
Markdown Waypoints (Steps 2, 3, 4):
  • Step 2:
    02_protocol_foundation.md
    (Sections 1-6)
  • Step 3:
    03_protocol_intervention.md
    (Sections 7-8)
  • Step 4:
    04_protocol_operations.md
    (Sections 9-12)
  • Step 4:
    02_protocol_draft.md
    (concatenated complete protocol)
  • Human-readable protocol documents
  • Can be directly edited by users
  • Individual section files preserved for easier regeneration
JSON节点(步骤0、1):
  • 结构化数据,便于程序化访问
  • 文件体积小(1-15KB)
  • 易于解析和引用
Markdown节点(步骤2、3、4):
  • 步骤2:
    02_protocol_foundation.md
    (第1-6部分)
  • 步骤3:
    03_protocol_intervention.md
    (第7-8部分)
  • 步骤4:
    04_protocol_operations.md
    (第9-12部分)
  • 步骤4:
    02_protocol_draft.md
    (拼接后的完整方案)
  • 人类可读的方案文档
  • 用户可直接编辑
  • 保留单独的章节文件,便于重新生成

Data Minimization Strategy

数据最小化策略

Each step implements aggressive summarization:
  • Keep: Top-N results (5-10 max)
  • Keep: Key facts and IDs (NCT numbers, endpoint types)
  • Keep: Concise rationale (2-3 sentences)
  • Discard: Raw MCP query results (not needed after analysis)
  • Discard: Full FDA guidance text (only excerpts/citations kept)
  • Discard: Lower-ranked search results
每个步骤都实施了积极的摘要策略:
  • 保留: 前N个结果(最多5-10个)
  • 保留: 关键事实和ID(NCT编号、终点类型)
  • 保留: 简明理由(2-3句话)
  • 丢弃: 原始MCP查询结果(分析后无需保留)
  • 丢弃: FDA指南全文(仅保留摘录/引用)
  • 丢弃: 排名较低的搜索结果

Step Independence

步骤独立性

Each subskill is designed to:
  • Read only from waypoint files (not conversation history)
  • Produce complete output in single execution
  • Not depend on conversation context from previous steps
  • Be runnable standalone
每个子技能的设计遵循:
  • 仅从节点文件读取数据(而非对话历史)
  • 单次执行即可生成完整输出
  • 不依赖前序步骤的对话上下文
  • 可独立运行

Error Handling

错误处理

MCP Server Unavailable

MCP服务器不可用

  • Detected in: Step 1
  • Action: Display error with installation instructions
  • Allow user to retry after installing MCP server
  • No fallback available - MCP server is required for protocol research
  • 检测时机:步骤1
  • 操作:显示错误及安装说明
  • 允许用户安装MCP服务器后重试
  • 无备用方案 - MCP服务器是方案研究的必填项

Step Fails or Returns Error

步骤执行失败或返回错误

  • Action: Display error message from subskill
  • Ask user: "Retry step? (Yes/No)"
    • Yes: Re-run step
    • No: Save current state, exit orchestrator
  • 操作:显示子技能返回的错误消息
  • 询问用户:“是否重试步骤?(是/否)”
    • 是:重新运行步骤
    • 否:保存当前状态,退出编排器

User Interruption

用户中断

  • All progress saved in waypoint files
  • User can resume anytime by restarting the skill
  • Workflow automatically detects completed steps and resumes from next step
  • No data loss
  • 所有进度自动保存在节点文件中
  • 用户可随时重启技能恢复
  • 工作流会自动检测已完成步骤并从下一步开始
  • 无数据丢失

Disclaimers

免责声明

⚠️ IMPORTANT: This protocol generation tool provides preliminary clinical study protocol based on NIH/FDA guidelines and similar trials. It does NOT constitute:
  • Official FDA or IRB determination or approval
  • Medical, legal, or regulatory advice
  • Substitute for professional biostatistician review
  • Substitute for FDA Pre-Submission meeting
  • Guarantee of regulatory or clinical success
REQUIRED before proceeding with clinical study:
  • Biostatistician review and sample size validation
  • FDA Pre-Submission meeting (Q-Submission for devices, Pre-IND for drugs)
  • IRB review and approval
  • Clinical expert and regulatory consultant engagement
  • Legal review of protocol and informed consent
  • Site investigator review and input
  • Sponsor completion of all [TBD] items in protocol
PROFESSIONAL CONSULTATION STRONGLY RECOMMENDED
Clinical trial protocols are complex, high-stakes documents requiring expertise across multiple disciplines. Professional consultation with clinical trial experts, biostatisticians, and regulatory affairs specialists is essential before proceeding with clinical study planning.
⚠️ 重要提示: 本方案生成工具基于NIH/FDA指南和同类试验,提供初步的临床研究方案。它不构成:
  • FDA或IRB的官方决定或批准
  • 医疗、法律或监管建议
  • 替代专业生物统计学家的审阅
  • 替代FDA预提交会议
  • 监管或临床成功的保证
开展临床研究前必须完成:
  • 生物统计学家审阅及样本量验证
  • FDA预提交会议(器械为Q-Submission,药物为Pre-IND)
  • IRB审阅与批准
  • 临床专家和监管顾问参与
  • 方案和知情同意书的法律审阅
  • 研究机构研究者的审阅与意见
  • 申办者完成方案中所有[TBD]项
强烈建议寻求专业咨询
临床试验方案是复杂、高风险的文档,需要多学科专业知识。在开展临床研究规划前,必须咨询临床试验专家、生物统计学家和监管事务专家。

Implementation Requirements

实施要求

When this skill is invoked:
  1. Display the welcome message with mode selection (shown in "Startup: Welcome and Mode Selection" section)
  2. Wait for user mode selection (1: Research Only, 2: Full Protocol, 3: Exit)
  3. Execute based on selected mode:
    • Research Only Mode (Option 1):
      • Execute Research Only Workflow Logic (Steps 0-1 only)
      • Generate formatted research summary as .md artifact
      • Offer option to continue with full protocol or exit
    • Full Protocol Mode (Option 2):
      • Execute Full Workflow Logic (Steps 0-5)
      • Check for existing waypoints and resume from last completed step
      • OR start from Step 0 if no waypoints exist
      • Execute all steps sequentially until complete
  4. For each step execution (LAZY LOADING - On-Demand Only):
    • ONLY when a step is ready to execute, read the corresponding subskill file
    • Do NOT read subskill files in advance or "to prepare"
    • Example: When Step 1 needs to run, THEN read
      references/01-research-protocols.md
      and follow its instructions
    • For protocol development: Execute Steps 2, 3, 4 sequentially in order
    • Do NOT try to execute multiple steps in parallel - run sequentially
    • Read each step's subskill file only when that specific step is about to execute
  5. Research summary artifact generation (Research Only Mode):
    • After Step 1 completes, read waypoint files
    • Generate comprehensive, well-formatted markdown summary
    • Save to
      waypoints/research_summary.md
    • Display completion message with key findings
  6. Handle errors gracefully:
    • If a step fails, give user option to retry or exit
    • If MCP server unavailable, explain how to install
    • All progress is saved automatically in waypoints
  7. Track progress:
    • Update
      waypoints/intervention_metadata.json
      after each step
    • Show progress indicators to user (e.g., "Progress: 3/6 steps complete" or "Progress: 2/2 research steps complete")
    • Provide clear feedback on what's happening
  8. Final output:
    • Research Only: Display research summary location and offer to continue with full protocol
    • Full Protocol: Congratulate user, display protocol location and next steps
    • Remind user of disclaimers
调用本技能时:
  1. 显示带模式选择的欢迎消息(见“启动:欢迎与模式选择”部分)
  2. 等待用户选择模式(1:仅研究,2:完整方案,3:退出)
  3. 根据所选模式执行:
    • 仅研究模式(选项1):
      • 执行仅研究工作流逻辑(仅步骤0-1)
      • 生成格式化为.md文件的研究摘要
      • 提供继续生成完整方案或退出的选项
    • 完整方案模式(选项2):
      • 执行完整工作流逻辑(步骤0-5)
      • 检查现有节点并从上次完成的步骤恢复
      • 或如果无节点则从步骤0开始
      • 按顺序执行所有步骤直至完成
  4. 每个步骤的执行(延迟加载 - 仅按需):
    • 仅在准备执行步骤时,读取对应子技能文件
    • 请勿提前读取子技能文件或“为做准备”而读取
    • 示例:当需要运行步骤1时,才读取
      references/01-research-protocols.md
      并遵循其说明
    • 方案开发: 按顺序执行步骤2、3、4
    • 请勿尝试并行执行多个步骤 - 按顺序运行
    • 仅在即将执行特定步骤时,才读取该步骤的子技能文件
  5. 研究摘要文件生成(仅研究模式):
    • 步骤1完成后,读取节点文件
    • 生成结构清晰的格式化Markdown摘要
    • 保存到
      waypoints/research_summary.md
    • 显示包含关键结果的完成消息
  6. 优雅处理错误:
    • 如果步骤执行失败,给用户重试或退出的选项
    • 如果MCP服务器不可用,说明安装方法
    • 所有进度自动保存在节点中
  7. 跟踪进度:
    • 每个步骤完成后更新
      waypoints/intervention_metadata.json
    • 向用户显示进度指示器(例如:“进度:3/6步骤已完成”或“进度:2/2研究步骤已完成”)
    • 提供清晰的操作反馈
  8. 最终输出:
    • 仅研究模式: 显示研究摘要位置并提供继续生成完整方案的选项
    • 完整方案模式: 向用户表示祝贺,显示方案位置和下一步行动
    • 提醒用户免责声明