devflow-kit 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/README.md +23 -6
  3. package/dist/cli.js +2 -0
  4. package/dist/commands/ambient.js +5 -4
  5. package/dist/commands/init.js +4 -2
  6. package/dist/commands/memory.js +4 -4
  7. package/dist/commands/skills.d.ts +11 -0
  8. package/dist/commands/skills.js +116 -0
  9. package/dist/commands/uninstall.js +11 -1
  10. package/dist/plugins.js +67 -3
  11. package/dist/utils/installer.js +20 -2
  12. package/package.json +4 -2
  13. package/plugins/devflow-accessibility/.claude-plugin/plugin.json +22 -0
  14. package/plugins/devflow-ambient/.claude-plugin/plugin.json +4 -2
  15. package/plugins/devflow-ambient/README.md +8 -8
  16. package/plugins/devflow-ambient/commands/ambient.md +14 -14
  17. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +16 -9
  18. package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +6 -2
  19. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +1 -1
  20. package/plugins/devflow-code-review/.claude-plugin/plugin.json +13 -6
  21. package/plugins/devflow-code-review/agents/reviewer.md +8 -0
  22. package/plugins/devflow-code-review/commands/code-review-teams.md +11 -1
  23. package/plugins/devflow-code-review/commands/code-review.md +12 -2
  24. package/plugins/devflow-code-review/skills/architecture-patterns/SKILL.md +1 -1
  25. package/plugins/devflow-code-review/skills/complexity-patterns/SKILL.md +1 -1
  26. package/plugins/devflow-code-review/skills/consistency-patterns/SKILL.md +1 -1
  27. package/plugins/devflow-code-review/skills/database-patterns/SKILL.md +1 -1
  28. package/plugins/devflow-code-review/skills/dependencies-patterns/SKILL.md +1 -1
  29. package/plugins/devflow-code-review/skills/documentation-patterns/SKILL.md +1 -1
  30. package/plugins/devflow-code-review/skills/performance-patterns/SKILL.md +1 -1
  31. package/plugins/devflow-code-review/skills/regression-patterns/SKILL.md +1 -1
  32. package/plugins/devflow-code-review/skills/review-methodology/SKILL.md +1 -1
  33. package/plugins/devflow-code-review/skills/security-patterns/SKILL.md +1 -1
  34. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +10 -7
  35. package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +5 -8
  36. package/plugins/devflow-debug/.claude-plugin/plugin.json +10 -3
  37. package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +22 -0
  38. package/plugins/devflow-go/.claude-plugin/plugin.json +22 -0
  39. package/plugins/devflow-go/skills/go/SKILL.md +187 -0
  40. package/plugins/devflow-go/skills/go/references/concurrency.md +312 -0
  41. package/plugins/devflow-go/skills/go/references/detection.md +129 -0
  42. package/plugins/devflow-go/skills/go/references/patterns.md +232 -0
  43. package/plugins/devflow-go/skills/go/references/violations.md +205 -0
  44. package/plugins/devflow-implement/.claude-plugin/plugin.json +19 -5
  45. package/plugins/devflow-implement/agents/coder.md +11 -6
  46. package/plugins/devflow-implement/skills/self-review/SKILL.md +1 -1
  47. package/plugins/devflow-java/.claude-plugin/plugin.json +22 -0
  48. package/plugins/devflow-java/skills/java/SKILL.md +183 -0
  49. package/plugins/devflow-java/skills/java/references/detection.md +120 -0
  50. package/plugins/devflow-java/skills/java/references/modern-java.md +270 -0
  51. package/plugins/devflow-java/skills/java/references/patterns.md +235 -0
  52. package/plugins/devflow-java/skills/java/references/violations.md +213 -0
  53. package/plugins/devflow-python/.claude-plugin/plugin.json +22 -0
  54. package/plugins/devflow-python/skills/python/SKILL.md +188 -0
  55. package/plugins/devflow-python/skills/python/references/async.md +220 -0
  56. package/plugins/devflow-python/skills/python/references/detection.md +128 -0
  57. package/plugins/devflow-python/skills/python/references/patterns.md +226 -0
  58. package/plugins/devflow-python/skills/python/references/violations.md +204 -0
  59. package/plugins/devflow-react/.claude-plugin/plugin.json +22 -0
  60. package/plugins/{devflow-core-skills → devflow-react}/skills/react/SKILL.md +1 -1
  61. package/plugins/{devflow-core-skills → devflow-react}/skills/react/references/patterns.md +3 -3
  62. package/plugins/devflow-resolve/.claude-plugin/plugin.json +13 -3
  63. package/plugins/devflow-resolve/skills/security-patterns/SKILL.md +1 -1
  64. package/plugins/devflow-rust/.claude-plugin/plugin.json +22 -0
  65. package/plugins/devflow-rust/skills/rust/SKILL.md +193 -0
  66. package/plugins/devflow-rust/skills/rust/references/detection.md +131 -0
  67. package/plugins/devflow-rust/skills/rust/references/ownership.md +242 -0
  68. package/plugins/devflow-rust/skills/rust/references/patterns.md +210 -0
  69. package/plugins/devflow-rust/skills/rust/references/violations.md +191 -0
  70. package/plugins/devflow-self-review/.claude-plugin/plugin.json +10 -3
  71. package/plugins/devflow-self-review/skills/self-review/SKILL.md +1 -1
  72. package/plugins/devflow-specify/.claude-plugin/plugin.json +15 -4
  73. package/plugins/devflow-typescript/.claude-plugin/plugin.json +22 -0
  74. package/plugins/{devflow-core-skills → devflow-typescript}/skills/typescript/references/patterns.md +3 -3
  75. package/scripts/hooks/{ambient-prompt.sh → ambient-prompt} +4 -4
  76. package/scripts/hooks/{background-memory-update.sh → background-memory-update} +3 -3
  77. package/scripts/hooks/{ensure-memory-gitignore.sh → ensure-memory-gitignore} +1 -1
  78. package/scripts/hooks/{pre-compact-memory.sh → pre-compact-memory} +2 -2
  79. package/scripts/hooks/run-hook +23 -0
  80. package/scripts/hooks/session-start-memory +151 -0
  81. package/scripts/hooks/{stop-update-memory.sh → stop-update-memory} +4 -4
  82. package/shared/agents/coder.md +11 -6
  83. package/shared/agents/reviewer.md +8 -0
  84. package/shared/skills/ambient-router/SKILL.md +16 -9
  85. package/shared/skills/ambient-router/references/skill-catalog.md +6 -2
  86. package/shared/skills/architecture-patterns/SKILL.md +1 -1
  87. package/shared/skills/complexity-patterns/SKILL.md +1 -1
  88. package/shared/skills/consistency-patterns/SKILL.md +1 -1
  89. package/shared/skills/database-patterns/SKILL.md +1 -1
  90. package/shared/skills/dependencies-patterns/SKILL.md +1 -1
  91. package/shared/skills/documentation-patterns/SKILL.md +1 -1
  92. package/shared/skills/go/SKILL.md +187 -0
  93. package/shared/skills/go/references/concurrency.md +312 -0
  94. package/shared/skills/go/references/detection.md +129 -0
  95. package/shared/skills/go/references/patterns.md +232 -0
  96. package/shared/skills/go/references/violations.md +205 -0
  97. package/shared/skills/java/SKILL.md +183 -0
  98. package/shared/skills/java/references/detection.md +120 -0
  99. package/shared/skills/java/references/modern-java.md +270 -0
  100. package/shared/skills/java/references/patterns.md +235 -0
  101. package/shared/skills/java/references/violations.md +213 -0
  102. package/shared/skills/performance-patterns/SKILL.md +1 -1
  103. package/shared/skills/python/SKILL.md +188 -0
  104. package/shared/skills/python/references/async.md +220 -0
  105. package/shared/skills/python/references/detection.md +128 -0
  106. package/shared/skills/python/references/patterns.md +226 -0
  107. package/shared/skills/python/references/violations.md +204 -0
  108. package/shared/skills/react/SKILL.md +1 -1
  109. package/shared/skills/react/references/patterns.md +3 -3
  110. package/shared/skills/regression-patterns/SKILL.md +1 -1
  111. package/shared/skills/review-methodology/SKILL.md +1 -1
  112. package/shared/skills/rust/SKILL.md +193 -0
  113. package/shared/skills/rust/references/detection.md +131 -0
  114. package/shared/skills/rust/references/ownership.md +242 -0
  115. package/shared/skills/rust/references/patterns.md +210 -0
  116. package/shared/skills/rust/references/violations.md +191 -0
  117. package/shared/skills/security-patterns/SKILL.md +1 -1
  118. package/shared/skills/self-review/SKILL.md +1 -1
  119. package/shared/skills/test-driven-development/SKILL.md +5 -8
  120. package/shared/skills/typescript/references/patterns.md +3 -3
  121. package/src/templates/settings.json +3 -3
  122. package/plugins/devflow-code-review/skills/react/SKILL.md +0 -276
  123. package/plugins/devflow-code-review/skills/react/references/patterns.md +0 -1331
  124. package/plugins/devflow-core-skills/skills/accessibility/SKILL.md +0 -229
  125. package/plugins/devflow-core-skills/skills/accessibility/references/detection.md +0 -171
  126. package/plugins/devflow-core-skills/skills/accessibility/references/patterns.md +0 -670
  127. package/plugins/devflow-core-skills/skills/accessibility/references/violations.md +0 -419
  128. package/plugins/devflow-core-skills/skills/frontend-design/SKILL.md +0 -254
  129. package/plugins/devflow-core-skills/skills/frontend-design/references/detection.md +0 -184
  130. package/plugins/devflow-core-skills/skills/frontend-design/references/patterns.md +0 -511
  131. package/plugins/devflow-core-skills/skills/frontend-design/references/violations.md +0 -453
  132. package/plugins/devflow-core-skills/skills/react/references/violations.md +0 -565
  133. package/plugins/devflow-implement/skills/accessibility/SKILL.md +0 -229
  134. package/plugins/devflow-implement/skills/accessibility/references/detection.md +0 -171
  135. package/plugins/devflow-implement/skills/accessibility/references/patterns.md +0 -670
  136. package/plugins/devflow-implement/skills/accessibility/references/violations.md +0 -419
  137. package/plugins/devflow-implement/skills/frontend-design/SKILL.md +0 -254
  138. package/plugins/devflow-implement/skills/frontend-design/references/detection.md +0 -184
  139. package/plugins/devflow-implement/skills/frontend-design/references/patterns.md +0 -511
  140. package/plugins/devflow-implement/skills/frontend-design/references/violations.md +0 -453
  141. package/scripts/hooks/session-start-memory.sh +0 -126
  142. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/SKILL.md +0 -0
  143. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/references/detection.md +0 -0
  144. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/references/patterns.md +0 -0
  145. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/references/violations.md +0 -0
  146. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/SKILL.md +0 -0
  147. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/references/detection.md +0 -0
  148. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/references/patterns.md +0 -0
  149. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/references/violations.md +0 -0
  150. /package/plugins/{devflow-code-review → devflow-react}/skills/react/references/violations.md +0 -0
  151. /package/plugins/{devflow-core-skills → devflow-typescript}/skills/typescript/SKILL.md +0 -0
  152. /package/plugins/{devflow-core-skills → devflow-typescript}/skills/typescript/references/violations.md +0 -0
package/CHANGELOG.md CHANGED
@@ -5,12 +5,78 @@ All notable changes to DevFlow will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.3.0] - 2026-03-08
9
+
10
+ ### Added
11
+ - **Skill shadowing** — `devflow skills shadow <name>` copies a skill for personal overrides
12
+ - `devflow skills unshadow <name>` restores the original
13
+ - `devflow skills list-shadowed` shows active overrides
14
+ - Shadowed skills are preserved during `devflow init` (not overwritten)
15
+ - Uninstall warns about remaining shadow files
16
+ - **Cross-platform hook wrapper** — `run-hook` polyglot entry point for Windows compatibility
17
+ - Discovers bash on Windows (Git Bash, WSL, MSYS2) via standard paths
18
+ - All hook scripts renamed to drop `.sh` extension
19
+ - **Ambient skill injection at session start** — `session-start-memory` hook injects `ambient-router` SKILL.md directly into context
20
+ - Eliminates the need for a Read tool call to load the ambient router
21
+ - Only activates when ambient mode is enabled
22
+ - **Skill activation integration tests** — `vitest.integration.config.ts` + helpers for live classification tests
23
+ - Separate `npm run test:integration` for tests requiring `claude` CLI
24
+
25
+ ### Changed
26
+ - **Ambient depth labels renamed** — STANDARD→GUIDED, ESCALATE→ELEVATE for clarity
27
+ - GUIDED: skills guide the response; ELEVATE: elevate to a full workflow
28
+ - **Hook commands use `run-hook` dispatch** — Settings template and CLI now register hooks via `run-hook <name>` instead of direct `.sh` paths
29
+ - **`devflow init` auto-upgrades hook format** — Removes old `.sh`-style hooks before re-adding, ensuring existing installs migrate seamlessly
30
+ - **Skill descriptions audited** — All 12 review-only skills updated to trigger-format (`"This skill should be used when..."`)
31
+ - **Skills architecture docs** — Added description rules section with good/bad examples
32
+ - **`chmod` skipped on Windows** — `chmodRecursive` no longer runs on `win32` platform
33
+
34
+ ### Fixed
35
+ - **Ambient preamble missing skill path** — Hook now tells Claude to `Read` skills from `~/.claude/skills/<name>/SKILL.md`
36
+ - **Ambient `--status` hook path parsing** — Handles `run-hook <name>` format instead of assuming direct `.sh` path
37
+
38
+ ---
39
+
40
+ ## [1.2.0] - 2026-03-05
41
+
42
+ ### Added
43
+ - **Polyglot language skills** — Go, Java, Python, and Rust skill plugins with comprehensive patterns
44
+ - Go: error handling, interfaces, concurrency (errgroup, worker pools, fan-out/fan-in)
45
+ - Java: records, sealed classes, streams, composition over inheritance
46
+ - Python: type hints, protocols, dataclasses, async patterns
47
+ - Rust: ownership, error handling (`thiserror`/`anyhow`), type system, concurrency
48
+ - Skills: 26 → 30, Plugins: 9 → 17
49
+ - **Optional plugin architecture** — Language/ecosystem plugins (`optional: true`) not installed by default
50
+ - Install selectively: `devflow init --plugin=go --plugin=python`
51
+ - Existing skills (typescript, react, accessibility, frontend-design) moved to optional plugins
52
+ - `devflow-core-skills` no longer bundles language-specific skills
53
+ - **Conditional language reviews** in `/code-review` command
54
+ - Spawns language-specific Reviewer agents when matching files are in the diff
55
+ - Skill availability check: skips review if optional plugin not installed
56
+ - **Dynamic skill loading in Coder agent** — Reads language skills at runtime based on DOMAIN hint instead of static frontmatter dependencies
57
+
58
+ ### Changed
59
+ - **`devflow-core-skills`** no longer includes typescript, react, accessibility, or frontend-design skills (moved to optional plugins)
60
+ - **Coder agent** frontmatter trimmed from 14 skills to 6 core skills; language skills loaded dynamically
61
+
62
+ ### Fixed
63
+ - **Deprecated `grpc.WithInsecure()`** in Go concurrency examples → replaced with `grpc.WithTransportCredentials(insecure.NewCredentials())`
64
+ - **Deprecated `datetime.utcnow`** in Python dataclass example → replaced with `datetime.now(timezone.utc)`
65
+ - **SQL injection** in Python async streaming example → replaced raw query with parameterized query
66
+ - **Deprecated `<Context.Provider>`** in React examples → replaced with `<Context>` (React 19+)
67
+ - **Deprecated `useRef<T>()`** without argument in React patterns → replaced with `useRef<T | undefined>(undefined)` (React 19+)
68
+ - **Non-portable `NodeJS.Timeout`** in TypeScript debounce/throttle → replaced with `ReturnType<typeof setTimeout>`
69
+ - **Unsafe `Function` type** in TypeScript type guard → replaced with `(...args: unknown[]) => unknown`
70
+ - **Go test file exclusion** removed from go skill activation (test files are valid Go code)
71
+
72
+ ---
73
+
8
74
  ## [1.1.0] - 2026-03-04
9
75
 
10
76
  ### Added
11
77
  - **Ambient mode** — New `devflow-ambient` plugin with `/ambient` command for proportional quality enforcement
12
78
  - Intent classification (BUILD/DEBUG/REVIEW/PLAN/EXPLORE/CHAT) auto-loads relevant skills
13
- - Three depth tiers: QUICK (zero overhead), STANDARD (2-3 skills), ESCALATE (nudge to workflows)
79
+ - Three depth tiers: QUICK (zero overhead), GUIDED (2-3 skills), ELEVATE (nudge to workflows)
14
80
  - Always-on mode via `devflow ambient --enable` or `devflow init --ambient`
15
81
  - New `ambient-router` skill for intent/depth classification
16
82
  - New `test-driven-development` skill (auto-activates for BUILD tasks)
@@ -749,6 +815,8 @@ devflow init
749
815
 
750
816
  ---
751
817
 
818
+ [1.3.0]: https://github.com/dean0x/devflow/compare/v1.2.0...v1.3.0
819
+ [1.2.0]: https://github.com/dean0x/devflow/compare/v1.1.0...v1.2.0
752
820
  [1.1.0]: https://github.com/dean0x/devflow/compare/v1.0.0...v1.1.0
753
821
  [1.0.0]: https://github.com/dean0x/devflow/compare/v0.9.0...v1.0.0
754
822
  [0.9.0]: https://github.com/dean0x/devflow/releases/tag/v0.9.0
package/README.md CHANGED
@@ -24,7 +24,7 @@ DevFlow adds structured commands that handle the full lifecycle: specify feature
24
24
  - **Full-lifecycle implementation** — spec, explore, plan, code, validate, refine in one command
25
25
  - **Automatic session memory** — survives restarts, `/clear`, and context compaction
26
26
  - **Parallel debugging** — competing hypotheses investigated simultaneously
27
- - **26 quality skills** — 12 auto-activating, plus specialized review and agent skills
27
+ - **30 quality skills** — 8 auto-activating core, 8 optional language/ecosystem, plus specialized review and agent skills
28
28
 
29
29
  ## Quick Start
30
30
 
@@ -81,7 +81,7 @@ Creates a PR when complete.
81
81
  Multi-perspective code review with specialized reviewers:
82
82
 
83
83
  - **Core**: Security, Architecture, Performance, Quality
84
- - **Conditional** (activated when relevant): TypeScript, React, Accessibility, Database, Dependencies, Documentation
84
+ - **Conditional** (activated when relevant): TypeScript, React, Accessibility, Go, Python, Java, Rust, Database, Dependencies, Documentation
85
85
  - Findings classified as must-fix, should-fix, or nit with severity and confidence levels
86
86
 
87
87
  Provides actionable feedback with specific file locations and suggested fixes.
@@ -120,10 +120,27 @@ The `devflow-core-skills` plugin provides quality enforcement skills that activa
120
120
  | `test-driven-development` | Implementing new features (RED-GREEN-REFACTOR) |
121
121
  | `test-patterns` | Writing or modifying tests |
122
122
  | `input-validation` | Creating API endpoints |
123
- | `typescript` | Working in TypeScript codebases |
124
- | `react` | Working with React components |
125
- | `accessibility` | Creating UI components, forms, interactive elements |
126
- | `frontend-design` | Working with CSS, styling, visual design |
123
+
124
+ ## Language & Ecosystem Plugins
125
+
126
+ Optional plugins for language-specific patterns. Install only what you need:
127
+
128
+ | Plugin | Skill | Triggers When |
129
+ |--------|-------|---------------|
130
+ | `devflow-typescript` | `typescript` | Working in TypeScript codebases |
131
+ | `devflow-react` | `react` | Working with React components |
132
+ | `devflow-accessibility` | `accessibility` | Creating UI components, forms |
133
+ | `devflow-frontend-design` | `frontend-design` | Working with CSS, styling |
134
+ | `devflow-go` | `go` | Working in Go codebases |
135
+ | `devflow-python` | `python` | Working in Python codebases |
136
+ | `devflow-java` | `java` | Working in Java codebases |
137
+ | `devflow-rust` | `rust` | Working in Rust codebases |
138
+
139
+ ```bash
140
+ # Install specific language plugins
141
+ npx devflow-kit init --plugin=typescript,react
142
+ npx devflow-kit init --plugin=go
143
+ ```
127
144
 
128
145
  ## Requirements
129
146
 
package/dist/cli.js CHANGED
@@ -8,6 +8,7 @@ import { uninstallCommand } from './commands/uninstall.js';
8
8
  import { listCommand } from './commands/list.js';
9
9
  import { ambientCommand } from './commands/ambient.js';
10
10
  import { memoryCommand } from './commands/memory.js';
11
+ import { skillsCommand } from './commands/skills.js';
11
12
  const __filename = fileURLToPath(import.meta.url);
12
13
  const __dirname = dirname(__filename);
13
14
  // Read version from package.json
@@ -25,6 +26,7 @@ program.addCommand(uninstallCommand);
25
26
  program.addCommand(listCommand);
26
27
  program.addCommand(ambientCommand);
27
28
  program.addCommand(memoryCommand);
29
+ program.addCommand(skillsCommand);
28
30
  // Handle no command
29
31
  program.action(() => {
30
32
  program.help();
@@ -4,7 +4,7 @@ import * as path from 'path';
4
4
  import * as p from '@clack/prompts';
5
5
  import color from 'picocolors';
6
6
  import { getClaudeDirectory } from '../utils/paths.js';
7
- const AMBIENT_HOOK_MARKER = 'ambient-prompt.sh';
7
+ const AMBIENT_HOOK_MARKER = 'ambient-prompt';
8
8
  /**
9
9
  * Add the ambient UserPromptSubmit hook to settings JSON.
10
10
  * Idempotent — returns unchanged JSON if hook already exists.
@@ -17,7 +17,7 @@ export function addAmbientHook(settingsJson, devflowDir) {
17
17
  if (!settings.hooks) {
18
18
  settings.hooks = {};
19
19
  }
20
- const hookCommand = path.join(devflowDir, 'scripts', 'hooks', AMBIENT_HOOK_MARKER);
20
+ const hookCommand = path.join(devflowDir, 'scripts', 'hooks', 'run-hook') + ' ambient-prompt';
21
21
  const newEntry = {
22
22
  hooks: [
23
23
  {
@@ -103,8 +103,9 @@ export const ambientCommand = new Command('ambient')
103
103
  // Try to extract devflowDir from existing hooks (e.g., Stop hook path)
104
104
  const stopHook = settings.hooks?.Stop?.[0]?.hooks?.[0]?.command;
105
105
  if (stopHook) {
106
- // e.g., /Users/dean/.devflow/scripts/hooks/stop-update-memory.sh → /Users/dean/.devflow
107
- devflowDir = path.resolve(stopHook, '..', '..', '..');
106
+ // e.g., "run-hook stop-update-memory" or "/path/to/.devflow/scripts/hooks/run-hook stop-update-memory"
107
+ const hookBinary = stopHook.split(' ')[0];
108
+ devflowDir = path.resolve(hookBinary, '..', '..', '..');
108
109
  }
109
110
  else {
110
111
  devflowDir = path.join(process.env.HOME || '~', '.devflow');
@@ -379,9 +379,11 @@ export const initCommand = new Command('init')
379
379
  const settingsPath = path.join(claudeDir, 'settings.json');
380
380
  try {
381
381
  const content = await fs.readFile(settingsPath, 'utf-8');
382
+ // Always remove-then-add to upgrade hook format (e.g., .sh → run-hook)
383
+ const cleaned = removeMemoryHooks(content);
382
384
  const updated = memoryEnabled
383
- ? addMemoryHooks(content, devflowDir)
384
- : removeMemoryHooks(content);
385
+ ? addMemoryHooks(cleaned, devflowDir)
386
+ : cleaned;
385
387
  if (updated !== content) {
386
388
  await fs.writeFile(settingsPath, updated, 'utf-8');
387
389
  if (verbose) {
@@ -9,9 +9,9 @@ import { createMemoryDir, migrateMemoryFiles } from '../utils/post-install.js';
9
9
  * Map of hook event type → filename marker for the 3 memory hooks.
10
10
  */
11
11
  const MEMORY_HOOK_CONFIG = {
12
- Stop: 'stop-update-memory.sh',
13
- SessionStart: 'session-start-memory.sh',
14
- PreCompact: 'pre-compact-memory.sh',
12
+ Stop: 'stop-update-memory',
13
+ SessionStart: 'session-start-memory',
14
+ PreCompact: 'pre-compact-memory',
15
15
  };
16
16
  /**
17
17
  * Add all 3 memory hooks (Stop, SessionStart, PreCompact) to settings JSON.
@@ -30,7 +30,7 @@ export function addMemoryHooks(settingsJson, devflowDir) {
30
30
  const existing = settings.hooks[hookType] ?? [];
31
31
  const alreadyPresent = existing.some((matcher) => matcher.hooks.some((h) => h.command.includes(marker)));
32
32
  if (!alreadyPresent) {
33
- const hookCommand = path.join(devflowDir, 'scripts', 'hooks', marker);
33
+ const hookCommand = path.join(devflowDir, 'scripts', 'hooks', 'run-hook') + ` ${marker}`;
34
34
  const newEntry = {
35
35
  hooks: [
36
36
  {
@@ -0,0 +1,11 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Check if a skill has a shadow (personal override).
4
+ */
5
+ export declare function hasShadow(skillName: string, devflowDir?: string): Promise<boolean>;
6
+ /**
7
+ * List all shadowed skill names.
8
+ */
9
+ export declare function listShadowed(devflowDir?: string): Promise<string[]>;
10
+ export declare const skillsCommand: Command;
11
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1,116 @@
1
+ import { Command } from 'commander';
2
+ import { promises as fs } from 'fs';
3
+ import * as path from 'path';
4
+ import * as p from '@clack/prompts';
5
+ import color from 'picocolors';
6
+ import { getClaudeDirectory, getDevFlowDirectory } from '../utils/paths.js';
7
+ import { getAllSkillNames } from '../plugins.js';
8
+ import { copyDirectory } from '../utils/installer.js';
9
+ /**
10
+ * Check if a directory exists.
11
+ */
12
+ async function dirExists(dirPath) {
13
+ try {
14
+ const stat = await fs.stat(dirPath);
15
+ return stat.isDirectory();
16
+ }
17
+ catch {
18
+ return false;
19
+ }
20
+ }
21
+ /**
22
+ * Get the shadow directory for a skill.
23
+ */
24
+ function getShadowDir(devflowDir, skillName) {
25
+ return path.join(devflowDir, 'skills', skillName);
26
+ }
27
+ /**
28
+ * Check if a skill has a shadow (personal override).
29
+ */
30
+ export async function hasShadow(skillName, devflowDir) {
31
+ const dir = devflowDir ?? getDevFlowDirectory();
32
+ return dirExists(getShadowDir(dir, skillName));
33
+ }
34
+ /**
35
+ * List all shadowed skill names.
36
+ */
37
+ export async function listShadowed(devflowDir) {
38
+ const dir = devflowDir ?? getDevFlowDirectory();
39
+ const shadowsRoot = path.join(dir, 'skills');
40
+ try {
41
+ const entries = await fs.readdir(shadowsRoot, { withFileTypes: true });
42
+ return entries.filter(e => e.isDirectory()).map(e => e.name);
43
+ }
44
+ catch {
45
+ return [];
46
+ }
47
+ }
48
+ export const skillsCommand = new Command('skills')
49
+ .description('Manage skill overrides (shadow/unshadow/list)')
50
+ .argument('<action>', 'Action: shadow, unshadow, or list-shadowed')
51
+ .argument('[name]', 'Skill name (required for shadow/unshadow)')
52
+ .action(async (action, name) => {
53
+ const devflowDir = getDevFlowDirectory();
54
+ const claudeDir = getClaudeDirectory();
55
+ const allSkills = getAllSkillNames();
56
+ if (action === 'shadow') {
57
+ if (!name) {
58
+ p.log.error('Skill name required. Usage: devflow skills shadow <name>');
59
+ p.log.info(`Available skills: ${allSkills.join(', ')}`);
60
+ process.exit(1);
61
+ }
62
+ if (!allSkills.includes(name)) {
63
+ p.log.error(`Unknown skill: ${name}`);
64
+ p.log.info(`Available skills: ${allSkills.join(', ')}`);
65
+ process.exit(1);
66
+ }
67
+ const installedSkillDir = path.join(claudeDir, 'skills', name);
68
+ if (!await dirExists(installedSkillDir)) {
69
+ p.log.error(`Skill not installed: ${name}. Run devflow init first.`);
70
+ process.exit(1);
71
+ }
72
+ const shadowDir = getShadowDir(devflowDir, name);
73
+ if (await dirExists(shadowDir)) {
74
+ p.log.info(`${name} is already shadowed`);
75
+ return;
76
+ }
77
+ // Create shadow directory and copy original as reference backup
78
+ await fs.mkdir(path.join(devflowDir, 'skills'), { recursive: true });
79
+ await copyDirectory(installedSkillDir, shadowDir);
80
+ p.log.success(`Shadowed ${color.cyan(name)}`);
81
+ p.log.info(`Edit ${color.dim(path.join(claudeDir, 'skills', name, 'SKILL.md'))} — it won't be overwritten on next init.`);
82
+ }
83
+ else if (action === 'unshadow') {
84
+ if (!name) {
85
+ p.log.error('Skill name required. Usage: devflow skills unshadow <name>');
86
+ process.exit(1);
87
+ }
88
+ const shadowDir = getShadowDir(devflowDir, name);
89
+ if (!await dirExists(shadowDir)) {
90
+ p.log.info(`${name} is not shadowed`);
91
+ return;
92
+ }
93
+ await fs.rm(shadowDir, { recursive: true, force: true });
94
+ p.log.success(`Unshadowed ${color.cyan(name)}`);
95
+ p.log.info('Run devflow init to restore DevFlow\'s version.');
96
+ }
97
+ else if (action === 'list-shadowed') {
98
+ const shadowed = await listShadowed(devflowDir);
99
+ if (shadowed.length === 0) {
100
+ p.log.info('No shadowed skills');
101
+ return;
102
+ }
103
+ p.log.info(`Shadowed skills (${shadowed.length}):`);
104
+ for (const skill of shadowed) {
105
+ const isKnown = allSkills.includes(skill);
106
+ const status = isKnown ? color.green('active') : color.yellow('unknown skill');
107
+ p.log.info(` ${color.cyan(skill)} — ${status}`);
108
+ }
109
+ }
110
+ else {
111
+ p.log.error(`Unknown action: ${action}`);
112
+ p.log.info('Usage: devflow skills <shadow|unshadow|list-shadowed> [name]');
113
+ process.exit(1);
114
+ }
115
+ });
116
+ //# sourceMappingURL=skills.js.map
@@ -5,12 +5,13 @@ import { fileURLToPath } from 'url';
5
5
  import { execSync } from 'child_process';
6
6
  import * as p from '@clack/prompts';
7
7
  import color from 'picocolors';
8
- import { getInstallationPaths, getClaudeDirectory, getManagedSettingsPath } from '../utils/paths.js';
8
+ import { getInstallationPaths, getClaudeDirectory, getDevFlowDirectory, getManagedSettingsPath } from '../utils/paths.js';
9
9
  import { getGitRoot } from '../utils/git.js';
10
10
  import { isClaudeCliAvailable } from '../utils/cli.js';
11
11
  import { DEVFLOW_PLUGINS, getAllSkillNames, LEGACY_SKILL_NAMES } from '../plugins.js';
12
12
  import { removeAmbientHook } from './ambient.js';
13
13
  import { removeMemoryHooks } from './memory.js';
14
+ import { listShadowed } from './skills.js';
14
15
  import { detectShell, getProfilePath } from '../utils/safe-delete.js';
15
16
  import { isAlreadyInstalled, removeFromProfile } from '../utils/safe-delete-install.js';
16
17
  import { removeManagedSettings } from '../utils/post-install.js';
@@ -403,6 +404,15 @@ export const uninstallCommand = new Command('uninstall')
403
404
  }
404
405
  }
405
406
  }
407
+ // Warn about personal skill overrides
408
+ if (!isSelectiveUninstall) {
409
+ const shadowed = await listShadowed();
410
+ if (shadowed.length > 0) {
411
+ const shadowPath = path.join(getDevFlowDirectory(), 'skills');
412
+ p.log.warn(`Personal skill overrides remain in ${shadowPath}: ${shadowed.join(', ')}`);
413
+ p.log.info(color.dim(`Remove manually or run: rm -rf ${shadowPath}`));
414
+ }
415
+ }
406
416
  const status = color.green('DevFlow uninstalled successfully');
407
417
  p.outro(`${status}${color.dim(' Reinstall: npx devflow-kit init')}`);
408
418
  });
package/dist/plugins.js CHANGED
@@ -10,7 +10,7 @@ export const DEVFLOW_PLUGINS = [
10
10
  description: 'Auto-activating quality enforcement (foundation layer)',
11
11
  commands: [],
12
12
  agents: [],
13
- skills: ['accessibility', 'core-patterns', 'docs-framework', 'frontend-design', 'git-safety', 'git-workflow', 'github-patterns', 'input-validation', 'react', 'test-driven-development', 'test-patterns', 'typescript'],
13
+ skills: ['core-patterns', 'docs-framework', 'git-safety', 'git-workflow', 'github-patterns', 'input-validation', 'test-driven-development', 'test-patterns'],
14
14
  },
15
15
  {
16
16
  name: 'devflow-specify',
@@ -24,14 +24,14 @@ export const DEVFLOW_PLUGINS = [
24
24
  description: 'Complete task implementation workflow',
25
25
  commands: ['/implement'],
26
26
  agents: ['git', 'skimmer', 'synthesizer', 'coder', 'simplifier', 'scrutinizer', 'shepherd', 'validator'],
27
- skills: ['accessibility', 'agent-teams', 'frontend-design', 'implementation-patterns', 'self-review'],
27
+ skills: ['agent-teams', 'implementation-patterns', 'self-review'],
28
28
  },
29
29
  {
30
30
  name: 'devflow-code-review',
31
31
  description: 'Comprehensive code review',
32
32
  commands: ['/code-review'],
33
33
  agents: ['git', 'reviewer', 'synthesizer'],
34
- skills: ['accessibility', 'agent-teams', 'architecture-patterns', 'complexity-patterns', 'consistency-patterns', 'database-patterns', 'dependencies-patterns', 'documentation-patterns', 'frontend-design', 'performance-patterns', 'react', 'regression-patterns', 'review-methodology', 'security-patterns', 'test-patterns'],
34
+ skills: ['agent-teams', 'architecture-patterns', 'complexity-patterns', 'consistency-patterns', 'database-patterns', 'dependencies-patterns', 'documentation-patterns', 'performance-patterns', 'regression-patterns', 'review-methodology', 'security-patterns', 'test-patterns'],
35
35
  },
36
36
  {
37
37
  name: 'devflow-resolve',
@@ -69,6 +69,70 @@ export const DEVFLOW_PLUGINS = [
69
69
  skills: [],
70
70
  optional: true,
71
71
  },
72
+ {
73
+ name: 'devflow-typescript',
74
+ description: 'TypeScript language patterns (type safety, generics, utility types)',
75
+ commands: [],
76
+ agents: [],
77
+ skills: ['typescript'],
78
+ optional: true,
79
+ },
80
+ {
81
+ name: 'devflow-react',
82
+ description: 'React framework patterns (hooks, state, composition, performance)',
83
+ commands: [],
84
+ agents: [],
85
+ skills: ['react'],
86
+ optional: true,
87
+ },
88
+ {
89
+ name: 'devflow-accessibility',
90
+ description: 'Web accessibility patterns (WCAG, ARIA, keyboard navigation)',
91
+ commands: [],
92
+ agents: [],
93
+ skills: ['accessibility'],
94
+ optional: true,
95
+ },
96
+ {
97
+ name: 'devflow-frontend-design',
98
+ description: 'Frontend design patterns (typography, color, spacing, motion)',
99
+ commands: [],
100
+ agents: [],
101
+ skills: ['frontend-design'],
102
+ optional: true,
103
+ },
104
+ {
105
+ name: 'devflow-go',
106
+ description: 'Go language patterns (error handling, interfaces, concurrency)',
107
+ commands: [],
108
+ agents: [],
109
+ skills: ['go'],
110
+ optional: true,
111
+ },
112
+ {
113
+ name: 'devflow-java',
114
+ description: 'Java language patterns (records, sealed classes, composition)',
115
+ commands: [],
116
+ agents: [],
117
+ skills: ['java'],
118
+ optional: true,
119
+ },
120
+ {
121
+ name: 'devflow-python',
122
+ description: 'Python language patterns (type hints, protocols, data modeling)',
123
+ commands: [],
124
+ agents: [],
125
+ skills: ['python'],
126
+ optional: true,
127
+ },
128
+ {
129
+ name: 'devflow-rust',
130
+ description: 'Rust language patterns (ownership, error handling, type system)',
131
+ commands: [],
132
+ agents: [],
133
+ skills: ['rust'],
134
+ optional: true,
135
+ },
72
136
  ];
73
137
  /**
74
138
  * Deprecated command names from old installations.
@@ -105,6 +105,14 @@ export async function installViaFileCopy(options) {
105
105
  }
106
106
  }
107
107
  for (const skill of allSkills) {
108
+ // Skip cleanup for shadowed skills — user has a personal override
109
+ const shadowDir = path.join(devflowDir, 'skills', skill);
110
+ try {
111
+ const stat = await fs.stat(shadowDir);
112
+ if (stat.isDirectory())
113
+ continue;
114
+ }
115
+ catch { /* no shadow — proceed with cleanup */ }
108
116
  try {
109
117
  await fs.rm(path.join(claudeDir, 'skills', skill), { recursive: true, force: true });
110
118
  }
@@ -148,13 +156,21 @@ export async function installViaFileCopy(options) {
148
156
  }
149
157
  }
150
158
  catch { /* no agents directory */ }
151
- // Install skills (deduplicated)
159
+ // Install skills (deduplicated, respects shadows)
152
160
  const skillsSource = path.join(pluginSourceDir, 'skills');
153
161
  try {
154
162
  const skillDirs = await fs.readdir(skillsSource, { withFileTypes: true });
155
163
  for (const skillDir of skillDirs) {
156
164
  if (skillDir.isDirectory()) {
157
165
  if (skillsMap.get(skillDir.name) === plugin.name) {
166
+ // Skip copy for shadowed skills — user has a personal override
167
+ const shadowDir = path.join(devflowDir, 'skills', skillDir.name);
168
+ try {
169
+ const stat = await fs.stat(shadowDir);
170
+ if (stat.isDirectory())
171
+ continue;
172
+ }
173
+ catch { /* no shadow — proceed with copy */ }
158
174
  const skillTarget = path.join(claudeDir, 'skills', skillDir.name);
159
175
  await copyDirectory(path.join(skillsSource, skillDir.name), skillTarget);
160
176
  }
@@ -169,7 +185,9 @@ export async function installViaFileCopy(options) {
169
185
  try {
170
186
  await fs.mkdir(scriptsTarget, { recursive: true });
171
187
  await copyDirectory(scriptsSource, scriptsTarget);
172
- await chmodRecursive(scriptsTarget, 0o755);
188
+ if (process.platform !== 'win32') {
189
+ await chmodRecursive(scriptsTarget, 0o755);
190
+ }
173
191
  }
174
192
  catch { /* scripts may not exist */ }
175
193
  spinner.stop('Components installed via file copy');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devflow-kit",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Agentic Development Toolkit for Claude Code - Enhance AI-assisted development with intelligent commands and workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,8 +24,10 @@
24
24
  "dev": "tsc --watch",
25
25
  "cli": "node dist/cli.js",
26
26
  "prepublishOnly": "npm run build",
27
+ "version:bump": "npx tsx scripts/bump-version.ts",
27
28
  "test": "vitest run",
28
- "test:watch": "vitest"
29
+ "test:watch": "vitest",
30
+ "test:integration": "vitest run --config vitest.integration.config.ts"
29
31
  },
30
32
  "keywords": [
31
33
  "claude",
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "devflow-accessibility",
3
+ "description": "Web accessibility patterns - WCAG compliance, ARIA roles, keyboard navigation, focus management",
4
+ "author": {
5
+ "name": "DevFlow Contributors",
6
+ "email": "dean@keren.dev"
7
+ },
8
+ "version": "1.3.0",
9
+ "homepage": "https://github.com/dean0x/devflow",
10
+ "repository": "https://github.com/dean0x/devflow",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "accessibility",
14
+ "wcag",
15
+ "aria",
16
+ "a11y"
17
+ ],
18
+ "agents": [],
19
+ "skills": [
20
+ "accessibility"
21
+ ]
22
+ }
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "devflow-ambient",
3
3
  "description": "Ambient mode — auto-loads relevant skills for every prompt",
4
- "version": "1.1.0",
4
+ "version": "1.3.0",
5
5
  "agents": [],
6
- "skills": ["ambient-router"]
6
+ "skills": [
7
+ "ambient-router"
8
+ ]
7
9
  }
@@ -9,10 +9,10 @@ Ambient mode — auto-loads relevant skills based on each prompt, no explicit co
9
9
  Classify user intent and apply proportional skill enforcement to any prompt.
10
10
 
11
11
  ```bash
12
- /ambient add a login form # BUILD/STANDARD — loads TDD + implementation-patterns
13
- /ambient fix the auth error # DEBUG/STANDARD — loads test-patterns + core-patterns
12
+ /ambient add a login form # BUILD/GUIDED — loads TDD + implementation-patterns
13
+ /ambient fix the auth error # DEBUG/GUIDED — loads test-patterns + core-patterns
14
14
  /ambient where is the config? # EXPLORE/QUICK — responds normally, zero overhead
15
- /ambient refactor the auth system # BUILD/ESCALATE — suggests /implement
15
+ /ambient refactor the auth system # BUILD/ELEVATE — suggests /implement
16
16
  ```
17
17
 
18
18
  ## Always-On Mode
@@ -30,19 +30,19 @@ When enabled, a `UserPromptSubmit` hook injects a classification preamble before
30
30
  ## How It Works
31
31
 
32
32
  1. **Classify intent** — BUILD, DEBUG, REVIEW, PLAN, EXPLORE, or CHAT
33
- 2. **Classify depth** — QUICK (zero overhead), STANDARD (2-3 skills), or ESCALATE (workflow nudge)
33
+ 2. **Classify depth** — QUICK (zero overhead), GUIDED (2-3 skills), or ELEVATE (workflow nudge)
34
34
  3. **Apply proportionally**:
35
35
  - QUICK: respond normally
36
- - STANDARD: load relevant skills, enforce TDD for BUILD
37
- - ESCALATE: respond + recommend full workflow command
36
+ - GUIDED: load relevant skills, enforce TDD for BUILD
37
+ - ELEVATE: respond + recommend full workflow command
38
38
 
39
39
  ## Depth Tiers
40
40
 
41
41
  | Depth | When | Overhead |
42
42
  |-------|------|----------|
43
43
  | QUICK | Chat, simple exploration, git/devops ops, single-word confirmations | ~0 tokens |
44
- | STANDARD | BUILD/DEBUG/REVIEW/PLAN, 1-5 file scope | ~500-1000 tokens (skill reads) |
45
- | ESCALATE | Multi-file, architectural, system-wide scope | ~0 extra tokens (nudge only) |
44
+ | GUIDED | BUILD/DEBUG/REVIEW/PLAN, 1-5 file scope | ~500-1000 tokens (skill reads) |
45
+ | ELEVATE | Multi-file, architectural, system-wide scope | ~0 extra tokens (nudge only) |
46
46
 
47
47
  ## Skills
48
48