feat(cli): refactor devw add to use GitHub registry, remove blocks#43
Merged
feat(cli): refactor devw add to use GitHub registry, remove blocks#43
Conversation
The pull command logic is absorbed into devw add. Removes pull.ts, its tests, and the registerPullCommand call from index.ts.
Delete blocks/registry.ts, blocks/installer.ts and their tests. Simplify prebuild script to only copy README.
Replace local blocks with rules fetched from the GitHub registry. Two modes: interactive (category select + multi-select rules + multi-category flow) and direct (devw add category/rule). Features: --list, --force, --dry-run, --no-compile flags, back navigation, installed indicators, clean Ctrl+C handling, old block format detection with migration error.
Replace block-based removal with pulled rules management. Interactive mode with multi-select, direct mode with category/rule format. Old block format detected with migration error.
listBlocks() now shows deprecation message pointing to pulled rules. init "What's next" messages updated from blocks to rules registry.
Remove block-dependent tests from cli.test.ts and output.test.ts. Add tests for new add/remove error cases: non-TTY, old block format, invalid format, non-installed rule removal.
Replace all references to blocks and devw pull with rules registry and devw add <category>/<rule> format. Updated: CLAUDE.md, CONTRIBUTING.md, content/rules/README.md, docs/commands/add.mdx, docs/commands/remove.mdx, docs/commands/list.mdx, docs/index.mdx, docs/quickstart.mdx, docs/concepts/blocks.mdx.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace block cards showcase with interactive mode terminal demo (category select → rule select → confirm → install) plus direct mode alternative. Update rule cards to category/rule format. Update terminal tabs: add shows interactive flow, remove uses category/rule format, init/doctor/list references updated. Proof strip: "Rule blocks" → "Registry rules", 137 → 243 tests.
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
devw pull: absorbed intodevw add, delete command + testsblocks/registry.ts,blocks/installer.ts+ tests, simplify prebuilddevw add: interactive mode (category select → multi-select rules → multi-category flow → summary → confirm) and direct mode (devw add category/rule). Flags:--list,--force,--dry-run,--no-compile. Detects old block format with migration error. Back navigation, installed indicators, clean Ctrl+Cdevw remove: works with pulled rules (category/ruleformat), interactive + direct modeslistandinit: blocks deprecation message, updated "What's next" hintsChanges
remove devw pull commandpull.ts+ tests, remove fromindex.tsremove blocks systemblocks/+ tests, simplifyprebuildrewrite devw addadd.tswith registry + interactive UX, newadd.test.tsrewrite devw removeremove.tsfor pulled rules, newremove.test.tsupdate list and initupdate testsupdate documentationTest plan
pnpm build— compiles without errorspnpm test— 243 tests pass, 0 failuresdevw add --list— lists categories from GitHub registrydevw add typescript/strict— downloads and installs ruledevw add(interactive) — category select → rule multi-select → summary → installdevw add typescript-strict(old format) — shows migration errordevw remove typescript/strict— removes rule + updates configdevw list blocks— shows deprecation messagedevw list rules— shows installed rules with source