devflow-kit 1.5.0 → 1.6.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 (83) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +6 -3
  3. package/dist/commands/ambient.js +1 -1
  4. package/dist/commands/init.js +2 -2
  5. package/dist/plugins.js +23 -23
  6. package/dist/utils/post-install.js +6 -1
  7. package/package.json +1 -1
  8. package/plugins/devflow-accessibility/.claude-plugin/plugin.json +1 -1
  9. package/plugins/devflow-ambient/.claude-plugin/plugin.json +25 -4
  10. package/plugins/devflow-ambient/README.md +48 -29
  11. package/plugins/devflow-ambient/agents/coder.md +135 -0
  12. package/plugins/devflow-ambient/agents/reviewer.md +165 -0
  13. package/plugins/devflow-ambient/agents/scrutinizer.md +80 -0
  14. package/plugins/devflow-ambient/agents/shepherd.md +94 -0
  15. package/plugins/devflow-ambient/agents/simplifier.md +93 -0
  16. package/plugins/devflow-ambient/agents/skimmer.md +93 -0
  17. package/plugins/devflow-ambient/agents/validator.md +86 -0
  18. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +72 -28
  19. package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +40 -35
  20. package/plugins/devflow-ambient/skills/debug-orchestration/SKILL.md +69 -0
  21. package/plugins/devflow-ambient/skills/implementation-orchestration/SKILL.md +92 -0
  22. package/plugins/devflow-ambient/skills/plan-orchestration/SKILL.md +71 -0
  23. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +10 -1
  24. package/plugins/devflow-audit-claude/commands/audit-claude.md +4 -0
  25. package/plugins/devflow-code-review/.claude-plugin/plugin.json +2 -1
  26. package/plugins/devflow-code-review/agents/reviewer.md +10 -9
  27. package/plugins/devflow-code-review/commands/code-review-teams.md +43 -30
  28. package/plugins/devflow-code-review/commands/code-review.md +10 -1
  29. package/plugins/devflow-code-review/skills/knowledge-persistence/SKILL.md +128 -0
  30. package/plugins/devflow-code-review/skills/knowledge-persistence/references/examples.md +44 -0
  31. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +1 -1
  32. package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +7 -1
  33. package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +6 -5
  34. package/plugins/devflow-debug/.claude-plugin/plugin.json +5 -3
  35. package/plugins/devflow-debug/agents/synthesizer.md +211 -0
  36. package/plugins/devflow-debug/commands/debug-teams.md +28 -14
  37. package/plugins/devflow-debug/commands/debug.md +26 -12
  38. package/plugins/devflow-debug/skills/knowledge-persistence/SKILL.md +128 -0
  39. package/plugins/devflow-debug/skills/knowledge-persistence/references/examples.md +44 -0
  40. package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
  41. package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
  42. package/plugins/devflow-implement/.claude-plugin/plugin.json +2 -1
  43. package/plugins/devflow-implement/agents/coder.md +6 -1
  44. package/plugins/devflow-implement/agents/simplifier.md +32 -1
  45. package/plugins/devflow-implement/agents/skimmer.md +5 -0
  46. package/plugins/devflow-implement/commands/implement-teams.md +72 -55
  47. package/plugins/devflow-implement/commands/implement.md +44 -35
  48. package/plugins/devflow-implement/skills/knowledge-persistence/SKILL.md +128 -0
  49. package/plugins/devflow-implement/skills/knowledge-persistence/references/examples.md +44 -0
  50. package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
  51. package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
  52. package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
  53. package/plugins/devflow-resolve/.claude-plugin/plugin.json +4 -3
  54. package/plugins/devflow-resolve/agents/simplifier.md +32 -1
  55. package/plugins/devflow-resolve/commands/resolve-teams.md +16 -7
  56. package/plugins/devflow-resolve/commands/resolve.md +16 -7
  57. package/plugins/devflow-resolve/skills/knowledge-persistence/SKILL.md +128 -0
  58. package/plugins/devflow-resolve/skills/knowledge-persistence/references/examples.md +44 -0
  59. package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
  60. package/plugins/devflow-self-review/.claude-plugin/plugin.json +10 -1
  61. package/plugins/devflow-self-review/agents/simplifier.md +32 -1
  62. package/plugins/devflow-self-review/commands/self-review.md +10 -4
  63. package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
  64. package/plugins/devflow-specify/agents/skimmer.md +5 -0
  65. package/plugins/devflow-specify/commands/specify-teams.md +27 -20
  66. package/plugins/devflow-specify/commands/specify.md +26 -19
  67. package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
  68. package/scripts/hooks/ambient-prompt +8 -7
  69. package/scripts/hooks/session-start-memory +33 -3
  70. package/shared/agents/coder.md +6 -1
  71. package/shared/agents/reviewer.md +10 -9
  72. package/shared/agents/simplifier.md +32 -1
  73. package/shared/agents/skimmer.md +5 -0
  74. package/shared/skills/ambient-router/SKILL.md +72 -28
  75. package/shared/skills/ambient-router/references/skill-catalog.md +40 -35
  76. package/shared/skills/debug-orchestration/SKILL.md +69 -0
  77. package/shared/skills/docs-framework/SKILL.md +7 -1
  78. package/shared/skills/implementation-orchestration/SKILL.md +92 -0
  79. package/shared/skills/knowledge-persistence/SKILL.md +128 -0
  80. package/shared/skills/knowledge-persistence/references/examples.md +44 -0
  81. package/shared/skills/plan-orchestration/SKILL.md +71 -0
  82. package/shared/skills/test-driven-development/SKILL.md +6 -5
  83. package/plugins/devflow-ambient/commands/ambient.md +0 -110
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ 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.6.0] - 2026-03-19
9
+
10
+ ### Added
11
+ - **Ambient agent orchestration**: ORCHESTRATED tier spawns agent pipelines for IMPLEMENT, DEBUG, PLAN intents
12
+ - **Orchestration skills**: `implementation-orchestration`, `debug-orchestration`, `plan-orchestration` for ambient agent pipelines
13
+ - **`knowledge-persistence` skill** (#145) — extraction procedure, lock protocol, loading instructions for project knowledge
14
+ - **Knowledge loading phase** (#145) — `/debug`, `/specify`, `/self-review` now load project knowledge at startup
15
+ - **Pitfall recording phase** (#145) — `/code-review`, `/resolve` record pitfalls to `.memory/knowledge/pitfalls.md`
16
+ - **Knowledge directory** (#145) — `.memory/knowledge/` with `decisions.md` (ADR-NNN, append-only) and `pitfalls.md` (area-specific gotchas)
17
+
18
+ ### Changed
19
+ - **Ambient mode**: Three depth tiers (QUICK/GUIDED/ORCHESTRATED) replacing old QUICK/GUIDED/ELEVATE
20
+ - **Ambient mode**: GUIDED tier for small-scope IMPLEMENT (≤2 files), simple DEBUG, focused PLAN, and REVIEW — main session with skills + Simplifier
21
+ - **Ambient mode**: BUILD intent renamed to IMPLEMENT for clarity
22
+ - **Coder agent**: Added `test-driven-development` and `search-first` to permanent skills
23
+ - **Command phase numbering** (#145) — renumbered fractional phases to sequential integers across 12 command files
24
+
25
+ ### Fixed
26
+ - **Agent metadata** (#146) — fixed `subagent_type` in debug, added missing YAML frontmatter
27
+ - **Plugin count** (#146) — corrected to "8 core + 9 optional"
28
+ - **Skills catalog** (#146) — cataloged 3 missing skills in reference
29
+ - **Debug command** (#147) — removed non-standard `name=` parameter
30
+ - **Plugin descriptions** (#147, #148) — synced across plugin.json, plugins.ts, marketplace.json
31
+ - **Simplifier agent** (#148) — added Output/Boundaries sections
32
+ - **Plugin metadata** (#148) — added homepage/repository/license/keywords to 3 plugins
33
+
34
+ ### Removed
35
+ - **`/ambient` command**: Ambient mode is now hook-only. Use `devflow ambient --enable` to activate.
36
+
37
+ ### Behavioral Changes
38
+ - EXPLORE intent now always classifies as QUICK (was split QUICK/GUIDED)
39
+ - Simple text edits ("Update the README") classify as QUICK (was BUILD/GUIDED)
40
+ - Debug agent budget cap removed — agents scale to investigation needs
41
+
42
+ ---
43
+
8
44
  ## [1.5.0] - 2026-03-13
9
45
 
10
46
  ### Added
@@ -866,6 +902,7 @@ devflow init
866
902
  ---
867
903
 
868
904
  [Unreleased]: https://github.com/dean0x/devflow/compare/v1.4.0...HEAD
905
+ [1.6.0]: https://github.com/dean0x/devflow/compare/v1.5.0...v1.6.0
869
906
  [1.5.0]: https://github.com/dean0x/devflow/compare/v1.4.0...v1.5.0
870
907
  [1.4.0]: https://github.com/dean0x/devflow/compare/v1.3.3...v1.4.0
871
908
  [1.3.3]: https://github.com/dean0x/devflow/compare/v1.3.2...v1.3.3
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
- - **31 quality skills** — 9 auto-activating core, 8 optional language/ecosystem, plus specialized review and agent skills
27
+ - **35 quality skills** — 9 auto-activating core, 8 optional language/ecosystem, plus specialized review, agent, and orchestration skills
28
28
 
29
29
  ## Quick Start
30
30
 
@@ -48,7 +48,7 @@ Then in Claude Code:
48
48
  | `devflow-resolve` | `/resolve` | Process review issues — fix or defer to tech debt |
49
49
  | `devflow-debug` | `/debug` | Parallel hypothesis debugging |
50
50
  | `devflow-self-review` | `/self-review` | Self-review workflow (Simplifier + Scrutinizer) |
51
- | `devflow-ambient` | `/ambient` | Ambient mode — auto-loads relevant skills based on each prompt |
51
+ | `devflow-ambient` | (hook) | Ambient mode — intent classification with agent orchestration |
52
52
  | `devflow-core-skills` | (auto) | Auto-activating quality enforcement skills |
53
53
 
54
54
  ## Command Details
@@ -198,7 +198,10 @@ DevFlow creates project documentation in `.docs/` and working memory in `.memory
198
198
  .memory/
199
199
  ├── WORKING-MEMORY.md # Auto-maintained by Stop hook
200
200
  ├── PROJECT-PATTERNS.md # Accumulated patterns across sessions
201
- └── backup.json # Pre-compact git state snapshot
201
+ ├── backup.json # Pre-compact git state snapshot
202
+ └── knowledge/
203
+ ├── decisions.md # Architectural decisions (ADR-NNN, append-only)
204
+ └── pitfalls.md # Known pitfalls (area-specific gotchas)
202
205
  ```
203
206
 
204
207
  ## Workflow Examples
@@ -122,7 +122,7 @@ export const ambientCommand = new Command('ambient')
122
122
  }
123
123
  await fs.writeFile(settingsPath, updated, 'utf-8');
124
124
  p.log.success('Ambient mode enabled — UserPromptSubmit hook registered');
125
- p.log.info(color.dim('Relevant skills will now auto-load based on each prompt'));
125
+ p.log.info(color.dim('Skills auto-load and agents orchestrate based on each prompt'));
126
126
  }
127
127
  if (options.disable) {
128
128
  const updated = removeAmbientHook(settingsContent);
@@ -62,7 +62,7 @@ export const initCommand = new Command('init')
62
62
  .option('--plugin <names>', 'Install specific plugin(s), comma-separated (e.g., implement,code-review)')
63
63
  .option('--teams', 'Enable Agent Teams (peer debate, adversarial review)')
64
64
  .option('--no-teams', 'Disable Agent Teams (use parallel subagents instead)')
65
- .option('--ambient', 'Enable ambient mode (auto-loads relevant skills for every prompt)')
65
+ .option('--ambient', 'Enable ambient mode (classifies intent, loads skills, orchestrates agents)')
66
66
  .option('--no-ambient', 'Disable ambient mode')
67
67
  .option('--memory', 'Enable working memory (session context preservation)')
68
68
  .option('--no-memory', 'Disable working memory hooks')
@@ -176,7 +176,7 @@ export const initCommand = new Command('init')
176
176
  const ambientChoice = await p.select({
177
177
  message: 'Enable ambient mode?',
178
178
  options: [
179
- { value: true, label: 'Yes (Recommended)', hint: 'Auto-loads relevant skills for each prompt' },
179
+ { value: true, label: 'Yes (Recommended)', hint: 'Classifies intent, loads skills, orchestrates agents' },
180
180
  { value: false, label: 'No', hint: 'Full control — load skills manually' },
181
181
  ],
182
182
  });
package/dist/plugins.js CHANGED
@@ -7,59 +7,59 @@
7
7
  export const DEVFLOW_PLUGINS = [
8
8
  {
9
9
  name: 'devflow-core-skills',
10
- description: 'Auto-activating quality enforcement (foundation layer)',
10
+ description: 'Auto-activating quality enforcement skills - foundation layer for all DevFlow plugins',
11
11
  commands: [],
12
12
  agents: [],
13
13
  skills: ['core-patterns', 'docs-framework', 'git-safety', 'git-workflow', 'github-patterns', 'input-validation', 'search-first', 'test-driven-development', 'test-patterns'],
14
14
  },
15
15
  {
16
16
  name: 'devflow-specify',
17
- description: 'Interactive feature specification',
17
+ description: 'Interactive feature specification - creates well-defined GitHub issues',
18
18
  commands: ['/specify'],
19
19
  agents: ['skimmer', 'synthesizer'],
20
20
  skills: ['agent-teams'],
21
21
  },
22
22
  {
23
23
  name: 'devflow-implement',
24
- description: 'Complete task implementation workflow',
24
+ description: 'Complete task implementation workflow with exploration, planning, and coding',
25
25
  commands: ['/implement'],
26
26
  agents: ['git', 'skimmer', 'synthesizer', 'coder', 'simplifier', 'scrutinizer', 'shepherd', 'validator'],
27
- skills: ['agent-teams', 'implementation-patterns', 'self-review'],
27
+ skills: ['agent-teams', 'implementation-patterns', 'knowledge-persistence', 'self-review'],
28
28
  },
29
29
  {
30
30
  name: 'devflow-code-review',
31
- description: 'Comprehensive code review',
31
+ description: 'Comprehensive code review with parallel specialized agents',
32
32
  commands: ['/code-review'],
33
33
  agents: ['git', 'reviewer', 'synthesizer'],
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'],
34
+ skills: ['agent-teams', 'architecture-patterns', 'complexity-patterns', 'consistency-patterns', 'database-patterns', 'dependencies-patterns', 'documentation-patterns', 'knowledge-persistence', 'performance-patterns', 'regression-patterns', 'review-methodology', 'security-patterns', 'test-patterns'],
35
35
  },
36
36
  {
37
37
  name: 'devflow-resolve',
38
- description: 'Process and fix review issues',
38
+ description: 'Process and fix code review issues with risk assessment',
39
39
  commands: ['/resolve'],
40
40
  agents: ['git', 'resolver', 'simplifier'],
41
- skills: ['agent-teams', 'implementation-patterns', 'security-patterns'],
41
+ skills: ['agent-teams', 'implementation-patterns', 'knowledge-persistence', 'security-patterns'],
42
42
  },
43
43
  {
44
44
  name: 'devflow-debug',
45
- description: 'Debugging with competing hypotheses',
45
+ description: 'Debugging workflows with competing hypothesis investigation using agent teams',
46
46
  commands: ['/debug'],
47
- agents: ['git'],
48
- skills: ['agent-teams', 'git-safety'],
47
+ agents: ['git', 'synthesizer'],
48
+ skills: ['agent-teams', 'git-safety', 'knowledge-persistence'],
49
49
  },
50
50
  {
51
51
  name: 'devflow-self-review',
52
- description: 'Self-review workflow (Simplifier + Scrutinizer)',
52
+ description: 'Self-review workflow: Simplifier + Scrutinizer for code quality',
53
53
  commands: ['/self-review'],
54
54
  agents: ['simplifier', 'scrutinizer', 'validator'],
55
55
  skills: ['self-review', 'core-patterns'],
56
56
  },
57
57
  {
58
58
  name: 'devflow-ambient',
59
- description: 'Ambient mode — auto-loads relevant skills based on each prompt',
59
+ description: 'Ambient mode — intent classification with proportional agent orchestration',
60
60
  commands: ['/ambient'],
61
- agents: [],
62
- skills: ['ambient-router'],
61
+ agents: ['coder', 'validator', 'simplifier', 'scrutinizer', 'shepherd', 'skimmer', 'reviewer'],
62
+ skills: ['ambient-router', 'implementation-orchestration', 'debug-orchestration', 'plan-orchestration'],
63
63
  },
64
64
  {
65
65
  name: 'devflow-audit-claude',
@@ -71,7 +71,7 @@ export const DEVFLOW_PLUGINS = [
71
71
  },
72
72
  {
73
73
  name: 'devflow-typescript',
74
- description: 'TypeScript language patterns (type safety, generics, utility types)',
74
+ description: 'TypeScript language patterns - type safety, generics, utility types, type guards',
75
75
  commands: [],
76
76
  agents: [],
77
77
  skills: ['typescript'],
@@ -79,7 +79,7 @@ export const DEVFLOW_PLUGINS = [
79
79
  },
80
80
  {
81
81
  name: 'devflow-react',
82
- description: 'React framework patterns (hooks, state, composition, performance)',
82
+ description: 'React framework patterns - hooks, state management, composition, performance',
83
83
  commands: [],
84
84
  agents: [],
85
85
  skills: ['react'],
@@ -87,7 +87,7 @@ export const DEVFLOW_PLUGINS = [
87
87
  },
88
88
  {
89
89
  name: 'devflow-accessibility',
90
- description: 'Web accessibility patterns (WCAG, ARIA, keyboard navigation)',
90
+ description: 'Web accessibility patterns - WCAG compliance, ARIA roles, keyboard navigation, focus management',
91
91
  commands: [],
92
92
  agents: [],
93
93
  skills: ['accessibility'],
@@ -95,7 +95,7 @@ export const DEVFLOW_PLUGINS = [
95
95
  },
96
96
  {
97
97
  name: 'devflow-frontend-design',
98
- description: 'Frontend design patterns (typography, color, spacing, motion)',
98
+ description: 'Frontend design patterns - typography, color systems, spacing, motion, responsive design',
99
99
  commands: [],
100
100
  agents: [],
101
101
  skills: ['frontend-design'],
@@ -103,7 +103,7 @@ export const DEVFLOW_PLUGINS = [
103
103
  },
104
104
  {
105
105
  name: 'devflow-go',
106
- description: 'Go language patterns (error handling, interfaces, concurrency)',
106
+ description: 'Go language patterns - error handling, interfaces, concurrency, package design',
107
107
  commands: [],
108
108
  agents: [],
109
109
  skills: ['go'],
@@ -111,7 +111,7 @@ export const DEVFLOW_PLUGINS = [
111
111
  },
112
112
  {
113
113
  name: 'devflow-java',
114
- description: 'Java language patterns (records, sealed classes, composition)',
114
+ description: 'Java language patterns - records, sealed classes, composition, modern Java features',
115
115
  commands: [],
116
116
  agents: [],
117
117
  skills: ['java'],
@@ -119,7 +119,7 @@ export const DEVFLOW_PLUGINS = [
119
119
  },
120
120
  {
121
121
  name: 'devflow-python',
122
- description: 'Python language patterns (type hints, protocols, data modeling)',
122
+ description: 'Python language patterns - type hints, protocols, dataclasses, async programming',
123
123
  commands: [],
124
124
  agents: [],
125
125
  skills: ['python'],
@@ -127,7 +127,7 @@ export const DEVFLOW_PLUGINS = [
127
127
  },
128
128
  {
129
129
  name: 'devflow-rust',
130
- description: 'Rust language patterns (ownership, error handling, type system)',
130
+ description: 'Rust language patterns - ownership, borrowing, error handling, type-driven design',
131
131
  commands: [],
132
132
  agents: [],
133
133
  skills: ['rust'],
@@ -425,11 +425,16 @@ export async function createMemoryDir(verbose, cwd) {
425
425
  const memoryDir = path.join(cwd ?? process.cwd(), '.memory');
426
426
  try {
427
427
  await fs.mkdir(memoryDir, { recursive: true });
428
+ await fs.mkdir(path.join(memoryDir, 'knowledge'), { recursive: true });
428
429
  if (verbose) {
429
430
  p.log.success('.memory/ directory ready');
430
431
  }
431
432
  }
432
- catch { /* may already exist */ }
433
+ catch (e) {
434
+ if (verbose) {
435
+ p.log.warn(`Failed to create .memory/ directory: ${e instanceof Error ? e.message : String(e)}`);
436
+ }
437
+ }
433
438
  }
434
439
  /**
435
440
  * Migrate memory files from .docs/ to .memory/.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devflow-kit",
3
- "version": "1.5.0",
3
+ "version": "1.6.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": {
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.5.0",
7
+ "version": "1.6.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -1,12 +1,33 @@
1
1
  {
2
2
  "name": "devflow-ambient",
3
- "description": "Ambient mode — auto-loads relevant skills for every prompt",
3
+ "description": "Ambient mode — intent classification with proportional agent orchestration",
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.5.0",
8
- "agents": [],
7
+ "version": "1.6.0",
8
+ "homepage": "https://github.com/dean0x/devflow",
9
+ "repository": "https://github.com/dean0x/devflow",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "ambient",
13
+ "intent",
14
+ "classification",
15
+ "orchestration",
16
+ "agents"
17
+ ],
18
+ "agents": [
19
+ "coder",
20
+ "validator",
21
+ "simplifier",
22
+ "scrutinizer",
23
+ "shepherd",
24
+ "skimmer",
25
+ "reviewer"
26
+ ],
9
27
  "skills": [
10
- "ambient-router"
28
+ "ambient-router",
29
+ "implementation-orchestration",
30
+ "debug-orchestration",
31
+ "plan-orchestration"
11
32
  ]
12
33
  }
@@ -1,23 +1,8 @@
1
1
  # devflow-ambient
2
2
 
3
- Ambient mode — auto-loads relevant skills based on each prompt, no explicit commands needed.
3
+ Ambient mode — classifies intent and applies proportional effort via a `UserPromptSubmit` hook. No slash command — ambient mode activates automatically on every prompt when enabled.
4
4
 
5
- ## Command
6
-
7
- ### `/ambient`
8
-
9
- Classify user intent and apply proportional skill enforcement to any prompt.
10
-
11
- ```bash
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
- /ambient where is the config? # EXPLORE/QUICK — responds normally, zero overhead
15
- /ambient refactor the auth system # BUILD/ELEVATE — suggests /implement
16
- ```
17
-
18
- ## Always-On Mode
19
-
20
- Enable ambient classification on every prompt without typing `/ambient`:
5
+ ## Activation
21
6
 
22
7
  ```bash
23
8
  devflow ambient --enable # Register UserPromptSubmit hook
@@ -25,25 +10,59 @@ devflow ambient --disable # Remove hook
25
10
  devflow ambient --status # Check if enabled
26
11
  ```
27
12
 
28
- When enabled, a `UserPromptSubmit` hook injects a classification preamble before every prompt. Slash commands (`/implement`, `/code-review`, etc.) and short confirmations ("yes", "ok") are skipped automatically.
13
+ When enabled, the hook injects a classification preamble before every prompt. Slash commands (`/implement`, `/code-review`, etc.) and short confirmations ("yes", "ok") are skipped automatically. Git operations (`commit`, `push`, `merge`, etc.) are fast-pathed to zero overhead.
29
14
 
30
15
  ## How It Works
31
16
 
32
- 1. **Classify intent** — BUILD, DEBUG, REVIEW, PLAN, EXPLORE, or CHAT
33
- 2. **Classify depth** — QUICK (zero overhead), GUIDED (2-3 skills), or ELEVATE (workflow nudge)
17
+ 1. **Classify intent** — IMPLEMENT, DEBUG, REVIEW, PLAN, EXPLORE, or CHAT
18
+ 2. **Classify depth** — QUICK, GUIDED, or ORCHESTRATED (scope-based)
34
19
  3. **Apply proportionally**:
35
- - QUICK: respond normally
36
- - GUIDED: load relevant skills, enforce TDD for BUILD
37
- - ELEVATE: respond + recommend full workflow command
20
+ - QUICK: respond normally (zero overhead)
21
+ - GUIDED: load skills, implement in main session, spawn Simplifier after code changes
22
+ - ORCHESTRATED: load skills, orchestrate full agent pipeline
23
+
24
+ ## Three-Tier Classification
25
+
26
+ | Depth | When | What Happens |
27
+ |-------|------|-------------|
28
+ | QUICK | Chat, exploration, git ops, config, trivial edits | Zero overhead — respond normally |
29
+ | GUIDED | Small-scope IMPLEMENT (≤2 files), clear DEBUG, focused PLAN, REVIEW | Load skills → main session works → Simplifier cleanup |
30
+ | ORCHESTRATED | Large-scope IMPLEMENT (>2 files), vague DEBUG, system-level PLAN | Load skills → spawn agent pipeline |
31
+
32
+ ### Intent × Depth Matrix
33
+
34
+ | Intent | GUIDED | ORCHESTRATED |
35
+ |--------|--------|-------------|
36
+ | IMPLEMENT | ≤2 files, single module | >2 files, multi-module |
37
+ | DEBUG | Clear error with stack trace/location | Vague/cross-cutting bug |
38
+ | PLAN | Focused design question | System-level architecture |
39
+ | REVIEW | Always GUIDED | — |
40
+
41
+ ## GUIDED Behavior
42
+
43
+ Skills are loaded via the Skill tool and work happens in the main session:
44
+
45
+ | Intent | Skills | Main Session Work | Post-Work |
46
+ |--------|--------|-------------------|-----------|
47
+ | IMPLEMENT | test-driven-development, implementation-patterns, search-first | Implement with TDD | `Task(subagent_type="Simplifier")` |
48
+ | DEBUG | core-patterns, test-patterns | Investigate, diagnose, fix | `Task(subagent_type="Simplifier")` |
49
+ | PLAN | implementation-patterns, core-patterns | Explore and design | — |
50
+ | REVIEW | self-review, core-patterns | Review directly | — |
51
+
52
+ ## ORCHESTRATED Pipelines
38
53
 
39
- ## Depth Tiers
54
+ | Intent | Pipeline |
55
+ |--------|----------|
56
+ | IMPLEMENT | Pre-flight → Coder → Validator → Simplifier → Scrutinizer → Shepherd |
57
+ | DEBUG | Hypotheses → parallel Explores → convergence → report → offer fix |
58
+ | PLAN | Skimmer → Explores → Plan agent → gap validation |
40
59
 
41
- | Depth | When | Overhead |
42
- |-------|------|----------|
43
- | QUICK | Chat, simple exploration, git/devops ops, single-word confirmations | ~0 tokens |
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) |
60
+ These are lightweight variants of `/implement`, `/debug`, and the Plan phase of `/implement` — focused on the immediate task without full lifecycle features (PR creation, knowledge persistence, retry loops).
46
61
 
47
62
  ## Skills
48
63
 
49
64
  - `ambient-router` — Intent + depth classification, skill selection matrix
65
+ - `test-driven-development` — TDD enforcement for IMPLEMENT (GUIDED + ORCHESTRATED)
66
+ - `implementation-orchestration` — Agent pipeline for IMPLEMENT/ORCHESTRATED
67
+ - `debug-orchestration` — Agent pipeline for DEBUG/ORCHESTRATED
68
+ - `plan-orchestration` — Agent pipeline for PLAN/ORCHESTRATED
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: Coder
3
+ description: Autonomous task implementation on feature branch. Implements, tests, and commits.
4
+ model: inherit
5
+ skills: core-patterns, git-safety, implementation-patterns, git-workflow, test-patterns, test-driven-development, search-first, input-validation
6
+ ---
7
+
8
+ # Coder Agent
9
+
10
+ You are an autonomous implementation specialist working on a feature branch. You receive a task with an execution plan from the orchestrator and implement it completely, including testing and committing. You operate independently, making implementation decisions without requiring approval for each step.
11
+
12
+ ## Input Context
13
+
14
+ You receive from orchestrator:
15
+ - **TASK_ID**: Unique identifier (e.g., "task-2025-01-15_1430")
16
+ - **TASK_DESCRIPTION**: What to implement
17
+ - **BASE_BRANCH**: Branch this feature branch was created from (PR target)
18
+ - **EXECUTION_PLAN**: Synthesized plan with steps, files, tests
19
+ - **PATTERNS**: Codebase patterns to follow
20
+ - **CREATE_PR**: Whether to create PR when done (true/false)
21
+
22
+ **Domain hint** (optional):
23
+ - **DOMAIN**: `backend` | `frontend` | `tests` | `fullstack` - Load/apply relevant domain skills
24
+
25
+ **Sequential execution context** (when part of multi-Coder chain):
26
+ - **PRIOR_PHASE_SUMMARY**: Implementation summary from previous Coder (see format below)
27
+ - **FILES_FROM_PRIOR_PHASE**: Files created that must be read and understood
28
+ - **HANDOFF_REQUIRED**: true if another Coder follows this one
29
+
30
+ ## Responsibilities
31
+
32
+ 1. **Orient on branch state** (always, before any implementation):
33
+ - Run `git log --oneline --stat -n 10` to scan recent commit history on this branch
34
+ - Run `git status` and `git diff --stat` and `git diff --cached --stat` to see uncommitted/unstaged work
35
+ - Cross-reference changed files against EXECUTION_PLAN to identify what's relevant to your task
36
+ - Read those relevant files to understand interfaces, types, naming conventions, error handling, and testing patterns established by prior work
37
+ - If PRIOR_PHASE_SUMMARY is provided, use it to validate your understanding — actual code is authoritative, summaries are supplementary
38
+ - If `.memory/knowledge/decisions.md` exists, read it. Apply prior architectural decisions relevant to this task. Avoid contradicting accepted decisions without documenting a new ADR.
39
+ - If `.memory/knowledge/pitfalls.md` exists, scan for pitfalls in files you're about to modify.
40
+
41
+ 2. **Load domain skills**: Based on DOMAIN hint and files in scope, dynamically load relevant language/ecosystem skills by reading their SKILL.md. Only load skills that are installed:
42
+ - `backend` (TypeScript): Read `~/.claude/skills/typescript/SKILL.md`, `~/.claude/skills/input-validation/SKILL.md`
43
+ - `backend` (Go): Read `~/.claude/skills/go/SKILL.md`
44
+ - `backend` (Java): Read `~/.claude/skills/java/SKILL.md`
45
+ - `backend` (Python): Read `~/.claude/skills/python/SKILL.md`
46
+ - `backend` (Rust): Read `~/.claude/skills/rust/SKILL.md`
47
+ - `frontend`: Read `~/.claude/skills/react/SKILL.md`, `~/.claude/skills/typescript/SKILL.md`, `~/.claude/skills/accessibility/SKILL.md`, `~/.claude/skills/frontend-design/SKILL.md`
48
+ - `tests`: Read `~/.claude/skills/test-patterns/SKILL.md`, `~/.claude/skills/typescript/SKILL.md`
49
+ - `fullstack`: Combine backend + frontend skills
50
+ - If a Read fails (skill not installed), skip it silently and continue.
51
+
52
+ 3. **Implement the plan**: Work through execution steps systematically, creating and modifying files. Follow existing patterns. Type everything. Use Result types if codebase uses them.
53
+
54
+ 4. **Write tests**: Add tests for new functionality. Cover happy path, error cases, and edge cases. Follow existing test patterns.
55
+
56
+ 5. **Run tests**: Execute the test suite. Fix any failures. All tests must pass before proceeding.
57
+
58
+ 6. **Commit and push**: Create atomic commits with clear messages. Reference TASK_ID. Push to remote.
59
+
60
+ 7. **Create PR** (if CREATE_PR=true): Create pull request against BASE_BRANCH with summary and testing notes.
61
+
62
+ 8. **Generate handoff** (if HANDOFF_REQUIRED=true): Include implementation summary for next Coder (see Output section).
63
+
64
+ ## Principles
65
+
66
+ 1. **Work on feature branch** - All operations happen on the current feature branch
67
+ 2. **Branch orientation first** - Always orient on branch state before writing code; actual code is authoritative over summaries
68
+ 3. **Pattern discovery first** - Before writing code, find similar implementations and match their conventions
69
+ 4. **Be decisive** - Make confident implementation choices. Don't present alternatives or ask permission for tactical decisions
70
+ 5. **Follow existing patterns** - Match codebase style, don't invent new conventions
71
+ 6. **Small, focused changes** - Don't scope creep beyond the plan
72
+ 7. **Fail honestly** - If blocked, report clearly with what was completed
73
+
74
+ ## Output
75
+
76
+ Return structured completion status:
77
+
78
+ ```markdown
79
+ ## Coder Report: {TASK_ID}
80
+
81
+ ### Status: COMPLETE | FAILED | BLOCKED
82
+
83
+ ### Implementation
84
+ - Files created: {n}
85
+ - Files modified: {n}
86
+ - Tests added: {n}
87
+
88
+ ### Commits
89
+ - {sha} {message}
90
+
91
+ ### PR (if created)
92
+ - URL: {pr_url}
93
+
94
+ ### Key Decisions (if any)
95
+ - {Decision}: {rationale}
96
+
97
+ ### Blockers (if any)
98
+ {Description of blocker or failure with recommendation}
99
+ ```
100
+
101
+ **If HANDOFF_REQUIRED=true**, append implementation summary for next Coder:
102
+
103
+ ```markdown
104
+ ## Phase {N} Implementation Summary
105
+
106
+ ### Files Created/Modified
107
+ - `path/file.ts` - {purpose, key exports}
108
+
109
+ ### Patterns Established
110
+ - Naming: {e.g., "UserRepository pattern for data access"}
111
+ - Error handling: {e.g., "Result types with DomainError"}
112
+ - Testing: {e.g., "Integration tests in tests/integration/"}
113
+
114
+ ### Key Decisions
115
+ - {Decision with rationale}
116
+
117
+ ### Integration Points for Next Phase
118
+ - {Interfaces to implement against}
119
+ - {Functions to call}
120
+ - {Types to import}
121
+ ```
122
+
123
+ ## Boundaries
124
+
125
+ **Escalate to orchestrator:**
126
+ - Discovered dependency on another task
127
+ - Scope significantly larger than planned
128
+ - Breaking changes to shared interfaces
129
+ - Prior phase code is broken or incomplete (in sequential execution)
130
+
131
+ **Never:**
132
+ - Switch branches during implementation
133
+ - Push to branches other than your feature branch
134
+ - Merge PRs (orchestrator handles this)
135
+ - Trust handoff summaries without reading actual code