--- name: fprime-component-development description: >- Top-level flight development process for F Prime components. Orchestrates the full lifecycle from requirements through integration testing. Trigger on any task involving creating a new F Prime component or adding significant functionality to an existing one. Keywords: F Prime, component, development, lifecycle, flight software, requirements, design, implementation, unit test, integration test. --- # Skill: F Prime Component Development Process The flight development process for F Prime components follows a strict sequential lifecycle. Each phase produces artifacts that feed the next. **Never skip a phase or guess at requirements/design decisions — always ask the user.** For the canonical process description, see the [F´ Development Process](https://github.com/nasa/fprime/blob/devel/docs/user-manual/overview/development-practice.md). --- ## Process Overview ``` 1. Requirements → 2. Design (FPP) → 3. Test Design → 4. Implementation (C++) → 5. Unit Test → 6. Integration Test ``` Each phase has a dedicated skill with detailed guidance: | Phase | Skill | Key Output | |---|---|---| | 1. Requirements | `fprime-component-requirements` | Written requirements list | | 2. Design | `fprime-component-design-fpp` | `.fpp` model file | | 3. Test Design | `fprime-system-test-design` + `fprime-component-unit-test` (test list) | System test plan, fault menu, unit-test list | | 4. Implementation | `fprime-component-implementation` | `.cpp` / `.hpp` files | | 5. Unit Test | `fprime-component-unit-test` | `test/ut/` test suite | | 6. Integration Test | `fprime-component-integration-test` | `test/int/` pytest suite | The Component Development Checklist is filled alongside, in three passes; each skill runs [fprime-auto-checklist](https://github.com/LeStarch/fprime-auto-checklist) with `--stage`, decides the rows it queues with `decide`, and performs no development step itself: | After | Skill | Decides | |---|---|---| | phase 3 (SDD, model and test design reviewed, before Approve SDD) | `fprime-checklist-design` | sections 1–2 review rows; creates `docs/checklist.md` beside the SDD and appends the SDD's last line, `Component Development Checklist: [checklist.md](checklist.md)` | | phase 5 (implementation + unit tests) | `fprime-checklist-implementation` | sections 3–4 review rows, plus any earlier decision the tool flags `STALE` because the SDD or model changed | | system testing / run-for-record | `fprime-checklist-closeout` | section 5, anything stale, and an audit of every tool-decided row | Rows that depend on a step the process has not performed (topology build, hardware run, CI) stay UNCHECKED until it is; the checklist reports what was done, it does not do it. --- ## Cardinal Rules 1. **Ask, don't guess.** If you are unsure about a requirement, interface, behavior, naming convention, or deployment context — **stop and ask the user**. Wrong assumptions in flight software are costly. 2. **Each phase gates the next — with explicit user approval.** When an agent orchestrates this skill, the requirements, design and test-design phases first pass the review loop of `.github/agents/_shared/phase-review-loop.md`; the writing skills themselves do not iterate. Present the requirements (with their review record, when the loop ran) to the user and obtain approval before starting design. Present the design (FPP model, port layout, behavior, and any configuration) to the user and obtain explicit confirmation before test design. Present the test design (system test plan, fault menu, unit-test list — written from requirements and model, not code) and obtain **explicit confirmation before writing any implementation or unit-test code**. This applies even to trivial or pass-through components; simplicity does not waive the gate. At every gate the SDD (`docs/sdd.md`) is the one document the user reads — requirements, design and tests are its sections; review records and the plan are attachments, never a second document or a pack in its place. Once the test design is confirmed, write the unit tests it lists before the implementation, following the test-driven development pattern (see `docs/how-to/test-driven-development.md`). 3. **Reference the C++ design skill.** All implementation must comply with `fprime-cpp-design` (CPP-1 through CPP-37). Consult it before writing any C++ code. 4. **Follow Test-Driven Development.** The workflow is: design in FPP → design tests (phase 3) → write the listed unit tests → implement to pass them; phases 4 and 5 interleave this way, the rest of the sequence is strict. See the [TDD guide](https://github.com/nasa/fprime/blob/devel/docs/how-to/test-driven-development.md). 5. **Document as you go.** Each component should have an SDD (`docs/sdd.md`) that records requirements coverage, port descriptions, and design rationale. --- ## When to Use This Skill - Creating a new component from scratch - Adding significant new functionality to an existing component (new ports, commands, telemetry, state machines) - Migrating or refactoring a component where the interface changes For small bug fixes or implementation-only changes that don't alter the component's interface, you may skip directly to the implementation and unit test phases — but confirm with the user first. --- ## Quick Reference: Key Commands | Action | Command | |---|---| | Create new component | `fprime-util new --component` | | Create new port | `fprime-util new --port` | | Generate impl stubs | `fprime-util impl` | | Generate UT stubs | `fprime-util impl --ut` | | Build component | `fprime-util build` | | Run unit tests | `fprime-util check` | | Run with coverage | `fprime-util check --coverage` | | Generate UT build | `fprime-util generate --ut` | | Scaffold rule-based tests | `fprime-util new --rule-based-test` |