You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"schema":"cmsg/1","type":"docs","scope":"global","summary":"update agent rules and repository configuration","intent":"standardize commit message schema and update project metadata","impact":"enforces new commit message format and updates repository references","breaking":false,"risk":"low","refs":[]}
- The JSON object must be a single line with no extra whitespace.
57
+
- Keys must appear in the exact order shown.
58
+
- Only the keys shown are allowed.
59
+
-`schema` must be `cmsg/1`.
60
+
-`type` must be one of `feat`, `fix`, `refactor`, `docs`, `chore`, `build`, `ci`, `perf`, or `revert`.
61
+
-`scope` must be `global` or a lowercase kebab-case component name.
62
+
-`summary`, `intent`, and `impact` must be short text without double quotes, backslashes, or newlines.
63
+
-`breaking` must be `true` or `false`.
64
+
-`risk` must be `low`, `medium`, or `high`.
65
+
-`refs` must be an array of strings. Each string must use one of the following forms: `gh:<owner>/<repo>#<issue>`, `pr:<number>`, `doc:<slug>`, `url:<https://...>`. Use an empty array when there are no references.
66
+
46
67
Commenting guidance:
47
68
48
69
- Avoid redundant comments that restate the code in different words.
@@ -64,8 +85,6 @@ Language- or stack-specific rules must be documented under `docs/guide/developme
64
85
65
86
Run verification commands only when requested or when you need evidence before claiming completion.
66
87
67
-
When a data debugging method is not specified, use `psql` with the `.env`-provided `PUBFI_DATABASE_URL` for the `pubfi_stg` database.
68
-
69
88
## 1.1 Workspace Automation (cargo make)
70
89
71
90
- Use `cargo make` tasks from `Makefile.toml` when they are the best fit for the job.
@@ -76,7 +95,6 @@ When a data debugging method is not specified, use `psql` with the `.env`-provid
76
95
- Tests: `cargo make test` for full workspace, or `cargo make test-rust` for Rust-only.
77
96
- SQLx metadata: `scripts/sqlx-prepare.sh`.
78
97
- Full validation: `cargo make checks`.
79
-
- Do not set `DATABASE_URL` manually when running `cargo make` tasks.
This guide standardizes how to upgrade Rust dependencies while keeping version requirements consistent and low-risk.
4
+
5
+
## Version format policy
6
+
7
+
- Use `major.minor` in version requirements when possible.
8
+
- Avoid patch pins unless a specific patch is required for correctness or security.
9
+
- For `0.x` dependencies, prefer minor-capped ranges to avoid overly broad upgrades.
10
+
- In the root `Cargo.toml`, normalize workspace dependency entries to inline table form with an explicit `version` key, even when no features are required.
11
+
- In workspace member `Cargo.toml` files, use `workspace = true` for dependencies and do not use `version` or `path` keys.
12
+
- In `Cargo.toml`, group dependency entries by origin and separate groups with a single blank line.
13
+
- Do not edit lockfiles by hand. Regenerate them with the appropriate tool.
14
+
15
+
Exception: If a minimum patch is required, document the reason and use an explicit range such as `>=X.Y.Z,<X.(Y+1)`.
16
+
17
+
## Rust (Cargo)
18
+
19
+
1. In the root `Cargo.toml`, normalize workspace dependency entries to inline table form with an explicit `version` key.
20
+
2. In workspace member `Cargo.toml` files, use `workspace = true` for dependencies and do not use `version` or `path` keys.
21
+
3. Keep dependency requirements in the root `Cargo.toml` at `major.minor` unless a patch pin is required.
22
+
4. Run `cargo update -w` from the repository root to refresh `Cargo.lock`.
23
+
24
+
## Verification
25
+
26
+
- Run `cargo make test` or targeted Rust tests when Rust dependencies change.
0 commit comments