Conversation
Implement rule distribution via GitHub. Users can download official rules from the dev-workflows registry with devw pull <category>/<rule>. - Add pull command with --list, --force, --dry-run, --no-compile flags - Add Markdown to YAML converter for rule files - Add GitHub API helpers (raw content + contents API) - Add cache with 1h TTL for registry listing - Extend types with source field on Rule and pulled[] on ProjectConfig - Add pulled files check to doctor command - Add source indicator (pulled/manual) to list command - Create 6 official rules in rules/ directory (P0 + P1) - Add tests for converter, github, cache, and pull integration
- Move rules/ directory to content/rules/ for consistency with content/blocks/ - Change BRANCH from 'feat/pull-command' to 'main' in github.ts - Update RAW_BASE and API_BASE URLs to point to content/rules/ - Update GitHub blob URL in generateYamlOutput - Add 69 edge-case tests across 6 new test files: converter.edge, github.edge, cache.edge, pull.edge, parser.edge, doctor.edge - Export validateInput, generateYamlOutput, updateConfig from pull.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 pullcommand to download rules from the official registry on GitHubconverter.ts(Markdown → YAML),github.ts(GitHub API),cache.ts(TTL cache)devw doctor(check pulled files exist) anddevw list rules(show pulled indicator)content/rules/for consistency withcontent/blocks/Changes
New files (source):
packages/cli/src/commands/pull.ts— full command with--list,--force,--dry-run,--no-compilepackages/cli/src/core/converter.ts— Markdown frontmatter + bullets → YAML rulespackages/cli/src/utils/github.ts—fetchRawContent,listDirectory,GitHubErrorpackages/cli/src/utils/cache.ts— disk cache with 1h TTLNew files (content):
content/rules/— 6 rule sets + README (moved fromrules/)Modified files:
packages/cli/src/bridges/types.ts—PulledEntry,sourceonRule,pulledonProjectConfigpackages/cli/src/core/parser.ts— parsepulled[]from config,sourcefrom rulespackages/cli/src/commands/doctor.ts—checkPulledFilesExist()checkpackages/cli/src/commands/list.ts— pulled indicator in outputTests (12 files, 257 total):
Test plan
pnpm build— no TS errorspnpm test— 257 pass, 0 faildevw pull --listshows categoriesdevw pull typescript/strictdownloads, converts, compilesdevw pull typescript/strict(again) → "Already up to date"devw doctor→ pulled files check passes