Skip to content

Commit 9ac4d55

Browse files
committed
Initialize CMP C++23 module project
1 parent 13b95c3 commit 9ac4d55

31 files changed

Lines changed: 1442 additions & 1229 deletions

.agents/skills/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# mcpplibs template — Agent Skills
1+
# CMP — Agent Skills
22

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

66
## Available Skills
77

@@ -30,7 +30,7 @@ done
3030
Or install them as personal skills:
3131

3232
```bash
33-
ln -s /path/to/mcpp-template/.agents/skills/mcpp ~/.cursor/skills/mcpp
33+
ln -s /path/to/cmp/.agents/skills/mcpp ~/.cursor/skills/mcpp
3434
```
3535

3636
Claude Code and other agents that read `.agents/skills/` pick them up from this directory

.agents/skills/mcpp-style-ref/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ mcpp --version
143143

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

146-
## 示例项目创建
146+
## 当前项目结构
147147

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

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

.agents/skills/more-details/SKILL.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@ docs, and actual command output.
2727

2828
## This Repository
2929

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

4139
## Upstream
4240

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

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

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

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

79-
This template pins its tools in `.xlings.json`. After entering the repository:
77+
This project pins its tools in `.xlings.json`. After entering the repository:
8078

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

8684
## Common Tasks
8785

88-
- **Understand the template**`README.md` and `docs/architecture.md`.
86+
- **Understand CMP's current baseline**`README.md` and `docs/architecture.md`.
8987
- **Confirm an `mcpp.toml` field**`mcpp.toml`, the [`mcpp`](../mcpp/SKILL.md) skill, then upstream `docs/05-mcpp-toml.md`.
9088
- **Add a dependency** → the [`mcpp-index`](../mcpp-index/SKILL.md) skill, then `mcpplibs/cmdline` for a real example.
9189
- **Add a module API**`mcpp-style-ref`, then edit `src/*.cppm`.
92-
- **Add a test** → follow `tests/mylib_test.cpp`, verify with `mcpp test`.
90+
- **Add a test** → follow `tests/cmp_test.cpp`, verify with `mcpp test`.
9391
- **Add an example** → follow `examples/basic/` — its own `mcpp.toml` with a path dependency.
94-
- **Add or change a template**`templates/<name>/`, verify with `bash tools/template_smoke.sh`.
9592
- **Publish the library** → the [`mcpp-index`](../mcpp-index/SKILL.md) skill.

.github/workflows/ci-linux.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: ci-linux
22

3-
# Linux CI — the same path a user walks after `Use this template`:
4-
# xlings install (project env, pinned by .xlings.json) → build → test →
5-
# example → templates/ smoke.
3+
# Linux CI — the same path a contributor walks:
4+
# xlings install (project env, pinned by .xlings.json) → build → test → example.
65
#
76
# Split per OS on purpose (ci-macos.yml / ci-windows.yml are the same flow):
87
# one badge and one log per platform, and a macOS/Windows toolchain problem
@@ -62,6 +61,3 @@ jobs:
6261
run: |
6362
cd examples/basic
6463
mcpp run
65-
66-
- name: Smoke-test templates/
67-
run: bash tools/template_smoke.sh

.github/workflows/ci-macos.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,3 @@ jobs:
5353
run: |
5454
cd examples/basic
5555
mcpp run
56-
57-
- name: Smoke-test templates/
58-
run: bash tools/template_smoke.sh

.github/workflows/ci-windows.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: ci-windows
22

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

88
on:
@@ -63,7 +63,3 @@ jobs:
6363
run: |
6464
cd examples/basic
6565
mcpp run
66-
67-
- name: Smoke-test templates/
68-
shell: bash
69-
run: bash tools/template_smoke.sh

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ compile_commands.json
77
# xlings project environment
88
.xlings/
99

10+
# Local tools and editor state
11+
.cache/
12+
/.clice/
13+
/.rpiv/
14+
/.vscode/
15+
1016
# Compiled Object files
1117
*.slo
1218
*.lo

0 commit comments

Comments
 (0)