Feat/cougr add into cli - #292
Open
mrteeednut007-dotcom wants to merge 3 commits into
Open
Conversation
Implements the shadcn-style piece distribution pattern described in docs/strategy/06-product-strategy.md. - New cougr-cli workspace member (binary crate, cargo install cougr-cli) - cougr add --list — prints all available pieces with maturity tiers - cougr add <piece> — copies a named piece into src/ as owned, editable source - Conflict detection: refuses to overwrite existing files, shows preview - Automatic mod declaration wiring into lib.rs (idempotent) Pieces shipped in v1 (embedded in binary via pieces.toml): session-auth [beta] SessionManager lifecycle from session_arena hidden-hand [experimental] hidden_cards ZK circuit from hidden_hand standards/pausable [stable] Pausable guard from src/standards/pausable.rs 11 unit/integration tests, all passing.
- Migrate add.rs, catalog.rs, and pieces.toml from cougr-cli/ into cli/ - Register Add subcommand alongside New in cli/src/main.rs - Add toml, serde, anstream, anyhow dependencies to cli/Cargo.toml - Remove the standalone cougr-cli/ crate (no longer needed) - All 40 tests pass (34 unit + 6 integration) Closes the concern raised in PR salazarsebas#270: the add subcommand now lives in the canonical cli/ crate introduced by salazarsebas#288, not a competing crate.
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.
feat(cli): integrate cougr add into the canonical cli/ crate
Summary
This PR addresses the review feedback on #270: instead of shipping a competing standalone
cougr-cli/ crate, the cougr add subcommand is now integrated directly into the cli/ crate
introduced by #288 — giving users a single cougr binary with both new and add.
What changed
cougr-cli/src/catalog.rs)
How it works
cougr add --list # show all available pieces
cougr add session-auth # copy piece into src/, update lib.rs
cougr add standards/pausable # nested piece support
cougr add hidden-hand -p ./mygame # explicit project root
Pieces are embedded in the binary via include_str!("../../pieces.toml") — same zero-dependency
model used by cougr new for templates.
Testing
All 40 tests pass — 34 unit tests + 6 integration tests:
test result: ok. 34 passed; 0 failed (unit)
test result: ok. 6 passed; 0 failed (integration)
Related
closes feat(cli): implement 'cougr add <piece>' component/system importer #245