Skip to content

feat(cli): add asset system for commands, templates, hooks, and presets#47

Merged
gpolanco merged 1 commit intomainfrom
feat/asset-system
Feb 20, 2026
Merged

feat(cli): add asset system for commands, templates, hooks, and presets#47
gpolanco merged 1 commit intomainfrom
feat/asset-system

Conversation

@gpolanco
Copy link
Copy Markdown
Owner

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-driven on 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), remove
  • packages/cli/src/core/settings-merge.ts — Deep-merge JSON for hooks → .claude/settings.local.json
  • packages/cli/tests/core/assets.test.ts — 17 tests for asset operations
  • packages/cli/tests/core/settings-merge.test.ts — 9 tests for deep merge
  • content/commands/{spec,plan,build,learn}.md — 4 slash commands for spec-driven workflow
  • content/templates/feature-spec.md — Feature spec template
  • content/hooks/auto-format.json — Auto-format hook (PostToolUse)
  • content/presets/spec-driven.yml — Preset bundling all of the above
  • content/rules/workflow/spec-driven.md — Rule teaching the AI the workflow

Modified files (13)

  • bridges/types.tsASSET_TYPE, AssetType, AssetEntry, ProjectConfig.assets
  • core/parser.ts — Parse assets[] from config (backwards-compatible)
  • utils/github.ts — Generic fetchContent() / listContentDirectory() (existing functions preserved as wrappers)
  • commands/add.ts — Route command/*, template/*, hook/*, preset/* to asset flow
  • commands/compile.ts — Deploy assets after bridge compilation
  • commands/init.ts--preset flag, create .dwf/assets/
  • commands/remove.ts — Route asset types to asset removal
  • commands/list.ts — Subcommands: assets, commands, templates, hooks
  • commands/doctor.tscheckAssetFilesExist health check
  • commands/watch.ts — Watch .dwf/assets/**/*.{md,json}
  • 3 test files updated for ProjectConfig.assets field

Test

pnpm test  # 271 tests pass, 0 failures

Manual verification:

devw add command/spec           # downloads slash command
devw compile                    # deploys to .claude/commands/spec.md
devw add preset/spec-driven     # installs full workflow
devw list assets                # shows installed assets
devw remove command/spec        # removes asset
devw doctor                     # all checks pass
devw init --preset spec-driven  # fresh project with full workflow

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.
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
landing Ready Ready Preview, Comment Feb 20, 2026 5:33pm

@gpolanco gpolanco merged commit 55b63b5 into main Feb 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant