Skip to content

Pre-v2 cleanup: namespace prefix, init UX, plugin infrastructure#167

Merged
dean0x merged 4 commits intomainfrom
feat/pre-v2-cleanup
Mar 29, 2026
Merged

Pre-v2 cleanup: namespace prefix, init UX, plugin infrastructure#167
dean0x merged 4 commits intomainfrom
feat/pre-v2-cleanup

Conversation

@dean0x
Copy link
Copy Markdown
Owner

@dean0x dean0x commented Mar 29, 2026

Summary

  • Namespace prefix: Add devflow: prefix to all skill references across agents, skills, commands, and hooks — prevents collisions with other plugin ecosystems. Three rounds of audit (automated + 5 independent agents) verified completeness.
  • Init UX: Add spinner progress during installation, two-mode init (Recommended/Advanced)
  • Plugin infrastructure: Sync plugin.json manifests, universal skill installation with namespace prefix at install-time
  • Build-time asset distribution: Skills and agents stored once in shared/, copied to plugins at build

Changes

  • 48 files changed (+317/-227)
  • 524/524 tests passing
  • Build clean

Key files

  • src/cli/utils/installer.tsdevflow: prefix applied at install-time
  • src/cli/commands/skills.ts — skill listing with namespace awareness
  • shared/agents/*.md — all skill references prefixed
  • shared/skills/ambient-router/ — full skill catalog with prefixed references
  • plugins/*/commands/*.md — all command skill references prefixed
  • scripts/hooks/ambient-prompt — preamble skill mappings prefixed
  • tests/skill-namespace.test.ts — new tests for namespace behavior

Test plan

  • npm run build — clean
  • npm test — 524/524 pass
  • Grep audit: no remaining bare skill references (verified by 5 independent agents)
  • No double-prefixed references (devflow:devflow:)
  • No broken file paths
  • devflow init + devflow list verified post-install

Dean Sharon added 4 commits March 29, 2026 20:57
Two pre-V2 cleanup items:

1. Skill namespace prefix (Issue #90): All DevFlow skills are now installed
   as ~/.claude/skills/devflow:{name}/ to avoid collisions with other plugin
   ecosystems. Source dirs in shared/skills/ stay unprefixed — the prefix is
   applied at install-time only. Shadow overrides at ~/.devflow/skills/{name}/
   are now copied TO the prefixed target (fixing the previous model where
   shadowed skills were skipped entirely, breaking agent Read paths).

   - Added SKILL_NAMESPACE, prefixSkillName(), unprefixSkillName() helpers
   - Updated installer cleanup/install to handle prefixed targets
   - Updated shadow/unshadow to accept both bare and prefixed input
   - Updated uninstall to handle all three name variants (devflow:, bare, devflow-)
   - Added all 39 current bare names to LEGACY_SKILL_NAMES for migration
   - Updated ~200 skill references across 46 files (agents, commands, skills,
     hooks, orchestration, ambient router, tests, docs)

2. Init spinner progress: Added phase-specific spinner messages during
   installation (Cleaning old files, Installing commands and agents,
   Installing skills, Installing scripts) and clearer managed settings prompt.
Third-round audit found 12 bare skill references across 10 files:
- git.md: github-patterns
- git-workflow/SKILL.md: git-safety
- input-validation/references/detection.md: core-patterns, test-patterns, security-patterns
- test-driven-development/SKILL.md: test-patterns
- implement.md, implement-teams.md: git-workflow
- code-review.md, code-review-teams.md: worktree-support
- resolve.md, resolve-teams.md: worktree-support

Verified by 5 independent audit agents + build clean + 524/524 tests pass.
- Remove shadow `continue` from cleanup loop — always clean both prefixed
  and unprefixed dirs (prevents orphan files on upgrade)
- Add non-empty guard for shadow dirs (empty shadow falls back to source)
- Normalize prefixed names in getShadowDir via unprefixSkillName
- Deduplicate skill names in full uninstall with Set, count only actual removals
- Add devflow-{name} legacy variant to selective uninstall
- Add 10 integration tests exercising real installViaFileCopy: prefixed install,
  legacy cleanup, stale file removal, shadow override, empty shadow fallback,
  partial install preservation, and full shadow lifecycle
Skills are universally installed regardless of plugin selection, so skill
cleanup must always run. Previously it was gated behind !isPartialInstall,
meaning `devflow init --plugin=X` could leave bare-named duplicates
alongside the new devflow:-prefixed dirs.

Commands and agents cleanup remains full-install-only since they're
plugin-scoped.
@dean0x dean0x merged commit dcecda3 into main Mar 29, 2026
3 of 4 checks passed
@dean0x dean0x deleted the feat/pre-v2-cleanup branch March 29, 2026 23:32
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