build-an-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!--
This source file is part of the Stanford Spezi open-source project.
SPDX-FileCopyrightText: 2026 Stanford University and the project authors (see CONTRIBUTORS.md)
SPDX-License-Identifier: MIT
-->
<!--
本源码文件属于斯坦福Spezi开源项目的一部分。
SPDX-FileCopyrightText: 2026 斯坦福大学及项目作者(详见 CONTRIBUTORS.md)
SPDX-License-Identifier: MIT
-->
Build an App
构建应用
Walk a user through building a digital health app from start to finish. This skill orchestrates the other skills in this repository — it asks a few questions, decides which planning skills are needed, runs them in order, and hands off to implementation.
引导用户从头至尾构建一款数字健康应用。该Skill会协调本仓库中的其他Skill——它会提出若干问题,确定所需的规划类Skill,按顺序运行它们,然后过渡到实现阶段。
When to Use
适用场景
Use this skill when a user wants to:
- build a new digital health app from scratch
- figure out where to start on a health app idea
- go from idea to running code with guidance at each step
Do not use this skill if the user wants to run a specific skill directly (e.g., they ask for FHIR data model design). Let them use that skill on its own.
当用户有以下需求时,可使用本Skill:
- 从零开始构建一款全新的数字健康应用
- 梳理健康应用创意的着手方向
- 在每一步的指导下,从创意转化为可运行的代码
如果用户想要直接运行某个特定Skill(例如,他们要求进行FHIR数据模型设计),则不要使用本Skill,让他们直接使用对应的Skill即可。
Working Style
工作方式
You are a conversational guide. Explain what each step does and why before running it. Ask focused questions. Let the user review and adjust after each step. Move at their pace — do not rush through planning.
你是一位对话式引导者。在运行每个步骤前,解释该步骤的作用及原因。提出针对性问题。让用户在每个步骤完成后进行审核和调整。配合用户的节奏推进——不要急于完成规划。
Step 1: Understand the Idea
步骤1:理解需求
Ask these questions to understand what the user wants to build:
- "What health problem are you trying to solve, and for whom?"
- "Is this tied to a research study, or is it a standalone product?"
- "Does the app need to work on both iOS and Android, or is Apple-only fine?"
- "Will it collect health data from the phone (like HealthKit, step counts, heart rate)?"
- "How far along are you — just an idea, have detailed requirements, or ready to start coding?"
If the user already has a clear problem statement, skip question 1 and use what they gave you.
提出以下问题,了解用户想要构建的内容:
- "你想要解决什么健康问题?目标用户是谁?"
- "这是关联到研究项目,还是一款独立产品?"
- "应用需要同时支持iOS和Android,还是仅支持Apple系统即可?"
- "应用是否需要从手机收集健康数据(如HealthKit、步数、心率)?"
- "目前进度如何——只是有个创意、已有详细需求,还是已准备好开始编码?"
如果用户已经有明确的问题陈述,则跳过问题1,直接使用他们提供的内容。
Step 2: Decide What's Needed
步骤2:确定所需Skill
Based on the answers, select which skills to run. Not every project needs every skill.
Always include:
- — define the problem clearly before building
biodesign-needs-finding - — choose the right template and clone it
spezi-platform-selection - — design the user experience
digital-health-ux-planning - — turn plans into a milestone-based build sequence
app-build-planner
Include when relevant:
| Condition | Skill | Why |
|---|---|---|
| App stores health data (vitals, assessments, patient records) | | Defines entities, relationships, and FHIR mappings |
| App needs FHIR interoperability or connects to EHRs | | Maps clinical concepts to concrete FHIR resources |
| App handles PHI, needs HIPAA review, or has regulatory concerns | | Identifies privacy, regulatory, and governance requirements |
| App is part of a research study with enrollment and assessments | | Plans the study protocol, consent, and data collection |
Present the selected skills to the user with a brief explanation of each. Let them add or remove any before proceeding.
If the user says they already have requirements or just want to code:
Check if planning documents already exist in in their project. If some are there, skip those skills and pick up where they left off. If they have an , skip straight to building.
docs/planning/implementation-plan.md根据用户的回答,选择要运行的Skill。并非每个项目都需要所有Skill。
必须包含的Skill:
- —— 在构建前明确界定问题
biodesign-needs-finding - —— 选择合适的模板并克隆
spezi-platform-selection - —— 设计用户体验
digital-health-ux-planning - —— 将规划转化为基于里程碑的构建序列
app-build-planner
按需包含的Skill:
| 适用场景 | Skill | 原因 |
|---|---|---|
| 应用存储健康数据(生命体征、评估结果、患者记录) | | 定义实体、关系及FHIR映射规则 |
| 应用需要FHIR互操作性或连接到电子健康档案(EHR)系统 | | 将临床概念映射为具体的FHIR资源 |
| 应用处理受保护健康信息(PHI)、需要HIPAA审核,或涉及合规相关问题 | | 识别隐私、合规及治理要求 |
| 应用是研究项目的一部分,涉及受试者招募和评估 | | 规划研究方案、知情同意流程及数据收集方式 |
向用户展示选定的Skill,并为每个Skill提供简短说明。让用户在继续前可以添加或移除Skill。
如果用户表示已有需求或只想直接编码:
检查他们项目的目录中是否已有规划文档。如果存在部分文档,则跳过对应的Skill,从已完成的部分继续。如果他们已有,则直接跳转到构建阶段。
docs/planning/implementation-plan.mdStep 3: Run Each Skill
步骤3:运行每个Skill
Work through the selected skills in this order. For each one:
- Tell the user what the skill does and what it will produce (one sentence)
- Read the skill's SKILL.md and follow its instructions
- After completion, verify the output was saved to the correct path
- Briefly summarize what was produced before moving to the next skill
按以下顺序处理选定的Skill。对于每个Skill:
- 告诉用户该Skill的作用及产出结果(一句话概括)
- 阅读该Skill的SKILL.md并遵循其指令
- 完成后,验证输出是否已保存到正确路径
- 在进入下一个Skill前,简要总结产出内容
Order and output paths
顺序及输出路径
| # | Skill | Output Path | What it Produces |
|---|---|---|---|
| 1 | | | Need statement: problem, population, outcome |
| 2 | | Cloned template repository | Working project directory with template code |
| 3 | | | User journeys, onboarding, workflows |
| 4 | | | Study protocol, enrollment, assessments |
| 5 | | | Entities, relationships, FHIR recommendations |
| 6 | | | FHIR resources, terminology, relationships |
| 7 | | | Privacy domains, controls, required decisions |
| 8 | | | Milestone-based build sequence |
Skills marked as not needed in Step 2 are skipped.
After running (skill 2), all subsequent outputs are saved inside the cloned template repository.
spezi-platform-selectionBetween each skill, ask: "Ready to move on to the next step, or do you want to adjust anything?"
| 序号 | Skill | 输出路径 | 产出内容 |
|---|---|---|---|
| 1 | | | 需求陈述:问题、目标人群、预期成果 |
| 2 | | 克隆的模板仓库 | 包含模板代码的可运行项目目录 |
| 3 | | | 用户旅程、引导流程、工作流 |
| 4 | | | 研究方案、招募流程、评估内容 |
| 5 | | | 实体、关系、FHIR建议 |
| 6 | | | FHIR资源、术语、关系 |
| 7 | | | 隐私领域、管控措施、需决策事项 |
| 8 | | | 基于里程碑的构建序列 |
步骤2中标记为不需要的Skill将被跳过。
运行完(Skill 2)后,所有后续产出都将保存到克隆的模板仓库内。
spezi-platform-selection在每个Skill之间,询问用户:"准备好进入下一步了吗?还是你想要调整一些内容?"
Step 4: Start Building
步骤4:开始构建
After saves , summarize everything that was produced:
app-build-plannerdocs/implementation-plan.mdHere's what we built:
Project: [cloned template path]
Planning documents:
docs/planning/need-statement.md
docs/planning/ux-brief.md
docs/planning/data-model-brief.md (if created)
docs/planning/fhir-data-model.md (if created)
docs/planning/compliance-brief.md (if created)
docs/planning/study-brief.md (if created)
Implementation plan:
docs/implementation-plan.md
[N] milestones, starting with [Milestone 1 name]
Ready to start building Milestone 1?If the user says yes, read , find Milestone 1, and begin implementing it.
docs/implementation-plan.md在保存好后,总结所有产出内容:
app-build-plannerdocs/implementation-plan.md以下是我们完成的内容:
项目:[克隆的模板路径]
规划文档:
docs/planning/need-statement.md
docs/planning/ux-brief.md
docs/planning/data-model-brief.md (若已创建)
docs/planning/fhir-data-model.md (若已创建)
docs/planning/compliance-brief.md (若已创建)
docs/planning/study-brief.md (若已创建)
实现计划:
docs/implementation-plan.md
共[N]个里程碑,从[里程碑1名称]开始
准备好开始构建里程碑1了吗?如果用户同意,则读取,找到里程碑1并开始实现。
docs/implementation-plan.mdGuardrails
约束规则
- Do not skip needs-finding unless the user explicitly has a well-defined need statement already.
- Do not skip platform selection unless the user has already cloned a template repository.
- Respect the user's pace. Let them review and adjust after each skill completes. Do not auto-advance without checking.
- Do not force unnecessary planning. If a simple app does not handle PHI, do not run compliance planning. If it does not use FHIR, do not run FHIR data model design.
- Handle the "skip to coding" case. If the user already has planning docs in , acknowledge them and pick up from wherever they left off. If they have an implementation plan, skip straight to building.
docs/planning/ - Each skill is interactive. When you read a skill's SKILL.md and follow its instructions, the user should participate — answer questions, review outputs, provide input. Do not simulate their answers.
- 除非用户明确已有清晰的需求陈述,否则不要跳过需求调研环节
- 除非用户已克隆模板仓库,否则不要跳过平台选择环节
- 尊重用户的节奏。让用户在每个Skill完成后进行审核和调整。未经确认不要自动推进。
- 不要强制进行不必要的规划。如果是简单应用且不处理PHI,则无需运行合规规划Skill。如果不使用FHIR,则无需运行FHIR数据模型设计Skill。
- 处理“直接编码”的场景。如果用户的目录中已有规划文档,则确认这些文档并从已完成的部分继续。如果他们已有实现计划,则直接跳转到构建阶段。
docs/planning/ - 每个Skill都是交互式的。当你读取某个Skill的SKILL.md并遵循其指令时,用户应参与其中——回答问题、审核产出、提供输入。不要模拟用户的回答。