Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 0 additions & 32 deletions .claude/agents/algo-implementer.md

This file was deleted.

49 changes: 0 additions & 49 deletions .claude/agents/executor.md

This file was deleted.

30 changes: 0 additions & 30 deletions .claude/agents/orchestrator.md

This file was deleted.

31 changes: 0 additions & 31 deletions .claude/agents/planner.md

This file was deleted.

78 changes: 24 additions & 54 deletions .claude/agents/reviewer.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,36 @@
---
name: reviewer
description: Review code changes against numerical-toolbox standards — no heap, float-only templates, forced inlining on hot paths, TEST_F on float, SOLID, docs. Does NOT modify files.
model: claude-sonnet-4-6
tools: [Read, Bash]
description: Review the changes on the current branch against the rules in AGENTS.md. Reports findings by severity. Does not change files.
model: sonnet
tools: [Read, Bash, Grep, Glob]
---

Canonical rules: `AGENTS.md`. Review only — no file modifications.
Review code. Do not change files. AGENTS.md is the rule set; *Exceptions* overrides a shared rule.

## Workflow
## Process

1. Identify changed files; read each completely.
2. Check every item below; compare against existing patterns in the same module.
3. Verify mathematical correctness and doc alignment.
1. Find the changes: `git diff --name-only $(git merge-base origin/main HEAD)`.
2. Read AGENTS.md and each matching `.github/instructions/*.instructions.md`.
3. Read each changed file completely. Read callers when a signature changes.
4. Check each rule against the lines the change adds or modifies. Do not report old code the change does not touch.
5. Confirm each finding in the code before you report it.

## Output format
## Severity

### `path/to/file`
**CRITICAL** — must fix before merge: [C1] ...
**WARNING** — should fix: [W1] ...
**SUGGESTION** — nice to have: [S1] ...
**PASS**: rules verified
| Severity | Rule broken |
|------------|-------------------------------------------------------------------------------------------------------------------------------------|
| CRITICAL | *Memory*, *Interfaces & errors*, *Optimisation*, *Domain*; behavioural change without a documentation update; build or test failure |
| WARNING | *Style* except comments; *Testing*; new file not in `CMakeLists.txt` |
| SUGGESTION | Comment rules; prose not in ASD-STE100; optimisation outside a hot path |

End with totals + verdict: APPROVE / REQUEST CHANGES.
A deviation listed in *Exceptions* is not a finding.

## Checklist
## Output

**Memory (CRITICAL)**
- [ ] No heap: `new`/`delete`/`make_unique`/`make_shared`/`std::vector`/`string`/`deque`/`list`/`map`/`set`. Tests too.
- [ ] No recursion.
```
path/file.hpp:42 CRITICAL [Memory] std::vector in production code — use infra::BoundedVector
path/file.cpp:10 WARNING [Style] header guard — use #pragma once
```

**Numeric types (CRITICAL)**
- [ ] `template<typename T>` + `static_assert(std::is_floating_point_v<T>)`. `float` only — no Q15/Q31.
- [ ] `std::numbers::pi_v<float>` — no hardcoded constants.
- [ ] `extern template` guarded by `#ifdef NUMERICAL_TOOLBOX_COVERAGE_BUILD`.

**Embedded optimizations (WARNING)**
- [ ] No `#pragma GCC optimize` and no `optimize` attribute anywhere (they stop GCC inlining across the boundary).
- [ ] `OPTIMIZE_FOR_SPEED` on `Filter/Compute/Update/Solve/Step`.

**Namespaces (WARNING)**
- [ ] Active filters (Kalman family): `namespace filters` — **not** `namespace filters::active`.
- [ ] Passive filters: `namespace filters::passive`. Window functions: `namespace windowing`.

**Style (WARNING)**
- [ ] Allman braces, brace-init `{}`, PascalCase types/methods, camelCase members.
- [ ] Functions ≤ ~30 lines. `const`-correct on all non-mutating methods. No comments except license/NOLINT.
- [ ] SOLID: one concern per class, constructor injection, depend on abstractions, no duplicated logic.

**Interfaces & errors (WARNING)**
- [ ] Interfaces: `protected:` non-virtual `~I() = default` — no `virtual` or `= 0` destructor, no ownership or deletion through an interface pointer. No exceptions — `std::optional`/status enums.

**Testing (WARNING)**
- [ ] `TEST_F` on `float` — no `TYPED_TEST`, no multi-type, never plain `TEST()`.
- [ ] `StrictMock` only (no `NiceMock`/bare). Anonymous-namespace fixture; macros outside.
- [ ] No redundant tests. Arrange/Act/Assert. `EXPECT_NEAR` + `math::Tolerance<float>()`.

**CMake (WARNING)**
- [ ] `numerical_add_header_library()`, `numerical_add_coverage_sources()`, `${NUMERICAL_VISIBILITY}`.
- [ ] If new simulator: `.vscode/launch.json` has a `cppdbg` entry inserted before `"Linux Debug"`.

**Docs (CRITICAL)**
- [ ] `doc/{domain}/{Name}.md` updated per `doc/TEMPLATE.md`. No class names, no code examples.
- [ ] `doc/{domain}/README.md` updated if a new algorithm was added.

**Terse**: report file paths + CRITICAL/WARNING counts. Don't narrate; don't re-read files.
One line per finding: location, severity, section, problem, fix.
Last line: `C=<n> W=<n> S=<n> — APPROVE` or `— REQUEST CHANGES` (any CRITICAL or WARNING).
49 changes: 0 additions & 49 deletions .claude/agents/unit-tester.md

This file was deleted.

23 changes: 23 additions & 0 deletions .claude/skills/algo-implementer/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: algo-implementer
description: Deploy one algorithm spec from roadmap/ into a toolbox as float-only production code, tests, documentation and CMake. Use for roadmap deployment in the numerical, robotics or neural-network toolbox.
---

Deploy one algorithm from `roadmap/<domain>/<Name>/`. `<root>` is the source folder that AGENTS.md *Domain* names.

## Steps

1. Read `roadmap/DEPLOYMENT.md`. Then read only the spec's `implementation.md`, `tests.md` and `explanation.md`.
2. Write what `roadmap/DEPLOYMENT.md` lists: `<root>/<domain>/<Name>.hpp`, the coverage `.cpp`,
`<root>/<domain>/test/Test<Name>.cpp`, `doc/<domain>/<Name>.md` and the CMake changes.
3. Write exactly the tests that `tests.md` lists. Add no other tests.
4. Run the *Build* commands. Fix until build and tests pass.
5. Do every bookkeeping step in `roadmap/DEPLOYMENT.md`: roadmap entries to remove, README and
`doc/<domain>/README.md` tables to update. CI builds the booklet from these tables.
6. Report changed files and test pass/fail.

## Rules

- Float only: `template<typename T>` with `static_assert(std::is_floating_point_v<T>)`. Instantiate and test `float`.
No `Q15`/`Q31`.
- `OPTIMIZE_FOR_SPEED` on hot functions defined in the header.
26 changes: 26 additions & 0 deletions .claude/skills/unit-tester/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: unit-tester
description: Write metric-driven unit tests for one toolbox algorithm, with assertions against independent references chosen from TESTING.md. Use to add or extend tests in the numerical, robotics or neural-network toolbox.
---

Add or extend the tests of one algorithm. `<root>` is the source folder that AGENTS.md *Domain* names.
`TESTING.md` defines what to assert: metric families M1–M9 and robustness dimensions R1–R6. Apply them; do not copy them.

## Steps

1. Read `TESTING.md`, the public interface in `<root>/<domain>/<Name>.hpp`, `doc/<domain>/<Name>.md`
and `<root>/<domain>/test/Test<Name>.cpp` if it exists.
2. Find the algorithm's family in `TESTING.md`. Select its M metrics. Always apply R1–R3; add R4–R6 where the family needs them.
3. Write one `TEST_F` on `float` per property. Assert each against an independent reference: closed form,
hand calculation, a cited golden vector or a different method. Use `EXPECT_NEAR` with `math::Tolerance<float>()`.
4. Add a new test file to `<root>/<domain>/test/CMakeLists.txt`.
5. Run the *Build* commands. Fix until build and tests pass.
6. Check the per-algorithm checklist in `TESTING.md`. Coverage must be ≥ 90 %; an uncovered branch usually means
a missing R2 (unhappy flow) test.
7. Report changed files, test pass/fail and the source of each golden vector. Put the sources in the report, not in the test file.

## Rules

- Never assert the implementation against its own output.
- One behaviour per test. No test per parameter permutation.
- Seeded random generators only.
10 changes: 10 additions & 0 deletions .embedded-agent-kit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "0.3.0",
"bundles": ["core", "toolbox"],
"files": [
".claude/agents/reviewer.md",
".claude/skills/algo-implementer/SKILL.md",
".claude/skills/unit-tester/SKILL.md",
".github/agents/reviewer.agent.md"
]
}
Loading
Loading