Agent Skillsnasa/fprime › fprime-component-design-fpp

fprime-component-design-fpp

GitHub

用于F Prime组件设计阶段,将需求转化为FPP模型以定义接口。指导创建包含端口、命令、事件等接口的.fpp文件,并生成C++基础代码。

.github/skills/fprime-component-design-fpp/SKILL.md nasa/fprime

Trigger Scenarios

需要编写F Prime组件的FPP接口定义文件 确认需求后需进行组件架构设计

Install

npx skills add nasa/fprime --skill fprime-component-design-fpp -g -y
More Options

Non-standard path

npx skills add https://github.com/nasa/fprime/tree/devel/.github/skills/fprime-component-design-fpp -g -y

Use without installing

npx skills use nasa/fprime@fprime-component-design-fpp

指定 Agent (Claude Code)

npx skills add nasa/fprime --skill fprime-component-design-fpp -a claude-code -g -y

安装 repo 全部 skill

npx skills add nasa/fprime --all -g -y

预览 repo 内 skill

npx skills add nasa/fprime --list

SKILL.md

Frontmatter
{
    "name": "fprime-component-design-fpp",
    "description": "FPP design phase of F Prime component development. Guides the agent through creating the FPP model that codifies the component's interface — ports, commands, events, telemetry, and parameters. Trigger when the requirements are confirmed and the next step is to write the .fpp file. Keywords: F Prime, FPP, design, model, ports, commands, telemetry, events, parameters, component definition."
}

Skill: F Prime Component Design (FPP)

The design phase codifies requirements into an FPP model — the single source of truth for the component's interface. The FPP compiler generates C++ base classes, test harnesses, and dictionaries from this model.

For FPP syntax and modeling details, see the FPP User's Guide. For component/port/command kinds, see Selecting Component, Port, and Command Kinds.

Reference the F Prime design patterns where possible — standard solutions exist for common needs:

  • Rate Group Pattern — docs/user-manual/design-patterns/rate-group.md
  • Health Checking — docs/user-manual/design-patterns/health-checking.md
  • Manager-Worker — docs/user-manual/design-patterns/manager-worker.md
  • Application-Manager-Driver — docs/user-manual/design-patterns/app-man-drv.md
  • Common Port Patterns — docs/user-manual/design-patterns/common-port-patterns.md
  • Hub Pattern — docs/user-manual/design-patterns/hub-pattern.md
  • Subtopologies — docs/user-manual/design-patterns/subtopologies.md

STOP — Confirm Before Designing

Before writing any FPP:

  1. Requirements must be confirmed (see fprime-component-requirements).
  2. Ask the user about any ambiguity in:
    • Port types (does a suitable port already exist, or do we need a new one?)
    • Command argument types and names
    • Telemetry channel update frequency semantics (on-change vs. periodic)
    • Event severity levels (DIAGNOSTIC, ACTIVITY_LO, ACTIVITY_HI, WARNING_LO, WARNING_HI, FATAL)
    • Parameter default values
    • Whether to use existing F Prime standard ports (Fw.Signal, Svc.Sched, Svc.Ping, etc.)

Step-by-Step Process

Step 0 — Scaffold with fprime-util

Start with fprime-util new --component for the base structure. This generates the initial directory layout, CMakeLists.txt, and FPP stub.

Step 1 — Choose Component Kind

Based on requirements (see docs/user-manual/framework/component-and-port-selection.md for the full decision guide):

Work Type Component Kind When to Use
Cyclic (hard deadline) passive Rate-group driven, no own thread
Cyclic with internal queue queued Deferred work within a cycle
Event-driven active Owns a thread, processes async messages

Ask the user if unsure. The component kind determines thread ownership and port synchronization semantics.

Step 2 — Define Ports

For each interface requirement, define input/output ports. Port kinds:

  • sync input — executes in caller's thread
  • async input — enqueued, executes in component's thread
  • guarded input — sync with component-wide mutex

See the FPP User's Guide for port definition syntax.

Standard framework ports to consider including:

Need Port Import
Rate-group scheduling sync input port run: Svc.Sched import Svc.Sched
Health ping async input port pingIn: Svc.Ping import Svc.Ping
Time access time get port timeCaller (special port)
Command handling command recv port cmdIn (special port)
Event logging event port eventOut (special port)
Telemetry telemetry port tlmOut (special port)

If the component is active, it probably needs health-ping support. Requirements should imply whether rate-group scheduling is needed. Ask the user only if unsure about which standard services to connect to.

Step 3 — Define Commands, Telemetry, Events, Parameters

Follow the FPP User's Guide for syntax. Follow F Prime Style Guidelines for naming conventions:

  • Commands: UPPER_SNAKE_CASE
  • Telemetry channels: PascalCase
  • Events: PascalCase
  • Parameters: PascalCase

For each construct, derive names, types, and semantics from the confirmed requirements. Ask the user if:

  • The command kind (sync/async/guarded) is ambiguous
  • The event severity level is unclear
  • Parameter defaults or valid ranges are unspecified

Step 4 — Build and Verify

fprime-util build

The FPP model should compile and generate the base class. Fix any FPP errors before proceeding.

Step 5 — Confirm Design with User

Present the FPP model to the user and wait for confirmation. The model is the interface contract — implementation and tests are written against it.


New Port Definitions

If a requirement needs a port type that doesn't exist:

  1. Ask the user what the port should carry (arguments, return type).
  2. Create a new .fpp file in an appropriate Ports/ directory. See the FPP User's Guide for port definition syntax.
  3. Add to CMakeLists.txt and register with add_fprime_subdirectory.

Anti-Patterns

  • Guessing port types — always check existing ports first and ask
  • Using async ports for cyclic/deadline work
  • Omitting time get port when telemetry or events are defined
  • Hardcoding opcodes/IDs without checking for conflicts (let the build system assign them, or ask the user for the base ID)
  • Using bare primitive types (int, unsigned) — use U32, FwSizeType, etc. (CPP-3, CPP-28)

Version History

  • 7d8f579 Current 2026-08-20 11:33

Same Skill Collection

.github/skills/agent-skill-authoring/SKILL.md
.github/skills/ci-test-runtime-policy/SKILL.md
.github/skills/fprime-cmake-build-system/SKILL.md
.github/skills/fprime-component-development/SKILL.md
.github/skills/fprime-component-implementation/SKILL.md
.github/skills/fprime-component-integration-test/SKILL.md
.github/skills/fprime-component-requirements/SKILL.md
.github/skills/fprime-component-unit-test/SKILL.md
.github/skills/fprime-ground-input-tracing/SKILL.md
.github/skills/fprime-hardware-input-tracing/SKILL.md
.github/skills/fprime-topology-development/SKILL.md
.github/skills/fprime-unit-testing/SKILL.md
.github/skills/jpl-design-principles/SKILL.md
.github/skills/maintainer-lookup/SKILL.md
.github/skills/post-inline-review/SKILL.md
.github/skills/pr-diff-scoping/SKILL.md
.github/skills/prompt-injection-precheck/SKILL.md
.github/skills/re-review-state/SKILL.md
.github/skills/triage-classifier/SKILL.md
.github/skills/write-system-functional-doc/SKILL.md
.github/skills/fprime-cpp-design/SKILL.md

Metadata

Files
0
Version
efce12d
Hash
1631f6bd
Indexed
2026-08-20 11:33

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-17 05:32
浙ICP备14020137号-1