feat(cli): add asset system for commands, templates, hooks, and presets#47
Merged
feat(cli): add asset system for commands, templates, hooks, and presets#47
Conversation
Extend dev-workflows from a rule compiler to a complete AI workflow system. The new asset system supports slash commands, spec templates, editor hooks, and presets that bundle everything together. Running `devw init --preset spec-driven` now sets up a full spec-driven development workflow.
|
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.
What
Extend dev-workflows from a rule compiler to a complete AI workflow system with support for commands (slash commands), templates (spec templates), hooks (editor hooks), and presets (bundles of rules + assets).
Why
Implements the spec-driven development workflow architecture. Users can now run
devw init --preset spec-drivenon any project and get a complete AI workflow:/spec→/plan→/build→/learn.Changes
New files (12)
packages/cli/src/core/assets.ts— Asset management: read, deploy (commands/templates/hooks), removepackages/cli/src/core/settings-merge.ts— Deep-merge JSON for hooks →.claude/settings.local.jsonpackages/cli/tests/core/assets.test.ts— 17 tests for asset operationspackages/cli/tests/core/settings-merge.test.ts— 9 tests for deep mergecontent/commands/{spec,plan,build,learn}.md— 4 slash commands for spec-driven workflowcontent/templates/feature-spec.md— Feature spec templatecontent/hooks/auto-format.json— Auto-format hook (PostToolUse)content/presets/spec-driven.yml— Preset bundling all of the abovecontent/rules/workflow/spec-driven.md— Rule teaching the AI the workflowModified files (13)
bridges/types.ts—ASSET_TYPE,AssetType,AssetEntry,ProjectConfig.assetscore/parser.ts— Parseassets[]from config (backwards-compatible)utils/github.ts— GenericfetchContent()/listContentDirectory()(existing functions preserved as wrappers)commands/add.ts— Routecommand/*,template/*,hook/*,preset/*to asset flowcommands/compile.ts— Deploy assets after bridge compilationcommands/init.ts—--presetflag, create.dwf/assets/commands/remove.ts— Route asset types to asset removalcommands/list.ts— Subcommands:assets,commands,templates,hookscommands/doctor.ts—checkAssetFilesExisthealth checkcommands/watch.ts— Watch.dwf/assets/**/*.{md,json}ProjectConfig.assetsfieldTest
Manual verification: