From 58de897fc3ffc4cb58b49afb642519de87459823 Mon Sep 17 00:00:00 2001 From: portersky <24420859+portersky@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:07:14 +0200 Subject: [PATCH] chore: refresh project agent guidance Clarify template guidance, move skills, and document formatter and commit conventions. Co-authored-by: GPT-6 Luna --- .agents/README.md | 39 ++++++++++ {.pi => .agents}/skills/cmake/SKILL.md | 33 +++++++-- {.pi => .agents}/skills/git/SKILL.md | 77 +++++++++++++------- {.pi => .agents}/skills/tdd/SKILL.md | 86 +++++++++++++++++----- .oxfmtrc.json | 17 +++++ .pi/README.md | 43 ----------- AGENTS.md | 99 ++++++++++++++++++++++---- 7 files changed, 291 insertions(+), 103 deletions(-) create mode 100644 .agents/README.md rename {.pi => .agents}/skills/cmake/SKILL.md (78%) rename {.pi => .agents}/skills/git/SKILL.md (57%) rename {.pi => .agents}/skills/tdd/SKILL.md (65%) create mode 100644 .oxfmtrc.json delete mode 100644 .pi/README.md diff --git a/.agents/README.md b/.agents/README.md new file mode 100644 index 0000000..a7c9d5a --- /dev/null +++ b/.agents/README.md @@ -0,0 +1,39 @@ +# Agent Skills + +This directory contains reusable, agent-agnostic guidance for common +project tasks. The skills are Markdown documents, not instructions tied +to a particular coding-agent product. Read the relevant skill when a +task matches its description; skill discovery and loading support varies +between tools. + +## Skills + +- [`tdd`](skills/tdd/SKILL.md): Test-driven development with Unity and + CMock. +- [`cmake`](skills/cmake/SKILL.md): Build configuration, modules, and + dependencies. +- [`git`](skills/git/SKILL.md): Commit messages, tagging, and branching. + +## Adding a Skill + +Place a `SKILL.md` inside a named directory under `.agents/skills/`: + +``` +.agents/skills/ + my-skill/ + SKILL.md +``` + +Include frontmatter with the skill's name and a short description of +when to use it: + +```yaml +--- +name: my-skill +description: Describe the tasks this skill helps with. +--- +``` + +Keep the instructions self-contained and useful across coding-agent +tools. Avoid tool-specific loading commands unless a skill is explicitly +written for that tool. diff --git a/.pi/skills/cmake/SKILL.md b/.agents/skills/cmake/SKILL.md similarity index 78% rename from .pi/skills/cmake/SKILL.md rename to .agents/skills/cmake/SKILL.md index 19e7e91..43eea04 100644 --- a/.pi/skills/cmake/SKILL.md +++ b/.agents/skills/cmake/SKILL.md @@ -1,12 +1,19 @@ --- name: cmake -description: CMake build configuration for projects scaffolded from the ctdd - template. Use when adding modules, adding dependencies, configuring coverage - or sanitizers, or understanding the build system. +description: CMake build configuration for C and C++ projects started from + the ctdd template. Use when adding modules or dependencies, or configuring + builds, coverage, and sanitizers. --- # CMake Skill +This repository is a starter template, not an application whose sample +modules define required features. Its checked-in targets are C examples +using C23. When adding C++ targets, use `.cpp` sources and select the +project's C++ standard explicitly (for example, `cxx_std_23`). Unity can +be used by C++ tests. CMock is for C-compatible interfaces, not C++ class +mocking. + > Replace `/` with the project source directory (e.g. `ctdd/`, `src/`). > Replace `` with the module name (e.g. `counter`, `timer`). @@ -24,8 +31,8 @@ description: CMake build configuration for projects scaffolded from the ctdd ## Adding a Module -Modules live in `/` as static libraries. Register them in -`/CMakeLists.txt`: +Modules live in `/` as static libraries. The current example is C; +register C modules in `/CMakeLists.txt`: ```cmake add_library(_ .c) @@ -33,6 +40,19 @@ target_include_directories(_ PUBLIC "${CMAKE_SOURCE_DIR}") target_compile_features(_ PRIVATE c_std_23) ``` +For a C++ module, use a `.cpp` source and select the standard used by the +derived project: + +```cmake +add_library(_ .cpp) +target_include_directories(_ PUBLIC "${CMAKE_SOURCE_DIR}") +target_compile_features(_ PRIVATE cxx_std_23) +``` + +Replace `cxx_std_23` if the project uses a different C++ standard. Likewise, +choose `.c`/`c_std_23` or `.cpp`/`cxx_std_23` for the application's entry +point and test sources. + Link into `main` in the root `CMakeLists.txt`: ```cmake @@ -122,6 +142,9 @@ target_compile_definitions( PRIVATE ${BASE_DEFINITIONS}) ## CMock Mock Generation +CMock generates mocks for C-compatible interfaces. Do not pass C++ class +headers to this helper; use a suitable fake or mocking tool for C++ APIs. + `tests/CMakeLists.txt` provides a `cmock_generate_mock` helper function: ```cmake diff --git a/.pi/skills/git/SKILL.md b/.agents/skills/git/SKILL.md similarity index 57% rename from .pi/skills/git/SKILL.md rename to .agents/skills/git/SKILL.md index 5b105e1..373e870 100644 --- a/.pi/skills/git/SKILL.md +++ b/.agents/skills/git/SKILL.md @@ -1,32 +1,63 @@ --- name: git -description: Git workflow for the ctdd template project. Use when committing - changes, creating tags for releases, or following the branching and commit - message conventions. +description: Git workflow for the ctdd C/C++ starter template. Use when + committing template or example changes, creating release tags, or following + the branching and commit message conventions. --- # Git Skill +This repository is a reusable starter template for C and C++ projects. +Treat its checked-in code as examples demonstrating the build and test +setup, not as a required application API. Template releases should keep +the starter structure and Unity/CMock workflows useful to derived projects. + ## Commit Messages -Follow [Conventional Commits](https://www.conventionalcommits.org/) with the -50/72 rule. +Follow [Conventional Commits v1.0.0][cc] with the 50/72 rule. + +[cc]: https://www.conventionalcommits.org/en/v1.0.0/ ### Format ``` -: +[optional scope][!]: -