Repository navigation
docs: add Actions & Pipelines reference page - #32
Merged
Merged
Conversation
Documents the pipeline concept, building blocks (conversion/validation/pack), standalone evaluation, custom step authoring, and utility patterns. Includes a design note explaining why type-checking is deferred to Arg<> to preserve polymorphism of validation steps like validation::range<>. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace SimpleAction/PackAction CRTP with explicit helper variable
templates. Users reference them directly in their trait declarations
rather than inheriting a base class:
template <class Input>
static constexpr bool accepts_input =
cli::deduce_accepts_input<MyStep, Input>;
template <class Input>
using after_type = cli::deduce_after_type<MyStep, Input>;
deduce_after_type is ill-formed (requires constraint) when
deduce_accepts_input is false, giving a clear error instead of a
silent void fallback. The Action<> requires clause no longer probes
after_type<void> since validate_impl already gates access behind
accepts_input.
actions.mdx updated to show the helper-based style with an explanation
of why storage_type must remain explicit for pack steps.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backtick inline code combined with {#anchor} in a heading caused
acorn to fail parsing the MDX. Replaced with escaped underscore and
auto-generated heading ID.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new documentation page describing cli20 “Actions & Pipelines” and introduces small API additions in include/cli/action.hh to support authoring custom pipeline steps with less boilerplate, along with unit tests that exercise the new deduction helpers.
Changes:
- Added
cli::deduce_accepts_inputandcli::deduce_after_typeto derive step traits fromoperator()for non-terminal steps. - Expanded unit tests to cover custom conversion/pack steps and pipeline invocation using the new helpers.
- Added a new “Actions & Pipelines” reference page and linked it from the docs sidebar.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
include/cli/action.hh |
Adds trait deduction helpers (and supporting type-trait scaffolding) for custom action steps. |
tests/test_conversion.cc |
Adds tests demonstrating custom action steps using the deduction helpers. |
docs/sidebars.ts |
Adds the new Actions page to the Docusaurus sidebar. |
docs/docs/actions.mdx |
New reference documentation explaining pipelines, traits, invocation, and custom step authoring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…example - RGBConversion: pass ctx.index to invalid_value_error instead of 0 - RGBConversion: check from_chars ec and fully-consumed pointer; reject components like "1,2,x" instead of silently treating as 0 - actions.mdx standalone invoke example: pass ActionCtx<optional<int>> with .arg = std::ref(storage) for pack::set_once; read result from storage, not result.value (terminal steps return ActionResult<void>) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gen740
enabled auto-merge (rebase)
May 11, 2026 02:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/docs/actions.mdx: comprehensive reference for the pipeline concept, built-in conversion/validation/pack steps, standalone evaluation viainvoke, and custom step authoring|defers type-checking toArg<>— preserves polymorphism of validation steps likevalidation::range<>'actions'entry todocs/sidebars.ts🤖 Generated with Claude Code