From c091999fd9661a6a85f1ce77bac19755b7d21e20 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:37:45 +0100 Subject: [PATCH 1/8] Show a compiled quick look in the `cgp` crate README The README that crates.io and docs.rs show now gives the reassurance line beside the tag line, a short greeting example that compiles as the crate's doctest, and the costs it carries. Its links send a learner to the website, an evaluator to the front page's costs and maturity section, and an agent user to the site's AI-assisted development section instead of the knowledge base's repository. Co-Authored-By: Claude Opus 5.5 --- crates/main/cgp/README.md | 83 +++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 21 deletions(-) diff --git a/crates/main/cgp/README.md b/crates/main/cgp/README.md index 147a27aa..15be6178 100644 --- a/crates/main/cgp/README.md +++ b/crates/main/cgp/README.md @@ -2,25 +2,55 @@ **A language extension for Rust, with pluggable trait implementations at compile-time.** -The `cgp` crate is the facade over the collection of crates that provide CGP. It re-exports them -under `cgp::core` and `cgp::extra`, and gathers the names users write in `cgp::prelude`. In ordinary -Rust a trait has one implementation per type; CGP lets one trait have many interchangeable -implementations and lets each *context* choose which one it uses, through a small wiring table the -compiler resolves statically, so provider selection adds nothing at runtime. +Still ordinary Rust: a library on the stable toolchain, with provider selection resolved at compile +time, adopted one trait at a time. -## Learn CGP +In ordinary Rust, a trait has one implementation per type. Context-Generic Programming (CGP) lets +one trait have many interchangeable implementations, called *providers*, and lets each *context* +choose the one it uses through a small wiring table. The compiler resolves that table statically, +so the choice adds nothing at runtime. This crate is the facade over the crates that provide CGP: it +re-exports them under `cgp::core` and `cgp::extra`, and gathers the names users write in +`cgp::prelude`. -The documentation lives on the website, [contextgeneric.dev](https://contextgeneric.dev/): +## A quick look -- [Quickstart](https://contextgeneric.dev/docs/quickstart): install it and run a first program. -- [Tutorials](https://contextgeneric.dev/docs/tutorials/hello): learn by building. -- [Concepts](https://contextgeneric.dev/docs/concepts/): why CGP works the way it does. -- [Reference](https://contextgeneric.dev/docs/reference/): one page per construct. +This example defines a greeting component, writes one provider for it, and wires `Person` to that +provider. `Person` is the data being greeted, and the check at the end makes the build fail if +`Person` lacks the `name` field the provider reads: + +```rust +use cgp::prelude::*; + +#[cgp_component(Greeter)] +pub trait CanGreet { + fn greet(&self) -> String; +} + +#[cgp_impl(new GreetHello)] +impl Greeter { + fn greet(&self, #[implicit] name: &str) -> String { + format!("Hello, {name}!") + } +} + +#[derive(HasField)] +pub struct Person { + pub name: String, +} + +delegate_components! { Person { GreeterComponent: GreetHello } } +check_components! { Person { GreeterComponent } } + +fn main() { + let person = Person { name: "World".to_owned() }; + assert_eq!(person.greet(), "Hello, World!"); +} +``` -The API documentation here covers the items themselves; the website explains how to use them. For the -exhaustive per-construct semantics, the -[CGP knowledge base](https://github.com/contextgeneric/cgp-knowledge-base) is written for agents and -records the internals. +A plain trait would be enough for this greeting alone. Providers help when an application needs +interchangeable implementations, or wants to reuse and compose them, and they cost more +declarations, extra compile-time work, and concepts to learn. The raw compile errors can also be +verbose, which is why the next section suggests a second tool. ## Install @@ -28,14 +58,25 @@ records the internals. cargo add cgp ``` -```rust -use cgp::prelude::*; -``` - -CGP requires Rust 1.89+ and runs on the stable toolchain. When you start with CGP, install -[`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) alongside it: `cargo cgp check` leads with +CGP requires Rust 1.89 or newer and runs on the stable toolchain. When you start with CGP, install +[`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) beside it: `cargo cgp check` leads with the root cause for the classes it recognizes, and the tool does not yet reshape every class. +## Learn CGP + +The documentation lives on the website, [contextgeneric.dev](https://contextgeneric.dev/): + +- [Quickstart](https://contextgeneric.dev/docs/quickstart): install CGP and run a first program. +- [Tutorials](https://contextgeneric.dev/docs/tutorials/hello): learn by building. +- [Concepts](https://contextgeneric.dev/docs/concepts/): why CGP works the way it does. +- [Reference](https://contextgeneric.dev/docs/reference/): one page per construct. +- [Costs and maturity](https://contextgeneric.dev/#costs): what to weigh before adopting it. + +The API documentation here describes each item, and a construct's documentation links the website's +reference page that explains how to use it, where the site has one. If you work with a coding agent, +the site's [AI-assisted development](https://contextgeneric.dev/docs/ai/) section covers the agent +skill and the knowledge base it draws on. + ## License Licensed under the [Apache License, Version 2.0](https://github.com/contextgeneric/cgp/blob/main/LICENSE). From c2e5ee1f2cb3f96e67e6a60a5561891a214805a9 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:47:36 +0100 Subject: [PATCH 2/8] Name the `alloc` feature in the `cgp` crate README The default features turn on no allocator, so a crate that wires `DebugError` or `DisplayError` must add `features = ["alloc"]`. The README's install section now says so beside the `no_std` build, and its opening drops a sentence that repeated the reassurance line. Co-Authored-By: Claude Opus 5.5 --- crates/main/cgp/README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/crates/main/cgp/README.md b/crates/main/cgp/README.md index 15be6178..8e955fd3 100644 --- a/crates/main/cgp/README.md +++ b/crates/main/cgp/README.md @@ -7,10 +7,9 @@ time, adopted one trait at a time. In ordinary Rust, a trait has one implementation per type. Context-Generic Programming (CGP) lets one trait have many interchangeable implementations, called *providers*, and lets each *context* -choose the one it uses through a small wiring table. The compiler resolves that table statically, -so the choice adds nothing at runtime. This crate is the facade over the crates that provide CGP: it -re-exports them under `cgp::core` and `cgp::extra`, and gathers the names users write in -`cgp::prelude`. +choose the one it uses through a small wiring table. This crate is the facade over the crates that +provide CGP: it re-exports them under `cgp::core` and `cgp::extra`, and gathers the names users +write in `cgp::prelude`. ## A quick look @@ -58,7 +57,16 @@ verbose, which is why the next section suggests a second tool. cargo add cgp ``` -CGP requires Rust 1.89 or newer and runs on the stable toolchain. When you start with CGP, install +CGP requires Rust 1.89 or newer and runs on the stable toolchain. Its default features need neither +`std` nor `alloc`, so it also builds for `no_std` targets. The providers that format an error into +a `String`, `DebugError` and `DisplayError`, need the `alloc` feature: + +```toml +[dependencies] +cgp = { version = "0.8.0", features = ["alloc"] } +``` + +When you start with CGP, install [`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) beside it: `cargo cgp check` leads with the root cause for the classes it recognizes, and the tool does not yet reshape every class. From fc1a61ea3ebd76e8e405bfefdd3185796e9b2964 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:49:58 +0100 Subject: [PATCH 3/8] Rewrite the `cgp` crate README in natural style Each paragraph now follows from the one before: the opening says what limit of ordinary traits CGP works around, the quick look introduces its example before the code, the install section explains why `cargo-cgp` helps, and the links name the question each page answers. Co-Authored-By: Claude Opus 5.5 --- crates/main/cgp/README.md | 69 ++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/crates/main/cgp/README.md b/crates/main/cgp/README.md index 8e955fd3..8b941958 100644 --- a/crates/main/cgp/README.md +++ b/crates/main/cgp/README.md @@ -5,17 +5,19 @@ Still ordinary Rust: a library on the stable toolchain, with provider selection resolved at compile time, adopted one trait at a time. -In ordinary Rust, a trait has one implementation per type. Context-Generic Programming (CGP) lets -one trait have many interchangeable implementations, called *providers*, and lets each *context* -choose the one it uses through a small wiring table. This crate is the facade over the crates that -provide CGP: it re-exports them under `cgp::core` and `cgp::extra`, and gathers the names users -write in `cgp::prelude`. +In ordinary Rust, a trait has one implementation per type, so a program that needs two behaviors for +the same type has to reach for a wrapper type or a second trait. Context-Generic Programming (CGP) +works around that limit: one trait can have many interchangeable implementations, called +*providers*, and each *context* chooses the one it uses through a small wiring table. This crate is +where you start. It is the facade over the crates that provide CGP, re-exporting them under +`cgp::core` and `cgp::extra` and gathering the names you write in `cgp::prelude`. ## A quick look -This example defines a greeting component, writes one provider for it, and wires `Person` to that -provider. `Person` is the data being greeted, and the check at the end makes the build fail if -`Person` lacks the `name` field the provider reads: +The smallest useful example is a greeting. It defines a greeting component, writes one provider +that reads a name, and wires `Person` to that provider. Here `Person` is the data being greeted, and +the `check_components!` line at the end makes the build fail if `Person` lacks the `name` field the +provider reads: ```rust use cgp::prelude::*; @@ -46,44 +48,51 @@ fn main() { } ``` -A plain trait would be enough for this greeting alone. Providers help when an application needs -interchangeable implementations, or wants to reuse and compose them, and they cost more -declarations, extra compile-time work, and concepts to learn. The raw compile errors can also be -verbose, which is why the next section suggests a second tool. +For a greeting alone, a plain trait would be enough. Providers start to help once an application +needs interchangeable implementations, or wants to reuse and compose them, and that help has a +price: more declarations, extra compile-time work, and concepts to learn. The raw compile errors can +also be verbose, which is why the install steps below suggest a second tool. ## Install +Add the crate to your project: + ```bash cargo add cgp ``` -CGP requires Rust 1.89 or newer and runs on the stable toolchain. Its default features need neither -`std` nor `alloc`, so it also builds for `no_std` targets. The providers that format an error into -a `String`, `DebugError` and `DisplayError`, need the `alloc` feature: +CGP needs Rust 1.89 or newer on the stable toolchain. Its default features need neither `std` nor +`alloc`, so it builds for `no_std` targets as well. Two providers, `DebugError` and `DisplayError`, +format an error into a `String`, so they need an allocator and the `alloc` feature: ```toml [dependencies] cgp = { version = "0.8.0", features = ["alloc"] } ``` -When you start with CGP, install -[`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) beside it: `cargo cgp check` leads with -the root cause for the classes it recognizes, and the tool does not yet reshape every class. +Once you start writing CGP, install [`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) +beside it, because a wiring mistake otherwise shows up as an error about generated types. +`cargo cgp check` leads with the root cause for the classes it recognizes, and the tool does not yet +reshape every class. ## Learn CGP -The documentation lives on the website, [contextgeneric.dev](https://contextgeneric.dev/): - -- [Quickstart](https://contextgeneric.dev/docs/quickstart): install CGP and run a first program. -- [Tutorials](https://contextgeneric.dev/docs/tutorials/hello): learn by building. -- [Concepts](https://contextgeneric.dev/docs/concepts/): why CGP works the way it does. -- [Reference](https://contextgeneric.dev/docs/reference/): one page per construct. -- [Costs and maturity](https://contextgeneric.dev/#costs): what to weigh before adopting it. - -The API documentation here describes each item, and a construct's documentation links the website's -reference page that explains how to use it, where the site has one. If you work with a coding agent, -the site's [AI-assisted development](https://contextgeneric.dev/docs/ai/) section covers the agent -skill and the knowledge base it draws on. +The documentation lives on the website, [contextgeneric.dev](https://contextgeneric.dev/), and each +part answers a different question: + +- [Quickstart](https://contextgeneric.dev/docs/quickstart): how do I install CGP and run a first + program? +- [Tutorials](https://contextgeneric.dev/docs/tutorials/hello): how do I learn it by building + something? +- [Concepts](https://contextgeneric.dev/docs/concepts/): why does CGP work the way it does? +- [Reference](https://contextgeneric.dev/docs/reference/): what does each construct accept and + generate? +- [Costs and maturity](https://contextgeneric.dev/#costs): what should I weigh before adopting it? + +The API documentation on docs.rs describes each item, and a construct's documentation links the +website's reference page that explains how to use it, where the site has one. If you work with a +coding agent, the site's [AI-assisted development](https://contextgeneric.dev/docs/ai/) section +covers the agent skill and the knowledge base the skill draws on. ## License From a81a580a18a4f7144ed19482d8c675b0799e1a1f Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:49:58 +0100 Subject: [PATCH 4/8] Write public-facing documents such as READMEs in natural style The universal writing rule now asks for natural writing in documents people outside the project read, such as a repository or crate README, beside point-first writing for internal prose. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 06d47ca8..6607da85 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,8 @@ holds their canonical wording: read it first, and change a rule there before upd - Verify a claim against the source before writing it. - Keep every view of the same truth in sync in the same change. - Ask the user when a decision is ambiguous. -- Apply point-first writing to internal prose. +- Apply point-first writing to internal prose, and natural writing to public-facing documents + such as READMEs. ## Task guides From 2e6d4a85f5e8601f83a4f41fab75d84ce360f76e Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:54:16 +0100 Subject: [PATCH 5/8] Run the workspace doctests in CI nextest runs no doctests, so the `cgp` crate README's quick look, which the crate includes as its documentation, was checked only locally. The test job now runs `cargo test --doc` across the workspace after the suite. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51d5202b..7ee2ff98 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -78,6 +78,10 @@ jobs: # are UI fixtures in `cargo-cgp`, not tests here. - name: Run tests run: cargo nextest run --all-features --no-fail-fast --workspace + # nextest runs no doctests, so the examples in the crate docs, such as the quick + # look the `cgp` crate's README gives as its documentation, run in this step. + - name: Run doctests + run: cargo test --doc --workspace --all-features --no-fail-fast doc: name: Docs From 1a0aed04a0e2092953bb2fd1a9cfa4190dd9dff0 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:54:16 +0100 Subject: [PATCH 6/8] Link the website from the error backends' READMEs Each backend's link bar drops its link to the knowledge base's project record, a document written for agents, and keeps the website's pages on error handling and the error components. Co-Authored-By: Claude Opus 5.5 --- crates/standalone/error/cgp-error-anyhow/README.md | 2 +- crates/standalone/error/cgp-error-eyre/README.md | 2 +- crates/standalone/error/cgp-error-std/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/standalone/error/cgp-error-anyhow/README.md b/crates/standalone/error/cgp-error-anyhow/README.md index dcb64b99..835f0552 100644 --- a/crates/standalone/error/cgp-error-anyhow/README.md +++ b/crates/standalone/error/cgp-error-anyhow/README.md @@ -9,7 +9,7 @@ add context to it. Code written against `HasErrorType`, `CanRaiseError`, and `CanWrapError` stays generic; only the context's wiring names anyhow. -**[Website](https://contextgeneric.dev/) · [Modular error handling](https://contextgeneric.dev/docs/concepts/modular-error-handling) · [The error components](https://contextgeneric.dev/docs/reference/components/has_error_type) · [Project record](https://github.com/contextgeneric/cgp-knowledge-base/blob/main/projects/error/README.md)** +**[Website](https://contextgeneric.dev/) · [Modular error handling](https://contextgeneric.dev/docs/concepts/modular-error-handling) · [The error components](https://contextgeneric.dev/docs/reference/components/has_error_type)** | Provider | Wire it to | What it does | |---|---|---| diff --git a/crates/standalone/error/cgp-error-eyre/README.md b/crates/standalone/error/cgp-error-eyre/README.md index 8b7c3b48..e501689e 100644 --- a/crates/standalone/error/cgp-error-eyre/README.md +++ b/crates/standalone/error/cgp-error-eyre/README.md @@ -9,7 +9,7 @@ add context to it. Code written against `HasErrorType`, `CanRaiseError`, and `CanWrapError` stays generic; only the context's wiring names eyre. -**[Website](https://contextgeneric.dev/) · [Modular error handling](https://contextgeneric.dev/docs/concepts/modular-error-handling) · [The error components](https://contextgeneric.dev/docs/reference/components/has_error_type) · [Project record](https://github.com/contextgeneric/cgp-knowledge-base/blob/main/projects/error/README.md)** +**[Website](https://contextgeneric.dev/) · [Modular error handling](https://contextgeneric.dev/docs/concepts/modular-error-handling) · [The error components](https://contextgeneric.dev/docs/reference/components/has_error_type)** | Provider | Wire it to | What it does | |---|---|---| diff --git a/crates/standalone/error/cgp-error-std/README.md b/crates/standalone/error/cgp-error-std/README.md index 81e82e59..cd4ed28d 100644 --- a/crates/standalone/error/cgp-error-std/README.md +++ b/crates/standalone/error/cgp-error-std/README.md @@ -9,7 +9,7 @@ abstract error type of a [CGP](https://contextgeneric.dev) context, and supplies raise errors into it and add context to it. It depends only on `cgp` and `alloc`, so it suits a `no_std` context that still wants an open-ended error type. -**[Website](https://contextgeneric.dev/) · [Modular error handling](https://contextgeneric.dev/docs/concepts/modular-error-handling) · [The error components](https://contextgeneric.dev/docs/reference/components/has_error_type) · [Project record](https://github.com/contextgeneric/cgp-knowledge-base/blob/main/projects/error/README.md)** +**[Website](https://contextgeneric.dev/) · [Modular error handling](https://contextgeneric.dev/docs/concepts/modular-error-handling) · [The error components](https://contextgeneric.dev/docs/reference/components/has_error_type)** | Item | Wire it to | What it does | |---|---|---| From 66c6941294e40a5b028126a2a3a6aa526d7e67b7 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 14:54:16 +0100 Subject: [PATCH 7/8] Link the cargo-cgp pages at their tooling URLs The website serves its cargo-cgp pages under `/docs/tooling/cargo-cgp/`, in the Tooling section, so every link to them moves there. Co-Authored-By: Claude Opus 5.5 --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d6d57598..bbe4a349 100644 --- a/README.md +++ b/README.md @@ -161,9 +161,10 @@ cargo cgp setup # provisions the compiler + driver it needs Then run `cargo cgp check` wherever you would run `cargo check`; it forces the pinned nightly that `cargo cgp setup` installed only for its own check, so your project keeps its toolchain untouched. (Prefer Nix? `nix run github:contextgeneric/cargo-cgp/v0.1.0 -- check` runs it without installing.) -The [installation guide](https://contextgeneric.dev/docs/cargo-cgp/installation) covers every path, -[reading the output](https://contextgeneric.dev/docs/cargo-cgp/reading-output) explains the rewritten -errors, and the [error codes](https://contextgeneric.dev/docs/cargo-cgp/error-codes) catalog every +The [installation guide](https://contextgeneric.dev/docs/tooling/cargo-cgp/installation) covers +every path, [reading the output](https://contextgeneric.dev/docs/tooling/cargo-cgp/reading-output) +explains the rewritten errors, and the +[error codes](https://contextgeneric.dev/docs/tooling/cargo-cgp/error-codes) catalog every `[CGP-Exxx]` code. cargo-cgp is optional and adds only the reading commands `check` and `expand`: keep building, From fdf3cc4da13635e6e01f1f807a6819d5d1d2cdd0 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 15 Nov 2026 15:00:34 +0100 Subject: [PATCH 8/8] Smooth the `cgp` crate README's prose The opening, the quick look, the costs, the install notes, and the links read more plainly, and the description splits into what CGP does and what this crate gives. The settled tag line, the reassurance line, and the canonical `cargo cgp check` sentence stay word for word. Co-Authored-By: Claude Opus 5.5 --- crates/main/cgp/README.md | 49 +++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/crates/main/cgp/README.md b/crates/main/cgp/README.md index 8b941958..96dd26be 100644 --- a/crates/main/cgp/README.md +++ b/crates/main/cgp/README.md @@ -6,18 +6,19 @@ Still ordinary Rust: a library on the stable toolchain, with provider selection time, adopted one trait at a time. In ordinary Rust, a trait has one implementation per type, so a program that needs two behaviors for -the same type has to reach for a wrapper type or a second trait. Context-Generic Programming (CGP) +the same type has to use a wrapper type or a second trait. Context-Generic Programming (CGP) works around that limit: one trait can have many interchangeable implementations, called -*providers*, and each *context* chooses the one it uses through a small wiring table. This crate is -where you start. It is the facade over the crates that provide CGP, re-exporting them under -`cgp::core` and `cgp::extra` and gathering the names you write in `cgp::prelude`. +*providers*, and each *context* chooses the one it uses through a small wiring table. + +To get started, use this crate: it re-exports the crates that provide CGP under `cgp::core` and +`cgp::extra`, and gathers the names you write in `cgp::prelude`. ## A quick look -The smallest useful example is a greeting. It defines a greeting component, writes one provider -that reads a name, and wires `Person` to that provider. Here `Person` is the data being greeted, and -the `check_components!` line at the end makes the build fail if `Person` lacks the `name` field the -provider reads: +A greeting shows how these pieces fit together. The example below defines a greeting component +and a provider that reads a name, then wires `Person` to that provider. Here `Person` holds the data +being greeted. The `check_components!` line checks the wiring at compile time, making the build +fail if `Person` lacks the `name` field the provider reads: ```rust use cgp::prelude::*; @@ -49,9 +50,9 @@ fn main() { ``` For a greeting alone, a plain trait would be enough. Providers start to help once an application -needs interchangeable implementations, or wants to reuse and compose them, and that help has a -price: more declarations, extra compile-time work, and concepts to learn. The raw compile errors can -also be verbose, which is why the install steps below suggest a second tool. +needs interchangeable implementations or wants to reuse and compose them. That flexibility comes +with more declarations, extra compile-time work, and new concepts to learn. The raw compile errors +can also be verbose, so the installation steps below include a tool to help interpret them. ## Install @@ -61,9 +62,10 @@ Add the crate to your project: cargo add cgp ``` -CGP needs Rust 1.89 or newer on the stable toolchain. Its default features need neither `std` nor -`alloc`, so it builds for `no_std` targets as well. Two providers, `DebugError` and `DisplayError`, -format an error into a `String`, so they need an allocator and the `alloc` feature: +CGP needs Rust 1.89 or newer on the stable toolchain. With its default features, it needs neither +`std` nor `alloc`, so it builds for `no_std` targets as well. The `DebugError` and `DisplayError` +providers format an error into a `String`, so using them requires an allocator and the `alloc` +feature: ```toml [dependencies] @@ -71,14 +73,14 @@ cgp = { version = "0.8.0", features = ["alloc"] } ``` Once you start writing CGP, install [`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp) -beside it, because a wiring mistake otherwise shows up as an error about generated types. -`cargo cgp check` leads with the root cause for the classes it recognizes, and the tool does not yet -reshape every class. +alongside it to help diagnose wiring mistakes. These otherwise show up as errors about generated +types. `cargo cgp check` leads with the root cause for the classes it recognizes, and the tool does +not yet reshape every class. ## Learn CGP -The documentation lives on the website, [contextgeneric.dev](https://contextgeneric.dev/), and each -part answers a different question: +To learn more, visit [contextgeneric.dev](https://contextgeneric.dev/). Its documentation covers +everything from your first program to the details of individual constructs: - [Quickstart](https://contextgeneric.dev/docs/quickstart): how do I install CGP and run a first program? @@ -89,10 +91,11 @@ part answers a different question: generate? - [Costs and maturity](https://contextgeneric.dev/#costs): what should I weigh before adopting it? -The API documentation on docs.rs describes each item, and a construct's documentation links the -website's reference page that explains how to use it, where the site has one. If you work with a -coding agent, the site's [AI-assisted development](https://contextgeneric.dev/docs/ai/) section -covers the agent skill and the knowledge base the skill draws on. +For details about individual API items, use the documentation on docs.rs. Each construct's +documentation also links to the website's reference page explaining how to use it, where one is +available. If you work with a coding agent, the site's +[AI-assisted development](https://contextgeneric.dev/docs/ai/) section explains the agent skill +and the knowledge base it draws on. ## License