跳到正文
Skillpedia
技术文档12k · #11498

fprime-component-requirements

它能做什么

它帮助 AI 提出正确的问题,并为飞行软件组件起草需求清单,由你在设计开始前进行审核。适用于定义新组件的工程师。

适用场景

  • ✓当你开始一个新的 F Prime 组件,需要把其需求写下来时。
  • ✓当你想定义组件的命令、遥测、事件和参数时。
  • ✓当下一步是设计,而需求必须先得到确认时。

技能链接

https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-requirements/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-requirements/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我为一个读取温度传感器的新 F Prime 组件编写需求。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会询问组件的用途、它与哪些组件通信,以及它的命令,然后起草需求,供你审核并确认。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Skill: F Prime Component Requirements

Requirements define what the component must do — its behaviors, interfaces, and constraints. This phase produces a written requirements list that drives all subsequent design and testing.

For context on the overall development process and where requirements fit, see the F´ Development Process. For guidance on work types and component kinds, see Selecting Component, Port, and Command Kinds.


STOP — Ask the User

You may draft requirements based on user input, but you cannot do requirements in isolation from the user. Draft requirements must stem from user-provided context and must be reviewed with the user before proceeding into development.

If any of the following are unclear, ask before proceeding:

  • What is the component's purpose / role in the system?
  • What other components does it interact with (upstream / downstream)?
  • What commands should the ground operator be able to send?
  • What telemetry should the component report?
  • What events (logs) should it emit and at what severity?
  • What parameters should be configurable at runtime?
  • Is this work event-driven, deadline-driven, or background? (See docs/user-manual/framework/component-and-port-selection.md for an explanation of the types of work.)
  • Are there any critical deadlines for this work?
  • Are there fault-handling or off-nominal requirements?
  • What existing F Prime components (Svc/, Drv/) can be built on top of?

Step-by-Step Process

Step 1 — Gather Context

Ask the user for:

  1. Component name and module: Where does this live in the project tree? (e.g., MyProject/Components/ThermalController)
  2. Work type: Event-driven, deadline-driven (cyclic), or background? This determines the component kind (active, passive, or queued). See docs/user-manual/framework/component-and-port-selection.md.
  3. High-level purpose: One-paragraph description of what this component does.

Step 2 — Define Behavioral Requirements

Requirements are written as "shall" statements; each must be something that can be verified (a pass/fail observable). Goals that are not pass/fail ("should") go in the SDD narrative, not the table.

Requirements are typically shipped as a table:

ID Shall Statement Rationale Verification Method
REQ-<Component>-001 The component shall <behavior>. <Why: request element, parent requirement, or fault scenario> <Unit test / integration test / inspection — strongest feasible, in that order>
REQ-<Component>-002 ... ... ...

Categories to cover:

Category Ask the user
Nominal behavior What does it do on each cycle / invocation?
Commands What operator commands does it accept? What are the args?
Telemetry What values does it periodically report?
Events What noteworthy occurrences does it log? Severity?
Parameters What runtime-configurable values does it store?
Error handling How does it respond to invalid inputs or faults?
State management Does it have modes or states? Transitions?

Step 3 — Define Interface Requirements

For each external connection, define what data the component exchanges — not port types (those are a design decision, not a requirement):

  • Inputs: What data/invocations does the component receive? From whom?
  • Outputs: What data does the component send out? To whom?
  • Data types: What are the arguments/payloads crossing each interface?

Port types (sync/async/guarded) and FPP port definitions are determined during the Design phase based on the work type and timing constraints established here.

Step 4 — Confirm with User

Present the full requirements table to the user and wait for confirmation before proceeding to design. Requirements are the contract — everything downstream is verified against them.


Output Artifact

A requirements document (typically captured in the component's docs/sdd.md or as a structured list in the PR description) with:

  • Component name, module, and work type
  • Requirements table (ID, shall statement, rationale, verification method)
  • Interface summary (data exchanged, not port types)
  • Any constraints
常见问题

AI 能单独编写需求吗?

不能。该技能说明,草稿必须以你的输入为基础,并在开发前与你一起审核。

它会问哪些问题?

它会询问组件的职责、连接对象、所需的命令和遥测,以及它的工作是事件驱动还是后台运行。

它涵盖事件和参数吗?

涵盖。它会询问组件应具备哪些事件、严重级别和运行时参数。

详情

作者的原始描述

Requirements phase of F Prime component development. Guides the agent through eliciting, documenting, and confirming component requirements before any design or code is written. Trigger when starting a new component or when the user says to define requirements. Keywords: F Prime, requirements, SDD, behavior, interface, specification.

repo: nasa/fprime

热度

GitHub 星标
12k
排名
#11498
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能