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
8 changes: 4 additions & 4 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mcpplibs template — Agent Skills
# CMP — Agent Skills

Skills that help an agent understand this mcpp/mcpplibs module-library template, look things up
upstream, and follow the mcpp-style-ref rules when writing or reviewing Modern/Module C++.
Skills that help an agent understand the CMP mcpp/C++23 module project, look things up upstream,
and follow the mcpp-style-ref rules when writing or reviewing Modern/Module C++.

## Available Skills

Expand Down Expand Up @@ -30,7 +30,7 @@ done
Or install them as personal skills:

```bash
ln -s /path/to/mcpp-template/.agents/skills/mcpp ~/.cursor/skills/mcpp
ln -s /path/to/cmp/.agents/skills/mcpp ~/.cursor/skills/mcpp
```

Claude Code and other agents that read `.agents/skills/` pick them up from this directory
Expand Down
6 changes: 3 additions & 3 deletions .agents/skills/mcpp-style-ref/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ mcpp --version

> xlings详细信息可参考 [xlings](https://github.com/openxlings/xlings) 文档。

## 示例项目创建
## 当前项目结构

参考本仓库 `src/` 目录结构:

- `.xlings.json`:声明项目工具环境
- `mcpp.toml`:声明 `[package]` 与测试依赖;简单库目标可由 mcpp 从 `src/*.cppm` 自动推断
- `src/mylib.cppm`:库主模块接口,默认 `export module mcpplibs.mylib;`
- `tests/mylib_test.cpp`:`mcpp test` 自动发现的 gtest 测试;不要定义 `main()`
- `src/cmp.cppm`:库主模块接口,声明 `export module mcpplibs.cmp;`
- `tests/cmp_test.cpp`:`mcpp test` 自动发现的 gtest 导入测试;不要定义 `main()`
- `examples/basic/`:独立 mcpp consumer 包,通过 path 依赖引用根库

构建:
Expand Down
23 changes: 10 additions & 13 deletions .agents/skills/more-details/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ docs, and actual command output.

## This Repository

- `README.md` (`README.zh.md`, `README.zh.hant.md`) — entry point, quick start, agent prompt, links.
- `docs/architecture.md` (`.zh.md`, `.zh.hant.md`) — structure, mcpp conventions, dependencies, templates, CI.
- `README.md` (`README.zh.md`, `README.zh.hant.md`) — entry point, current status, boundaries, roadmap, links.
- `docs/architecture.md` (`.zh.md`, `.zh.hant.md`) — current structure, mcpp conventions, runtime boundaries, CI.
- `.xlings.json` — the project tool environment (which mcpp version builds this).
- `mcpp.toml` — package metadata, dependencies, dev-dependencies.
- `src/mylib.cppm` — the library module interface.
- `tests/mylib_test.cpp` — a gtest suite matching the `mcpp test` conventions.
- `examples/basic/` — a standalone consumer package.
- `templates/` — project templates shipped with the library (`basic`, `lib`).
- `tools/template_smoke.sh` — renders and builds every template against this checkout.
- `.github/workflows/ci-{linux,macos,windows}.yml` — per-platform CI.
- `src/cmp.cppm` — the import-only CMP root module interface.
- `tests/cmp_test.cpp` — the gtest import smoke test.
- `examples/basic/` — a standalone path-dependency consumer.
- `.github/workflows/ci-{linux,macos,windows}.yml` — per-platform build, test, and example CI.

## Upstream

Expand All @@ -57,7 +55,7 @@ Use these to confirm:

- Package index: https://github.com/mcpplibs/mcpp-index · https://mcpplibs.github.io/mcpp-index/
- mcpplibs organization: https://github.com/mcpplibs
- Reference library — small and close to this template: https://github.com/mcpplibs/cmdline
- Reference library — small, with a package/module layout close to CMP's current baseline: https://github.com/mcpplibs/cmdline
- Reference library — templates, i18n, multi-module: https://github.com/mcpplibs/llmapi

Check the index before adding a dependency; read `cmdline`/`llmapi` when you want to see how a
Expand All @@ -76,7 +74,7 @@ public API, and tests without a custom `main()`.

- xlings: https://github.com/openxlings/xlings

This template pins its tools in `.xlings.json`. After entering the repository:
This project pins its tools in `.xlings.json`. After entering the repository:

```bash
xlings install # installs mcpp into the PROJECT environment (xlings install mcpp -g for global)
Expand All @@ -85,11 +83,10 @@ mcpp --version

## Common Tasks

- **Understand the template** → `README.md` and `docs/architecture.md`.
- **Understand CMP's current baseline** → `README.md` and `docs/architecture.md`.
- **Confirm an `mcpp.toml` field** → `mcpp.toml`, the [`mcpp`](../mcpp/SKILL.md) skill, then upstream `docs/05-mcpp-toml.md`.
- **Add a dependency** → the [`mcpp-index`](../mcpp-index/SKILL.md) skill, then `mcpplibs/cmdline` for a real example.
- **Add a module API** → `mcpp-style-ref`, then edit `src/*.cppm`.
- **Add a test** → follow `tests/mylib_test.cpp`, verify with `mcpp test`.
- **Add a test** → follow `tests/cmp_test.cpp`, verify with `mcpp test`.
- **Add an example** → follow `examples/basic/` — its own `mcpp.toml` with a path dependency.
- **Add or change a template** → `templates/<name>/`, verify with `bash tools/template_smoke.sh`.
- **Publish the library** → the [`mcpp-index`](../mcpp-index/SKILL.md) skill.
8 changes: 2 additions & 6 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: ci-linux

# Linux CI — the same path a user walks after `Use this template`:
# xlings install (project env, pinned by .xlings.json) → build → test →
# example → templates/ smoke.
# Linux CI — the same path a contributor walks:
# xlings install (project env, pinned by .xlings.json) → build → test → example.
#
# Split per OS on purpose (ci-macos.yml / ci-windows.yml are the same flow):
# one badge and one log per platform, and a macOS/Windows toolchain problem
Expand Down Expand Up @@ -62,6 +61,3 @@ jobs:
run: |
cd examples/basic
mcpp run

- name: Smoke-test templates/
run: bash tools/template_smoke.sh
3 changes: 0 additions & 3 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ jobs:
run: |
cd examples/basic
mcpp run

- name: Smoke-test templates/
run: bash tools/template_smoke.sh
6 changes: 1 addition & 5 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ci-windows

# Windows CI — same flow as ci-linux.yml. xlings bootstraps from PowerShell;
# everything after it runs in bash (git-bash ships on the runner), so the
# build/test/example/template steps stay byte-identical to the other two
# build/test/example steps stay byte-identical to the other two
# platforms instead of forking into a second dialect.

on:
Expand Down Expand Up @@ -63,7 +63,3 @@ jobs:
run: |
cd examples/basic
mcpp run

- name: Smoke-test templates/
shell: bash
run: bash tools/template_smoke.sh
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ compile_commands.json
# xlings project environment
.xlings/

# Local tools and editor state
.cache/
/.clice/
/.rpiv/
/.vscode/

# Compiled Object files
*.slo
*.lo
Expand Down
Loading
Loading