devflow-kit 1.6.0 → 1.7.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 (39) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +4 -1
  3. package/dist/commands/init.js +7 -3
  4. package/dist/commands/uninstall.d.ts +9 -0
  5. package/dist/commands/uninstall.js +60 -4
  6. package/dist/utils/post-install.js +0 -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 +1 -1
  10. package/plugins/devflow-ambient/agents/skimmer.md +71 -21
  11. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +4 -1
  12. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +1 -1
  13. package/plugins/devflow-code-review/.claude-plugin/plugin.json +1 -1
  14. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +1 -1
  15. package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +0 -1
  16. package/plugins/devflow-debug/.claude-plugin/plugin.json +1 -1
  17. package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
  18. package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
  19. package/plugins/devflow-implement/.claude-plugin/plugin.json +1 -1
  20. package/plugins/devflow-implement/agents/skimmer.md +71 -21
  21. package/plugins/devflow-implement/commands/implement-teams.md +1 -1
  22. package/plugins/devflow-implement/commands/implement.md +1 -1
  23. package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
  24. package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
  25. package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
  26. package/plugins/devflow-resolve/.claude-plugin/plugin.json +1 -1
  27. package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
  28. package/plugins/devflow-self-review/.claude-plugin/plugin.json +1 -1
  29. package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
  30. package/plugins/devflow-specify/agents/skimmer.md +71 -21
  31. package/plugins/devflow-specify/commands/specify-teams.md +1 -1
  32. package/plugins/devflow-specify/commands/specify.md +1 -1
  33. package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
  34. package/scripts/hooks/ambient-prompt +5 -4
  35. package/scripts/hooks/background-memory-update +114 -85
  36. package/scripts/hooks/session-start-memory +1 -17
  37. package/shared/agents/skimmer.md +71 -21
  38. package/shared/skills/ambient-router/SKILL.md +4 -1
  39. package/shared/skills/docs-framework/SKILL.md +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ 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.7.0] - 2026-03-20
9
+
10
+ ### Added
11
+ - **Version update notification** — statusline shows magenta `⬆ X.Y.Z` badge when newer devflow-kit is available (24h cached npm check, fully async)
12
+
13
+ ### Fixed
14
+ - **Skimmer agent** — enforce rskim usage via `tools: ["Bash", "Read"]` platform restriction and strict sequential workflow; prevents fallback to Grep/Glob
15
+ - **Init multiselect** — remove redundant "(optional)" suffix from plugin hints
16
+ - **Init multiselect** — hide `audit-claude` plugin (not production-ready; still installable via `--plugin=audit-claude`)
17
+ - **Statusline portability** — replace macOS-only `stat -f %m` with portable `get_mtime()` helper (macOS + Linux)
18
+
19
+ ---
20
+
21
+ ## [1.6.1] - 2026-03-20
22
+
23
+ ### Added
24
+ - **`--dry-run` flag** for `devflow uninstall` — preview removal plan without deleting anything
25
+
26
+ ### Fixed
27
+ - **Ambient skill loading** — removed `allowed-tools` restriction from ambient-router so skills actually load via the Skill tool
28
+ - **Ambient hook preamble** — explicit Skill tool instruction ensures models invoke skills rather than responding directly
29
+ - **Init wizard** — hide `devflow-ambient` from plugin multiselect (auto-included via ambient prompt)
30
+ - **Working memory** — replaced broken `--resume` with transcript-based background updater
31
+
32
+ ---
33
+
8
34
  ## [1.6.0] - 2026-03-19
9
35
 
10
36
  ### Added
@@ -902,6 +928,8 @@ devflow init
902
928
  ---
903
929
 
904
930
  [Unreleased]: https://github.com/dean0x/devflow/compare/v1.4.0...HEAD
931
+ [1.7.0]: https://github.com/dean0x/devflow/compare/v1.6.1...v1.7.0
932
+ [1.6.1]: https://github.com/dean0x/devflow/compare/v1.6.0...v1.6.1
905
933
  [1.6.0]: https://github.com/dean0x/devflow/compare/v1.5.0...v1.6.0
906
934
  [1.5.0]: https://github.com/dean0x/devflow/compare/v1.4.0...v1.5.0
907
935
  [1.4.0]: https://github.com/dean0x/devflow/compare/v1.3.3...v1.4.0
package/README.md CHANGED
@@ -24,6 +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
+ - **Version notifications** — statusline shows an update badge when a newer version is available
27
28
  - **35 quality skills** — 9 auto-activating core, 8 optional language/ecosystem, plus specialized review, agent, and orchestration skills
28
29
 
29
30
  ## Quick Start
@@ -197,7 +198,6 @@ DevFlow creates project documentation in `.docs/` and working memory in `.memory
197
198
 
198
199
  .memory/
199
200
  ├── WORKING-MEMORY.md # Auto-maintained by Stop hook
200
- ├── PROJECT-PATTERNS.md # Accumulated patterns across sessions
201
201
  ├── backup.json # Pre-compact git state snapshot
202
202
  └── knowledge/
203
203
  ├── decisions.md # Architectural decisions (ADR-NNN, append-only)
@@ -255,7 +255,10 @@ Session context is saved and restored automatically via Working Memory hooks —
255
255
  | Option | Description |
256
256
  |--------|-------------|
257
257
  | `--scope <user\|local>` | Uninstall scope (default: user) |
258
+ | `--plugin <names>` | Comma-separated plugin names to uninstall selectively |
258
259
  | `--keep-docs` | Preserve .docs/ directory |
260
+ | `--dry-run` | Show what would be removed without deleting anything |
261
+ | `--verbose` | Show detailed uninstall output |
259
262
 
260
263
  ## Building from Source
261
264
 
@@ -121,14 +121,14 @@ export const initCommand = new Command('init')
121
121
  }
122
122
  else if (process.stdin.isTTY) {
123
123
  const choices = DEVFLOW_PLUGINS
124
- .filter(pl => pl.name !== 'devflow-core-skills')
124
+ .filter(pl => pl.name !== 'devflow-core-skills' && pl.name !== 'devflow-ambient' && pl.name !== 'devflow-audit-claude')
125
125
  .map(pl => ({
126
126
  value: pl.name,
127
127
  label: pl.name.replace('devflow-', ''),
128
- hint: pl.description + (pl.optional ? ' (optional)' : ''),
128
+ hint: pl.description,
129
129
  }));
130
130
  const preSelected = DEVFLOW_PLUGINS
131
- .filter(pl => !pl.optional && pl.name !== 'devflow-core-skills')
131
+ .filter(pl => !pl.optional && pl.name !== 'devflow-core-skills' && pl.name !== 'devflow-ambient')
132
132
  .map(pl => pl.name);
133
133
  const pluginSelection = await p.multiselect({
134
134
  message: 'Select plugins to install',
@@ -284,6 +284,10 @@ export const initCommand = new Command('init')
284
284
  if (pluginsToInstall.length > 0 && coreSkillsPlugin && !pluginsToInstall.includes(coreSkillsPlugin)) {
285
285
  pluginsToInstall = [coreSkillsPlugin, ...pluginsToInstall];
286
286
  }
287
+ const ambientPlugin = DEVFLOW_PLUGINS.find(p => p.name === 'devflow-ambient');
288
+ if (ambientEnabled && ambientPlugin && !pluginsToInstall.includes(ambientPlugin)) {
289
+ pluginsToInstall.push(ambientPlugin);
290
+ }
287
291
  const { skillsMap, agentsMap } = buildAssetMaps(pluginsToInstall);
288
292
  // Install: try native CLI first, fall back to file copy
289
293
  const cliAvailable = isClaudeCliAvailable();
@@ -9,5 +9,14 @@ export declare function computeAssetsToRemove(selectedPlugins: PluginDefinition[
9
9
  agents: string[];
10
10
  commands: string[];
11
11
  };
12
+ /**
13
+ * Format a dry-run plan showing what would be removed.
14
+ * Pure function — no I/O, fully testable.
15
+ */
16
+ export declare function formatDryRunPlan(assets: {
17
+ skills: string[];
18
+ agents: string[];
19
+ commands: string[];
20
+ }, extras?: string[]): string;
12
21
  export declare const uninstallCommand: Command;
13
22
  //# sourceMappingURL=uninstall.d.ts.map
@@ -2,7 +2,7 @@ import { Command } from 'commander';
2
2
  import { promises as fs } from 'fs';
3
3
  import * as path from 'path';
4
4
  import { fileURLToPath } from 'url';
5
- import { execSync } from 'child_process';
5
+ import { execFileSync } from 'child_process';
6
6
  import * as p from '@clack/prompts';
7
7
  import color from 'picocolors';
8
8
  import { getInstallationPaths, getClaudeDirectory, getDevFlowDirectory, getManagedSettingsPath } from '../utils/paths.js';
@@ -46,13 +46,37 @@ export function computeAssetsToRemove(selectedPlugins, allPlugins) {
46
46
  }
47
47
  return { skills, agents, commands };
48
48
  }
49
+ /**
50
+ * Format a dry-run plan showing what would be removed.
51
+ * Pure function — no I/O, fully testable.
52
+ */
53
+ export function formatDryRunPlan(assets, extras) {
54
+ const skills = [...new Set(assets.skills)];
55
+ const agents = [...new Set(assets.agents)];
56
+ const commands = [...new Set(assets.commands)];
57
+ const hasAssets = skills.length > 0 || agents.length > 0 || commands.length > 0;
58
+ const hasExtras = extras && extras.length > 0;
59
+ if (!hasAssets && !hasExtras) {
60
+ return 'Nothing to remove.';
61
+ }
62
+ const lines = [];
63
+ if (skills.length > 0)
64
+ lines.push(`Skills (${skills.length}): ${skills.join(', ')}`);
65
+ if (agents.length > 0)
66
+ lines.push(`Agents (${agents.length}): ${agents.join(', ')}`);
67
+ if (commands.length > 0)
68
+ lines.push(`Commands (${commands.length}): ${commands.join(', ')}`);
69
+ if (hasExtras)
70
+ lines.push(`Extras: ${extras.join(', ')}`);
71
+ return lines.join('\n');
72
+ }
49
73
  /**
50
74
  * Uninstall plugin using Claude CLI
51
75
  */
52
76
  function uninstallPluginViaCli(scope) {
53
77
  try {
54
78
  const cliScope = scope === 'local' ? 'project' : 'user';
55
- execSync(`claude plugin uninstall devflow --scope ${cliScope}`, { stdio: 'inherit' });
79
+ execFileSync('claude', ['plugin', 'uninstall', 'devflow', '--scope', cliScope], { stdio: 'inherit' });
56
80
  return true;
57
81
  }
58
82
  catch {
@@ -77,8 +101,10 @@ export const uninstallCommand = new Command('uninstall')
77
101
  .option('--scope <type>', 'Uninstall from specific scope only (default: auto-detect all)', /^(user|local)$/i)
78
102
  .option('--plugin <names>', 'Uninstall specific plugin(s), comma-separated (e.g., implement,review)')
79
103
  .option('--verbose', 'Show detailed uninstall output')
104
+ .option('--dry-run', 'Show what would be removed without actually removing anything')
80
105
  .action(async (options) => {
81
- p.intro(color.bgRed(color.white(' Uninstalling DevFlow ')));
106
+ const dryRun = options.dryRun ?? false;
107
+ p.intro(color.bgRed(color.white(dryRun ? ' DevFlow Uninstall (dry run) ' : ' Uninstalling DevFlow ')));
82
108
  const verbose = options.verbose ?? false;
83
109
  // Parse plugin selection
84
110
  let selectedPluginNames = [];
@@ -121,7 +147,7 @@ export const uninstallCommand = new Command('uninstall')
121
147
  p.log.info('Checked user scope (~/.claude/) and local scope (git-root/.claude/)');
122
148
  process.exit(1);
123
149
  }
124
- if (scopesToUninstall.length > 1) {
150
+ if (scopesToUninstall.length > 1 && !dryRun) {
125
151
  if (process.stdin.isTTY) {
126
152
  const scopeChoice = await p.select({
127
153
  message: 'Found DevFlow in multiple scopes. Uninstall from:',
@@ -144,6 +170,36 @@ export const uninstallCommand = new Command('uninstall')
144
170
  }
145
171
  }
146
172
  }
173
+ // === DRY RUN: show plan and exit ===
174
+ if (dryRun) {
175
+ p.log.info(`Scope(s): ${scopesToUninstall.join(', ')} (dry-run shows all detected scopes)`);
176
+ const assets = isSelectiveUninstall
177
+ ? computeAssetsToRemove(selectedPlugins, DEVFLOW_PLUGINS)
178
+ : computeAssetsToRemove(DEVFLOW_PLUGINS, DEVFLOW_PLUGINS);
179
+ // Detect extras that would be cleaned up (full uninstall only)
180
+ const extras = [];
181
+ if (!isSelectiveUninstall) {
182
+ const docsDir = path.join(process.cwd(), '.docs');
183
+ const memoryDir = path.join(process.cwd(), '.memory');
184
+ try {
185
+ await fs.access(docsDir);
186
+ extras.push('.docs/');
187
+ }
188
+ catch { /* noop */ }
189
+ try {
190
+ await fs.access(memoryDir);
191
+ extras.push('.memory/');
192
+ }
193
+ catch { /* noop */ }
194
+ extras.push('hooks in settings.json', 'scripts in ~/.devflow/');
195
+ }
196
+ const plan = formatDryRunPlan(assets, extras.length > 0 ? extras : undefined);
197
+ for (const line of plan.split('\n')) {
198
+ p.log.info(line);
199
+ }
200
+ p.outro(color.dim('No changes made (dry run)'));
201
+ return;
202
+ }
147
203
  const cliAvailable = isClaudeCliAvailable();
148
204
  // Uninstall from each scope
149
205
  for (const scope of scopesToUninstall) {
@@ -448,7 +448,6 @@ export async function migrateMemoryFiles(verbose, cwd) {
448
448
  const memoryDir = path.join(root, '.memory');
449
449
  const migrations = [
450
450
  { src: path.join(docsDir, 'WORKING-MEMORY.md'), dest: path.join(memoryDir, 'WORKING-MEMORY.md') },
451
- { src: path.join(docsDir, 'patterns.md'), dest: path.join(memoryDir, 'PROJECT-PATTERNS.md') },
452
451
  { src: path.join(docsDir, 'working-memory-backup.json'), dest: path.join(memoryDir, 'backup.json') },
453
452
  ];
454
453
  let migrated = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devflow-kit",
3
- "version": "1.6.0",
3
+ "version": "1.7.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.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -1,39 +1,88 @@
1
1
  ---
2
2
  name: Skimmer
3
- description: Codebase orientation using skim to identify relevant files, functions, and patterns for a feature or task
3
+ description: Codebase orientation using rskim to identify relevant files, functions, and patterns for a feature or task
4
+ tools: ["Bash", "Read"]
4
5
  skills: knowledge-persistence
5
6
  model: inherit
6
7
  ---
7
8
 
8
9
  # Skimmer Agent
9
10
 
10
- You are a codebase orientation specialist using `skim` to efficiently understand codebases. Extract structure without implementation noise - find entry points, data flow, and integration points quickly.
11
+ You are a codebase orientation specialist. You use `npx rskim` exclusively for code exploration — never Grep, Glob, or manual file searches. Your output gives implementation agents a clear map of relevant files, functions, and integration points.
11
12
 
12
13
  ## Input Context
13
14
 
14
15
  You receive from orchestrator:
15
16
  - **TASK_DESCRIPTION**: What feature/task needs to be implemented or understood
16
17
 
17
- ## Responsibilities
18
+ ## Workflow
18
19
 
19
- 1. **Get project overview** - Identify project type, entry points, source directories
20
- 2. **Skim key directories** - Extract structure from src/, lib/, or app/ with `npx rskim --mode structure --show-stats`
21
- 3. **Search for task-relevant code** - Find files matching task keywords
22
- 4. **Identify integration points** - Exports, entry points, import patterns
23
- 5. **Generate orientation summary** - Structured output for implementation planning
24
- 6. **Check project knowledge** - If `.memory/knowledge/decisions.md` exists, read its `<!-- TL;DR: ... -->` first-line comment and include active decision count in orientation under "### Active Decisions". Only the TL;DR is read here (not full entries) — this is intentional for token efficiency; agents that need full entries read the file themselves.
20
+ Execute these steps in order. Do NOT skip steps or reorder.
25
21
 
26
- ## Tool Invocation
22
+ ### Step 1: Project Overview
27
23
 
28
- Always invoke skim via `npx rskim`. This works whether or not skim is globally installed npx downloads and caches it transparently.
24
+ Run `ls` on the project root via Bash to identify source directories and project type. Then Read the project manifest (`package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, etc.) to understand the project.
29
25
 
30
- ## Skim Modes
26
+ **CRITICAL**: Never run `npx rskim .` or `npx rskim` on the repo root — it scans ALL files including `node_modules/` and produces millions of tokens. Always target specific source directories.
31
27
 
32
- | Mode | Use When | Command |
33
- |------|----------|---------|
34
- | `structure` | High-level overview | `npx rskim src/ --mode structure` |
35
- | `signatures` | Need API/function details | `npx rskim src/ --mode signatures` |
36
- | `types` | Working with type definitions | `npx rskim src/ --mode types` |
28
+ ### Step 2: Primary Source Skim
29
+
30
+ Run rskim on the main source directory with a token budget:
31
+
32
+ ```bash
33
+ npx rskim src/ --tokens 15000 --show-stats
34
+ ```
35
+
36
+ The `--tokens` flag auto-cascades through modes (full → minimal → structure → signatures → types) to fit within the budget. Let it choose the mode — do not specify `--mode` when using `--tokens`.
37
+
38
+ If `--tokens` flag errors (older rskim version), fall back to:
39
+ ```bash
40
+ npx rskim src/ --mode structure --show-stats
41
+ ```
42
+
43
+ ### Step 3: Secondary Directories (if relevant to task)
44
+
45
+ Skim additional directories with smaller budgets:
46
+
47
+ ```bash
48
+ npx rskim tests/ --tokens 5000 --show-stats
49
+ npx rskim scripts/ --tokens 5000 --show-stats
50
+ ```
51
+
52
+ Only skim directories relevant to the task description.
53
+
54
+ ### Step 4: Deep Inspection
55
+
56
+ For specific files needing detailed view, use rskim with full mode:
57
+
58
+ ```bash
59
+ npx rskim path/to/file.ts --mode full
60
+ ```
61
+
62
+ Use this instead of Read for code files.
63
+
64
+ ### Step 5: Project Knowledge
65
+
66
+ If `.memory/knowledge/decisions.md` exists, Read its `<!-- TL;DR: ... -->` first-line comment and include active decision count in orientation under "### Active Decisions". Only the TL;DR is read here — this is intentional for token efficiency.
67
+
68
+ ### Step 6: Generate Summary
69
+
70
+ Produce the orientation summary in the output format below.
71
+
72
+ ## rskim Reference
73
+
74
+ | Flag | Effect |
75
+ |------|--------|
76
+ | `--tokens N` | Token budget — auto-selects best mode to fit within N tokens |
77
+ | `--mode minimal` | Maximum compression (~85-90% reduction) |
78
+ | `--mode structure` | Architecture overview (~60-70% reduction) |
79
+ | `--mode signatures` | API/function details (~85-92% reduction) |
80
+ | `--mode types` | Type definitions only (~90-95% reduction) |
81
+ | `--mode full` | Complete file content (0% reduction) |
82
+ | `--show-stats` | Show original vs skimmed token counts |
83
+ | `--max-lines N` | AST-aware truncation (keeps types/signatures over imports/bodies) |
84
+
85
+ **Preferred**: Use `--tokens N` instead of choosing modes manually.
37
86
 
38
87
  ## Output
39
88
 
@@ -41,10 +90,10 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
41
90
  ## Codebase Orientation
42
91
 
43
92
  ### Project Type
44
- {Language/framework from package.json, Cargo.toml, etc.}
93
+ {Language/framework from manifest}
45
94
 
46
95
  ### Token Statistics
47
- {From skim --show-stats: original vs skimmed tokens}
96
+ {From rskim --show-stats: original vs skimmed tokens}
48
97
 
49
98
  ### Directory Structure
50
99
  | Directory | Purpose |
@@ -78,16 +127,17 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
78
127
  1. **Speed over depth** - Get oriented quickly, don't deep dive everything
79
128
  2. **Pattern discovery first** - Find existing patterns before recommending approaches
80
129
  3. **Be decisive** - Make confident recommendations about where to integrate
81
- 4. **Token efficiency** - Use skim stats to show compression ratio
130
+ 4. **Token efficiency** - Use rskim token budgets and stats to show compression ratio
82
131
  5. **Task-focused** - Only explore what's relevant to the task
83
132
 
84
133
  ## Boundaries
85
134
 
86
135
  **Handle autonomously:**
87
- - Directory structure exploration
136
+ - Directory structure exploration via rskim
88
137
  - Pattern identification
89
138
  - Generating orientation summaries
90
139
 
91
140
  **Escalate to orchestrator:**
141
+ - If `npx rskim` fails, report the error (do not attempt manual fallbacks with other tools) — orchestrators should spawn an ad-hoc Explore agent if Skimmer reports rskim failure
92
142
  - No source directories found (ask user for structure)
93
143
  - Ambiguous project structure (report findings, ask for clarification)
@@ -2,7 +2,7 @@
2
2
  name: ambient-router
3
3
  description: This skill should be used when classifying user intent for ambient mode, auto-loading relevant skills without explicit command invocation. Used by the always-on UserPromptSubmit hook.
4
4
  user-invocable: false
5
- allowed-tools: Read, Grep, Glob
5
+ # No allowed-tools: orchestrator requires unrestricted access (Skill, Agent, Edit, Write, Bash)
6
6
  ---
7
7
 
8
8
  # Ambient Router
@@ -89,6 +89,9 @@ When classification is GUIDED or ORCHESTRATED, skill loading is NON-NEGOTIABLE.
89
89
  Do not rationalize skipping skills. Do not respond without loading them first.
90
90
  BLOCKING REQUIREMENT: Invoke each selected skill using the Skill tool before proceeding.
91
91
  For IMPLEMENT intent, enforce TDD: write the failing test before ANY production code.
92
+ NOTE: Skills loaded in the main session via ambient mode are reference patterns only —
93
+ their allowed-tools metadata does NOT restrict your tool access. You retain full access
94
+ to all tools (Edit, Write, Bash, Agent, etc.) for implementation work.
92
95
  </IMPORTANT>
93
96
 
94
97
  - **QUICK:** Respond directly. No preamble, no classification statement.
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -38,7 +38,6 @@ All generated documentation lives under `.docs/` in the project root:
38
38
 
39
39
  .memory/
40
40
  ├── WORKING-MEMORY.md # Auto-maintained by Stop hook (overwritten)
41
- ├── PROJECT-PATTERNS.md # Accumulated patterns (merged across sessions)
42
41
  ├── backup.json # Pre-compact git state snapshot
43
42
  └── knowledge/
44
43
  ├── decisions.md # Architectural decisions (ADR-NNN format)
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.6.0",
7
+ "version": "1.7.0",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -1,39 +1,88 @@
1
1
  ---
2
2
  name: Skimmer
3
- description: Codebase orientation using skim to identify relevant files, functions, and patterns for a feature or task
3
+ description: Codebase orientation using rskim to identify relevant files, functions, and patterns for a feature or task
4
+ tools: ["Bash", "Read"]
4
5
  skills: knowledge-persistence
5
6
  model: inherit
6
7
  ---
7
8
 
8
9
  # Skimmer Agent
9
10
 
10
- You are a codebase orientation specialist using `skim` to efficiently understand codebases. Extract structure without implementation noise - find entry points, data flow, and integration points quickly.
11
+ You are a codebase orientation specialist. You use `npx rskim` exclusively for code exploration — never Grep, Glob, or manual file searches. Your output gives implementation agents a clear map of relevant files, functions, and integration points.
11
12
 
12
13
  ## Input Context
13
14
 
14
15
  You receive from orchestrator:
15
16
  - **TASK_DESCRIPTION**: What feature/task needs to be implemented or understood
16
17
 
17
- ## Responsibilities
18
+ ## Workflow
18
19
 
19
- 1. **Get project overview** - Identify project type, entry points, source directories
20
- 2. **Skim key directories** - Extract structure from src/, lib/, or app/ with `npx rskim --mode structure --show-stats`
21
- 3. **Search for task-relevant code** - Find files matching task keywords
22
- 4. **Identify integration points** - Exports, entry points, import patterns
23
- 5. **Generate orientation summary** - Structured output for implementation planning
24
- 6. **Check project knowledge** - If `.memory/knowledge/decisions.md` exists, read its `<!-- TL;DR: ... -->` first-line comment and include active decision count in orientation under "### Active Decisions". Only the TL;DR is read here (not full entries) — this is intentional for token efficiency; agents that need full entries read the file themselves.
20
+ Execute these steps in order. Do NOT skip steps or reorder.
25
21
 
26
- ## Tool Invocation
22
+ ### Step 1: Project Overview
27
23
 
28
- Always invoke skim via `npx rskim`. This works whether or not skim is globally installed npx downloads and caches it transparently.
24
+ Run `ls` on the project root via Bash to identify source directories and project type. Then Read the project manifest (`package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, etc.) to understand the project.
29
25
 
30
- ## Skim Modes
26
+ **CRITICAL**: Never run `npx rskim .` or `npx rskim` on the repo root — it scans ALL files including `node_modules/` and produces millions of tokens. Always target specific source directories.
31
27
 
32
- | Mode | Use When | Command |
33
- |------|----------|---------|
34
- | `structure` | High-level overview | `npx rskim src/ --mode structure` |
35
- | `signatures` | Need API/function details | `npx rskim src/ --mode signatures` |
36
- | `types` | Working with type definitions | `npx rskim src/ --mode types` |
28
+ ### Step 2: Primary Source Skim
29
+
30
+ Run rskim on the main source directory with a token budget:
31
+
32
+ ```bash
33
+ npx rskim src/ --tokens 15000 --show-stats
34
+ ```
35
+
36
+ The `--tokens` flag auto-cascades through modes (full → minimal → structure → signatures → types) to fit within the budget. Let it choose the mode — do not specify `--mode` when using `--tokens`.
37
+
38
+ If `--tokens` flag errors (older rskim version), fall back to:
39
+ ```bash
40
+ npx rskim src/ --mode structure --show-stats
41
+ ```
42
+
43
+ ### Step 3: Secondary Directories (if relevant to task)
44
+
45
+ Skim additional directories with smaller budgets:
46
+
47
+ ```bash
48
+ npx rskim tests/ --tokens 5000 --show-stats
49
+ npx rskim scripts/ --tokens 5000 --show-stats
50
+ ```
51
+
52
+ Only skim directories relevant to the task description.
53
+
54
+ ### Step 4: Deep Inspection
55
+
56
+ For specific files needing detailed view, use rskim with full mode:
57
+
58
+ ```bash
59
+ npx rskim path/to/file.ts --mode full
60
+ ```
61
+
62
+ Use this instead of Read for code files.
63
+
64
+ ### Step 5: Project Knowledge
65
+
66
+ If `.memory/knowledge/decisions.md` exists, Read its `<!-- TL;DR: ... -->` first-line comment and include active decision count in orientation under "### Active Decisions". Only the TL;DR is read here — this is intentional for token efficiency.
67
+
68
+ ### Step 6: Generate Summary
69
+
70
+ Produce the orientation summary in the output format below.
71
+
72
+ ## rskim Reference
73
+
74
+ | Flag | Effect |
75
+ |------|--------|
76
+ | `--tokens N` | Token budget — auto-selects best mode to fit within N tokens |
77
+ | `--mode minimal` | Maximum compression (~85-90% reduction) |
78
+ | `--mode structure` | Architecture overview (~60-70% reduction) |
79
+ | `--mode signatures` | API/function details (~85-92% reduction) |
80
+ | `--mode types` | Type definitions only (~90-95% reduction) |
81
+ | `--mode full` | Complete file content (0% reduction) |
82
+ | `--show-stats` | Show original vs skimmed token counts |
83
+ | `--max-lines N` | AST-aware truncation (keeps types/signatures over imports/bodies) |
84
+
85
+ **Preferred**: Use `--tokens N` instead of choosing modes manually.
37
86
 
38
87
  ## Output
39
88
 
@@ -41,10 +90,10 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
41
90
  ## Codebase Orientation
42
91
 
43
92
  ### Project Type
44
- {Language/framework from package.json, Cargo.toml, etc.}
93
+ {Language/framework from manifest}
45
94
 
46
95
  ### Token Statistics
47
- {From skim --show-stats: original vs skimmed tokens}
96
+ {From rskim --show-stats: original vs skimmed tokens}
48
97
 
49
98
  ### Directory Structure
50
99
  | Directory | Purpose |
@@ -78,16 +127,17 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
78
127
  1. **Speed over depth** - Get oriented quickly, don't deep dive everything
79
128
  2. **Pattern discovery first** - Find existing patterns before recommending approaches
80
129
  3. **Be decisive** - Make confident recommendations about where to integrate
81
- 4. **Token efficiency** - Use skim stats to show compression ratio
130
+ 4. **Token efficiency** - Use rskim token budgets and stats to show compression ratio
82
131
  5. **Task-focused** - Only explore what's relevant to the task
83
132
 
84
133
  ## Boundaries
85
134
 
86
135
  **Handle autonomously:**
87
- - Directory structure exploration
136
+ - Directory structure exploration via rskim
88
137
  - Pattern identification
89
138
  - Generating orientation summaries
90
139
 
91
140
  **Escalate to orchestrator:**
141
+ - If `npx rskim` fails, report the error (do not attempt manual fallbacks with other tools) — orchestrators should spawn an ad-hoc Explore agent if Skimmer reports rskim failure
92
142
  - No source directories found (ask user for structure)
93
143
  - Ambiguous project structure (report findings, ask for clarification)
@@ -53,7 +53,7 @@ Spawn Skimmer agent for codebase overview:
53
53
  ```
54
54
  Task(subagent_type="Skimmer"):
55
55
  "Orient in codebase for: {task description}
56
- Use skim to identify relevant files, functions, integration points"
56
+ Run rskim on source directories (NOT repo root) to identify relevant files, functions, integration points"
57
57
  ```
58
58
 
59
59
  ### Phase 3: Exploration Team