Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/agents/algo-implementer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ handoffs:
prompt: "Review the deployed algorithm against AGENTS.md: float-only, no heap, tests, doc, CMake wiring."
---

# Algorithm Implementer

You deploy ONE algorithm at a time from its `roadmap/<domain>/<Name>/` spec into the codebase.
Authoritative rules: `AGENTS.md`. Recipe: `roadmap/DEPLOYMENT.md`. Follow both exactly.

Expand Down
2 changes: 2 additions & 0 deletions .github/agents/executor.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ handoffs:
prompt: "Review the implementation changes made above against robotics-toolbox project standards."
---

# Executor

Canonical rules: `AGENTS.md`. Implement exactly what's asked — nothing more.

## Workflow
Expand Down
11 changes: 5 additions & 6 deletions .github/agents/modernizer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ handoffs:
prompt: "Review the refactoring changes made above against robotics-toolbox project standards."
---

# Modernizer

Canonical rules: `AGENTS.md`. You modernize ONE pre-roadmap algorithm at a time so it matches
current roadmap conventions. Refactor is **behavior-preserving** — no new features, no public-API
change unless required to remove duplication.
Expand Down Expand Up @@ -39,15 +41,12 @@ The `test/Test*.cpp` is a first-class deliverable of every modernization. Audit
- [ ] `EXPECT_NEAR` + `math::Tolerance<float>()` for float comparisons.
- [ ] Anonymous-namespace fixture; macros outside; no heap; no comments.

Keep `TYPED_TEST` where the algorithm is multi-type; behavior and assertions stay identical.
Behavior and assertions stay identical when restructuring a test.

## Preserve types — hard rule

Keep existing `Q15`/`Q31` support and its `TYPED_TEST` where the algorithm already has it — do
**NOT** strip multi-type. The multi-type guard
(`static_assert(math::is_qnumber<T>::value || std::is_floating_point_v<T>, ...)`) stays for those.
Float-only migration applies ONLY to algorithms that are already float-only; those follow
`static_assert(std::is_floating_point_v<T>)` + `TEST_F` on `float`.
Every algorithm in this repository is float-only: `static_assert(std::is_floating_point_v<T>)` +
`TEST_F` on `float`. Do not introduce `Q15`/`Q31` or `TYPED_TEST` while modernizing.

## Memory — quick reference

Expand Down
2 changes: 2 additions & 0 deletions .github/agents/orchestrator.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ handoffs:
prompt: "Refactor the pre-roadmap algorithm described above to reuse shared utilities and simplify tests, following robotics-toolbox conventions."
---

# Orchestrator

Triage requests and route to the right specialist. Do NOT implement or plan yourself.

## Workflow
Expand Down
2 changes: 2 additions & 0 deletions .github/agents/planner.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ handoffs:
prompt: "Implement the plan outlined above, following all project conventions strictly."
---

# Planner

Canonical rules: `AGENTS.md`. Produce plans only — no code edits.

## Workflow
Expand Down
2 changes: 2 additions & 0 deletions .github/agents/reviewer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ handoffs:
prompt: "Revise the implementation plan based on the review feedback above."
---

# Reviewer

Canonical rules: `AGENTS.md`. Review only — no file modifications.

## Workflow
Expand Down
2 changes: 2 additions & 0 deletions .github/agents/unit-tester.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ handoffs:
prompt: "Review the authored unit tests against AGENTS.md, testing.instructions.md, and TESTING.md: TEST_F on float, StrictMock only, no heap, one behaviour per test, independent reference values, no redundant cases, CMake wiring, tests green."
---

# Unit Tester

You add or extend the unit tests for ONE algorithm at a time in
`robotics/<domain>/test/Test<Name>.cpp`. Authoritative rules: `AGENTS.md`. Testing rules:
`.github/instructions/testing.instructions.md`. Metric families per algorithm:
Expand Down
4 changes: 3 additions & 1 deletion .github/instructions/robotics-cpp.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ Apply `OPTIMIZE_FOR_SPEED` (from `numerical/math/CompilerOptimizations.hpp`) on

## Documentation — MANDATORY

For every algorithm added or modified, update the corresponding `doc/{domain}/{AlgorithmName}.md` file. Follow `doc/TEMPLATE.md` exactly. Documentation is **design-first**: cover mathematical background, algorithm behaviour, complexity, pitfalls, and connections. Do **not** include implementation details, class names, template parameters, or usage code examples — docs describe the algorithm design; code follows from it.
For every algorithm added or modified, update the corresponding `doc/{domain}/{AlgorithmName}.md` file. Follow `doc/TEMPLATE.md` exactly.
Documentation is **design-first**: cover mathematical background, algorithm behaviour, complexity, pitfalls, and connections.
Do **not** include implementation details, class names, template parameters, or usage code examples — docs describe the algorithm design; code follows from it.

Canonical rules: [AGENTS.md](../../AGENTS.md).
12 changes: 7 additions & 5 deletions .github/instructions/testing.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@ applyTo: "**/test/**"
## Fixture Test Pattern (float)

```cpp
#include "numerical/solvers/DiscreteAlgebraicRiccatiEquation.hpp"
#include "robotics/kinematics/ForwardKinematics.hpp"
#include "numerical/math/Tolerance.hpp"
#include <gtest/gtest.h>

namespace
{
class TestDare : public ::testing::Test
class TestForwardKinematics
: public ::testing::Test
{
protected:
solvers::DiscreteAlgebraicRiccatiEquation<float, 2, 1> solver;
kinematics::ForwardKinematics<float, 2> fk{ math::Vector<float, 3>{ 0.8f, 0.0f, 0.0f } };
};
}

TEST_F(TestDare, solves_simple_system)
TEST_F(TestForwardKinematics, elbow_at_ninety_degrees_places_tool_above_elbow)
{
// Arrange, Act, Assert
// Arrange, Act, Assert — EXPECT_NEAR(actual, expected, math::Tolerance<float>())
}
```

Expand Down
6 changes: 5 additions & 1 deletion .github/prompts/orchestrate.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ argument-hint: "Describe the algorithm, feature, bug fix, or change you want to
model: "Claude Sonnet 4.6"
---

Analyze the following task for the **robotics-toolbox** project — a robot-manipulator algorithms library (kinematics, dynamics, trajectories, and manipulator control) targeting resource-constrained embedded systems, consuming shared numerical primitives from numerical-toolbox-cpp via FetchContent. Gather relevant context from the codebase — identify affected modules, existing patterns, the float-only numeric policy, and documentation requirements. Then provide a brief scope summary and use the handoff buttons to route to the appropriate specialist:
# Orchestrate

Analyze the following task for the **robotics-toolbox** project — a robot-manipulator algorithms library (kinematics, dynamics, trajectories, and manipulator control) targeting resource-constrained embedded systems, consuming shared numerical primitives from numerical-toolbox-cpp via FetchContent.
Gather relevant context from the codebase — identify affected modules, existing patterns, the float-only numeric policy, and documentation requirements.
Then provide a brief scope summary and use the handoff buttons to route to the appropriate specialist:

- **Plan Implementation**: For complex tasks needing detailed upfront design (new algorithms, architectural changes, multi-file modifications)
- **Execute Directly**: For straightforward changes with a clear path (bug fixes, small improvements)
Expand Down
2 changes: 2 additions & 0 deletions .github/prompts/unit-test.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ argument-hint: "Name the robotics/ algorithm to author unit tests for (e.g. Biqu
model: "Claude Sonnet 5"
---

# Unit Test

Author (or extend) the unit tests for the named **robotics-toolbox** algorithm in
`robotics/<domain>/test/Test<Name>.cpp`. Follow the `unit-tester` workflow: read the algorithm's
public interface and doc; look up its family in `TESTING.md` and select the metric
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,57 @@ jobs:
name: test-logs
path: build/host/Testing/Temporary/
host_build_test:
name: Host Build & Test
name: Host Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
include:
- os: macos-latest
cache-variant: ccache
cmake-args: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"
# The Visual Studio generator ignores compiler launchers; sccache cannot cache /Zi, so debug info is embedded (/Z7).
# CC/CXX make run-cmake skip its vcpkg-based MSVC setup; msvc-dev-cmd already did it.
- os: windows-latest
cache-variant: sccache
cmake-args: "['-GNinja', '-DCMAKE_C_COMPILER_LAUNCHER=sccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=sccache', '-DCMAKE_POLICY_DEFAULT_CMP0141=NEW', '-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded']"
cc: cl
fail-fast: false
steps:
- name: Configure Git
shell: bash
run: |
git config --global url."https://${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
git config --global url."https://github.com/".insteadOf "git@github.com:"
git config --global --add safe.directory '*'
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- if: ${{ runner.os == 'Windows' }}
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
with:
variant: ${{ matrix.cache-variant }}
key: ${{ github.job }}-${{ matrix.os }}
max-size: 2G
save: ${{ github.ref == 'refs/heads/main' }}
- uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cc }}
with:
configurePreset: "host-single-Debug"
buildPreset: "host-single-Debug"
testPreset: "host-single-Debug"
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"
configurePresetAdditionalArgs: ${{ matrix.cmake-args }}
- name: Re-run failed tests
if: ${{ failure() }}
run: ctest --preset host-single-Debug --rerun-failed --output-on-failure
continue-on-error: true
- name: Upload test logs
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-logs
path: build/host/Testing/Temporary/
name: test-logs-${{ matrix.os }}
path: build/host-single-Debug/Testing/Temporary/
Loading
Loading