agentleFS
JeffKarlingJeffKarling/Anvil/.agents/skills/feature/SKILL.md

feature

Skill0 starsChanged 2 days agoMIT-0View on GitHub

Scaffolds and implements a physical component under Anvil. Use this skill when adding, creating, or extending a component target in targets/.

73 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use bug, bugfix and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • paulocsbSkill

    bug

    Investigation playbook for fixing a bug. Walks through 5 phases: reproduce → isolate → root cause → propose fix → validate. Forces concrete reasoning with code reads, log inspection, and git blame instead of pattern-matching guesses. Use for any non-trivial defect.

    Also in 8 projects that use this

  • team-attentionSkill

    bugfix

    Root cause based one-shot bug fix. debugger diagnosis → requirements.md generation → /execute. /bugfix "error description" Full investigation pipeline: debugger + gap-analyzer + standard verify. QA suggestion after successful fix.

    Also in 7 projects that use this

  • codebycoreySkill

    adopt

    Adopt an existing plan from conversation context into delta-spec format. Use when importing a plan, adopting planning that already happened, capturing plan mode output, or bringing in prior design work.

    Also in 4 projects that use this

  • Google CloudSkill

    fix

    Plan a remediation strategy after a test failure.

    Also in 10 projects that use this

  • marylinSkill

    recover

    Recover work from a crashed or interrupted session. Use when Claude crashed mid-task, after an unexpected exit, when you see 'stale sessions detected', or when you lost context and need to figure out what was happening.

    Also in 3 projects that use this

  • aegiswizardSkill

    context

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 67 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the component requires Protobuf code generation, -fno-fast-math, private C++23 features, or local SIMD flags, consult …

    line 20
  2. Very specific:

    Keep <name>.hpp free of third party headers and macros.

    line 25
  3. Distinctive:

    Test valid inputs, boundary edge cases, and invalid inputs handled safely without leaking exceptions.

    line 33
  4. Very specific:

    When verifying emitted log records in memory, redirect the sink via anvil::journal::detail::set_record_sink, call anvil::journal::flush, …

    line 34
  5. Very specific:

    When internal logic spans distinct sub-concerns used only by this component, factor them into private <helper>.hpp and <helper>.cpp files …

    line 40
  6. Distinctive:

    Run dual compiler verification and record the initial hardware PMU benchmark baseline.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 67 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Component implementation workflow

Step 1. Scaffold the target deterministically

For any new component, generate the physical directory hierarchy and boilerplate files using the scaffolding script rather than writing CMake boilerplate manually.

python3 .agents/skills/feature/scripts/scaffold.py <name>

Pass --no-bench only for pure schema or signal adapter targets that have no hot computational path.

If the component requires Protobuf code generation, -fno-fast-math, private C++23 features, or local SIMD flags, consult .agents/skills/feature/references/cmake_overrides.md.

Step 2. Define the public header and catalog contract

Edit targets/<name>/<name>/<name>.hpp and targets/<name>/<name>.catalog.

  • Keep <name>.hpp free of third party headers and macros.
  • Define struct catalog with 32 character lowercase hex message_id strings matching <name>.catalog.
  • Expose strong types, scoped enums, std::span or std::ranges inputs, and noexcept operational boundaries returning bool or std::optional.

Step 3. Write unit tests first

Update targets/<name>/<name>TEST/<name>TEST.cpp.

  • Retain static_assert(anvil::journal::is_valid_catalog(anvil::<name>::k_catalog));.
  • Test valid inputs, boundary edge cases, and invalid inputs handled safely without leaking exceptions.
  • When verifying emitted log records in memory, redirect the sink via anvil::journal::detail::set_record_sink, call anvil::journal::flush, and restore via anvil::journal::detail::reset_record_sink.

Step 4. Implement private logic and boundary firewall

Implement targets/<name>/<name>.cpp.

  • Link any required third party targets from cmake/dependencies.cmake as PRIVATE in targets/<name>/CMakeLists.txt.
  • When internal logic spans distinct sub-concerns used only by this component, factor them into private <helper>.hpp and <helper>.cpp files at targets/<name>/, include them via #include <<helper>.hpp>, and register <helper>.cpp under PRIVATE in target_sources.
  • Wrap every public operational entry point in a try block and delegate caught exceptions to anvil::journal::catch_boundary_exception(k_catalog).
  • For multi entry catalogs, throw anvil::journal::catalog_exception(k_catalog.k_entry, "reason") from internal helpers and pass the fallback entry to catch_boundary_exception.

Step 5. Verify dual compiler builds and capture birth baseline

Run dual compiler verification and record the initial hardware PMU benchmark baseline.

./production_artifacts/build_all.sh custom debug
./production_artifacts/build_all.sh default release
cmake --build --preset Clang_Custom_Release --target <name>BENCH_run
grep -rn '#include "' targets/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.