Commit Graph

12 Commits

Author SHA1 Message Date
Jacob Dahl
dc53eeb0cd chore(claude): build one target and shorten PR bodies in the pr skill (#28382)
Building both a board and SITL for every PR wastes minutes on changes that
cannot reach either target. Build the one target the diff can affect, or
none. Descriptions get read only if they are short, so cap them at a
sentence or two per section and drop the CI boilerplate.

Assisted-by: Claude:claude-opus-5[1m]

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-25 10:13:21 -06:00
Jacob Dahl
af2e7b4311 chore(claude): harden the rebase-onto-main skill against losing work (#28368)
The skill force-pushes over the only copy of the pre-rebase head without
ever checking that the rebase preserved it, and says nothing about the two
things that most often go wrong around it.

Adds a git range-diff gate before the push, the worktree collision that
makes git checkout fail mid-loop, and the --onto follow-up a stacked child
branch needs once its base moves.

Assisted-by: Claude:claude-opus-5

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-24 17:18:15 -06:00
Ramon Roche
a2f1bb7c34 docs(contribute): add AI coding assistant policy
Adopt a policy for AI-assisted contributions modeled on the Linux
kernel's coding-assistants document: the human submitter is the author
and accountable for every line, an AI tool never appears in authorship
or Signed-off-by tags, licensing follows the LF Generative AI Policy,
and disclosure via an Assisted-by trailer is required.

Summarize the policy in CONTRIBUTING.md and add it to the docs sidebar.
The commit and pr skills keep their disclosure and sign-off rules but do
not link the policy: files loaded into every agent session are standing
context, not rules applied on demand, so pointing at the policy from
there invites agents to pull it in and biases unrelated work.

Assisted-by: Claude:claude-opus-4-8[1m]
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-07-23 09:44:46 -07:00
Jacob Dahl
de8158101c chore(claude): use Summary/Problem/Solution format in pr skill (#27949)
Give PRs generated via the skill a fixed, skimmable structure instead of an ad-hoc leading paragraph. Keeps the existing no-attribution, no-test-plan, and terse rules.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-07-17 18:29:36 -06:00
Jacob Dahl
219fcf387d chore(claude): overhaul review-pr skill to focus on substance (#27892)
* chore(claude): overhaul review-pr skill to focus on substance

The skill spent most of its 207 lines on process: merge-strategy
recommendations, commit-message auditing, formatting checks, and an
interactive posting menu. That feedback is nit-picky noise for a PR
author, and CI already enforces formatting.

Rewrite it (49 lines) around reviewing substance: merit and need (root
cause vs papering over), first-principles analysis for physics/math
changes, architecture consistency with the surrounding code, and an
alternatives assessment. Output is a debrief for the operator plus a
terse, actionable draft comment explicitly attributed as a Claude
review.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(claude): generalize numeric-robustness check beyond float32

The physics/math check hardcoded float32; not all flight-critical math
uses it. Phrase the robustness check in terms of the given
representation, keeping float32 precision as a concrete example.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(claude): fold maintainability into the architecture check

Rename the check to Architecture and maintainability and direct it at
hidden cross-module coupling — a change that silently breaks an
assumption in another module — asking for a contract-codifying unit
test when such coupling is unavoidable.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(claude): add reliability to the correctness check

Reliability was not called out anywhere. Rename to Correctness and
reliability and add resource exhaustion and failure-path handling to
the list of defects to look for.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(claude): make the debrief lead with findings

A per-file restatement of a well-described PR wastes tokens and time.
Have the debrief lead with actionable findings and only explain what
the change does when the PR description is missing, ambiguous, or
misleading.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(claude): require provable, objectively-framed findings

Direct the draft comment to frame findings as engineering tradeoffs
rather than judgments, and to stay silent on any flaw it cannot
demonstrate via a concrete code path or first-principles derivation.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-07-14 10:03:37 -06:00
Jacob Dahl
d07fcec626 chore(claude): add CLAUDE.md and tighten commit/pr skills (#27119)
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2026-04-23 13:39:08 -07:00
Jacob Dahl
226ba48bcf chore(claude): update commit and pr skills
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-04-13 11:43:49 -07:00
Ramon Roche
b142342c3a ci(claude): add review-pr skill for domain-aware PR reviews (#26814)
* ci(claude): add review-pr skill for domain-aware PR reviews

Add a Claude Code skill that reviews pull requests with checks
tailored to the domains touched (estimation, control, drivers,
simulation, system, CI/build, messages, board additions).

Built from analysis of 800+ PR reviews across 8 PX4 maintainers.
Includes merge strategy recommendation, interactive dialog for
submitting reviews, and human-sounding PR comment formatting.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci(copilot): add domain-scoped review instructions for GitHub Copilot

Add .github/instructions/ files that give GitHub Copilot PR reviews
the same domain-aware context as the Claude Code review-pr skill.

Each file is scoped via applyTo to the relevant source paths:
core review, estimation, control, drivers/CAN, simulation, system,
CI/build, messages/protocol, and board additions.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* fix(claude): address Copilot review feedback

- Fix step reference in review-pr skill (step 8 -> step 9)
- Capitalize CMake consistently in skill and Copilot instructions

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-01 17:56:23 -07:00
Ramon Roche
547eb77a55 ci(claude): add GPG signing step to commit skill
Check for user.signingkey and use -S flag when available.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-18 08:59:25 -07:00
Jacob Dahl
99aa88c175 ci(claude): defer commit conventions to CONTRIBUTING.md
Remove duplicated type/scope definitions from commit skill and
point to CONTRIBUTING.md as the single source of truth.
2026-03-18 08:59:25 -07:00
Jacob Dahl
8aa02078e9 ci(claude): link to CONTRIBUTING.md and add format step
Reference CONTRIBUTING.md from commit and PR skills so conventions
stay in sync. Add make format / astyle step to commit skill.
2026-03-18 08:59:25 -07:00
Jacob Dahl
2ea2bfcc15 ci(claude): add Claude Code skills for commit, pr, and rebase
Add reusable skill definitions for common contributor workflows:
- commit: creates conventional commits with proper type(scope) format
- pr: creates PRs with conventional commit titles
- rebase-onto-main: handles rebasing onto main when parent branches
  were squash-merged
2026-03-18 08:59:25 -07:00