feat(cli): add asset system for commands, templates, hooks, and presets#51
Merged
feat(cli): add asset system for commands, templates, hooks, and presets#51
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.
Update README, Mintlify docs, and content registry to reflect the new asset system (commands, templates, hooks, presets). Fix outdated block naming, add missing rules and bridges to tables, create assets concept page, and generate changeset for minor version bump.
The hook settings were using the old format with `command` directly
in the matcher group. Claude Code expects each matcher group to have
a `hooks` array with `{type, command}` objects.
Fixes: hooks → PostToolUse → 0 → hooks: Expected array, received undefined
|
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
Adds a full asset system to the CLI that allows users to install not just rules, but also commands, templates, hooks, and presets from the registry. Includes a
settings-mergeutility that correctly writes Claude Code hook settings in the expected format.Why
The CLI previously only supported rules. This extends the asset model to cover all developer workflow primitives as defined in the v0.2/v0.2.1 specs and the internal
content/directory structure.Also fixes a bug in the hook settings format: Claude Code expects each matcher group to have a
hooksarray with{type, command}objects, not acommanddirectly.Changes
New files:
packages/cli/src/core/assets.ts— asset resolution, installation, and registry logicpackages/cli/src/core/settings-merge.ts— merges hook entries into Claude Code settings.json with correct formatpackages/cli/tests/core/assets.test.ts— full test coverage for asset systempackages/cli/tests/core/settings-merge.test.ts— tests for settings merge logiccontent/commands/build.md,learn.md,plan.md,spec.md— built-in commandscontent/hooks/auto-format.json— built-in auto-format hook (with correct format)content/presets/spec-driven.yml— example presetcontent/templates/feature-spec.md— feature spec templatecontent/rules/workflow/spec-driven.md— spec-driven workflow ruledocs/concepts/assets.mdx— documentation for the asset system.changeset/add-asset-system.mdModified files:
packages/cli/src/commands/add.ts— supports all asset typespackages/cli/src/commands/list.ts— lists all asset typespackages/cli/src/commands/doctor.ts— validates asset installationspackages/cli/src/commands/init.ts— initializes with assetspackages/cli/src/commands/compile.ts— compiles assetspackages/cli/src/commands/remove.ts— removes assetspackages/cli/src/bridges/types.ts— bridge type extensionspackages/cli/src/utils/github.ts— updated GitHub fetchingpackages/cli/src/core/parser.ts— parser updatesdocs/commands/add.mdx,compile.mdx,doctor.mdx,init.mdx,list.mdx— updated docsdocs/index.mdx,docs/quickstart.mdx,docs/docs.json— updated navigation and contentREADME.md— updated with asset system overviewTest